From: Greg KH To: torvalds@transmeta.com Cc: linux-usb-devel@lists.sourceforge.net Subject: [BK PATCH] USB changes for 2.5.7-pre2 Pull from: http://linuxusb.bkbits.net/linus-2.5 drivers/usb/Config.help | 1 drivers/usb/catc.c | 291 ++++++++++++---- drivers/usb/hid-core.c | 72 +++- drivers/usb/hid.h | 3 drivers/usb/hiddev.c | 114 ++++-- drivers/usb/printer.c | 607 ++++++++++++++++++++++++++--------- drivers/usb/serial/cyberjack.c | 8 drivers/usb/serial/digi_acceleport.c | 14 drivers/usb/serial/empeg.c | 8 drivers/usb/serial/ftdi_sio.c | 4 drivers/usb/serial/io_edgeport.c | 18 - drivers/usb/serial/ipaq.c | 4 drivers/usb/serial/ir-usb.c | 4 drivers/usb/serial/keyspan.c | 14 drivers/usb/serial/keyspan_pda.c | 4 drivers/usb/serial/kl5kusb105.c | 8 drivers/usb/serial/mct_u232.c | 2 drivers/usb/serial/omninet.c | 4 drivers/usb/serial/pl2303.c | 8 drivers/usb/serial/usbserial.c | 4 drivers/usb/serial/visor.c | 10 drivers/usb/serial/whiteheat.c | 2 include/linux/hiddev.h | 12 23 files changed, 879 insertions(+), 337 deletions(-) ------ ChangeSet@1.525, 2002-03-17 10:07:21-08:00, paschal@rcsis.com USB printer update - bind to 7/1/2 alternate setting by default, to fix printing with HP LaserJet 1200 and 2200 - ioctls needed by the GPL user-mode IEEE 1284.4 driver which is part of the HP OfficeJet Linux driver (http://hpoj.sourceforge.net): - dynamic switching between 7/1/[123] alternate settings - sending HP vendor-specific channel-change-request to support memory card readers on HP PhotoSmart printers - inquire more information about the peripheral, including /proc/bus/usb/xx/yy linkage to get even more information - fix apparent array overflow (by 1 entry) in usblp_probe when more than the maximum number of USB printers are connected - for the 2.2 version, added MODULE_{INC,DEC}_USE_COUNT to prevent rmmoding of printer.o (and subsequent OOPSes) while a USB printer device is open - cleaned up the code in a few places by consolidating duplicated code drivers/usb/printer.c | 606 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 451 insertions(+), 155 deletions(-) ------ ChangeSet@1.526, 2002-03-17 10:14:24-08:00, stewart@inverse.wetlogic.net USB Urefs for hid-core/hiddev I've written a patch Vojtech and I discussed for enhancing the hiddev code to optionally provide more detailed output on read(). The old functionality is still supported by default, and in situations where HID usage codes are unique across reports, the old method is still preferable due to its terseness. The new method provides the ability to determine exactly which value has changed, in cases where the HID usage codes are not unique. It also provides a means to optionally receive notification when input reports are received from the device, whether or not any of the values in the report have changed. The details of the changes are as follows: - All current code behaves identically - A new ioctl pair HIDIOCGFLAG/HIDIOCSFLAG gets and clears flags on the hiddev device. - If you set the flag HIDDEV_FLAG_UREF, the read() call switches from reading hiddev_event structures to hiddev_usage_ref structures. The change takes effect immediately, even to already queued events that haven't been read() yet. Here's an example of enabling FLAG_UREF: { int flag = HIDDEV_FLAG_UREF; if (ioctl(fd, HIDIOCSFLAG, &flag) != 0) { perror("ioctl"); exit(1); } } - With the HIDDEV_FLAG_REPORT set (which is only allowed if HIDDEV_FLAG_UREF is also set), there is a special uref that will be read() in addition to the ones corresponding to changes in the device state: when uref.field_index is set to HID_FIELD_INDEX_NONE, this uref is a notification that the report referred to by report_type and report_id has been received from the device. This can be useful in situations when the notification of the arrival of a report is useful even if there is no change in state. drivers/usb/hid-core.c | 34 +++++++++++++- drivers/usb/hid.h | 1 drivers/usb/hiddev.c | 114 ++++++++++++++++++++++++++++++++++--------------- include/linux/hiddev.h | 12 ++++- 4 files changed, 123 insertions(+), 38 deletions(-) ------ ChangeSet@1.527, 2002-03-17 10:29:11-08:00, spse@secret.org.uk USB catc driver Here is a patch to add support for F5U011 to catc.c driver. The patch has been compile tested against 2.5.6 and 2.5.7pre1 (and tested against 2.5.5-dj1) and should apply cleanly. drivers/usb/Config.help | 1 drivers/usb/catc.c | 291 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 216 insertions(+), 76 deletions(-) ------ ChangeSet@1.528, 2002-03-17 10:31:22-08:00, ganesh@tuxtop.vxindia.veritas.com USB serial drivers Several functions in the serial drivers can be called from bottom half or interrupt context. They must use the GFP_ATOMIC flag for calls to kmalloc() and usb_submit_urb(). Functions which must use GFP_ATOMIC: 1. All *_callback() functions. 2. Any code which is inside a spinlock. 3. write(), throttle(), unthrottle(), which may be called by the line discipline in bottom half context. Functions which can use GFP_KERNEL: 1. open(), close(), startup(), shutdown(), set_termios(). drivers/usb/serial/cyberjack.c | 8 ++++---- drivers/usb/serial/digi_acceleport.c | 14 +++++++------- drivers/usb/serial/empeg.c | 8 ++++---- drivers/usb/serial/ftdi_sio.c | 4 ++-- drivers/usb/serial/io_edgeport.c | 18 +++++++++--------- drivers/usb/serial/ipaq.c | 4 ++-- drivers/usb/serial/ir-usb.c | 4 ++-- drivers/usb/serial/keyspan.c | 14 +++++++------- drivers/usb/serial/keyspan_pda.c | 4 ++-- drivers/usb/serial/kl5kusb105.c | 8 ++++---- drivers/usb/serial/mct_u232.c | 2 +- drivers/usb/serial/omninet.c | 4 ++-- drivers/usb/serial/pl2303.c | 8 ++++---- drivers/usb/serial/usbserial.c | 4 ++-- drivers/usb/serial/visor.c | 10 +++++----- drivers/usb/serial/whiteheat.c | 2 +- 16 files changed, 58 insertions(+), 58 deletions(-) ------ ChangeSet@1.529, 2002-03-17 10:38:43-08:00, vojtech@suse.cz USB HID driver Workaround for the ATEN switches drivers/usb/hid-core.c | 38 ++++++++++++++++++++++++++++---------- drivers/usb/hid.h | 2 ++ 2 files changed, 30 insertions(+), 10 deletions(-) ------ ChangeSet@1.530, 2002-03-17 10:48:38-08:00, tai@imasy.or.jp USB printer patch added NEC printer to quirks list drivers/usb/printer.c | 1 + 1 files changed, 1 insertion(+)