summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 12:59:04 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 12:59:04 -0800
commit460223d21d960e420775ca4d11ddaa8389af4d25 (patch)
treec1e9d3e661180263f5e4ac72af85a151d3c183e7 /include
parent255f0385c8e0d6b9005c0e09fffb5bd852f3b506 (diff)
parented077bb714816e942ea9b740156659a28a34112f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (39 commits) USB: at91-ohci, handle extra at91sam9261 ahb clock USB: another id for cp2101 driver USB: ueagle-atm.c needs sched.h USB: at91_udc, shrink runtime footprint usbnet: add missing Kconfig for KC2190 cables usbnet: init fault (oops) cleanup, whitespace fixes usbnet: recognize SiteCom CN-124 usb: Remove Airprime device from option.c USB: change __init to __devinit for isp116x_probe USB: ps3: don't call ps3_system_bus_driver_register on other platforms USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist USB: kernel-doc fixes USB: quirky device for cdc-acm USB: cdc-acm: fix incorrect throtteling, make set_control optional USB: unconfigure devices which have config 0 USB: make usb_iso_packet_descriptor.status signed USB: fix g_serial small error USB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player USB: Fix misspelled "USBNET_MII" kernel config option. ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/cdc.h7
-rw-r--r--include/linux/usb/ch9.h20
-rw-r--r--include/linux/usb/serial.h6
-rw-r--r--include/linux/usb_usual.h4
-rw-r--r--include/linux/usbdevice_fs.h4
-rw-r--r--include/scsi/scsi_device.h1
7 files changed, 30 insertions, 14 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b5c226a87ed..a8e8d1ecebb 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -935,7 +935,7 @@ struct usb_iso_packet_descriptor {
unsigned int offset;
unsigned int length; /* expected length */
unsigned int actual_length;
- unsigned int status;
+ int status;
};
struct urb;
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index ba617c37245..956edf3bbec 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -73,6 +73,13 @@ struct usb_cdc_acm_descriptor {
__u8 bmCapabilities;
} __attribute__ ((packed));
+/* capabilities from 5.2.3.3 */
+
+#define USB_CDC_COMM_FEATURE 0x01
+#define USB_CDC_CAP_LINE 0x02
+#define USB_CDC_CAP_BRK 0x04
+#define USB_CDC_CAP_NOTIFY 0x08
+
/* "Union Functional Descriptor" from CDC spec 5.2.3.8 */
struct usb_cdc_union_desc {
__u8 bLength;
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index ae7833749fa..245c7253122 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -367,7 +367,7 @@ struct usb_debug_descriptor {
/* bulk endpoints with 8 byte maxpacket */
__u8 bDebugInEndpoint;
__u8 bDebugOutEndpoint;
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -396,7 +396,7 @@ struct usb_security_descriptor {
__le16 wTotalLength;
__u8 bNumEncryptionTypes;
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -410,7 +410,7 @@ struct usb_key_descriptor {
__u8 tTKID[3];
__u8 bReserved;
__u8 bKeyData[0];
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -426,7 +426,7 @@ struct usb_encryption_descriptor {
#define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */
__u8 bEncryptionValue; /* use in SET_ENCRYPTION */
__u8 bAuthKeyIndex;
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -438,7 +438,7 @@ struct usb_bos_descriptor {
__le16 wTotalLength;
__u8 bNumDeviceCaps;
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -447,7 +447,7 @@ struct usb_dev_cap_header {
__u8 bLength;
__u8 bDescriptorType;
__u8 bDevCapabilityType;
-};
+} __attribute__((packed));
#define USB_CAP_TYPE_WIRELESS_USB 1
@@ -475,7 +475,7 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
__u8 bmFFITXPowerInfo; /* FFI power levels */
__le16 bmBandGroup;
__u8 bReserved;
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -496,7 +496,7 @@ struct usb_wireless_ep_comp_descriptor {
#define USB_ENDPOINT_SWITCH_NO 0
#define USB_ENDPOINT_SWITCH_SWITCH 1
#define USB_ENDPOINT_SWITCH_SCALE 2
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -512,7 +512,7 @@ struct usb_handshake {
__u8 CDID[16];
__u8 nonce[16];
__u8 MIC[8];
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
@@ -524,7 +524,7 @@ struct usb_connection_context {
__u8 CHID[16]; /* persistent host id */
__u8 CDID[16]; /* device id (unique w/in host context) */
__u8 CK[16]; /* connection key */
-};
+} __attribute__((packed));
/*-------------------------------------------------------------------------*/
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 33dcd857669..32acbae28d2 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -54,6 +54,8 @@
* @write_wait: a wait_queue_head_t used by the port.
* @work: work queue entry for the line discipline waking up.
* @open_count: number of times this port has been opened.
+ * @throttled: nonzero if the read urb is inactive to throttle the device
+ * @throttle_req: nonzero if the tty wants to throttle us
*
* This structure is used by the usb-serial core and drivers for the specific
* ports of a device.
@@ -88,6 +90,8 @@ struct usb_serial_port {
wait_queue_head_t write_wait;
struct work_struct work;
int open_count;
+ char throttled;
+ char throttle_req;
struct device dev;
};
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
@@ -269,6 +273,8 @@ extern int usb_serial_generic_write_room (struct usb_serial_port *port);
extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
extern void usb_serial_generic_read_bulk_callback (struct urb *urb);
extern void usb_serial_generic_write_bulk_callback (struct urb *urb);
+extern void usb_serial_generic_throttle (struct usb_serial_port *port);
+extern void usb_serial_generic_unthrottle (struct usb_serial_port *port);
extern void usb_serial_generic_shutdown (struct usb_serial *serial);
extern int usb_serial_generic_register (int debug);
extern void usb_serial_generic_deregister (void);
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index 2ae76fe52ff..1b792b9286b 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -46,7 +46,9 @@
US_FLAG(MAX_SECTORS_64, 0x00000400) \
/* Sets max_sectors to 64 */ \
US_FLAG(IGNORE_DEVICE, 0x00000800) \
- /* Don't claim device */
+ /* Don't claim device */ \
+ US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
+ /* sometimes sizes is too big */
#define US_FLAG(name, value) US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index 617d8a1c59a..342dd5a7e8b 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -159,9 +159,9 @@ struct usbdevfs_ioctl32 {
#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
#define USBDEVFS_DISCARDURB _IO('U', 11)
#define USBDEVFS_REAPURB _IOW('U', 12, void *)
-#define USBDEVFS_REAPURB32 _IOW('U', 12, u32)
+#define USBDEVFS_REAPURB32 _IOW('U', 12, __u32)
#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
-#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32)
+#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32)
#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index ebf31b16dc4..9dd37e2f5a8 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -122,6 +122,7 @@ struct scsi_device {
unsigned no_uld_attach:1; /* disable connecting to upper level drivers */
unsigned select_no_atn:1;
unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */
+ unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */
unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */
unsigned int device_blocked; /* Device returned QUEUE_FULL. */