author | Praneeth Bajjuri <praneeth@ti.com> | |
Fri, 5 Apr 2013 23:05:41 +0000 (18:05 -0500) | ||
committer | Praneeth Bajjuri <praneeth@ti.com> | |
Fri, 5 Apr 2013 23:05:41 +0000 (18:05 -0500) |
* origin/p-ti-linux-3.8.y: (146 commits)
ARM: omap2plus_defconfig: enable ocp2scp driver
Linux 3.8.6
bonding: get netdev_rx_handler_unregister out of locks
smsc75xx: fix jumbo frame support
pch_gbe: fix ip_summed checksum reporting on rx
net: fq_codel: Fix off-by-one error
net: fix the use of this_cpu_ptr
net: ethernet: cpsw: fix erroneous condition in error check
net: add a synchronize_net() in netdev_rx_handler_unregister()
ks8851: Fix interpretation of rxlen field.
ipv6: don't accept node local multicast traffic from the wire
ipv6: don't accept multicast traffic with scope 0
ipv6: fix bad free of addrconf_init_net
fec: Fix the build as module
DM9000B: driver initialization upgrade
atl1e: drop pci-msi support because of packet corruption
aoe: reserve enough headroom on skbs
net: fix *_DIAG_MAX constants
drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue
drivers: net: ethernet: davinci_emac: use netif_wake_queue() while restarting tx queue
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
ARM: omap2plus_defconfig: enable ocp2scp driver
Linux 3.8.6
bonding: get netdev_rx_handler_unregister out of locks
smsc75xx: fix jumbo frame support
pch_gbe: fix ip_summed checksum reporting on rx
net: fq_codel: Fix off-by-one error
net: fix the use of this_cpu_ptr
net: ethernet: cpsw: fix erroneous condition in error check
net: add a synchronize_net() in netdev_rx_handler_unregister()
ks8851: Fix interpretation of rxlen field.
ipv6: don't accept node local multicast traffic from the wire
ipv6: don't accept multicast traffic with scope 0
ipv6: fix bad free of addrconf_init_net
fec: Fix the build as module
DM9000B: driver initialization upgrade
atl1e: drop pci-msi support because of packet corruption
aoe: reserve enough headroom on skbs
net: fix *_DIAG_MAX constants
drivers: net: ethernet: cpsw: use netif_wake_queue() while restarting tx queue
drivers: net: ethernet: davinci_emac: use netif_wake_queue() while restarting tx queue
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
1 | 2 | |||
---|---|---|---|---|
drivers/usb/gadget/udc-core.c | patch | | diff1 | | diff2 | | blob | history |
net/bluetooth/sco.c | patch | | diff1 | | diff2 | | blob | history |
diff --combined drivers/usb/gadget/udc-core.c
index 231580f5c9c78e048fdb299af99358ffa3e4a7f0,34a39076d3b05c2d26eb86cd94c6f6e1c35ba407..0b10575a2fac1eeccaf55c73a068965a89f158fd
usb_gadget_disconnect(udc->gadget);
udc->driver->disconnect(udc->gadget);
udc->driver->unbind(udc->gadget);
- usb_gadget_udc_stop(udc->gadget, udc->driver);
+ usb_gadget_udc_stop(udc->gadget, NULL);
} else {
usb_gadget_stop(udc->gadget, udc->driver);
}
driver->unbind(udc->gadget);
goto err1;
}
- usb_gadget_connect(udc->gadget);
+ /*
+ * HACK: The Android gadget driver disconnects the gadget
+ * on bind and expects the gadget to stay disconnected until
+ * it calls usb_gadget_connect when userspace is ready. Remove
+ * the call to usb_gadget_connect bellow to avoid enabling the
+ * pullup before userspace is ready.
+ *
+ * usb_gadget_connect(udc->gadget);
+ */
} else {
ret = usb_gadget_start(udc->gadget, driver, driver->bind);
diff --combined net/bluetooth/sco.c
index cb25067d100e95812ade90bb607f8bc0e37b11a5,47e88b416c27d509304699693794ab37dc7f50a2..f54d743581977dd0006d218057b1a15993257a63
--- 1/net/bluetooth/sco.c
--- 2/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
{
bdaddr_t *src = &bt_sk(sk)->src;
bdaddr_t *dst = &bt_sk(sk)->dst;
+ __u16 pkt_type = sco_pi(sk)->pkt_type;
struct sco_conn *conn;
struct hci_conn *hcon;
struct hci_dev *hdev;
if (lmp_esco_capable(hdev) && !disable_esco)
type = ESCO_LINK;
- else
+ else {
type = SCO_LINK;
+ pkt_type &= SCO_ESCO_MASK;
+ }
- hcon = hci_connect(hdev, type, dst, BDADDR_BREDR, BT_SECURITY_LOW,
- HCI_AT_NO_BONDING);
+ hcon = hci_connect(hdev, type, pkt_type, dst, BDADDR_BREDR,
+ BT_SECURITY_LOW, HCI_AT_NO_BONDING);
if (IS_ERR(hcon)) {
err = PTR_ERR(hcon);
goto done;
sco_chan_del(sk, ECONNRESET);
break;
+ case BT_CONNECT2:
case BT_CONNECT:
case BT_DISCONN:
sco_chan_del(sk, ECONNRESET);
return 0;
}
-static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
+static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
{
- struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
+ struct sockaddr_sco sa;
struct sock *sk = sock->sk;
- int err = 0;
+ int len, err = 0;
- BT_DBG("sk %p %pMR", sk, &sa->sco_bdaddr);
+ BT_DBG("sk %p %pMR", sk, &sa.sco_bdaddr);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
+ memset(&sa, 0, sizeof(sa));
+ len = min_t(unsigned int, sizeof(sa), alen);
+ memcpy(&sa, addr, len);
+
lock_sock(sk);
if (sk->sk_state != BT_OPEN) {
goto done;
}
- bacpy(&bt_sk(sk)->src, &sa->sco_bdaddr);
+ bacpy(&bt_sk(sk)->src, &sa.sco_bdaddr);
+ sco_pi(sk)->pkt_type = sa.sco_pkt_type;
sk->sk_state = BT_BOUND;
static int sco_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
{
- struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
struct sock *sk = sock->sk;
- int err = 0;
-
+ struct sockaddr_sco sa;
+ int len, err = 0;
BT_DBG("sk %p", sk);
- if (alen < sizeof(struct sockaddr_sco) ||
- addr->sa_family != AF_BLUETOOTH)
+ if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
- if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND)
- return -EBADFD;
-
- if (sk->sk_type != SOCK_SEQPACKET)
- return -EINVAL;
+ memset(&sa, 0, sizeof(sa));
+ len = min_t(unsigned int, sizeof(sa), alen);
+ memcpy(&sa, addr, len);
lock_sock(sk);
+ if (sk->sk_type != SOCK_SEQPACKET) {
+ err = -EINVAL;
+ goto done;
+ }
+
+ if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND) {
+ err = -EBADFD;
+ goto done;
+ }
+
/* Set destination address and psm */
- bacpy(&bt_sk(sk)->dst, &sa->sco_bdaddr);
+ bacpy(&bt_sk(sk)->dst, &sa.sco_bdaddr);
+ sco_pi(sk)->pkt_type = sa.sco_pkt_type;
err = sco_connect(sk);
if (err)
bacpy(&sa->sco_bdaddr, &bt_sk(sk)->dst);
else
bacpy(&sa->sco_bdaddr, &bt_sk(sk)->src);
+ sa->sco_pkt_type = sco_pi(sk)->pkt_type;
return 0;
}