Re: Add commit 3f2cee73b650 (USB: usbfs: allow URBs to be reaped after disconnection) to -stable
On Fri, Jul 31, 2015 at 10:56:20AM -0400, Alan Stern wrote: Greg: The $SUBJECT commit was added in the 4.0 kernel, but I forgot to mark it for inclusion in the -stable kernels. The problem it fixes is a nasty one, affecting people who use libusb: When a device is disconnected while a libusb transfer is in progress, libusb never receives a completion notification for the transfer. This can result in a hang or a segmentation error, depending on how the userspace program tries to cope. The patch may require some context adjustment before it will apply to the longterm -stable trees, but I think it should be added. Alan Stern -- To unsubscribe from this list: send the line unsubscribe stable in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Queuing it for the 3.16 kernel as well. Thanks! Cheers, -- Luís -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH] usb: gadget: at91_udc: move prepare clk into process context
Hi Felipe, On Thu, Nov 20, 2014 at 01:50:49PM -0600, Felipe Balbi wrote: On Wed, Nov 19, 2014 at 04:37:27PM +0100, Nicolas Ferre wrote: From: Ronald Wahl ronald.w...@raritan.com Commit 7628083227b6bc4a7e33d7c381d7a4e558424b6b (usb: gadget: at91_udc: prepare clk before calling enable) added clock preparation in interrupt context. This is not allowed as it might sleep. Also setting the clock rate is unsafe to call from there for the same reason. Move clock preparation and setting clock rate into process context (at91udc_probe). Signed-off-by: Ronald Wahl ronald.w...@raritan.com Acked-by: Alexandre Belloni alexandre.bell...@free-electrons.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com Cc: Felipe Balbi ba...@ti.com Cc: sta...@vger.kernel.org # v3.17+ --- Hi Felipe, I forgot to answer you on this patch. So I resend it now with the proper stable tag. You can also queue it during this -rc phase if you feel it is still possible. I think it's late for v3.18, so it'll go on v3.19 and get backported to 3.17 and 3.18. Sorry :-s Although this commit (b2ba27a5c56f usb: gadget: at91_udc: move prepare clk into process context) is tagged for stable v3.17+, it seems like it could be applied to earlier kernels. 3.16, 3.13 and 3.12 seem to be affected by the same issue (and they all include commit 7628083227b6 usb: gadget: at91_udc: prepare clk before calling enable). Is there any reason for not applying it in these trees? Cheers, -- Luís cheers -- balbi -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH] usb: gadget: at91_udc: move prepare clk into process context
On Fri, Dec 19, 2014 at 03:08:15PM +0100, Nicolas Ferre wrote: Le 19/12/2014 15:02, Ronald Wahl a écrit : On 19.12.2014 14:51, Luis Henriques wrote: Hi Felipe, On Thu, Nov 20, 2014 at 01:50:49PM -0600, Felipe Balbi wrote: On Wed, Nov 19, 2014 at 04:37:27PM +0100, Nicolas Ferre wrote: From: Ronald Wahl ronald.w...@raritan.com Commit 7628083227b6bc4a7e33d7c381d7a4e558424b6b (usb: gadget: at91_udc: prepare clk before calling enable) added clock preparation in interrupt context. This is not allowed as it might sleep. Also setting the clock rate is unsafe to call from there for the same reason. Move clock preparation and setting clock rate into process context (at91udc_probe). Signed-off-by: Ronald Wahl ronald.w...@raritan.com Acked-by: Alexandre Belloni alexandre.bell...@free-electrons.com Acked-by: Boris Brezillon boris.brezil...@free-electrons.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com Cc: Felipe Balbi ba...@ti.com Cc: sta...@vger.kernel.org # v3.17+ --- Hi Felipe, I forgot to answer you on this patch. So I resend it now with the proper stable tag. You can also queue it during this -rc phase if you feel it is still possible. I think it's late for v3.18, so it'll go on v3.19 and get backported to 3.17 and 3.18. Sorry :-s Although this commit (b2ba27a5c56f usb: gadget: at91_udc: move prepare clk into process context) is tagged for stable v3.17+, it seems like it could be applied to earlier kernels. 3.16, 3.13 and 3.12 seem to be affected by the same issue (and they all include commit 7628083227b6 usb: gadget: at91_udc: prepare clk before calling enable). Is there any reason for not applying it in these trees? Not to forget 3.14 (LTS) which was the branch where I primarily found the issue... Yes, of course! Sorry. Well it's maybe an issue with the re-naming of the directory to drivers/usb/gadget/udc/ introduced by patch: 90fccb529d24 (usb: gadget: Gadget directory cleanup - group UDC drivers) The patch doesn't apply out of the box but it surely can be applied in those earlier kernels. Right, the file was renamed but the backport seems to be trivial. Thanks for confirming. Cheers, -- Luís Thanks, bye. -- Nicolas Ferre -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Potential USB PHY error handling fix for stable
On Wed, Oct 29, 2014 at 10:10:12PM +, Mark Brown wrote: Hi, One of the Linaro stable kernel users has suggested 2c4e3dbf63b39d (usb: phy: return -ENODEV on failure of try_module_get) as a fix for the stable kernel. While it's error handling that's being fixed this does seem like a reasonable candidate, it's a very simple fix and the behaviour without the change is to return a NULL pointer rather than an error pointer which callers will interpret as success which isn't good. Does this seem reasonable? Thanks, Mark Thank you, I'll queue this fix for the 3.16 extended stable. Cheers, -- Luís -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 054/150] HID: clean up quirk for Sony RF receivers
3.5.7.9 -stable review patch. If anyone has any objections, please let me know. -- From: =?UTF-8?q?Fernando=20Luis=20V=C3=A1zquez=20Cao?= commit 99d249021abd4341771523ed8dd7946276103432 upstream. Document what the fix-up is does and make it more robust by ensuring that it is only applied to the USB interface that corresponds to the mouse (sony_report_fixup() is called once per interface during probing). Cc: linux-in...@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp Signed-off-by: Jiri Kosina jkos...@suse.cz Signed-off-by: Luis Henriques luis.henriq...@canonical.com --- drivers/hid/hid-sony.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 963bda1..4142c21 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -44,9 +44,19 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, { struct sony_sc *sc = hid_get_drvdata(hdev); - if ((sc-quirks VAIO_RDESC_CONSTANT) - *rsize = 56 rdesc[54] == 0x81 rdesc[55] == 0x07) { + /* +* Some Sony RF receivers wrongly declare the mouse pointer as a +* a constant non-data variable. +*/ + if ((sc-quirks VAIO_RDESC_CONSTANT) *rsize = 56 + /* usage page: generic desktop controls */ + /* rdesc[0] == 0x05 rdesc[1] == 0x01 */ + /* usage: mouse */ + rdesc[2] == 0x09 rdesc[3] == 0x02 + /* input (usage page for x,y axes): constant, variable, relative */ + rdesc[54] == 0x81 rdesc[55] == 0x07) { hid_info(hdev, Fixing up Sony RF Receiver report descriptor\n); + /* input: data, variable, relative */ rdesc[55] = 0x06; } -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 053/150] HID: add support for Sony RF receiver with USB product id 0x0374
3.5.7.9 -stable review patch. If anyone has any objections, please let me know. -- From: =?UTF-8?q?Fernando=20Luis=20V=C3=A1zquez=20Cao?= commit a464918419f94a0043d2f549d6defb4c3f69f68a upstream. Some Vaio desktop computers, among them the VGC-LN51JGB multimedia PC, have a RF receiver, multi-interface USB device 054c:0374, that is used to connect a wireless keyboard and a wireless mouse. The keyboard works flawlessly, but the mouse (VGP-WMS3 in my case) does not seem to be generating any pointer events. The problem is that the mouse pointer is wrongly declared as a constant non-data variable in the report descriptor (see lsusb and usbhid-dump output below), with the consequence that it is ignored by the HID code. Add this device to the have-special-driver list and fix up the report descriptor in the Sony-specific driver which happens to already have a fixup for a similar firmware bug. Bus 003 Device 002: ID 054c:0374 Sony Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x054c Sony Corp. idProduct 0x0374 iSerial 0 [...] Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 2 RF Receiver [...] Report Descriptor: (length is 100) [...] Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x30 ] 48 Direction-X Item(Local ): Usage, data= [ 0x31 ] 49 Direction-Y Item(Global): Report Count, data= [ 0x02 ] 2 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Logical Minimum, data= [ 0x81 ] 129 Item(Global): Logical Maximum, data= [ 0x7f ] 127 Item(Main ): Input, data= [ 0x07 ] 7 Constant Variable Relative No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield 003:002:001:DESCRIPTOR 1357910009.758544 05 01 09 02 A1 01 05 01 09 02 A1 02 85 01 09 01 A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01 81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 07 A1 02 85 01 09 38 35 00 45 00 15 81 25 7F 95 01 75 08 81 06 C0 A1 02 85 01 05 0C 15 81 25 7F 95 01 75 08 0A 38 02 81 06 C0 C0 C0 C0 Cc: linux-in...@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp Signed-off-by: Jiri Kosina jkos...@suse.cz [ luis: adjusted context ] Signed-off-by: Luis Henriques luis.henriq...@canonical.com --- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-sony.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 52bc936..2f85e59 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1641,6 +1641,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) }, { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) }, { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index de39a12..c04eec3 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -684,6 +684,7 @@ #define USB_VENDOR_ID_SONY 0x054c #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b +#define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE 0x0374 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 5cd25bd..963bda1 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -46,7 +46,7 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, if ((sc-quirks VAIO_RDESC_CONSTANT) *rsize = 56 rdesc[54] == 0x81 rdesc[55] == 0x07) { - hid_info(hdev, Fixing up Sony Vaio VGX report descriptor\n); + hid_info(hdev, Fixing
[ 3.5.y.z extended stable ] Patch HID: add support for Sony RF receiver with USB product id has been added to staging queue
This is a note to let you know that I have just added a patch titled HID: add support for Sony RF receiver with USB product id to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Luis -- From 751f9ee98fc9233840518f65f72a6232580c08ce Mon Sep 17 00:00:00 2001 From: Fernando Luis Vazquez Cao fernando...@lab.ntt.co.jp Date: Tue, 15 Jan 2013 19:40:48 +0900 Subject: [PATCH] HID: add support for Sony RF receiver with USB product id 0x0374 commit a464918419f94a0043d2f549d6defb4c3f69f68a upstream. Some Vaio desktop computers, among them the VGC-LN51JGB multimedia PC, have a RF receiver, multi-interface USB device 054c:0374, that is used to connect a wireless keyboard and a wireless mouse. The keyboard works flawlessly, but the mouse (VGP-WMS3 in my case) does not seem to be generating any pointer events. The problem is that the mouse pointer is wrongly declared as a constant non-data variable in the report descriptor (see lsusb and usbhid-dump output below), with the consequence that it is ignored by the HID code. Add this device to the have-special-driver list and fix up the report descriptor in the Sony-specific driver which happens to already have a fixup for a similar firmware bug. Bus 003 Device 002: ID 054c:0374 Sony Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x054c Sony Corp. idProduct 0x0374 iSerial 0 [...] Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 2 RF Receiver [...] Report Descriptor: (length is 100) [...] Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x30 ] 48 Direction-X Item(Local ): Usage, data= [ 0x31 ] 49 Direction-Y Item(Global): Report Count, data= [ 0x02 ] 2 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Logical Minimum, data= [ 0x81 ] 129 Item(Global): Logical Maximum, data= [ 0x7f ] 127 Item(Main ): Input, data= [ 0x07 ] 7 Constant Variable Relative No_Wrap Linear Preferred_State No_Null_Position Non_Volatile Bitfield 003:002:001:DESCRIPTOR 1357910009.758544 05 01 09 02 A1 01 05 01 09 02 A1 02 85 01 09 01 A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01 81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 07 A1 02 85 01 09 38 35 00 45 00 15 81 25 7F 95 01 75 08 81 06 C0 A1 02 85 01 05 0C 15 81 25 7F 95 01 75 08 0A 38 02 81 06 C0 C0 C0 C0 Cc: linux-in...@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp Signed-off-by: Jiri Kosina jkos...@suse.cz [ luis: adjusted context ] Signed-off-by: Luis Henriques luis.henriq...@canonical.com --- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + drivers/hid/hid-sony.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 52bc936..2f85e59 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1641,6 +1641,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) }, { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) }, { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index de39a12..c04eec3 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -684,6 +684,7 @@ #define USB_VENDOR_ID_SONY 0x054c #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b +#define