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

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: ACE1001 patch for cp2101.c
USB: usbmon: fix read(2)
USB: gadget rndis: send notifications
USB: gadget rndis: stop windows self-immolation
USB: storage: update unusual_devs entries for Nokia 5300 and 5310
USB: storage: updates unusual_devs entry for the Nokia 6300
usb: musb: fix bug in musb_schedule
USB: fix SB700 usb subsystem hang bug

+37 -6
+1 -2
drivers/usb/gadget/f_rndis.c
··· 172 172 .bDescriptorType = USB_DT_INTERFACE, 173 173 174 174 /* .bInterfaceNumber = DYNAMIC */ 175 - .bAlternateSetting = 1, 176 175 .bNumEndpoints = 2, 177 176 .bInterfaceClass = USB_CLASS_CDC_DATA, 178 177 .bInterfaceSubClass = 0, ··· 302 303 __le32 *data = req->buf; 303 304 int status; 304 305 305 - if (atomic_inc_return(&rndis->notify_count)) 306 + if (atomic_inc_return(&rndis->notify_count) != 1) 306 307 return; 307 308 308 309 /* Send RNDIS RESPONSE_AVAILABLE notification; a
+21
drivers/usb/host/ehci-pci.c
··· 66 66 { 67 67 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 68 68 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 69 + struct pci_dev *p_smbus; 70 + u8 rev; 69 71 u32 temp; 70 72 int retval; 71 73 ··· 166 164 if (tmp & 0x20) 167 165 break; 168 166 pci_write_config_byte(pdev, 0x4b, tmp | 0x20); 167 + } 168 + break; 169 + case PCI_VENDOR_ID_ATI: 170 + /* SB700 old version has a bug in EHCI controller, 171 + * which causes usb devices lose response in some cases. 172 + */ 173 + if (pdev->device == 0x4396) { 174 + p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, 175 + PCI_DEVICE_ID_ATI_SBX00_SMBUS, 176 + NULL); 177 + if (!p_smbus) 178 + break; 179 + rev = p_smbus->revision; 180 + if ((rev == 0x3a) || (rev == 0x3b)) { 181 + u8 tmp; 182 + pci_read_config_byte(pdev, 0x53, &tmp); 183 + pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); 184 + } 185 + pci_dev_put(p_smbus); 169 186 } 170 187 break; 171 188 }
+4 -1
drivers/usb/mon/mon_bin.c
··· 687 687 } 688 688 689 689 if (rp->b_read >= sizeof(struct mon_bin_hdr)) { 690 - step_len = min(nbytes, (size_t)ep->len_cap); 690 + step_len = ep->len_cap; 691 + step_len -= rp->b_read - sizeof(struct mon_bin_hdr); 692 + if (step_len > nbytes) 693 + step_len = nbytes; 691 694 offset = rp->b_out + PKT_SIZE; 692 695 offset += rp->b_read - sizeof(struct mon_bin_hdr); 693 696 if (offset >= rp->b_size)
+1 -1
drivers/usb/musb/musb_host.c
··· 1757 1757 } 1758 1758 } 1759 1759 /* use bulk reserved ep1 if no other ep is free */ 1760 - if (best_end > 0 && qh->type == USB_ENDPOINT_XFER_BULK) { 1760 + if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) { 1761 1761 hw_ep = musb->bulk_ep; 1762 1762 if (is_in) 1763 1763 head = &musb->in_bulk;
+1
drivers/usb/serial/cp2101.c
··· 56 56 static int debug; 57 57 58 58 static struct usb_device_id id_table [] = { 59 + { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ 59 60 { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ 60 61 { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ 61 62 { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
+9 -2
drivers/usb/storage/unusual_devs.h
··· 167 167 US_SC_DEVICE, US_PR_DEVICE, NULL, 168 168 US_FL_FIX_CAPACITY ), 169 169 170 + /* Patch for Nokia 5310 capacity */ 171 + UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591, 172 + "Nokia", 173 + "5310", 174 + US_SC_DEVICE, US_PR_DEVICE, NULL, 175 + US_FL_FIX_CAPACITY ), 176 + 170 177 /* Reported by Mario Rettig <mariorettig@web.de> */ 171 178 UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, 172 179 "Nokia", ··· 240 233 US_FL_MAX_SECTORS_64 ), 241 234 242 235 /* Reported by Cedric Godin <cedric@belbone.be> */ 243 - UNUSUAL_DEV( 0x0421, 0x04b9, 0x0551, 0x0551, 236 + UNUSUAL_DEV( 0x0421, 0x04b9, 0x0500, 0x0551, 244 237 "Nokia", 245 238 "5300", 246 239 US_SC_DEVICE, US_PR_DEVICE, NULL, 247 240 US_FL_FIX_CAPACITY ), 248 241 249 242 /* Reported by Richard Nauber <RichardNauber@web.de> */ 250 - UNUSUAL_DEV( 0x0421, 0x04fa, 0x0601, 0x0601, 243 + UNUSUAL_DEV( 0x0421, 0x04fa, 0x0550, 0x0660, 251 244 "Nokia", 252 245 "6300", 253 246 US_SC_DEVICE, US_PR_DEVICE, NULL,