diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-02-27 17:27:16 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-02-27 17:27:16 +0000 |
commit | 1f16c7700d04a735aa3df3ed26ab236e680c21ad (patch) | |
tree | 799ccaf32ee5b67a3fd075acab472e59c72735d8 /sys/dev/usb/usb_device.h | |
parent | 03a6b7577d94c2fbc97da1c5539e0bcae374f497 (diff) | |
download | FreeBSD-src-1f16c7700d04a735aa3df3ed26ab236e680c21ad.zip FreeBSD-src-1f16c7700d04a735aa3df3ed26ab236e680c21ad.tar.gz |
Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.
The /dev entries are layed out as follows,
/dev/usbctl = master device
/dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
/dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint
This also removes the custom permissions model from USB. Bump
__FreeBSD_version to 800066.
Submitted by: rink (earlier version)
Diffstat (limited to 'sys/dev/usb/usb_device.h')
-rw-r--r-- | sys/dev/usb/usb_device.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h index 4c296d4..bca3a1d 100644 --- a/sys/dev/usb/usb_device.h +++ b/sys/dev/usb/usb_device.h @@ -61,11 +61,12 @@ struct usb2_pipe { * The following structure defines an USB interface. */ struct usb2_interface { - struct usb2_perm perm; /* interface permissions */ struct usb2_interface_descriptor *idesc; device_t subdev; uint8_t alt_index; uint8_t parent_iface_index; + uint16_t ep_in_mask; /* bitmask of IN endpoints */ + uint16_t ep_out_mask; /* bitmask of OUT endpoints */ }; /* @@ -101,12 +102,12 @@ struct usb2_power_save { struct usb2_device { struct usb2_clear_stall_msg cs_msg[2]; /* generic clear stall * messages */ - struct usb2_perm perm; struct sx default_sx[2]; struct mtx default_mtx[1]; struct cv default_cv[2]; struct usb2_interface ifaces[USB_IFACE_MAX]; struct usb2_pipe default_pipe; /* Control Endpoint 0 */ + struct cdev *default_dev; /* Control Endpoint 0 device node */ struct usb2_pipe pipes[USB_EP_MAX]; struct usb2_power_save pwr_save;/* power save data */ @@ -120,10 +121,16 @@ struct usb2_device { struct usb2_temp_data *usb2_template_ptr; struct usb2_pipe *pipe_curr; /* current clear stall pipe */ struct usb2_fifo *fifo[USB_FIFO_MAX]; + + char ugen_name[20]; /* name of ugenX.X device */ struct usb2_symlink *ugen_symlink; /* our generic symlink */ + LIST_HEAD(,usb2_fs_privdata) pd_list; + uint32_t plugtime; /* copy of "ticks" */ + uint16_t ep_rd_opened; /* bitmask of endpoints opened */ + uint16_t ep_wr_opened; /* from the device nodes. */ uint16_t refcount; #define USB_DEV_REF_MAX 0xffff |