diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-08 17:49:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-08 17:49:06 -0800 |
| commit | abe26395fab4014299cbda53cc2615de83ea6835 (patch) | |
| tree | 5f6dd08490d9c5e1754df6d90b17b2fd815e4015 /include | |
| parent | 9edf0fffb657b48ccf1c36d0a5dea61c4189f048 (diff) | |
| parent | d9795da7533d783a7bd2b9973ef864f0aa6cc7bd (diff) | |
Merge bk://gkernel.bkbits.net/net-drivers-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-ixp2000/io.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/arch-ixp2000/ixdp2x01.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/arch-ixp2000/platform.h | 4 | ||||
| -rw-r--r-- | include/asm-arm/arch-pxa/corgi.h | 4 | ||||
| -rw-r--r-- | include/asm-arm/hardware/scoop.h | 10 | ||||
| -rw-r--r-- | include/asm-parisc/checksum.h | 4 | ||||
| -rw-r--r-- | include/asm-parisc/compat.h | 8 | ||||
| -rw-r--r-- | include/asm-parisc/ide.h | 2 | ||||
| -rw-r--r-- | include/asm-parisc/irq.h | 8 | ||||
| -rw-r--r-- | include/asm-parisc/numnodes.h | 2 | ||||
| -rw-r--r-- | include/asm-parisc/serial.h | 2 | ||||
| -rw-r--r-- | include/asm-parisc/signal.h | 7 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 2 | ||||
| -rw-r--r-- | include/linux/compat_ioctl.h | 3 | ||||
| -rw-r--r-- | include/linux/elevator.h | 3 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 4 | ||||
| -rw-r--r-- | include/linux/usb.h | 17 | ||||
| -rw-r--r-- | include/linux/usb_cdc.h | 162 | ||||
| -rw-r--r-- | include/linux/usbdevice_fs.h | 23 |
19 files changed, 236 insertions, 33 deletions
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h index 571dbbcd8521..4555265cf5ce 100644 --- a/include/asm-arm/arch-ixp2000/io.h +++ b/include/asm-arm/arch-ixp2000/io.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/arch-ixdp2000/io.h + * linux/include/asm-arm/arch-ixp2000/io.h * * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> * Maintainer: Deepak Saxena <dsaxena@plexity.net> diff --git a/include/asm-arm/arch-ixp2000/ixdp2x01.h b/include/asm-arm/arch-ixp2000/ixdp2x01.h index 9e1672cd84cf..b3a1bcda8d01 100644 --- a/include/asm-arm/arch-ixp2000/ixdp2x01.h +++ b/include/asm-arm/arch-ixp2000/ixdp2x01.h @@ -1,5 +1,5 @@ /* - * include/asm/arch/ixdp2x01.h + * include/asm-arm/arch-ixp2000/ixdp2x01.h * * Platform definitions for IXDP2X01 && IXDP2801 systems * diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index 16e4a240199d..7118a843ab12 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h @@ -1,5 +1,5 @@ /* - * include/asm-arh/arch-ixp2000/platform.h + * include/asm-arm/arch-ixp2000/platform.h * * Various bits of code used by platform-level code. * @@ -50,7 +50,7 @@ static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long * Boards may multiplex different devices on the 2nd channel of * the slowport interface that each need different configuration * settings. For example, the IXDP2400 uses channel 2 on the interface - * to access the CPLD, the switch fabric card, and te media card. Each + * to access the CPLD, the switch fabric card, and the media card. Each * one needs a different mode so drivers must save/restore the mode * before and after each operation. * diff --git a/include/asm-arm/arch-pxa/corgi.h b/include/asm-arm/arch-pxa/corgi.h index 950c9378a6a6..4f69467327d1 100644 --- a/include/asm-arm/arch-pxa/corgi.h +++ b/include/asm-arm/arch-pxa/corgi.h @@ -133,6 +133,10 @@ struct sharpsl_flash_param_info { unsigned int phadadj; }; +/* + * Shared data structures + */ +extern struct platform_device corgiscoop_device; /* * External Functions diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h index 669b7df6e570..7ea771ff6144 100644 --- a/include/asm-arm/hardware/scoop.h +++ b/include/asm-arm/hardware/scoop.h @@ -40,8 +40,8 @@ struct scoop_config { unsigned short io_dir; }; -void reset_scoop(void); -unsigned short set_scoop_gpio(unsigned short bit); -unsigned short reset_scoop_gpio(unsigned short bit); -unsigned short read_scoop_reg(unsigned short reg); -void write_scoop_reg(unsigned short reg, unsigned short data); +void reset_scoop(struct device *dev); +unsigned short set_scoop_gpio(struct device *dev, unsigned short bit); +unsigned short reset_scoop_gpio(struct device *dev, unsigned short bit); +unsigned short read_scoop_reg(struct device *dev, unsigned short reg); +void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data); diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index f8bfc4c72236..229cb56fdb7a 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h @@ -30,8 +30,8 @@ extern unsigned int csum_partial_copy_nocheck(const unsigned char *, unsigned ch * this is a new version of the above that records errors it finds in *errp, * but continues and zeros the rest of the buffer. */ -extern unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, - int len, unsigned int sum, int *errp); +extern unsigned int csum_partial_copy_from_user(const unsigned char __user *src, + unsigned char *dst, int len, unsigned int sum, int *errp); /* * Optimized for IP headers, which always checksum on 4 octet boundaries. diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 3edb5db3eace..ca0eac647a05 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h @@ -131,15 +131,15 @@ typedef u32 compat_sigset_word; */ typedef u32 compat_uptr_t; -static inline void *compat_ptr(compat_uptr_t uptr) +static inline void __user *compat_ptr(compat_uptr_t uptr) { - return (void *)(unsigned long)uptr; + return (void __user *)(unsigned long)uptr; } -static __inline__ void *compat_alloc_user_space(long len) +static __inline__ void __user *compat_alloc_user_space(long len) { struct pt_regs *regs = ¤t->thread.regs; - return (void *)regs->gr[30]; + return (void __user *)regs->gr[30]; } #endif /* _ASM_PARISC_COMPAT_H */ diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index 15a9374c1c0f..a463c8642cab 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h @@ -13,8 +13,6 @@ #ifdef __KERNEL__ -#include <linux/config.h> - #ifndef MAX_HWIFS #define MAX_HWIFS 2 #endif diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h index 4e5fad213c39..75654ba93353 100644 --- a/include/asm-parisc/irq.h +++ b/include/asm-parisc/irq.h @@ -40,10 +40,12 @@ struct hw_interrupt_type; void no_ack_irq(unsigned int irq); void no_end_irq(unsigned int irq); -extern int txn_alloc_irq(void); +extern int txn_alloc_irq(unsigned int nbits); extern int txn_claim_irq(int); -extern unsigned int txn_alloc_data(int, unsigned int); -extern unsigned long txn_alloc_addr(int); +extern unsigned int txn_alloc_data(unsigned int); +extern unsigned long txn_alloc_addr(unsigned int); + +extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *); extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *); diff --git a/include/asm-parisc/numnodes.h b/include/asm-parisc/numnodes.h index dcdd933eb60b..6c67651efd1c 100644 --- a/include/asm-parisc/numnodes.h +++ b/include/asm-parisc/numnodes.h @@ -1,8 +1,6 @@ #ifndef _ASM_MAX_NUMNODES_H #define _ASM_MAX_NUMNODES_H -#include <linux/config.h> - /* Max 8 Nodes */ #define NODES_SHIFT 3 diff --git a/include/asm-parisc/serial.h b/include/asm-parisc/serial.h index 230644f9e28e..239c5dcab7e6 100644 --- a/include/asm-parisc/serial.h +++ b/include/asm-parisc/serial.h @@ -2,8 +2,6 @@ * include/asm-parisc/serial.h */ -#include <linux/config.h> - /* * This assumes you have a 7.272727 MHz clock for your UART. * The documentation implies a 40Mhz clock, and elsewhere a 7Mhz clock diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index cd4beefef333..358f577c8eb8 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h @@ -123,13 +123,14 @@ struct siginfo; * compiler doesn't support code which changes or tests the address of * the function in the little struct. This is really ugly -PB */ -typedef __kernel_caddr_t __sighandler_t; +typedef char __user *__sighandler_t; #else -typedef void (*__sighandler_t)(int); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; #endif typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 83eef4fde873..266b44fcfaa0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -219,6 +219,7 @@ enum rq_flag_bits { __REQ_PM_SHUTDOWN, /* shutdown request */ __REQ_BAR_PREFLUSH, /* barrier pre-flush done */ __REQ_BAR_POSTFLUSH, /* barrier post-flush */ + __REQ_BAR_FLUSH, /* rq is the flush request */ __REQ_NR_BITS, /* stops here */ }; @@ -246,6 +247,7 @@ enum rq_flag_bits { #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN) #define REQ_BAR_PREFLUSH (1 << __REQ_BAR_PREFLUSH) #define REQ_BAR_POSTFLUSH (1 << __REQ_BAR_POSTFLUSH) +#define REQ_BAR_FLUSH (1 << __REQ_BAR_FLUSH) /* * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 56fa057bf0d7..70a4ebb5d964 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -693,6 +693,9 @@ COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE) COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO) COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO) COMPATIBLE_IOCTL(USBDEVFS_RESET) +COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32) +COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) +COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) /* MTD */ COMPATIBLE_IOCTL(MEMGETINFO) diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 8cf0e3f290bf..ee54f81faad5 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -20,6 +20,7 @@ typedef int (elevator_may_queue_fn) (request_queue_t *, int); typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, int); typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); +typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); typedef int (elevator_init_fn) (request_queue_t *, elevator_t *); typedef void (elevator_exit_fn) (elevator_t *); @@ -34,6 +35,7 @@ struct elevator_ops elevator_add_req_fn *elevator_add_req_fn; elevator_remove_req_fn *elevator_remove_req_fn; elevator_requeue_req_fn *elevator_requeue_req_fn; + elevator_deactivate_req_fn *elevator_deactivate_req_fn; elevator_queue_empty_fn *elevator_queue_empty_fn; elevator_completed_req_fn *elevator_completed_req_fn; @@ -87,6 +89,7 @@ extern void elv_merge_requests(request_queue_t *, struct request *, extern void elv_merged_request(request_queue_t *, struct request *); extern void elv_remove_request(request_queue_t *, struct request *); extern void elv_requeue_request(request_queue_t *, struct request *); +extern void elv_deactivate_request(request_queue_t *, struct request *); extern int elv_queue_empty(request_queue_t *); extern struct request *elv_next_request(struct request_queue *q); extern struct request *elv_former_request(request_queue_t *, struct request *); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b65f84ec1118..a0bf80e45aee 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2068,8 +2068,8 @@ #define PCI_VENDOR_ID_TOPSPIN 0x1867 -#define PCI_VENDOR_ID_ARC 0x192E -#define PCI_DEVICE_ID_ARC_EHCI 0x0101 +#define PCI_VENDOR_ID_TDI 0x192E +#define PCI_DEVICE_ID_TDI_EHCI 0x0101 #define PCI_VENDOR_ID_SYMPHONY 0x1c1c #define PCI_DEVICE_ID_SYMPHONY_101 0x0001 diff --git a/include/linux/usb.h b/include/linux/usb.h index 7dbcc054c7dc..8d2687ae39ff 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -70,6 +70,7 @@ struct usb_host_interface { */ struct usb_host_endpoint *endpoint; + char *string; /* iInterface string, if present */ unsigned char *extra; /* Extra descriptors */ int extralen; }; @@ -189,6 +190,8 @@ struct usb_interface_cache { /** * struct usb_host_config - representation of a device's configuration * @desc: the device's configuration descriptor. + * @string: pointer to the cached version of the iConfiguration string, if + * present for this configuration. * @interface: array of pointers to usb_interface structures, one for each * interface in the configuration. The number of interfaces is stored * in desc.bNumInterfaces. These pointers are valid only while the @@ -225,6 +228,7 @@ struct usb_interface_cache { struct usb_host_config { struct usb_config_descriptor desc; + char *string; /* the interfaces associated with this configuration, * stored in no particular order */ struct usb_interface *interface[USB_MAXINTERFACES]; @@ -285,6 +289,10 @@ struct usb_bus { struct class_device class_dev; /* class device for this bus */ void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ +#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) + struct mon_bus *mon_bus; /* non-null when associated */ + int monitored; /* non-zero when monitored */ +#endif }; #define to_usb_bus(d) container_of(d, struct usb_bus, class_dev) @@ -338,6 +346,9 @@ struct usb_device { int have_langid; /* whether string_langid is valid yet */ int string_langid; /* language ID for strings */ + char *product; + char *manufacturer; + char *serial; /* static strings from the device */ struct list_head filelist; struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ @@ -986,13 +997,13 @@ extern int usb_reset_configuration(struct usb_device *dev); extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); /* - * timeouts, in seconds, used for sending/receiving control messages + * timeouts, in milliseconds, used for sending/receiving control messages * they typically complete within a few frames (msec) after they're issued * USB identifies 5 second timeouts, maybe more in a few cases, and a few * slow devices (like some MGE Ellipse UPSes) actually push that limit. */ -#define USB_CTRL_GET_TIMEOUT 5 -#define USB_CTRL_SET_TIMEOUT 5 +#define USB_CTRL_GET_TIMEOUT 5000 +#define USB_CTRL_SET_TIMEOUT 5000 /** diff --git a/include/linux/usb_cdc.h b/include/linux/usb_cdc.h new file mode 100644 index 000000000000..0b8d9a78a51a --- /dev/null +++ b/include/linux/usb_cdc.h @@ -0,0 +1,162 @@ +/* + * USB Communications Device Class (CDC) definitions + * + * CDC says how to talk to lots of different types of network adapters, + * notably ethernet adapters and various modems. It's used mostly with + * firmware based USB peripherals. + */ + +#define USB_CDC_SUBCLASS_ACM 2 +#define USB_CDC_SUBCLASS_ETHERNET 6 + +#define USB_CDC_PROTO_NONE 0 + +#define USB_CDC_ACM_PROTO_AT_V25TER 1 +#define USB_CDC_ACM_PROTO_AT_PCCA101 2 +#define USB_CDC_ACM_PROTO_AT_PCCA101_WAKE 3 +#define USB_CDC_ACM_PROTO_AT_GSM 4 +#define USB_CDC_ACM_PROTO_AT_3G 5 +#define USB_CDC_ACM_PROTO_AT_CDMA 6 +#define USB_CDC_ACM_PROTO_VENDOR 0xff + +/*-------------------------------------------------------------------------*/ + +/* + * Class-Specific descriptors ... there are a couple dozen of them + */ + +#define USB_CDC_HEADER_TYPE 0x00 /* header_desc */ +#define USB_CDC_CALL_MANAGEMENT_TYPE 0x01 /* call_mgmt_descriptor */ +#define USB_CDC_ACM_TYPE 0x02 /* acm_descriptor */ +#define USB_CDC_UNION_TYPE 0x06 /* union_desc */ +#define USB_CDC_COUNTRY_TYPE 0x07 +#define USB_CDC_ETHERNET_TYPE 0x0f /* ether_desc */ + +/* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ +struct usb_cdc_header_desc { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __le16 bcdCDC; +} __attribute__ ((packed)); + +/* "Call Management Descriptor" from CDC spec 5.2.3.2 */ +struct usb_cdc_call_mgmt_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __u8 bmCapabilities; +#define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01 +#define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02 + + __u8 bDataInterface; +} __attribute__ ((packed)); + +/* "Abstract Control Management Descriptor" from CDC spec 5.2.3.3 */ +struct usb_cdc_acm_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __u8 bmCapabilities; +} __attribute__ ((packed)); + +/* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ +struct usb_cdc_union_desc { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __u8 bMasterInterface0; + __u8 bSlaveInterface0; + /* ... and there could be other slave interfaces */ +} __attribute__ ((packed)); + +/* "Ethernet Networking Functional Descriptor" from CDC spec 5.2.3.16 */ +struct usb_cdc_ether_desc { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __u8 iMACAddress; + __le32 bmEthernetStatistics; + __le16 wMaxSegmentSize; + __le16 wNumberMCFilters; + __u8 bNumberPowerFilters; +} __attribute__ ((packed)); + +/*-------------------------------------------------------------------------*/ + +/* + * Class-Specific Control Requests (6.2) + * + * section 3.6.2.1 table 4 has the ACM profile, for modems. + * section 3.8.2 table 10 has the ethernet profile. + * + * Microsoft's RNDIS stack for Ethernet is a vendor-specific CDC ACM variant, + * heavily dependent on the encapsulated (proprietary) command mechanism. + */ + +#define USB_CDC_SEND_ENCAPSULATED_COMMAND 0x00 +#define USB_CDC_GET_ENCAPSULATED_RESPONSE 0x01 +#define USB_CDC_REQ_SET_LINE_CODING 0x20 +#define USB_CDC_REQ_GET_LINE_CODING 0x21 +#define USB_CDC_REQ_SET_CONTROL_LINE_STATE 0x22 +#define USB_CDC_REQ_SEND_BREAK 0x23 +#define USB_CDC_SET_ETHERNET_MULTICAST_FILTERS 0x40 +#define USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER 0x41 +#define USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER 0x42 +#define USB_CDC_SET_ETHERNET_PACKET_FILTER 0x43 +#define USB_CDC_GET_ETHERNET_STATISTIC 0x44 + +/* Line Coding Structure from CDC spec 6.2.13 */ +struct usb_cdc_line_coding { + __le32 dwDTERate; + __u8 bCharFormat; +#define USB_CDC_1_STOP_BITS 0 +#define USB_CDC_1_5_STOP_BITS 1 +#define USB_CDC_2_STOP_BITS 2 + + __u8 bParityType; +#define USB_CDC_NO_PARITY 0 +#define USB_CDC_ODD_PARITY 1 +#define USB_CDC_EVEN_PARITY 2 +#define USB_CDC_MARK_PARITY 3 +#define USB_CDC_SPACE_PARITY 4 + + __u8 bDataBits; +} __attribute__ ((packed)); + +/* table 62; bits in multicast filter */ +#define USB_CDC_PACKET_TYPE_PROMISCUOUS (1 << 0) +#define USB_CDC_PACKET_TYPE_ALL_MULTICAST (1 << 1) /* no filter */ +#define USB_CDC_PACKET_TYPE_DIRECTED (1 << 2) +#define USB_CDC_PACKET_TYPE_BROADCAST (1 << 3) +#define USB_CDC_PACKET_TYPE_MULTICAST (1 << 4) /* filtered */ + + +/*-------------------------------------------------------------------------*/ + +/* + * Class-Specific Notifications (6.3) sent by interrupt transfers + * + * section 3.8.2 table 11 of the CDC spec lists Ethernet notifications + * section 3.6.2.1 table 5 specifies ACM notifications, accepted by RNDIS + * RNDIS also defines its own bit-incompatible notifications + */ + +#define USB_CDC_NOTIFY_NETWORK_CONNECTION 0x00 +#define USB_CDC_NOTIFY_RESPONSE_AVAILABLE 0x01 +#define USB_CDC_NOTIFY_SERIAL_STATE 0x20 +#define USB_CDC_NOTIFY_SPEED_CHANGE 0x2a + +struct usb_cdc_notification { + __u8 bmRequestType; + __u8 bNotificationType; + __le16 wValue; + __le16 wIndex; + __le16 wLength; +} __attribute__ ((packed)); + diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index aed8193eb420..fb57c2217468 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h @@ -32,6 +32,7 @@ #define _LINUX_USBDEVICE_FS_H #include <linux/types.h> +#include <linux/compat.h> /* --------------------------------------------------------------------- */ @@ -123,6 +124,24 @@ struct usbdevfs_hub_portinfo { char port [127]; /* e.g. port 3 connects to device 27 */ }; +#ifdef CONFIG_COMPAT +struct usbdevfs_urb32 { + unsigned char type; + unsigned char endpoint; + compat_int_t status; + compat_uint_t flags; + compat_caddr_t buffer; + compat_int_t buffer_length; + compat_int_t actual_length; + compat_int_t start_frame; + compat_int_t number_of_packets; + compat_int_t error_count; + compat_uint_t signr; + compat_caddr_t usercontext; /* unused */ + struct usbdevfs_iso_packet_desc iso_frame_desc[0]; +}; +#endif + #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) #define USBDEVFS_RESETEP _IOR('U', 3, unsigned int) @@ -130,9 +149,12 @@ struct usbdevfs_hub_portinfo { #define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int) #define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver) #define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb) +#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_REAPURBNDELAY _IOW('U', 13, void *) +#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) @@ -143,5 +165,4 @@ struct usbdevfs_hub_portinfo { #define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int) #define USBDEVFS_DISCONNECT _IO('U', 22) #define USBDEVFS_CONNECT _IO('U', 23) - #endif /* _LINUX_USBDEVICE_FS_H */ |
