summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_dev.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-03-17 01:46:40 +0000
committerthompsa <thompsa@FreeBSD.org>2009-03-17 01:46:40 +0000
commit152e3d301d04fa2aa6bf7600705f0170d2ba27c0 (patch)
tree85006ed8a85d5213a94fe0bf4564ece9a33ebbfe /sys/dev/usb/usb_dev.h
parentaaec37fdbe35075f7a6fb6c59c1541265361965d (diff)
downloadFreeBSD-src-152e3d301d04fa2aa6bf7600705f0170d2ba27c0.zip
FreeBSD-src-152e3d301d04fa2aa6bf7600705f0170d2ba27c0.tar.gz
MFp4 //depot/projects/usb 159225,159241,159292
Fix regression issue in the USB file system interface. - Use cdev_privdata pointer as indicator of correct file handle. - Remove redundant FIFO opened flags. Don't send ZLP at close for ulpt and uscanner devices as this causes some models to stop working. This reverts back to the USB1 behaviour. Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_dev.h')
-rw-r--r--sys/dev/usb/usb_dev.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_dev.h b/sys/dev/usb/usb_dev.h
index 92be7af..e1c8b94 100644
--- a/sys/dev/usb/usb_dev.h
+++ b/sys/dev/usb/usb_dev.h
@@ -93,12 +93,12 @@ struct usb2_cdev_privdata {
int bus_index; /* bus index */
int dev_index; /* device index */
int ep_addr; /* endpoint address */
+ int fflags;
uint8_t fifo_index; /* FIFO index */
uint8_t is_read; /* location has read access */
uint8_t is_write; /* location has write access */
uint8_t is_uref; /* USB refcount decr. needed */
uint8_t is_usbfs; /* USB-FS is active */
- int fflags;
};
struct usb2_fs_privdata {
@@ -130,7 +130,8 @@ struct usb2_fifo {
struct usb2_xfer *xfer[2];
struct usb2_xfer **fs_xfer;
struct mtx *priv_mtx; /* client data */
- int opened; /* set if FIFO is opened by a FILE */
+ /* set if FIFO is opened by a FILE: */
+ struct usb2_cdev_privdata *curr_cpd;
void *priv_sc0; /* client data */
void *priv_sc1; /* client data */
void *queue_data;
@@ -194,5 +195,6 @@ struct usb2_symlink *usb2_alloc_symlink(const char *target);
void usb2_free_symlink(struct usb2_symlink *ps);
int usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry,
uint32_t user_len);
+void usb2_fifo_set_close_zlp(struct usb2_fifo *, uint8_t);
#endif /* _USB2_DEV_H_ */
OpenPOWER on IntegriCloud