Re: [PATCH] usb: host: pci_quirks: fix memory leak, by adding iounmap

2015-11-29 Thread Saurabh Sengar
pinging in case this patch is lost. On 6 November 2015 at 17:46, Saurabh Sengar wrote: > added iounmap inorder to free memory mapped to base before returning > > Signed-off-by: Saurabh Sengar > --- > drivers/usb/host/pci-quirks.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

[PATCH 2/2] usb: dwc2: forbid queuing request to a disabled ep

2015-11-29 Thread changbin . du
From: "Du, Changbin" Queue a request to disabled ep doesn't make sense, and induce caller make mistakes. Here is a example for the android mtp gadget function driver. A mem corruption can happen on below senario. 1) On disconnect, mtp driver disable its EPs, 2) During send_file_work and receive

[PATCH 0/2] Two fix for dwc2 gadget driver

2015-11-29 Thread changbin . du
From: "Du, Changbin" With the first patch, enable a enabled ep will return -EBUSY. The second patch forbid queuing on disabled ep to avoid panic. Du, Changbin (2): usb: dwc2: add ep enabled flag to avoid double enable/disable usb: dwc2: forbid queuing request to a disabled ep drivers/usb/d

[PATCH 1/2] usb: dwc2: add ep enabled flag to avoid double enable/disable

2015-11-29 Thread changbin . du
From: "Du, Changbin" Enabling a already enabled ep is illegal, because the ep may has trbs running. Reprogram the ep may break running transfer. So udc driver must avoid this happening by return an error -EBUSY. Gadget function driver also should avoid such things, but that is out of udc driver.

Re: [PATCH 2/2] Minor improvement for smsc95xx netusb driver performance.

2015-11-29 Thread David Miller
From: Ameen Date: Wed, 25 Nov 2015 23:55:26 +0200 > if (csum) > - tx_cmd_b |= TX_CMD_B_CSUM_ENABLE; > - cpu_to_le32s(&tx_cmd_b); > - memcpy(skb->data, &tx_cmd_b, 4); > + tx_cmds.cmd_b |= TX_CMD_B_CSUM_ENABLE; You've corrupted the indentation here. -- To unsubscrib

Re: [PATCH] net: usb: ch9200: use kmemdup instead of kmalloc + memcpy

2015-11-29 Thread David Miller
From: Anup Limbu Date: Wed, 25 Nov 2015 15:37:21 +0530 > replace kmalloc + memset with kmemdup > > Signed-off-by: Anup Limbu I agree with Bjorn that this microturfing cleanup misses the real higher level opportunity to use the usbnet_read_cmd() and usbnet_write_cmd() helpers that already exist

[PATCH v6 5/5] Add ioctls to enable and disable local controls on an instrument

2015-11-29 Thread Dave Penkler
These ioctls provide support for the USBTMC-USB488 control requests for REN_CONTROL, GO_TO_LOCAL and LOCAL_LOCKOUT Signed-off-by: Dave Penkler --- drivers/usb/class/usbtmc.c | 71 include/uapi/linux/usb/tmc.h | 6 2 files changed, 77 insertion

[PATCH v6 4/5] Add ioctl to retrieve USBTMC-USB488 capabilities

2015-11-29 Thread Dave Penkler
This is a convenience function to obtain an instrument's capabilities from its file descriptor without having to access sysfs from the user program. Signed-off-by: Dave Penkler --- drivers/usb/class/usbtmc.c | 12 include/uapi/linux/usb/tmc.h | 21 ++--- 2 files ch

[PATCH v6 3/5] Add support for receiving USBTMC USB488 SRQ notifications via poll/select

2015-11-29 Thread Dave Penkler
Background: In many situations operations on multiple instruments need to be synchronized. poll/select provide a convenient way of waiting on a number of different instruments and other peripherals simultaneously. Signed-off-by: Dave Penkler --- drivers/usb/class/usbtmc.c | 23 ++

[PATCH v6 2/5] Add support for USBTMC USB488 SRQ notification with fasync

2015-11-29 Thread Dave Penkler
Background: By configuring an instrument's event status register various conditions can be reported via an SRQ notification. This complements the synchronous polling approach using the READ_STATUS_BYTE ioctl with an asynchronous notification. Signed-off-by: Dave Penkler --- drivers/usb/class/usb

[PATCH v6 1/5] Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.

2015-11-29 Thread Dave Penkler
Background: When performing a read on an instrument that is executing a function that runs longer than the USB timeout the instrument may hang and require a device reset to recover. The READ_STATUS_BYTE operation always returns even when the instrument is busy permitting to poll for the appropriate

[PATCH v6 0/5] usb: usbtmc: Add support for missing functions in USBTMC-USB488 spec

2015-11-29 Thread Dave Penkler
Implement support for the USB488 defined READ_STATUS_BYTE ioctl (1/5) and SRQ notifications with fasync (2/5) and poll/select (3/5) in order to be able to synchronize with variable duration instrument operations. Add ioctls for other USB488 requests: REN_CONTROL, GOTO_LOCAL and LOCAL_LOCKOUT. (4/5

Re: [PATCH v2] hid: usbhid: hid-core: fix recursive deadlock

2015-11-29 Thread Ioan-Adrian Ratiu
On Fri, 20 Nov 2015 22:19:02 +0200 Ioan-Adrian Ratiu wrote: > The critical section protected by usbhid->lock in hid_ctrl() is too > big and because of this it causes a recursive deadlock. "Too big" means > the case statement and the call to hid_input_report() do not need to be > protected by the