patch-2.3.22 linux/drivers/usb/usb.h
Next file: linux/drivers/usb/usb_scsi.c
Previous file: linux/drivers/usb/usb.c
Back to the patch index
Back to the overall index
- Lines: 82
- Date:
Thu Oct 14 14:59:46 1999
- Orig file:
v2.3.21/linux/drivers/usb/usb.h
- Orig date:
Sat Oct 9 11:47:50 1999
diff -u --recursive --new-file v2.3.21/linux/drivers/usb/usb.h linux/drivers/usb/usb.h
@@ -351,6 +351,9 @@
void (*disconnect)(struct usb_device *);
struct list_head driver_list;
+
+ struct file_operations *fops;
+ int minor;
};
/*
@@ -455,7 +458,7 @@
int (*deallocate)(struct usb_device *);
int (*control_msg)(struct usb_device *, unsigned int, devrequest *, void *, int, int);
int (*bulk_msg)(struct usb_device *, unsigned int, void *, int, unsigned long *, int);
- int (*request_irq)(struct usb_device *, unsigned int, usb_device_irq, int, void *, void **);
+ int (*request_irq)(struct usb_device *, unsigned int, usb_device_irq, int, void *, void **, long);
int (*release_irq)(struct usb_device *, void *);
void *(*request_bulk)(struct usb_device *, unsigned int, usb_device_irq,
void *, int, void *);
@@ -548,6 +551,7 @@
extern void usb_free_dev(struct usb_device *);
extern void usb_inc_dev_use(struct usb_device *);
#define usb_dec_dev_use usb_free_dev
+extern void usb_release_bandwidth(struct usb_device *, int);
extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout);
@@ -611,6 +615,11 @@
* appropriately.
*/
+#define PIPE_ISOCHRONOUS 0
+#define PIPE_INTERRUPT 1
+#define PIPE_CONTROL 2
+#define PIPE_BULK 3
+
#define usb_maxpacket(dev, pipe, out) (out \
? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \
: (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] )
@@ -624,10 +633,10 @@
#define usb_pipedata(pipe) (((pipe) >> 19) & 1)
#define usb_pipeslow(pipe) (((pipe) >> 26) & 1)
#define usb_pipetype(pipe) (((pipe) >> 30) & 3)
-#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == 0)
-#define usb_pipeint(pipe) (usb_pipetype((pipe)) == 1)
-#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == 2)
-#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == 3)
+#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS)
+#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT)
+#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL)
+#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK)
#define PIPE_DEVEP_MASK 0x0007ff00
@@ -653,14 +662,14 @@
}
/* Create various pipes... */
-#define usb_sndctrlpipe(dev,endpoint) ((2 << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvctrlpipe(dev,endpoint) ((2 << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_sndisocpipe(dev,endpoint) ((0 << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvisocpipe(dev,endpoint) ((0 << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_sndbulkpipe(dev,endpoint) ((3 << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvbulkpipe(dev,endpoint) ((3 << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_snddefctrl(dev) ((2 << 30) | __default_pipe(dev))
-#define usb_rcvdefctrl(dev) ((2 << 30) | __default_pipe(dev) | USB_DIR_IN)
+#define usb_sndctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint))
+#define usb_rcvctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
+#define usb_sndisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint))
+#define usb_rcvisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
+#define usb_sndbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint))
+#define usb_rcvbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
+#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30) | __default_pipe(dev))
+#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | __default_pipe(dev) | USB_DIR_IN)
/*
* Send and receive control messages..
@@ -739,4 +748,3 @@
#endif /* __KERNEL__ */
#endif
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)