diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-10-11 17:28:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-12 01:40:26 +0200 |
commit | 91a99b5e78849db90dc2f5e8dfa034af43bdb760 (patch) | |
tree | 27af7c91347333591d6e47e043072400ea55f74b /drivers/usb/host/ehci.h | |
parent | USB: EHCI: change toggle only upon successful reset (diff) | |
download | linux-91a99b5e78849db90dc2f5e8dfa034af43bdb760.tar.xz linux-91a99b5e78849db90dc2f5e8dfa034af43bdb760.zip |
USB: EHCI: use consistent NO_FRAME value
ehci-hcd is inconsistent in the sentinel values it uses to indicate
that no frame number has been assigned for a periodic transfer. Some
places it uses NO_FRAME (defined as 65535), other places it uses -1,
and elsewhere it uses 9999.
This patch defines a value for NO_FRAME which can fit in a 16-bit
signed integer, and changes the code to use it everywhere.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r-- | drivers/usb/host/ehci.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 2d401927e143..b93eb59bb529 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -54,6 +54,8 @@ struct ehci_stats { unsigned long unlink; }; +#define NO_FRAME 29999 /* frame not assigned yet */ + /* ehci_hcd->lock guards shared data against other CPUs: * ehci_hcd: async, unlink, periodic (and shadow), ... * usb_host_endpoint: hcpriv @@ -405,7 +407,6 @@ struct ehci_qh { u16 tt_usecs; /* tt downstream bandwidth */ unsigned short period; /* polling interval */ unsigned short start; /* where polling starts */ -#define NO_FRAME ((unsigned short)~0) /* pick new start */ struct usb_device *dev; /* access to TT */ unsigned is_out:1; /* bulk or intr OUT */ @@ -454,7 +455,7 @@ struct ehci_iso_stream { struct usb_host_endpoint *ep; /* output of (re)scheduling */ - int next_uframe; + unsigned next_uframe; __hc32 splits; /* the rest is derived from the endpoint descriptor, |