aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hcd.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-12-17 18:02:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:57 -0500
commit0ed8fee1c1d38a62e981025ba40b5eba30c4ce2a (patch)
tree5f006afb273d5657251c49ae7144f669db9ed05d /drivers/usb/host/uhci-hcd.h
parentaf0bb5998abe8ed28ee354dd4c71689cacdc91e9 (diff)
[PATCH] UHCI: remove main list of URBs
As part of reorienting uhci-hcd away from URBs and toward endpoint queues, this patch (as625) eliminates the driver's main list of URBs. The list wsa used mainly in checking for URB completions; now the driver goes through the list of active endpoints and checks the members of the queues. As a side effect, I had to remove the code that looks for FSBR timeouts. For now, FSBR will remain on so long as any URBs on a full-speed control or bulk queue request it, even if the queue isn't advancing. A later patch can add more intelligent handling. This isn't a huge drawback; it's pretty rare for an URB to get stuck for more than a fraction of a second. (And it will help the people trying to use those insane HP USB devices.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.h')
-rw-r--r--drivers/usb/host/uhci-hcd.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
index c057956667b5..7e96bef2e88f 100644
--- a/drivers/usb/host/uhci-hcd.h
+++ b/drivers/usb/host/uhci-hcd.h
@@ -132,6 +132,10 @@ struct uhci_qh {
132 132
133 unsigned int unlink_frame; /* When the QH was unlinked */ 133 unsigned int unlink_frame; /* When the QH was unlinked */
134 int state; /* QH_STATE_xxx; see above */ 134 int state; /* QH_STATE_xxx; see above */
135
136 unsigned int initial_toggle:1; /* Endpoint's current toggle value */
137 unsigned int needs_fixup:1; /* Must fix the TD toggle values */
138 unsigned int is_stopped:1; /* Queue was stopped by an error */
135} __attribute__((aligned(16))); 139} __attribute__((aligned(16)));
136 140
137/* 141/*
@@ -384,6 +388,7 @@ struct uhci_hcd {
384 388
385 struct uhci_td *term_td; /* Terminating TD, see UHCI bug */ 389 struct uhci_td *term_td; /* Terminating TD, see UHCI bug */
386 struct uhci_qh *skelqh[UHCI_NUM_SKELQH]; /* Skeleton QHs */ 390 struct uhci_qh *skelqh[UHCI_NUM_SKELQH]; /* Skeleton QHs */
391 struct uhci_qh *next_qh; /* Next QH to scan */
387 392
388 spinlock_t lock; 393 spinlock_t lock;
389 394
@@ -413,16 +418,10 @@ struct uhci_hcd {
413 unsigned long resuming_ports; 418 unsigned long resuming_ports;
414 unsigned long ports_timeout; /* Time to stop signalling */ 419 unsigned long ports_timeout; /* Time to stop signalling */
415 420
416 /* Main list of URBs currently controlled by this HC */
417 struct list_head urb_list;
418
419 /* List of TDs that are done, but waiting to be freed (race) */ 421 /* List of TDs that are done, but waiting to be freed (race) */
420 struct list_head td_remove_list; 422 struct list_head td_remove_list;
421 unsigned int td_remove_age; /* Age in frames */ 423 unsigned int td_remove_age; /* Age in frames */
422 424
423 /* List of URBs awaiting completion callback */
424 struct list_head complete_list;
425
426 struct list_head idle_qh_list; /* Where the idle QHs live */ 425 struct list_head idle_qh_list; /* Where the idle QHs live */
427 426
428 int rh_numports; /* Number of root-hub ports */ 427 int rh_numports; /* Number of root-hub ports */
@@ -448,7 +447,6 @@ static inline struct usb_hcd *uhci_to_hcd(struct uhci_hcd *uhci)
448 * Private per-URB data 447 * Private per-URB data
449 */ 448 */
450struct urb_priv { 449struct urb_priv {
451 struct list_head urb_list;
452 struct list_head node; /* Node in the QH's urbp list */ 450 struct list_head node; /* Node in the QH's urbp list */
453 451
454 struct urb *urb; 452 struct urb *urb;
@@ -456,10 +454,7 @@ struct urb_priv {
456 struct uhci_qh *qh; /* QH for this URB */ 454 struct uhci_qh *qh; /* QH for this URB */
457 struct list_head td_list; 455 struct list_head td_list;
458 456
459 unsigned long fsbrtime; /* In jiffies */
460
461 unsigned fsbr : 1; /* URB turned on FSBR */ 457 unsigned fsbr : 1; /* URB turned on FSBR */
462 unsigned fsbr_timeout : 1; /* URB timed out on FSBR */
463 unsigned short_transfer : 1; /* URB got a short transfer, no 458 unsigned short_transfer : 1; /* URB got a short transfer, no
464 * need to rescan */ 459 * need to rescan */
465}; 460};