Skip to content

Commit ba721d3

Browse files
committed
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
2 parents 0ca4b6b + 5091b58 commit ba721d3

File tree

6 files changed

+37
-6
lines changed

6 files changed

+37
-6
lines changed

drivers/usb/gadget/f_rndis.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
172172
.bDescriptorType = USB_DT_INTERFACE,
173173

174174
/* .bInterfaceNumber = DYNAMIC */
175-
.bAlternateSetting = 1,
176175
.bNumEndpoints = 2,
177176
.bInterfaceClass = USB_CLASS_CDC_DATA,
178177
.bInterfaceSubClass = 0,
@@ -303,7 +302,7 @@ static void rndis_response_available(void *_rndis)
303302
__le32 *data = req->buf;
304303
int status;
305304

306-
if (atomic_inc_return(&rndis->notify_count))
305+
if (atomic_inc_return(&rndis->notify_count) != 1)
307306
return;
308307

309308
/* Send RNDIS RESPONSE_AVAILABLE notification; a

drivers/usb/host/ehci-pci.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
6666
{
6767
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
6868
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
69+
struct pci_dev *p_smbus;
70+
u8 rev;
6971
u32 temp;
7072
int retval;
7173

@@ -166,6 +168,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
166168
pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
167169
}
168170
break;
171+
case PCI_VENDOR_ID_ATI:
172+
/* SB700 old version has a bug in EHCI controller,
173+
* which causes usb devices lose response in some cases.
174+
*/
175+
if (pdev->device == 0x4396) {
176+
p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
177+
PCI_DEVICE_ID_ATI_SBX00_SMBUS,
178+
NULL);
179+
if (!p_smbus)
180+
break;
181+
rev = p_smbus->revision;
182+
if ((rev == 0x3a) || (rev == 0x3b)) {
183+
u8 tmp;
184+
pci_read_config_byte(pdev, 0x53, &tmp);
185+
pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
186+
}
187+
pci_dev_put(p_smbus);
188+
}
189+
break;
169190
}
170191

171192
ehci_reset(ehci);

drivers/usb/mon/mon_bin.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,10 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
687687
}
688688

689689
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;
691694
offset = rp->b_out + PKT_SIZE;
692695
offset += rp->b_read - sizeof(struct mon_bin_hdr);
693696
if (offset >= rp->b_size)

drivers/usb/musb/musb_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ static int musb_schedule(
17571757
}
17581758
}
17591759
/* 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) {
17611761
hw_ep = musb->bulk_ep;
17621762
if (is_in)
17631763
head = &musb->in_bulk;

drivers/usb/serial/cp2101.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static void cp2101_shutdown(struct usb_serial *);
5656
static int debug;
5757

5858
static struct usb_device_id id_table [] = {
59+
{ USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
5960
{ USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
6061
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
6162
{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */

drivers/usb/storage/unusual_devs.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ UNUSUAL_DEV( 0x0421, 0x005d, 0x0001, 0x0600,
167167
US_SC_DEVICE, US_PR_DEVICE, NULL,
168168
US_FL_FIX_CAPACITY ),
169169

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+
170177
/* Reported by Mario Rettig <[email protected]> */
171178
UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100,
172179
"Nokia",
@@ -233,14 +240,14 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370,
233240
US_FL_MAX_SECTORS_64 ),
234241

235242
/* Reported by Cedric Godin <[email protected]> */
236-
UNUSUAL_DEV( 0x0421, 0x04b9, 0x0551, 0x0551,
243+
UNUSUAL_DEV( 0x0421, 0x04b9, 0x0500, 0x0551,
237244
"Nokia",
238245
"5300",
239246
US_SC_DEVICE, US_PR_DEVICE, NULL,
240247
US_FL_FIX_CAPACITY ),
241248

242249
/* Reported by Richard Nauber <[email protected]> */
243-
UNUSUAL_DEV( 0x0421, 0x04fa, 0x0601, 0x0601,
250+
UNUSUAL_DEV( 0x0421, 0x04fa, 0x0550, 0x0660,
244251
"Nokia",
245252
"6300",
246253
US_SC_DEVICE, US_PR_DEVICE, NULL,

0 commit comments

Comments
 (0)