Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93341
b: refs/heads/master
c: 7329e21
h: refs/heads/master
i:
  93339: 1f0d5d7
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent 87eda59 commit cc3cfc5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fc88f53aaa4ff8ee621353ac27269b4a656d721
refs/heads/master: 7329e211b987a493cbcfca0e98c60eb108ab42df
14 changes: 12 additions & 2 deletions trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static const u8 usb2_rh_dev_descriptor [18] = {

0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
0x00, /* __u8 bDeviceSubClass; */
0x01, /* __u8 bDeviceProtocol; [ usb 2.0 single TT ]*/
0x00, /* __u8 bDeviceProtocol; [ usb 2.0 no TT ] */
0x40, /* __u8 bMaxPacketSize0; 64 Bytes */

0x6b, 0x1d, /* __le16 idVendor; Linux Foundation */
Expand Down Expand Up @@ -354,9 +354,10 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
__attribute__((aligned(4)));
const u8 *bufp = tbuf;
int len = 0;
int patch_wakeup = 0;
int status;
int n;
u8 patch_wakeup = 0;
u8 patch_protocol = 0;

might_sleep();

Expand Down Expand Up @@ -433,6 +434,8 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
else
goto error;
len = 18;
if (hcd->has_tt)
patch_protocol = 1;
break;
case USB_DT_CONFIG << 8:
if (hcd->driver->flags & HCD_USB2) {
Expand Down Expand Up @@ -527,6 +530,13 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
bmAttributes))
((struct usb_config_descriptor *)ubuf)->bmAttributes
|= USB_CONFIG_ATT_WAKEUP;

/* report whether RH hardware has an integrated TT */
if (patch_protocol &&
len > offsetof(struct usb_device_descriptor,
bDeviceProtocol))
((struct usb_device_descriptor *) ubuf)->
bDeviceProtocol = 1;
}

/* any errors get returned through the urb completion */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/core/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ struct usb_hcd {
unsigned poll_pending:1; /* status has changed? */
unsigned wireless:1; /* Wireless USB HCD */
unsigned authorized_default:1;
unsigned has_tt:1; /* Integrated TT in root hub */

int irq; /* irq allocated */
void __iomem *regs; /* device memory/io */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
case PCI_VENDOR_ID_TDI:
if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
ehci->is_tdi_rh_tt = 1;
hcd->has_tt = 1;
tdi_reset(ehci);
}
break;
Expand Down

0 comments on commit cc3cfc5

Please sign in to comment.