aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-07 15:53:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-07 15:53:41 -0500
commitc9050b64940a1b47dfa623630431fec400edbf33 (patch)
tree1b0c061e2b0753066fe982c52e130767bb181551 /include/linux
parent86e2864d7e9d429b94624a28ba3f05fc2db89051 (diff)
parent7969943789df1196faa9ba67518d83fd93e4f9f6 (diff)
Merge tag 'for-usb-next-2014-03-06' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
Sarah writes: xhci: Streams and UAS cleanups, misc cleanups for 3.15 Hi Greg, Here's 76 patches to queue to usb-next for 3.15. The bulk of this rather large pull request is the UAS driver cleanup, the xHCI streams fixes, and the new userspace API for usbfs to be able to use and alloc/free bulk streams. I've hammered on these changes, and the UAS driver seems solid. The performance numbers are pretty spiffy too: root@xanatos:~# echo 3 > /proc/sys/vm/drop_caches; dd if=/dev/sdb of=/dev/null bs=4k count=1000M iflag=count_bytes 256000+0 records in 256000+0 records out 1048576000 bytes (1.0 GB) copied, 3.28557 s, 319 MB/s That's about 100 MB/s faster than my fastest Bulk-only-Transport mass storage drive. There's a couple of miscellaneous cleanup patches and non-urgent bug fixes in here as well: 7969943789df xhci: add the meaningful IRQ description if it is empty bcffae7708eb xhci: Prevent runtime pm from autosuspending during initialization e587b8b270d3 xhci: make warnings greppable 25cd2882e2fc usb/xhci: Change how we indicate a host supports Link PM. Sarah Sharp
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h4
-rw-r--r--include/linux/usb/hcd.h1
-rw-r--r--include/linux/usb/uas.h14
-rw-r--r--include/linux/usb_usual.h6
4 files changed, 16 insertions, 9 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 7f6eb859873e..f1015cee5944 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -57,6 +57,7 @@ struct ep_device;
57 * @extra: descriptors following this endpoint in the configuration 57 * @extra: descriptors following this endpoint in the configuration
58 * @extralen: how many bytes of "extra" are valid 58 * @extralen: how many bytes of "extra" are valid
59 * @enabled: URBs may be submitted to this endpoint 59 * @enabled: URBs may be submitted to this endpoint
60 * @streams: number of USB-3 streams allocated on the endpoint
60 * 61 *
61 * USB requests are always queued to a given endpoint, identified by a 62 * USB requests are always queued to a given endpoint, identified by a
62 * descriptor within an active interface in a given USB configuration. 63 * descriptor within an active interface in a given USB configuration.
@@ -71,6 +72,7 @@ struct usb_host_endpoint {
71 unsigned char *extra; /* Extra descriptors */ 72 unsigned char *extra; /* Extra descriptors */
72 int extralen; 73 int extralen;
73 int enabled; 74 int enabled;
75 int streams;
74}; 76};
75 77
76/* host-side wrapper for one interface setting's parsed descriptors */ 78/* host-side wrapper for one interface setting's parsed descriptors */
@@ -202,6 +204,8 @@ static inline void usb_set_intfdata(struct usb_interface *intf, void *data)
202struct usb_interface *usb_get_intf(struct usb_interface *intf); 204struct usb_interface *usb_get_intf(struct usb_interface *intf);
203void usb_put_intf(struct usb_interface *intf); 205void usb_put_intf(struct usb_interface *intf);
204 206
207/* Hard limit */
208#define USB_MAXENDPOINTS 30
205/* this maximum is arbitrary */ 209/* this maximum is arbitrary */
206#define USB_MAXINTERFACES 32 210#define USB_MAXINTERFACES 32
207#define USB_MAXIADS (USB_MAXINTERFACES/2) 211#define USB_MAXIADS (USB_MAXINTERFACES/2)
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index efe8d8a7c7ad..485cd5e2100c 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -143,6 +143,7 @@ struct usb_hcd {
143 unsigned authorized_default:1; 143 unsigned authorized_default:1;
144 unsigned has_tt:1; /* Integrated TT in root hub */ 144 unsigned has_tt:1; /* Integrated TT in root hub */
145 unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */ 145 unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */
146 unsigned can_do_streams:1; /* HC supports streams */
146 147
147 unsigned int irq; /* irq allocated */ 148 unsigned int irq; /* irq allocated */
148 void __iomem *regs; /* device memory/io */ 149 void __iomem *regs; /* device memory/io */
diff --git a/include/linux/usb/uas.h b/include/linux/usb/uas.h
index 5499ab5c94bd..3fc8e8b9f043 100644
--- a/include/linux/usb/uas.h
+++ b/include/linux/usb/uas.h
@@ -9,7 +9,7 @@ struct iu {
9 __u8 iu_id; 9 __u8 iu_id;
10 __u8 rsvd1; 10 __u8 rsvd1;
11 __be16 tag; 11 __be16 tag;
12}; 12} __attribute__((__packed__));
13 13
14enum { 14enum {
15 IU_ID_COMMAND = 0x01, 15 IU_ID_COMMAND = 0x01,
@@ -52,7 +52,7 @@ struct command_iu {
52 __u8 rsvd7; 52 __u8 rsvd7;
53 struct scsi_lun lun; 53 struct scsi_lun lun;
54 __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */ 54 __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */
55}; 55} __attribute__((__packed__));
56 56
57struct task_mgmt_iu { 57struct task_mgmt_iu {
58 __u8 iu_id; 58 __u8 iu_id;
@@ -62,7 +62,7 @@ struct task_mgmt_iu {
62 __u8 rsvd2; 62 __u8 rsvd2;
63 __be16 task_tag; 63 __be16 task_tag;
64 struct scsi_lun lun; 64 struct scsi_lun lun;
65}; 65} __attribute__((__packed__));
66 66
67/* 67/*
68 * Also used for the Read Ready and Write Ready IUs since they have the 68 * Also used for the Read Ready and Write Ready IUs since they have the
@@ -77,15 +77,15 @@ struct sense_iu {
77 __u8 rsvd7[7]; 77 __u8 rsvd7[7];
78 __be16 len; 78 __be16 len;
79 __u8 sense[SCSI_SENSE_BUFFERSIZE]; 79 __u8 sense[SCSI_SENSE_BUFFERSIZE];
80}; 80} __attribute__((__packed__));
81 81
82struct response_ui { 82struct response_iu {
83 __u8 iu_id; 83 __u8 iu_id;
84 __u8 rsvd1; 84 __u8 rsvd1;
85 __be16 tag; 85 __be16 tag;
86 __be16 add_response_info; 86 __u8 add_response_info[3];
87 __u8 response_code; 87 __u8 response_code;
88}; 88} __attribute__((__packed__));
89 89
90struct usb_pipe_usage_descriptor { 90struct usb_pipe_usage_descriptor {
91 __u8 bLength; 91 __u8 bLength;
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index 630356866030..1a64b26046ed 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -67,8 +67,10 @@
67 /* Initial READ(10) (and others) must be retried */ \ 67 /* Initial READ(10) (and others) must be retried */ \
68 US_FLAG(WRITE_CACHE, 0x00200000) \ 68 US_FLAG(WRITE_CACHE, 0x00200000) \
69 /* Write Cache status is not available */ \ 69 /* Write Cache status is not available */ \
70 US_FLAG(NEEDS_CAP16, 0x00400000) 70 US_FLAG(NEEDS_CAP16, 0x00400000) \
71 /* cannot handle READ_CAPACITY_10 */ 71 /* cannot handle READ_CAPACITY_10 */ \
72 US_FLAG(IGNORE_UAS, 0x00800000) \
73 /* Device advertises UAS but it is broken */
72 74
73#define US_FLAG(name, value) US_FL_##name = value , 75#define US_FLAG(name, value) US_FL_##name = value ,
74enum { US_DO_ALL_FLAGS }; 76enum { US_DO_ALL_FLAGS };