Re: [RFC PATCH linux-next] USB: dwc3: dwc3_get_extcon() can be static

2018-05-18 Thread Roger Quadros
On 18/05/18 08:39, Andrzej Hajda wrote: > On 17.05.2018 18:06, kbuild test robot wrote: >> Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings") >> Signed-off-by: kbuild test robot > > It should be static of course, my bad. > > Reviewed-by: Andrzej

Re: [RFC PATCH linux-next] USB: dwc3: dwc3_get_extcon() can be static

2018-05-18 Thread Roger Quadros
On 18/05/18 10:47, Andrzej Hajda wrote: > On 18.05.2018 09:38, Roger Quadros wrote: >> On 18/05/18 08:39, Andrzej Hajda wrote: >>> On 17.05.2018 18:06, kbuild test robot wrote: Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings") Signed-off-by: kbuild test robot

[PATCH/RFC] usb: gadget: function: printer: avoid wrong list handling in printer_write()

2018-05-18 Thread Yoshihiro Shimoda
The usb_ep_queue() in printer_write() is possible to call req->complete(). In that case, since tx_complete() calls list_add(>list, >tx_reqs), printer_write() should not call list_add(>list, >tx_reqs_active) because the transfer has already finished. So, this patch checks the condition of req->list

Re: USB, Help, Keyboard being dropped

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 01:43:35PM -0400, ant wrote: > > Did I not say it right? > > Or perhaps a kernel or some other issue? > > > = > > > (no need to CC I'm subscribed to list), > > Hello, > > My USB keyboard is being dropped by the kernel at various times > and I cannot figure out

Re: [RFC PATCH linux-next] USB: dwc3: dwc3_get_extcon() can be static

2018-05-18 Thread Andrzej Hajda
On 18.05.2018 09:38, Roger Quadros wrote: > On 18/05/18 08:39, Andrzej Hajda wrote: >> On 17.05.2018 18:06, kbuild test robot wrote: >>> Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings") >>> Signed-off-by: kbuild test robot >> It should be static of

Re: Pandaboard OMAP4 MUSB short packet hang on UVC gadget

2018-05-18 Thread Laurent Pinchart
Hi Bin, On Wednesday, 16 May 2018 18:45:40 EEST Bin Liu wrote: > On Tue, May 15, 2018 at 10:58:16PM +0100, Kieran Bingham wrote: > > Hi Bin, Felipe, > > > > We have been trying to get a UVC gadget operational on the Pandaboard ES > > platform, and we believe we've hit an issue with short packets

[PATCH] ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: fix memdup.cocci warnings

2018-05-18 Thread Julia Lawall
linuxfoundation.org> Signed-off-by: kbuild test robot <fengguang...@intel.com> Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- url: https://github.com/0day-ci/linux/commits/Greg-KH/NFC-pn533-don-t-send-USB-data-off-of-the-stack/20180518-100416 :: branch date: 54 minutes ago

Re: USB, Help, Keyboard being dropped

2018-05-18 Thread ant
On Fri, May 18, 2018 at 08:41:28AM +0200, Greg KH wrote: > On Thu, May 17, 2018 at 01:43:35PM -0400, ant wrote: > > > > Did I not say it right? > > > > Or perhaps a kernel or some other issue? > > > > > > = > > > > > > (no need to CC I'm subscribed to list), hi, thank you for

Re: ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 10:56:25AM +0200, Arend van Spriel wrote: > On 5/17/2018 6:46 PM, Greg KH wrote: > > On Thu, May 17, 2018 at 06:40:04PM +0200, Greg KH wrote: > > > Adding the network and NFC developers as this really is a NFC driver > > > bug, not a USB core issue... > > > > > > On Thu,

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > > > - Add 'struct usbtmc_file_data' for each file handle to cache last > > > srq_byte (=Status

usb HC busted?

2018-05-18 Thread Sudip Mukherjee
Hi Mathias, We are using an Intel Atom based board and the usb controller is: 00:14.0 USB Controller: Intel Corporation Device 0f35 (rev 11) (prog-if 30) Flags: bus master, medium devsel, latency 0, IRQ 130 Memory at df7e (64-bit, non-prefetchable) [size=64K]

[PATCH v3] NFC: pn533: don't send USB data off of the stack

2018-05-18 Thread Greg Kroah-Hartman
It's amazing that this driver ever worked, but now that x86 doesn't allow USB data to be sent off of the stack, it really does not work at all. Fix this up by properly allocating the data for the small "commands" that get sent to the device. The USB stack will free the buffer when the data has

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: - Add 'struct usbtmc_file_data' for each file handle to cache last srq_byte (=Status Byte with SRQ) received by usbtmc_interrupt(..) - usbtmc488_ioctl_read_stb returns cached

Re: ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...

2018-05-18 Thread Johannes Berg
On Fri, 2018-05-18 at 10:56 +0200, Arend van Spriel wrote: > > > + buffer = kmalloc(sizeof(cmd), GFP_KERNEL); > > + if (!buffer) > > + return -ENOMEM; > > + memcpy(buffer, cmd, sizeof(cmd)); It should also use kmemdup() ;-) johannes -- To unsubscribe from this list: send the

Re: Fwd: usb: uas: device reset most the time while enumeration- usb3.0

2018-05-18 Thread Manu Gautam
Hi, On 4/16/2018 3:47 PM, Tushar Nimkar wrote: > On 2018-04-05 12:39, Felipe Balbi wrote: >> Hi, >> >> tnim...@codeaurora.org writes: >>> On 2018-04-05 11:24, Felipe Balbi wrote: Hi, Greg KH writes: > On Wed, Apr 04, 2018 at 05:14:50PM +0530,

Re: `ucsi_acpi: probe of USBC000:00 failed with error -12` on Dell XPS 13 9360/9370

2018-05-18 Thread Heikki Krogerus
Hi Paul, On Thu, May 17, 2018 at 03:34:49PM +0200, Paul Menzel wrote: > Dear Heikki, > > Note, this problem also exists on the Dell XPS 13 9360 (Kaby Lake) device. OK. Good to know. Though, we don't have one of those either. > On 05/17/18 10:59, Heikki Krogerus wrote: > > On Wed, May 16, 2018

Re: Fwd: usb: uas: device reset most the time while enumeration- usb3.0

2018-05-18 Thread Tushar Nimkar
Manu, On 2018-05-18 16:10, Manu Gautam wrote: Hi, On 4/16/2018 3:47 PM, Tushar Nimkar wrote: On 2018-04-05 12:39, Felipe Balbi wrote: Hi, tnim...@codeaurora.org writes: On 2018-04-05 11:24, Felipe Balbi wrote: Hi, Greg KH writes: On Wed, Apr 04, 2018 at

Re: USB, Help, Keyboard being dropped

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 07:17:42AM -0400, ant wrote: > On Fri, May 18, 2018 at 08:41:28AM +0200, Greg KH wrote: > > On Thu, May 17, 2018 at 01:43:35PM -0400, ant wrote: > > > > > > Did I not say it right? > > > > > > Or perhaps a kernel or some other issue? > > > > > > > > > = > > > > > >

Re: ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...

2018-05-18 Thread Arend van Spriel
On 5/17/2018 6:46 PM, Greg KH wrote: On Thu, May 17, 2018 at 06:40:04PM +0200, Greg KH wrote: Adding the network and NFC developers as this really is a NFC driver bug, not a USB core issue... On Thu, May 17, 2018 at 04:12:17PM +0200, Greg KH wrote: On Thu, May 17, 2018 at 02:10:57PM +0100,

Re: [PATCH 00/12] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:24PM +0200, Guido Kiener wrote: The working group "VISA for Linux" of the IVI Foundation www.ivifoundation.org specifies common rules, shared libraries and drivers to implement the specification of "VPP-4.3: The

Re: [PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:28PM +0200, Guido Kiener wrote: - add USBTMC488_IOCTL_TRIGGER to send TRIGGER Bulk-OUT header according to Subclass USB488 Specification The usbtmc trigger command is equivalent to the IEEE 488 GET (Group

Re: [PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 12:08:16PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:28PM +0200, Guido Kiener wrote: > > > - add USBTMC488_IOCTL_TRIGGER to send TRIGGER Bulk-OUT header > > > according to Subclass

Re: [PATCH 00/12] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 11:57:01AM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:24PM +0200, Guido Kiener wrote: > > > The working group "VISA for Linux" of the IVI Foundation > > > www.ivifoundation.org specifies

[PATCH v2 2/2] [usb-storage] Add compatibility quirk flags for G-Technologies G-Drive

2018-05-18 Thread Alexander Kappner
The "G-Drive" (sold by G-Technology) external USB 3.0 drive hangs on write access under UAS and usb-storage: [ 136.079121] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 136.079144] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current] [

[PATCH v2 1/2] [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver

2018-05-18 Thread Alexander Kappner
The ALWAYS_SYNC flag is currently honored by the usb-storage driver but not UAS and is required to work around devices that become unstable upon being queried for cache. This code is taken straight from: drivers/usb/storage/scsiglue.c:284 Signed-off-by: Alexander Kappner ---

[PATCH v2 0/2] Re: usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
v2 of this patch implements the FL_ALWAYS_SYNC flag in the UAS driver, and then adds the flag as quirks for the device at issue. This allows the G-Drive to work under both UAS and usb-storage. Alexander Kappner (2): [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver

[PATCH 4/4] USB: serial: ftdi_sio: clean up flow control management

2018-05-18 Thread Johan Hovold
Clean up the somewhat convoluted hardware-assisted flow control handling. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 81 ++- 1 file changed, 23 insertions(+), 58 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c

[PATCH 1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup

2018-05-18 Thread Johan Hovold
Since forever this driver has had IXON and IXOFF mixed up, and has used the latter rather than the former to enable hardware-assisted software flow control on output. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[PATCH 2/4] USB: serial: ftdi_sio: use non-underscore fixed types

2018-05-18 Thread Johan Hovold
Replace all __u types with their u counterparts throughout the driver (whose structures are not exported to user space). Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 50 +-- 1 file changed, 25 insertions(+), 25 deletions(-)

[PATCH 0/4] USB: serial: ftdi_sio: flow control fix and clean ups

2018-05-18 Thread Johan Hovold
Turns out the ftdi driver has had IXON and IXOFF, which are used to enable outgoing and incoming software flow control, mixed up since before git. The first patch addresses this while the following three clean up the flow control handling code. Johan Johan Hovold (4): USB: serial: ftdi_sio:

[PATCH 3/4] USB: serial: ftdi_sio: drop unnecessary urb_ variable prefixes

2018-05-18 Thread Johan Hovold
Drop urb_ prefixes from value and index variables used in control requests. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 83 +-- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c

Re: [PATCH 1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup

2018-05-18 Thread Johan Hovold
On Fri, May 18, 2018 at 03:53:54PM +0200, Greg Kroah-Hartman wrote: > On Fri, May 18, 2018 at 03:25:47PM +0200, Johan Hovold wrote: > > Since forever this driver has had IXON and IXOFF mixed up, and has used > > the latter rather than the former to enable hardware-assisted software > > flow

Re: [PATCH v2] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-18 Thread Shuah Khan
On 05/18/2018 07:47 AM, Greg Kroah-Hartman wrote: > On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote: >> pdev_nr and rhport can be controlled by user-space, hence leading to >> a potential exploitation of the Spectre variant 1 vulnerability. >> >> This issue was detected with

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread guido
Zitat von Greg KH : On Fri, May 18, 2018 at 03:02:10PM +, gu...@kiener-muenchen.de wrote: Zitat von Greg KH : > On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote: > > @@ -2420,8 +2476,8 @@ static int usbtmc_probe(struct

Re: [PATCH 1/3] xhci: Allow more than 32 quirks

2018-05-18 Thread Marc Zyngier
On 17/05/18 14:28, Greg KH wrote: > On Thu, May 17, 2018 at 01:58:34PM +0100, Marc Zyngier wrote: >> We now have 32 different quirks, and the field that holds them >> is full. Let's bump it up to the next stage so that we can handle >> some more... The type is now an unsigned long long, which is

Re: [PATCH 3/3] Revert "xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue"

2018-05-18 Thread Marc Zyngier
On 17/05/18 14:29, Greg KH wrote: > On Thu, May 17, 2018 at 01:58:36PM +0100, Marc Zyngier wrote: >> This reverts commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7. >> >> Now that we can properly reset the uPD72020x without a hard PCI reset, >> let's get rid of the existing quirks. >> >>

[PATCH v2 3/3] Revert "xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue"

2018-05-18 Thread Marc Zyngier
This reverts commit 8466489ef5ba48272ba4fa4ea9f8f403306de4c7. Now that we can properly reset the uPD72020x without a hard PCI reset, let's get rid of the existing quirks. Signed-off-by: Marc Zyngier --- drivers/usb/host/pci-quirks.c | 20

[PATCH v2 2/3] xhci: Add quirk to zero 64bit registers on Renesas PCIe controllers

2018-05-18 Thread Marc Zyngier
Some Renesas controllers get into a weird state if they are reset while programmed with 64bit addresses (they will preserve the top half of the address in internal, non visible registers). You end up with half the address coming from the kernel, and the other half coming from the firmware. Also,

Re: [PATCH v3] NFC: pn533: don't send USB data off of the stack

2018-05-18 Thread Johan Hovold
On Fri, May 18, 2018 at 12:38:11PM +0200, Greg Kroah-Hartman wrote: > It's amazing that this driver ever worked, but now that x86 doesn't > allow USB data to be sent off of the stack, it really does not work at > all. Fix this up by properly allocating the data for the small > "commands" that get

[PATCH v2 1/3] xhci: Allow more than 32 quirks

2018-05-18 Thread Marc Zyngier
We now have 32 different quirks, and the field that holds them is full. Let's bump it up to the next stage so that we can handle some more... The type is now an unsigned long long, which is 64bit on most architectures. We take this opportunity to change the quirks from using (1 << x) to

[PATCH v2 0/3] Revised Renesas uPD72020x workaround for 32bit DMA issue

2018-05-18 Thread Marc Zyngier
Back around the 4.13 timeframe, we tried to address a rather bad issue with the Renesas uPD72020x USB3 controller family. They have trouble with the programming of the base addresses which tend to stick on XHCI reset. This makes transitionning from 64bit to 32bit addresses completely unsafe. This

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: > +/* > + * usbtmc_message->flags: > + */ > +#define USBTMC_FLAG_ASYNC0x0001 > +#define USBTMC_FLAG_APPEND 0x0002 > +#define USBTMC_FLAG_IGNORE_TRAILER 0x0004 > + > +struct usbtmc_message { > + void __user

Re: [PATCH 2/4] USB: serial: ftdi_sio: use non-underscore fixed types

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 03:25:48PM +0200, Johan Hovold wrote: > Replace all __u types with their u counterparts throughout the driver > (whose structures are not exported to user space). > > Signed-off-by: Johan Hovold > --- > drivers/usb/serial/ftdi_sio.c | 50

Re: [PATCH 1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 03:25:47PM +0200, Johan Hovold wrote: > Since forever this driver has had IXON and IXOFF mixed up, and has used > the latter rather than the former to enable hardware-assisted software > flow control on output. > > Signed-off-by: Johan Hovold > --- >

Re: [PATCH 3/4] USB: serial: ftdi_sio: drop unnecessary urb_ variable prefixes

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 03:25:49PM +0200, Johan Hovold wrote: > Drop urb_ prefixes from value and index variables used in control > requests. > > Signed-off-by: Johan Hovold > --- > drivers/usb/serial/ftdi_sio.c | 83 +-- > 1 file changed, 41

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 03:02:10PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote: > > > @@ -2420,8 +2476,8 @@ static int usbtmc_probe(struct usb_interface *intf, > > > > > > retcode

[GIT PULL] USB driver fixes for 4.17-rc6

2018-05-18 Thread Greg KH
The following changes since commit 75bc37fefc4471e718ba8e651aa74673d4e0a9eb: Linux 4.17-rc4 (2018-05-06 16:57:38 -1000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.17-rc6 for you to fetch changes up to

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: > - ioctl USBTMC_IOCTL_WRITE sends an (a)synchronous generic message > to bulk OUT. The message is split into chunks of 4k (page size). > Message size is aligned to 32 bit boundaries. > > With flag USBTMC_FLAG_ASYNC the ioctl is

Re: usb HC busted?

2018-05-18 Thread Mathias Nyman
Hi, Looks like event for Transfer block (TRB) at 0x32a21060 was never completed, or at least not handled by xhci driver. (either the event was never issued by hw, or something got messed up in the driver along the way) HC doesn't look busted, it continues sending transfer completions events.

Re: usb HC busted?

2018-05-18 Thread Sudip Mukherjee
Hi Mathias, On Fri, May 18, 2018 at 03:55:04PM +0300, Mathias Nyman wrote: > Hi, > > Looks like event for Transfer block (TRB) at 0x32a21060 was never completed, > or at least not handled by xhci driver. > (either the event was never issued by hw, or something got messed up in the > driver

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: - ioctl USBTMC_IOCTL_WRITE sends an (a)synchronous generic message to bulk OUT. The message is split into chunks of 4k (page size). Message size is aligned to 32 bit boundaries.

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: +/* + * usbtmc_message->flags: + */ +#define USBTMC_FLAG_ASYNC 0x0001 +#define USBTMC_FLAG_APPEND 0x0002 +#define USBTMC_FLAG_IGNORE_TRAILER 0x0004 +

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:27PM +0200, Guido Kiener wrote: Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to get/set I/O timeout for specific file handle. Different operations on an instrument can take different lengths of

Re: `ucsi_acpi: probe of USBC000:00 failed with error -12` on Dell XPS 13 9360/9370

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 06:08:24PM +0300, Heikki Krogerus wrote: > > Rafael, the problem here with these Dell laptops is that a memory page > that is used as a mailbox for special communication between EC FW and > OS (called UCSI mailbox) should be in uncached memory, but the memory > is marked

Re: [PATCH 05/12] usb: usbtmc: Add ioctl for generic requests on control pipe

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:29PM +0200, Guido Kiener wrote: > Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the > control pipe. Used by specific applications of IVI Foundation, > Inc. to implement VISA API functions: viUsbControlIn/Out. > > Signed-off-by: Guido Kiener

Re: [PATCH 08/12] usb: usbtmc: Optimize read/write and add ioctls for auto_abort

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:32PM +0200, Guido Kiener wrote: > - Optimize read/write functions for better bandwidth and > fixes reading of long transfers > > - add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for > each specific file handle. > > - add ioctl USBTMC_IOCTL_MSG_IN_ATTR

Re: [PATCH 12/12] usb: usbtmc: Add ioctl to return API version of usbtmc driver

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:36PM +0200, Guido Kiener wrote: > - add ioctl USBTMC_IOCTL_API_VERSION to get current API version > - add info message to show API version > - replace USBTMC_TIMEOUT macros with common used USB_CTRL_GET_TIMEOUT > or USB_CTRL_SET_TIMEOUT macros. > - delete some

Re: [PATCH 01/12] usb: usbtmc: Remove rigol_quirk

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:25PM +0200, Guido Kiener wrote: > All T instruments should also work with rigol_quirk = 1 code path. > So remove unnecessary code in rigol_quirk = 0 code path to simplify the > driver. > > Tested-by: Dave Penkler > Reviewed-by: Steve Bayless

Re: [PATCH 4/4] USB: serial: ftdi_sio: clean up flow control management

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 03:25:50PM +0200, Johan Hovold wrote: > Clean up the somewhat convoluted hardware-assisted flow control > handling. > > Signed-off-by: Johan Hovold > --- > drivers/usb/serial/ftdi_sio.c | 81 ++- > 1 file changed, 23

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote: @@ -2420,8 +2476,8 @@ static int usbtmc_probe(struct usb_interface *intf, retcode = usb_register_dev(intf, _class); if (retcode) { - dev_err(>dev, "Not

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
Zitat von Greg KH : On Fri, May 18, 2018 at 02:48:11PM +, gu...@kiener-muenchen.de wrote: Zitat von Greg KH : > On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: > > +/* > > + * usbtmc_message->flags: > > + */ > >

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
Zitat von Greg KH : On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote: Zitat von Greg KH : > On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote: > > - Add 'struct usbtmc_file_data' for each file handle

Re: [PATCH 10/12] usb: usbtmc: Add test functions to set HALT Feature (Stall)

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:34PM +0200, Guido Kiener wrote: > The ioctls USBTMC_IOCTL_SET_OUT_HALT or USBTMC_IOCTL_SET_IN_HALT > send a SET_FEATURE(HALT) request to the corresponding OUT or IN pipe. > > Useful for testing devices and client applications: The ioctls force > the device to

Re: [PATCH 05/12] usb: usbtmc: Add ioctl for generic requests on control pipe

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 01:32:51PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:29PM +0200, Guido Kiener wrote: > > > Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the > > > control pipe. Used by

[PATCH] usbip: dynamically allocate idev by nports found in sysfs

2018-05-18 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik ---

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:27PM +0200, Guido Kiener wrote: > Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to > get/set I/O timeout for specific file handle. > > Different operations on an instrument can take different lengths of > time thus it is important to be able to set

Re: USB, Help, Keyboard being dropped

2018-05-18 Thread ant
On Fri, May 18, 2018 at 01:57:20PM +0200, Greg KH wrote: > On Fri, May 18, 2018 at 07:17:42AM -0400, ant wrote: > > On Fri, May 18, 2018 at 08:41:28AM +0200, Greg KH wrote: > > > On Thu, May 17, 2018 at 01:43:35PM -0400, ant wrote: > > > > > > > > Did I not say it right? > > > > > > > > Or

Re: [PATCH 05/12] usb: usbtmc: Add ioctl for generic requests on control pipe

2018-05-18 Thread guido
Zitat von Greg KH : On Thu, May 17, 2018 at 07:03:29PM +0200, Guido Kiener wrote: Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the control pipe. Used by specific applications of IVI Foundation, Inc. to implement VISA API functions:

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote: > @@ -2420,8 +2476,8 @@ static int usbtmc_probe(struct usb_interface *intf, > > retcode = usb_register_dev(intf, _class); > if (retcode) { > - dev_err(>dev, "Not able to get a minor" > - "

Re: [PATCH 11/12] usb: usbtmc: Add ioctls to abort with specific tags

2018-05-18 Thread Greg KH
On Thu, May 17, 2018 at 07:03:35PM +0200, Guido Kiener wrote: > - fix ioctls USBTMC_IOCTL_ABORT_BULK_OUT/IN "fix" how? be specific :) > > - add ioctls USBTMC_IOCTL_ABORT_BULK_OUT_TAG and > USBTMC_IOCTL_ABORT_BULK_IN_TAG for test purpose. Again, why test stuff in a generic driver? And

Re: [PATCH 1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup

2018-05-18 Thread Greg Kroah-Hartman
On Fri, May 18, 2018 at 04:33:50PM +0200, Johan Hovold wrote: > On Fri, May 18, 2018 at 03:53:54PM +0200, Greg Kroah-Hartman wrote: > > On Fri, May 18, 2018 at 03:25:47PM +0200, Johan Hovold wrote: > > > Since forever this driver has had IXON and IXOFF mixed up, and has used > > > the latter

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread Greg KH
On Fri, May 18, 2018 at 02:48:11PM +, gu...@kiener-muenchen.de wrote: > > Zitat von Greg KH : > > > On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote: > > > +/* > > > + * usbtmc_message->flags: > > > + */ > > > +#define USBTMC_FLAG_ASYNC

Re: [PATCH v2] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-18 Thread Greg Kroah-Hartman
On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote: > pdev_nr and rhport can be controlled by user-space, hence leading to > a potential exploitation of the Spectre variant 1 vulnerability. > > This issue was detected with the help of Smatch: > drivers/usb/usbip/vhci_sysfs.c:238

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alan Stern
On Fri, 18 May 2018, Alexander Kappner wrote: > Further debugging shows that the code that causes the device to hang is in > drivers/scsi/sd.c:2698. So the reason why usb-storage works and UAS does > not is because the device setting both skip_ms_page_3f=1 and > skip_ms_page_8=1 is required.

Re: `ucsi_acpi: probe of USBC000:00 failed with error -12` on Dell XPS 13 9360/9370

2018-05-18 Thread Heikki Krogerus
On Fri, May 18, 2018 at 10:04:02PM +0200, Rafael J. Wysocki wrote: > On Fri, May 18, 2018 at 5:15 PM, Greg Kroah-Hartman > > Given that Windows works with this same set of ACPI tables, perhaps the > > requirement isn't that this memory location be uncached? > > > > We shouldn't have to fix up ACPI

Re: [PATCH v3 1/2] dt-bindings: add MediaTek XS-PHY binding

2018-05-18 Thread Rob Herring
On Thu, May 10, 2018 at 02:10:28PM +0800, Chunfeng Yun wrote: > Add a DT binding documentation of XS-PHY for MediaTek SoCs > with USB3.1 GEN2 controller > > Signed-off-by: Chunfeng Yun > --- > .../devicetree/bindings/phy/phy-mtk-xsphy.txt | 110 >

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread Andy Shevchenko
On Thu, May 17, 2018 at 8:03 PM, Guido Kiener wrote: > Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to > get/set I/O timeout for specific file handle. > +static int usbtmc_ioctl_get_timeout(struct usbtmc_file_data *file_data, > +

Re: `ucsi_acpi: probe of USBC000:00 failed with error -12` on Dell XPS 13 9360/9370

2018-05-18 Thread Rafael J. Wysocki
On Fri, May 18, 2018 at 5:15 PM, Greg Kroah-Hartman wrote: > On Fri, May 18, 2018 at 06:08:24PM +0300, Heikki Krogerus wrote: >> >> Rafael, the problem here with these Dell laptops is that a memory page >> that is used as a mailbox for special communication between EC

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
> Was this tested with uas or usb-storage? On both. dd works either way. > Are you certain Oliver's new code was executed? If you put > US_FL_NO_WP_DETECT only in unusual_devs.h and not in ususual_uas.h then > it would not affect the uas driver. Yes, the code ran. Further debugging shows

Re: USB, Help, Keyboard being dropped

2018-05-18 Thread ant
On Fri, May 18, 2018 at 01:57:20PM +0200, Greg KH wrote: > ant wrote: ... > > i didn't think you'd care too much about a report > > from Debian stable, but i finally got that installed > > and booting. i can leave that running today while > > i'm working on other things and see what the logs >

[PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

2018-05-18 Thread John Stultz
In 4.17-rc, commit 03ea6d6e9e1f ("usb: dwc2: Enable power down") caused the HiKey board to not correctly handle switching between usb-gadget and usb-host mode. Unplugging the OTG port would result in: [ 42.240973] dwc2 f72c.usb: dwc2_restore_host_registers: no host registers to restore [

[PATCH v3] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-18 Thread Gustavo A. R. Silva
pdev_nr and rhport can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/usb/usbip/vhci_sysfs.c:238 detach_store() warn: potential spectre issue 'vhcis'

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread guido
Zitat von Andy Shevchenko : On Thu, May 17, 2018 at 8:03 PM, Guido Kiener wrote: Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to get/set I/O timeout for specific file handle. +static int

Re: [PATCH v2] usbip: vhci_sysfs: fix potential Spectre v1

2018-05-18 Thread Gustavo A. R. Silva
On 05/18/2018 11:06 AM, Shuah Khan wrote: On 05/18/2018 07:47 AM, Greg Kroah-Hartman wrote: On Thu, May 17, 2018 at 03:16:28PM -0500, Gustavo A. R. Silva wrote: pdev_nr and rhport can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1