aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-02 22:50:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-02 22:50:27 -0500
commitaa2ba5f1082dc705745899584aac8416d710c056 (patch)
treebde0bf4aff036c6bac19a0212194ae1092afb3c9 /drivers/usb
parent68024541e2e5a8f35e281daaa5068a29e2a538a5 (diff)
parentf6f7b52e2f6149d2ee365717afff315b05720162 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_main.c drivers/net/smc91x.c
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/fsl_qe_udc.c3
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c3
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c14
-rw-r--r--drivers/usb/host/ehci-pci.c9
-rw-r--r--drivers/usb/host/ehci.h12
-rw-r--r--drivers/usb/serial/console.c1
-rw-r--r--drivers/usb/serial/option.c35
-rw-r--r--drivers/usb/storage/unusual_devs.h19
8 files changed, 79 insertions, 17 deletions
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 1fe8b44787b3..b3408ff39fba 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2363,6 +2363,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
2363 nuke(loop_ep, -ESHUTDOWN); 2363 nuke(loop_ep, -ESHUTDOWN);
2364 spin_unlock_irqrestore(&udc_controller->lock, flags); 2364 spin_unlock_irqrestore(&udc_controller->lock, flags);
2365 2365
2366 /* report disconnect; the controller is already quiesced */
2367 driver->disconnect(&udc_controller->gadget);
2368
2366 /* unbind gadget and unhook driver. */ 2369 /* unbind gadget and unhook driver. */
2367 driver->unbind(&udc_controller->gadget); 2370 driver->unbind(&udc_controller->gadget);
2368 udc_controller->gadget.dev.driver = NULL; 2371 udc_controller->gadget.dev.driver = NULL;
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 091bb55c9aa7..f3c6703cffda 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -1836,6 +1836,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
1836 nuke(loop_ep, -ESHUTDOWN); 1836 nuke(loop_ep, -ESHUTDOWN);
1837 spin_unlock_irqrestore(&udc_controller->lock, flags); 1837 spin_unlock_irqrestore(&udc_controller->lock, flags);
1838 1838
1839 /* report disconnect; the controller is already quiesced */
1840 driver->disconnect(&udc_controller->gadget);
1841
1839 /* unbind gadget and unhook driver. */ 1842 /* unbind gadget and unhook driver. */
1840 driver->unbind(&udc_controller->gadget); 1843 driver->unbind(&udc_controller->gadget);
1841 udc_controller->gadget.dev.driver = NULL; 1844 udc_controller->gadget.dev.driver = NULL;
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index da6e93c201d2..2dbc0db0b46c 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -141,7 +141,11 @@ static int is_vbus_present(void)
141 141
142 if (mach->gpio_vbus) { 142 if (mach->gpio_vbus) {
143 int value = gpio_get_value(mach->gpio_vbus); 143 int value = gpio_get_value(mach->gpio_vbus);
144 return mach->gpio_vbus_inverted ? !value : value; 144
145 if (mach->gpio_vbus_inverted)
146 return !value;
147 else
148 return !!value;
145 } 149 }
146 if (mach->udc_is_connected) 150 if (mach->udc_is_connected)
147 return mach->udc_is_connected(); 151 return mach->udc_is_connected();
@@ -982,7 +986,7 @@ static int pxa25x_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
982 struct pxa25x_udc *udc; 986 struct pxa25x_udc *udc;
983 987
984 udc = container_of(_gadget, struct pxa25x_udc, gadget); 988 udc = container_of(_gadget, struct pxa25x_udc, gadget);
985 udc->vbus = (is_active != 0); 989 udc->vbus = is_active;
986 DMSG("vbus %s\n", is_active ? "supplied" : "inactive"); 990 DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
987 pullup(udc); 991 pullup(udc);
988 return 0; 992 return 0;
@@ -1399,12 +1403,8 @@ lubbock_vbus_irq(int irq, void *_dev)
1399static irqreturn_t udc_vbus_irq(int irq, void *_dev) 1403static irqreturn_t udc_vbus_irq(int irq, void *_dev)
1400{ 1404{
1401 struct pxa25x_udc *dev = _dev; 1405 struct pxa25x_udc *dev = _dev;
1402 int vbus = gpio_get_value(dev->mach->gpio_vbus);
1403 1406
1404 if (dev->mach->gpio_vbus_inverted) 1407 pxa25x_udc_vbus_session(&dev->gadget, is_vbus_present());
1405 vbus = !vbus;
1406
1407 pxa25x_udc_vbus_session(&dev->gadget, vbus);
1408 return IRQ_HANDLED; 1408 return IRQ_HANDLED;
1409} 1409}
1410 1410
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 9d0ea573aef6..36864f958444 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -169,18 +169,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
169 } 169 }
170 break; 170 break;
171 case PCI_VENDOR_ID_ATI: 171 case PCI_VENDOR_ID_ATI:
172 /* SB700 old version has a bug in EHCI controller, 172 /* SB600 and old version of SB700 have a bug in EHCI controller,
173 * which causes usb devices lose response in some cases. 173 * which causes usb devices lose response in some cases.
174 */ 174 */
175 if (pdev->device == 0x4396) { 175 if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) {
176 p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, 176 p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
177 PCI_DEVICE_ID_ATI_SBX00_SMBUS, 177 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
178 NULL); 178 NULL);
179 if (!p_smbus) 179 if (!p_smbus)
180 break; 180 break;
181 rev = p_smbus->revision; 181 rev = p_smbus->revision;
182 if ((rev == 0x3a) || (rev == 0x3b)) { 182 if ((pdev->device == 0x4386) || (rev == 0x3a)
183 || (rev == 0x3b)) {
183 u8 tmp; 184 u8 tmp;
185 ehci_info(ehci, "applying AMD SB600/SB700 USB "
186 "freeze workaround\n");
184 pci_read_config_byte(pdev, 0x53, &tmp); 187 pci_read_config_byte(pdev, 0x53, &tmp);
185 pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); 188 pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
186 } 189 }
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b11798d17ae5..c7d4b5a06bdb 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
183 * the async ring; just the I/O watchdog. Note that if a 183 * the async ring; just the I/O watchdog. Note that if a
184 * SHRINK were pending, OFF would never be requested. 184 * SHRINK were pending, OFF would never be requested.
185 */ 185 */
186 enum ehci_timer_action oldactions = ehci->actions; 186 if (timer_pending(&ehci->watchdog)
187 && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
188 & ehci->actions))
189 return;
187 190
188 if (!test_and_set_bit (action, &ehci->actions)) { 191 if (!test_and_set_bit (action, &ehci->actions)) {
189 unsigned long t; 192 unsigned long t;
190 193
191 if (timer_pending(&ehci->watchdog)
192 && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
193 & oldactions))
194 return;
195
196 switch (action) { 194 switch (action) {
197 case TIMER_IO_WATCHDOG: 195 case TIMER_IO_WATCHDOG:
198 t = EHCI_IO_JIFFIES; 196 t = EHCI_IO_JIFFIES;
@@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
208 t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; 206 t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1;
209 break; 207 break;
210 } 208 }
211 mod_timer(&ehci->watchdog, round_jiffies(t + jiffies)); 209 mod_timer(&ehci->watchdog, t + jiffies);
212 } 210 }
213} 211}
214 212
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 5b20de130e08..5b95009d2fbb 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options)
135 err("no more memory"); 135 err("no more memory");
136 goto reset_open_count; 136 goto reset_open_count;
137 } 137 }
138 kref_init(&tty->kref);
138 termios = kzalloc(sizeof(*termios), GFP_KERNEL); 139 termios = kzalloc(sizeof(*termios), GFP_KERNEL);
139 if (!termios) { 140 if (!termios) {
140 retval = -ENOMEM; 141 retval = -ENOMEM;
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 6fa1ec441b61..809697b3c7fc 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -224,6 +224,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
224#define ONDA_VENDOR_ID 0x19d2 224#define ONDA_VENDOR_ID 0x19d2
225#define ONDA_PRODUCT_MSA501HS 0x0001 225#define ONDA_PRODUCT_MSA501HS 0x0001
226#define ONDA_PRODUCT_ET502HS 0x0002 226#define ONDA_PRODUCT_ET502HS 0x0002
227#define ONDA_PRODUCT_MT503HS 0x0200
227 228
228#define BANDRICH_VENDOR_ID 0x1A8D 229#define BANDRICH_VENDOR_ID 0x1A8D
229#define BANDRICH_PRODUCT_C100_1 0x1002 230#define BANDRICH_PRODUCT_C100_1 0x1002
@@ -413,6 +414,40 @@ static struct usb_device_id option_ids[] = {
413 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, 414 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
414 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, 415 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
415 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, 416 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
417 { USB_DEVICE(ONDA_VENDOR_ID, 0x0003) },
418 { USB_DEVICE(ONDA_VENDOR_ID, 0x0004) },
419 { USB_DEVICE(ONDA_VENDOR_ID, 0x0005) },
420 { USB_DEVICE(ONDA_VENDOR_ID, 0x0006) },
421 { USB_DEVICE(ONDA_VENDOR_ID, 0x0007) },
422 { USB_DEVICE(ONDA_VENDOR_ID, 0x0008) },
423 { USB_DEVICE(ONDA_VENDOR_ID, 0x0009) },
424 { USB_DEVICE(ONDA_VENDOR_ID, 0x000a) },
425 { USB_DEVICE(ONDA_VENDOR_ID, 0x000b) },
426 { USB_DEVICE(ONDA_VENDOR_ID, 0x000c) },
427 { USB_DEVICE(ONDA_VENDOR_ID, 0x000d) },
428 { USB_DEVICE(ONDA_VENDOR_ID, 0x000e) },
429 { USB_DEVICE(ONDA_VENDOR_ID, 0x000f) },
430 { USB_DEVICE(ONDA_VENDOR_ID, 0x0010) },
431 { USB_DEVICE(ONDA_VENDOR_ID, 0x0011) },
432 { USB_DEVICE(ONDA_VENDOR_ID, 0x0012) },
433 { USB_DEVICE(ONDA_VENDOR_ID, 0x0013) },
434 { USB_DEVICE(ONDA_VENDOR_ID, 0x0014) },
435 { USB_DEVICE(ONDA_VENDOR_ID, 0x0015) },
436 { USB_DEVICE(ONDA_VENDOR_ID, 0x0016) },
437 { USB_DEVICE(ONDA_VENDOR_ID, 0x0017) },
438 { USB_DEVICE(ONDA_VENDOR_ID, 0x0018) },
439 { USB_DEVICE(ONDA_VENDOR_ID, 0x0019) },
440 { USB_DEVICE(ONDA_VENDOR_ID, 0x0020) },
441 { USB_DEVICE(ONDA_VENDOR_ID, 0x0021) },
442 { USB_DEVICE(ONDA_VENDOR_ID, 0x0022) },
443 { USB_DEVICE(ONDA_VENDOR_ID, 0x0023) },
444 { USB_DEVICE(ONDA_VENDOR_ID, 0x0024) },
445 { USB_DEVICE(ONDA_VENDOR_ID, 0x0025) },
446 { USB_DEVICE(ONDA_VENDOR_ID, 0x0026) },
447 { USB_DEVICE(ONDA_VENDOR_ID, 0x0027) },
448 { USB_DEVICE(ONDA_VENDOR_ID, 0x0028) },
449 { USB_DEVICE(ONDA_VENDOR_ID, 0x0029) },
450 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) },
416 { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, 451 { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) },
417 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 452 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
418 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 453 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 6da9a7a962a8..e61f2bfc64ad 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -318,6 +318,18 @@ UNUSUAL_DEV( 0x045a, 0x5210, 0x0101, 0x0101,
318 US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0), 318 US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
319#endif 319#endif
320 320
321/* Reported by Tamas Kerecsen <kerecsen@bigfoot.com>
322 * Obviously the PROM has not been customized by the VAR;
323 * the Vendor and Product string descriptors are:
324 * Generic Mass Storage (PROTOTYPE--Remember to change idVendor)
325 * Generic Manufacturer (PROTOTYPE--Remember to change idVendor)
326 */
327UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000,
328 "Mitac",
329 "GPS",
330 US_SC_DEVICE, US_PR_DEVICE, NULL,
331 US_FL_MAX_SECTORS_64 ),
332
321/* 333/*
322 * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.) 334 * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
323 * Reported by Pete Zaitcev <zaitcev@redhat.com> 335 * Reported by Pete Zaitcev <zaitcev@redhat.com>
@@ -377,6 +389,13 @@ UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x0200,
377 US_SC_DEVICE, US_PR_DEVICE, NULL, 389 US_SC_DEVICE, US_PR_DEVICE, NULL,
378 US_FL_FIX_CAPACITY), 390 US_FL_FIX_CAPACITY),
379 391
392/* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */
393UNUSUAL_DEV( 0x04b0, 0x0403, 0x0200, 0x0200,
394 "NIKON",
395 "NIKON DSC D2H",
396 US_SC_DEVICE, US_PR_DEVICE, NULL,
397 US_FL_FIX_CAPACITY),
398
380/* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */ 399/* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */
381UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100, 400UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100,
382 "NIKON", 401 "NIKON",