Commit d738752f authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  uhci-hcd: fix list access bug
  USB: Support for ELECOM LD-USB20 in pegasus
  USB: Add VIA quirk fixup for VT8235 usb2
  USB: rtl8150_disconnect() needs tasklet_kill()
  USB Storage: unusual_devs.h for Sony Ericsson M600i
  USB Storage: Remove the finecam3 unusual_devs entry
  UHCI: don't stop at an Iso error
  usb gadget: g_ether spinlock recursion fix
  USB: add all wacom device to hid-core.c blacklist
  hid-core.c: Adds all GTCO CalComp Digitizers and InterWrite School Products to blacklist
  USB floppy drive SAMSUNG SFD-321U/EP detected 8 times
parents a9303638 db59b464
...@@ -667,6 +667,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_vi ...@@ -667,6 +667,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_vi
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
......
...@@ -117,6 +117,8 @@ struct eth_dev { ...@@ -117,6 +117,8 @@ struct eth_dev {
struct usb_ep *in_ep, *out_ep, *status_ep; struct usb_ep *in_ep, *out_ep, *status_ep;
const struct usb_endpoint_descriptor const struct usb_endpoint_descriptor
*in, *out, *status; *in, *out, *status;
spinlock_t req_lock;
struct list_head tx_reqs, rx_reqs; struct list_head tx_reqs, rx_reqs;
struct net_device *net; struct net_device *net;
...@@ -1066,21 +1068,31 @@ static void eth_reset_config (struct eth_dev *dev) ...@@ -1066,21 +1068,31 @@ static void eth_reset_config (struct eth_dev *dev)
*/ */
if (dev->in) { if (dev->in) {
usb_ep_disable (dev->in_ep); usb_ep_disable (dev->in_ep);
spin_lock(&dev->req_lock);
while (likely (!list_empty (&dev->tx_reqs))) { while (likely (!list_empty (&dev->tx_reqs))) {
req = container_of (dev->tx_reqs.next, req = container_of (dev->tx_reqs.next,
struct usb_request, list); struct usb_request, list);
list_del (&req->list); list_del (&req->list);
spin_unlock(&dev->req_lock);
usb_ep_free_request (dev->in_ep, req); usb_ep_free_request (dev->in_ep, req);
spin_lock(&dev->req_lock);
} }
spin_unlock(&dev->req_lock);
} }
if (dev->out) { if (dev->out) {
usb_ep_disable (dev->out_ep); usb_ep_disable (dev->out_ep);
spin_lock(&dev->req_lock);
while (likely (!list_empty (&dev->rx_reqs))) { while (likely (!list_empty (&dev->rx_reqs))) {
req = container_of (dev->rx_reqs.next, req = container_of (dev->rx_reqs.next,
struct usb_request, list); struct usb_request, list);
list_del (&req->list); list_del (&req->list);
spin_unlock(&dev->req_lock);
usb_ep_free_request (dev->out_ep, req); usb_ep_free_request (dev->out_ep, req);
spin_lock(&dev->req_lock);
} }
spin_unlock(&dev->req_lock);
} }
if (dev->status) { if (dev->status) {
...@@ -1659,9 +1671,9 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags) ...@@ -1659,9 +1671,9 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
if (retval) { if (retval) {
DEBUG (dev, "rx submit --> %d\n", retval); DEBUG (dev, "rx submit --> %d\n", retval);
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
spin_lock (&dev->lock); spin_lock(&dev->req_lock);
list_add (&req->list, &dev->rx_reqs); list_add (&req->list, &dev->rx_reqs);
spin_unlock (&dev->lock); spin_unlock(&dev->req_lock);
} }
return retval; return retval;
} }
...@@ -1730,8 +1742,9 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -1730,8 +1742,9 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
if (!netif_running (dev->net)) { if (!netif_running (dev->net)) {
clean: clean:
/* nobody reading rx_reqs, so no dev->lock */ spin_lock(&dev->req_lock);
list_add (&req->list, &dev->rx_reqs); list_add (&req->list, &dev->rx_reqs);
spin_unlock(&dev->req_lock);
req = NULL; req = NULL;
} }
if (req) if (req)
...@@ -1782,15 +1795,18 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags) ...@@ -1782,15 +1795,18 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags)
{ {
int status; int status;
spin_lock(&dev->req_lock);
status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags); status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags);
if (status < 0) if (status < 0)
goto fail; goto fail;
status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags); status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags);
if (status < 0) if (status < 0)
goto fail; goto fail;
return 0; goto done;
fail: fail:
DEBUG (dev, "can't alloc requests\n"); DEBUG (dev, "can't alloc requests\n");
done:
spin_unlock(&dev->req_lock);
return status; return status;
} }
...@@ -1800,21 +1816,21 @@ static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags) ...@@ -1800,21 +1816,21 @@ static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags)
unsigned long flags; unsigned long flags;
/* fill unused rxq slots with some skb */ /* fill unused rxq slots with some skb */
spin_lock_irqsave (&dev->lock, flags); spin_lock_irqsave(&dev->req_lock, flags);
while (!list_empty (&dev->rx_reqs)) { while (!list_empty (&dev->rx_reqs)) {
req = container_of (dev->rx_reqs.next, req = container_of (dev->rx_reqs.next,
struct usb_request, list); struct usb_request, list);
list_del_init (&req->list); list_del_init (&req->list);
spin_unlock_irqrestore (&dev->lock, flags); spin_unlock_irqrestore(&dev->req_lock, flags);
if (rx_submit (dev, req, gfp_flags) < 0) { if (rx_submit (dev, req, gfp_flags) < 0) {
defer_kevent (dev, WORK_RX_MEMORY); defer_kevent (dev, WORK_RX_MEMORY);
return; return;
} }
spin_lock_irqsave (&dev->lock, flags); spin_lock_irqsave(&dev->req_lock, flags);
} }
spin_unlock_irqrestore (&dev->lock, flags); spin_unlock_irqrestore(&dev->req_lock, flags);
} }
static void eth_work (void *_dev) static void eth_work (void *_dev)
...@@ -1848,9 +1864,9 @@ static void tx_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -1848,9 +1864,9 @@ static void tx_complete (struct usb_ep *ep, struct usb_request *req)
} }
dev->stats.tx_packets++; dev->stats.tx_packets++;
spin_lock (&dev->lock); spin_lock(&dev->req_lock);
list_add (&req->list, &dev->tx_reqs); list_add (&req->list, &dev->tx_reqs);
spin_unlock (&dev->lock); spin_unlock(&dev->req_lock);
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
atomic_dec (&dev->tx_qlen); atomic_dec (&dev->tx_qlen);
...@@ -1896,12 +1912,12 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1896,12 +1912,12 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
/* ignores USB_CDC_PACKET_TYPE_DIRECTED */ /* ignores USB_CDC_PACKET_TYPE_DIRECTED */
} }
spin_lock_irqsave (&dev->lock, flags); spin_lock_irqsave(&dev->req_lock, flags);
req = container_of (dev->tx_reqs.next, struct usb_request, list); req = container_of (dev->tx_reqs.next, struct usb_request, list);
list_del (&req->list); list_del (&req->list);
if (list_empty (&dev->tx_reqs)) if (list_empty (&dev->tx_reqs))
netif_stop_queue (net); netif_stop_queue (net);
spin_unlock_irqrestore (&dev->lock, flags); spin_unlock_irqrestore(&dev->req_lock, flags);
/* no buffer copies needed, unless the network stack did it /* no buffer copies needed, unless the network stack did it
* or the hardware can't use skb buffers. * or the hardware can't use skb buffers.
...@@ -1955,11 +1971,11 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1955,11 +1971,11 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
drop: drop:
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
spin_lock_irqsave (&dev->lock, flags); spin_lock_irqsave(&dev->req_lock, flags);
if (list_empty (&dev->tx_reqs)) if (list_empty (&dev->tx_reqs))
netif_start_queue (net); netif_start_queue (net);
list_add (&req->list, &dev->tx_reqs); list_add (&req->list, &dev->tx_reqs);
spin_unlock_irqrestore (&dev->lock, flags); spin_unlock_irqrestore(&dev->req_lock, flags);
} }
return 0; return 0;
} }
...@@ -2378,6 +2394,7 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2378,6 +2394,7 @@ eth_bind (struct usb_gadget *gadget)
return status; return status;
dev = netdev_priv(net); dev = netdev_priv(net);
spin_lock_init (&dev->lock); spin_lock_init (&dev->lock);
spin_lock_init (&dev->req_lock);
INIT_WORK (&dev->work, eth_work, dev); INIT_WORK (&dev->work, eth_work, dev);
INIT_LIST_HEAD (&dev->tx_reqs); INIT_LIST_HEAD (&dev->tx_reqs);
INIT_LIST_HEAD (&dev->rx_reqs); INIT_LIST_HEAD (&dev->rx_reqs);
......
...@@ -372,7 +372,7 @@ static void uhci_fixup_toggles(struct uhci_qh *qh, int skip_first) ...@@ -372,7 +372,7 @@ static void uhci_fixup_toggles(struct uhci_qh *qh, int skip_first)
* need to change any toggles in this URB */ * need to change any toggles in this URB */
td = list_entry(urbp->td_list.next, struct uhci_td, list); td = list_entry(urbp->td_list.next, struct uhci_td, list);
if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) {
td = list_entry(urbp->td_list.next, struct uhci_td, td = list_entry(urbp->td_list.prev, struct uhci_td,
list); list);
toggle = uhci_toggle(td_token(td)) ^ 1; toggle = uhci_toggle(td_token(td)) ^ 1;
...@@ -1348,7 +1348,7 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh, ...@@ -1348,7 +1348,7 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh,
} }
uhci_giveback_urb(uhci, qh, urb, regs); uhci_giveback_urb(uhci, qh, urb, regs);
if (status < 0) if (status < 0 && qh->type != USB_ENDPOINT_XFER_ISOC)
break; break;
} }
......
This diff is collapsed.
...@@ -131,6 +131,7 @@ struct usb_eth_dev { ...@@ -131,6 +131,7 @@ struct usb_eth_dev {
#define VENDOR_COREGA 0x07aa #define VENDOR_COREGA 0x07aa
#define VENDOR_DLINK 0x2001 #define VENDOR_DLINK 0x2001
#define VENDOR_ELCON 0x0db7 #define VENDOR_ELCON 0x0db7
#define VENDOR_ELECOM 0x056e
#define VENDOR_ELSA 0x05cc #define VENDOR_ELSA 0x05cc
#define VENDOR_GIGABYTE 0x1044 #define VENDOR_GIGABYTE 0x1044
#define VENDOR_HAWKING 0x0e66 #define VENDOR_HAWKING 0x0e66
...@@ -233,6 +234,8 @@ PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1, ...@@ -233,6 +234,8 @@ PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
DEFAULT_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002, PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002,
DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA ) DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
PEGASUS_DEV( "ELECOM USB Ethernet LD-USB20", VENDOR_ELECOM, 0x4010,
DEFAULT_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304, PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304,
DEFAULT_GPIO_RESET ) DEFAULT_GPIO_RESET )
PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000, PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
......
...@@ -972,6 +972,7 @@ static void rtl8150_disconnect(struct usb_interface *intf) ...@@ -972,6 +972,7 @@ static void rtl8150_disconnect(struct usb_interface *intf)
if (dev) { if (dev) {
set_bit(RTL8150_UNPLUG, &dev->flags); set_bit(RTL8150_UNPLUG, &dev->flags);
tasklet_disable(&dev->tl); tasklet_disable(&dev->tl);
tasklet_kill(&dev->tl);
unregister_netdev(dev->netdev); unregister_netdev(dev->netdev);
unlink_all_urbs(dev); unlink_all_urbs(dev);
free_all_urbs(dev); free_all_urbs(dev);
......
...@@ -241,16 +241,6 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100, ...@@ -241,16 +241,6 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100,
"Finecam S5", "Finecam S5",
US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
/* Patch for Kyocera Finecam L3
* Submitted by Michael Krauth <michael.krauth@web.de>
* and Alessandro Fracchetti <al.fracchetti@tin.it>
*/
UNUSUAL_DEV( 0x0482, 0x0105, 0x0100, 0x0100,
"Kyocera",
"Finecam L3",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY),
/* Reported by Paul Stewart <stewart@wetlogic.net> /* Reported by Paul Stewart <stewart@wetlogic.net>
* This entry is needed because the device reports Sub=ff */ * This entry is needed because the device reports Sub=ff */
UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001,
...@@ -599,6 +589,13 @@ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999, ...@@ -599,6 +589,13 @@ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999,
US_SC_DEVICE, US_PR_DEVICE, NULL, US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ), US_FL_FIX_INQUIRY ),
/* floppy reports multiple luns */
UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210,
"SAMSUNG",
"SFD-321U [FW 0C]",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_SINGLE_LUN ),
UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299,
"Y-E Data", "Y-E Data",
...@@ -1257,6 +1254,13 @@ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, ...@@ -1257,6 +1254,13 @@ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
US_SC_DEVICE, US_PR_DEVICE, NULL, US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_NO_WP_DETECT ), US_FL_NO_WP_DETECT ),
/* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */
UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000,
"Sony Ericsson",
"M600i",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
* Tested on hardware version 1.10. * Tested on hardware version 1.10.
* Entry is needed only for the initializer function override. * Entry is needed only for the initializer function override.
......
...@@ -1292,6 +1292,7 @@ ...@@ -1292,6 +1292,7 @@
#define PCI_DEVICE_ID_VIA_8367_0 0x3099 #define PCI_DEVICE_ID_VIA_8367_0 0x3099
#define PCI_DEVICE_ID_VIA_8653_0 0x3101 #define PCI_DEVICE_ID_VIA_8653_0 0x3101
#define PCI_DEVICE_ID_VIA_8622 0x3102 #define PCI_DEVICE_ID_VIA_8622 0x3102
#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104
#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109
#define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_8361 0x3112
#define PCI_DEVICE_ID_VIA_XM266 0x3116 #define PCI_DEVICE_ID_VIA_XM266 0x3116
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment