diff options
| author | David Brownell <david-b@pacbell.net> | 2002-09-30 02:28:15 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-09-30 02:28:15 -0700 |
| commit | 846f917ce02bc1aeac7f9f7b40da39d066a4481e (patch) | |
| tree | 43e0570f82cc0696ffe75a868174197da9e4927d /include/linux | |
| parent | b161105568b50e519168c30130f0bf877e536949 (diff) | |
[PATCH] usbcore misc cleanup
This has minor usbcore cleanups:
DOC:
- the changes passing a usb_interface to driver probe() and disconnect()
weren't reflected in their adjacent docs. likewise they still said
it was possible to get a null usb_device_id (no more).
- the (root) hub API restrictions from rmk's ARM patch weren't
flagged
- mention the non-dma-coherent cache issue for usb_buffer_alloc()
- mention disconnect() cleanup issue with usb_{control,bulk}_msg()
[ you can't cancel those urbs from disconnect() ]
CODE
- make driver ioctl() use 'usb_interface' too ... this update
also resolves an old 'one instance per device' bad assumption
- module locking on driver->ioctl() was goofy, kept BKL way too
long and didn't try_inc_mod_count() like the rest of usbcore
- hcd unlink code treated iso inappropriately like interrupt;
only interrupt still wants that automagic mode
- move iso init out of ohci into shared submit_urb logic
- remove interrupt transfer length restriction; hcds that don't
handle packetization (just like bulk :) should be updated,
but device drivers won't care for now.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb.h | 25 | ||||
| -rw-r--r-- | include/linux/usbdevice_fs.h | 2 |
2 files changed, 12 insertions, 15 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5d323aa0d36e..b65e61a9fc52 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -452,9 +452,9 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) * User mode code can read these tables to choose which modules to load. * Declare the table as a MODULE_DEVICE_TABLE. * - * The third probe() parameter will point to a matching entry from this - * table. (Null value reserved.) Use the driver_data field for each - * match to hold information tied to that match: device quirks, etc. + * A probe() parameter will point to a matching entry from this table. + * Use the driver_info field for each match to hold information tied + * to that match: device quirks, etc. * * Terminate the driver's table with an all-zeroes entry. * Use the flag values to control which fields are compared. @@ -604,17 +604,14 @@ struct usb_device_id { * @name: The driver name should be unique among USB drivers, * and should normally be the same as the module name. * @probe: Called to see if the driver is willing to manage a particular - * interface on a device. The probe routine returns a handle that - * will later be provided to disconnect(), or a null pointer to - * indicate that the driver will not handle the interface. - * The handle is normally a pointer to driver-specific data. - * If the probe() routine needs to access the interface - * structure itself, use usb_ifnum_to_if() to make sure it's using - * the right one. + * interface on a device. If it is, probe returns zero and uses + * dev_set_drvdata() to associate driver-specific data with the + * interface. It may also use usb_set_interface() to specify the + * appropriate altsetting. If unwilling to manage the interface, + * return a negative errno value. * @disconnect: Called when the interface is no longer accessible, usually - * because its device has been (or is being) disconnected. The - * handle passed is what was returned by probe(), or was provided - * to usb_driver_claim_interface(). + * because its device has been (or is being) disconnected or the + * driver module is being unloaded. * @ioctl: Used for drivers that want to talk to userspace through * the "usbfs" filesystem. This lets devices provide ways to * expose information to user space regardless of where they @@ -648,7 +645,7 @@ struct usb_driver { void (*disconnect) (struct usb_interface *intf); - int (*ioctl) (struct usb_device *dev, unsigned int code, void *buf); + int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf); const struct usb_device_id *id_table; diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index de18e956f47b..84653713900c 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h @@ -108,7 +108,7 @@ struct usbdevfs_urb { struct usbdevfs_iso_packet_desc iso_frame_desc[0]; }; -/* ioctls for talking to drivers in the usbcore module: */ +/* ioctls for talking directly to drivers */ struct usbdevfs_ioctl { int ifno; /* interface 0..N ; negative numbers reserved */ int ioctl_code; /* MUST encode size + direction of data so the |
