Re: usbtmc: vendor specific i/o

2016-09-28 Thread Oliver Neukum
On Wed, 2016-09-28 at 12:29 +0200, Ladislav Michl wrote: > Well, reference counting is also suspicious as kref_get(&data->kref) > in > probe function with comment "will reference data in int urb" gives no > clue why there's explicit reference. Also what if we add classic > error unwinding and leave

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-09-28 Thread Oliver Neukum
On Wed, 2016-09-28 at 17:08 +0200, Wim Osterholt wrote: > On Wed, Sep 28, 2016 at 11:16:04AM +0200, Oliver Neukum wrote: > > this should show you where it crashes. In addition I've attached > > a patch with paranoid debugging. Could you compile and test a kernel > > wit

request for testers

2016-09-28 Thread Oliver Neukum
Hi, does anybody here want to test patches to improve UAS error handling? Regards Oliver -- 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

Re: [PATCH] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

2016-10-05 Thread Oliver Neukum
On Fri, 2016-09-30 at 17:39 +0200, Stefan Tauner wrote: > Signed-off-by: Stefan Tauner A minimal change log entry would be good. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org

Re: [PATCH] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

2016-10-05 Thread Oliver Neukum
On Wed, 2016-10-05 at 10:29 +0200, Stefan Tauner wrote: > On Wed, 05 Oct 2016 09:31:29 +0200 > Oliver Neukum wrote: > > > On Fri, 2016-09-30 at 17:39 +0200, Stefan Tauner wrote: > > > Signed-off-by: Stefan Tauner > > > > A minimal change log entry w

Re: USB hot-plug not working (ASUS TP301UA-C4028T)

2016-10-06 Thread Oliver Neukum
On Wed, 2016-10-05 at 22:41 +0200, Lukas Wunner wrote: > The PCI core doesn't allow runtime PM by default. Rather it calls > pm_runtime_forbid() when the device is added (see pci_pm_init(), > called > indirectly from pci_device_add()). PCI drivers need to explicitly > call > pm_runtime_allow(), t

Re: [PATCH] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

2016-10-06 Thread Oliver Neukum
On Wed, 2016-10-05 at 16:11 +0200, Stefan Tauner wrote: > This adds support to ftdi_sio for the Infineon TriBoard TC2X7 > engineering board for first-generation Aurix SoCs with Tricore CPUs. > Mere addition of the device IDs does the job. Now you only need to put Johan Hovold into CC and do an ind

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-10-06 Thread Oliver Neukum
On Thu, 2016-09-29 at 15:26 +0200, Wim Osterholt wrote: > On Wed, Sep 28, 2016 at 05:23:30PM +0200, Oliver Neukum wrote: > > > > > > HP src # sync > > > HP src # [ 3744.914184] BUG: unable to handle kernel NULL pointer > > > dereference at 0249 > >

Re: Fwd: HSO driver patch

2016-10-07 Thread Oliver Neukum
On Fri, 2016-10-07 at 12:06 +0200, Matej Kupljen wrote: > Hi, > > I tried contacting authors of the driver mentioned in the source file > and also in the MAINTAINERS file, > but haven't received any reply so I am sending this to this mailing > list. If I should use another one, > plese advise me w

Re: Fwd: HSO driver patch

2016-10-07 Thread Oliver Neukum
On Fri, 2016-10-07 at 12:47 +0200, Matej Kupljen wrote: Hi, > And my mail responded with: > > Delivery to the following recipient failed permanently: > > j.du...@option.com > > > How to proceed, please advise. ask somebody else @option about Jon and let's see whether he reads this list.

Re: USB crash on BeagleBoard-xM

2016-10-10 Thread Oliver Neukum
On Fri, 2016-10-07 at 22:26 +0100, Snaper wrote: > Hi, > > This is on a BeagleBoard-xM with a fresh image from > https://eewiki.net/display/linuxonarm/BeagleBoard. > > I attach the output of dmesg after booting. > > Some seconds after booting USB seems to crash, since the keyboard no > longer

Re: USB crash on BeagleBoard-xM

2016-10-17 Thread Oliver Neukum
On Fri, 2016-10-14 at 01:16 +0100, Snaper wrote: > Hi Oliver, > > On 10/10/2016 08:19, Oliver Neukum wrote: > > it is very hard for us to say something about that specific kernel. > > We don't know the kernel tree. And the error seems to be in the OF > > code. I

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-10-17 Thread Oliver Neukum
On Thu, 2016-09-08 at 14:58 +0200, Wim Osterholt wrote: > On Thu, Sep 08, 2016 at 02:20:38PM +0200, Oliver Neukum wrote: > > > > > > The oops tells things that I didn't all write down, but it says > > > null pointer dereference at 0246 > > > &

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-10-18 Thread Oliver Neukum
On Mon, 2016-10-17 at 17:20 +0200, Wim Osterholt wrote: > On Mon, Oct 17, 2016 at 04:10:45PM +0200, Oliver Neukum wrote: > > Hi, > > > > I got one of those devices. However, I don't get a crash. > > Could you please give me instructions on how you trigger it?

[PATCH] USB: update intro of documentation

2016-10-20 Thread Oliver Neukum
It does no good to mention The 2.4 kernel series and neglect USB 3.x and XHCI. Also with type C and micro/mini USB we better not talk about the shape of connectors. Signed-off-by: Oliver Neukum --- Documentation/DocBook/usb.tmpl | 68 +++--- 1 file changed

[PATCH] Documentation: usb: the dumb conversion to Sphinx

2016-10-20 Thread Oliver Neukum
This just is the result of the conversion script and its addition to the index. Just the plain automatic conversion. Signed-off-by: Oliver Neukum --- Documentation/index.rst | 1 + Documentation/usb/conf.py | 5 + Documentation/usb/usb.rst | 750

Re: [PATCH] Documentation: usb: the dumb conversion to Sphinx

2016-10-20 Thread Oliver Neukum
On Thu, 2016-10-20 at 18:04 +0300, Jani Nikula wrote: > On Thu, 20 Oct 2016, Oliver Neukum wrote: Hi, > > This just is the result of the conversion script and its addition > > to the index. Just the plain automatic conversion. > > How does this relate to [1]? It is the

Re: [PATCH] USB: update intro of documentation

2016-10-21 Thread Oliver Neukum
On Fri, 2016-10-21 at 15:17 -0600, Jonathan Corbet wrote: > On Thu, 20 Oct 2016 15:15:00 +0200 > Oliver Neukum wrote: > > > It does no good to mention The 2.4 kernel series and neglect > > USB 3.x and XHCI. Also with type C and micro/mini USB we better > > not talk ab

Re: [PATCH v2 0/4] ch341 cleanup and parity etc support

2016-10-23 Thread Oliver Neukum
On Sat, 2016-10-22 at 22:02 +0100, Aidan Thornton wrote: > This is an attempt to clean-up and resubmit some patches by Grigori > Goronzy a few months back adding support for parity, frame length, and > 2 stop bits to the CH340/1 driver and cleaning up some magic constants. > His later patches (for

Re: [PATCH] Documentation: usb: the dumb conversion to Sphinx

2016-10-24 Thread Oliver Neukum
On Thu, 2016-10-20 at 10:29 -0600, Jonathan Corbet wrote: > On Thu, 20 Oct 2016 18:22:28 +0200 > Oliver Neukum wrote: > > > > Why does this not remove the .tmpl file? > > > > 1. We might want to keep it > > 2. It is an operation beyond the scope of this

[PATCH] cdc-acm: fix uninitialized variable

2016-11-02 Thread Oliver Neukum
ffer, buflen); but later use h in if (h.usb_cdc_country_functional_desc) { /* export the country data */ Signed-off-by: Oliver Neukum CC: sta...@vger.kernel.org Reported-by: Victor Sologoubov --- drivers/usb/class/cdc-acm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/class

Re: Bug in cdc-acm: variable struct usb_cdc_parsed_header h may be used uninitialized in acm_probe.

2016-11-02 Thread Oliver Neukum
On Sat, 2016-10-29 at 15:48 +0300, Victor Sologoubov wrote: > Bug in cdc-acm: variable struct usb_cdc_parsed_header h may be used > uninitialized in acm_probe. Hi, good catch. Apatch with credits to you has been submitted. Regards Oliver -- To unsubscribe from this list

[PATCH] usbhid: add ATEN CS962 to list of quirky devices

2016-11-03 Thread Oliver Neukum
Like many similar devices it needs a quirk to work. Issuing the request gets the device into an irrecoverable state. Signed-off-by: Oliver Neukum CC: sta...@vger.kernel.org --- drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) diff

Re: [BUG] cdc-acm: no data available after port open

2016-11-03 Thread Oliver Neukum
On Thu, 2016-11-03 at 11:34 +0100, Ladislav Michl wrote: > Hi Oliver, > Device operates normally after reconnect. So it seems you were right, > there's no handling for EPIPE and EPROTO errors reported to > acm_read_bulk_callback. > Following patch fixes it for me, if it looks okay for you, I'll r

Re: [BUG] cdc-acm: no data available after port open

2016-11-03 Thread Oliver Neukum
On Thu, 2016-11-03 at 13:44 +0100, Ladislav Michl wrote: > On Thu, Nov 03, 2016 at 01:03:56PM +0100, Ladislav Michl wrote: Hi, > > now I'm really confused. Just looked at drivers/usb/serial/generic.c > > which just stops submitting urbs on -EPIPE. On contrary > > drivers/usb/serial/ti_usb_3410_50

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-05 Thread Oliver Neukum
On Sun, 2016-11-06 at 01:36 +0100, Ladislav Michl wrote: > > @@ -475,7 +490,30 @@ static void acm_softint(struct work_struct *work) > { > struct acm *acm = container_of(work, struct acm, work); > > - tty_port_tty_wakeup(&acm->port); > + dev_vdbg(&acm->data->dev, "scheduled work\n

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-06 Thread Oliver Neukum
On Sun, 2016-11-06 at 10:07 +0100, Ladislav Michl wrote: > + if (test_bit(EVENT_RX_STALL, &acm->flags)) { > + status = usb_autopm_get_interface(acm->data); > + if (!status) { > + for (i = 0; i < acm->rx_buflimit; i++) { > +

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-07 Thread Oliver Neukum
On Fri, 2016-11-04 at 09:26 -0400, Alan Stern wrote: > On Fri, 4 Nov 2016, Kai-Heng Feng wrote: > > > Sometimes cdc_mbim failed to probe if runtime pm is enabled: > > [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 > > > > This can be solved by increase its pm usage counter. > >

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-07 Thread Oliver Neukum
On Sun, 2016-11-06 at 23:31 +0100, Ladislav Michl wrote: > On Sun, Nov 06, 2016 at 10:30:02PM +0100, Oliver Neukum wrote: > > Hi, > > > > almost. Two issues left with this section. > > > > 1. It makes no sense to check the results of usb_clear_halt() >

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-07 Thread Oliver Neukum
On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng Feng wrote: > Sometimes cdc_mbim failed to probe if runtime pm is enabled: > [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 > > This can be solved by increase its pm usage counter. > > Signed-off-by: Kai-Heng Feng For the record: NA

Re: [PATCH 4/4] cdc-acm: clear halt condition

2016-11-07 Thread Oliver Neukum
On Mon, 2016-11-07 at 11:50 +0100, Ladislav Michl wrote: > On Mon, Nov 07, 2016 at 11:26:10AM +0100, Oliver Neukum wrote: > > This is looking good. Please resend so Greg can pick it up. > > One more question. I rather point on it explicitely as it changes > driver behaviour. P

Re: [PATCH] USB: cdc-acm: fix TIOCMIWAIT

2016-11-08 Thread Oliver Neukum
ly, which is in accordance with how other > drivers implement this ioctl. > > Fixes: 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT") > Cc: stable > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Regards Oliver -- To unsubscribe from this list: send

Re: [PATCH] USB: serial: fix invalid user-pointer checks

2016-11-08 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:26 +0100, Johan Hovold wrote: > Drop invalid user-pointer checks from ioctl handlers. > > A NULL-pointer can be valid in user space and copy_to_user() takes > care > of sanity checking. Shouldn't we bail out early in these cases? Regards Oliver

Re: [PATCH 2/2] USB: cdc-acm: use get_icount tty operation

2016-11-08 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:28 +0100, Johan Hovold wrote: > Use the tty get_icount operation instead of implementing TIOCGICOUNT > directly. > > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Regards Oliver -- To unsubscribe from this list: s

Re: [PATCH] USB: serial: fix invalid user-pointer checks

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 16:41 +0100, Johan Hovold wrote: > On Tue, Nov 08, 2016 at 03:13:13PM +0100, Oliver Neukum wrote: > > On Tue, 2016-11-08 at 13:26 +0100, Johan Hovold wrote: > > > Drop invalid user-pointer checks from ioctl handlers. > > > > > > A NULL-po

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: > These problems could very well be caused by running at SuperSpeed > (USB-3) instead of high speed (USB-2). > > Is there any way to test what happens when the device is attached to > the computer by a USB-2 cable? That would prevent it from

Re: [PATCH 1/2] USB: cdc-acm: fix invalid user-pointer check

2016-11-09 Thread Oliver Neukum
On Tue, 2016-11-08 at 13:28 +0100, Johan Hovold wrote: > Drop invalid user-pointer check from TIOCGSERIAL handler. > > A NULL-pointer can be valid in user space and copy_to_user() takes > care > of sanity checking. > > Signed-off-by: Johan Hovold Acked-by: Oliver Neu

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-10 Thread Oliver Neukum
On Thu, 2016-11-10 at 12:09 +0100, Bjørn Mork wrote: > Kai-Heng Feng writes: > > On Wed, Nov 9, 2016 at 8:32 PM, Bjørn Mork wrote: > >> Oliver Neukum writes: > >> > >>> On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: > >>> > >&

Re: cdc_acm - fragmented notifications

2016-11-14 Thread Oliver Neukum
On Thu, 2016-11-10 at 22:30 +0100, Tobias Herzog wrote: > Hi, > > I'm trying to build an usb device conforming to the CDC ACM device > class. The device uses an interrupt IN endpoint with a max packet size > of 8 bytes. > I tried to send a SERIAL_STATE notification to the host (to report > parity

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-15 Thread Oliver Neukum
ch. Could you test with it? Regards Oliver From d9c67172611257c262a19e9d3d4d9e6b9a69e88c Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 8 Nov 2016 16:12:11 +0100 Subject: [PATCH] acm: insane debugging extremnely stupid debugging patch Signed-off-by: Oliver Neukum --- drivers/usb/c

Re: [PATCH 1/5] cdc-acm: reindent log messages

2016-11-15 Thread Oliver Neukum
On Tue, 2016-11-15 at 12:26 +0100, Ladislav Michl wrote: > On Tue, Nov 15, 2016 at 11:07:27AM +0100, Greg KH wrote: > > On Wed, Nov 09, 2016 at 12:53:25PM +0100, Ladislav Michl wrote: > > > Signed-off-by: Ladislav Michl > > > --- > > > drivers/usb/class/cdc-acm.c | 35 +---

Re: [PATHCv10 1/2] usb: USB Type-C connector class

2016-11-16 Thread Oliver Neukum
On Mon, 2016-11-14 at 06:34 -0800, Guenter Roeck wrote: > >>> +int typec_connect(struct typec_port *port, struct > typec_connection *con) > >>> +{ > >>> + int ret; > >>> + > >>> + if (!con->partner && !con->cable) > >>> + return -EINVAL; > >>> + > >>> + port->connected = 1; > >>> +

Re: [PATCH] add DWR-158 in usb option

2016-11-16 Thread Oliver Neukum
On Wed, 2016-11-16 at 10:22 +0700, Lars Melin wrote: > On 2016-11-16 03:20, Giuseppe Lippolis wrote: > > Signed-off-by: Giuseppe Lippolis > > --- > > Adding support for 3G modem DWR-158 from Dlink (I found it embedded in the > > DWR-512). > > --- > > > > --- drivers/usb/serial/option.c.orig

Re: [PATHCv10 1/2] usb: USB Type-C connector class

2016-11-16 Thread Oliver Neukum
On Wed, 2016-11-16 at 11:30 +0200, Heikki Krogerus wrote: > On Tue, Nov 15, 2016 at 04:19:10PM -0800, Badhri Jagan Sridharan wrote: > > Is that too costly to have ? > > Greg, could you give your opinion. In this case we do have attribute > files that the user space can poll. Data role is the USB

Re: [PATHCv10 1/2] usb: USB Type-C connector class

2016-11-16 Thread Oliver Neukum
On Wed, 2016-11-16 at 13:09 +0200, Heikki Krogerus wrote: > OK, I'll add KOBJ_CHANGE for those. > > So is it OK to everybody if I remove the KOBJ_CHANGE in > typec_connect()? We will see uevent KOBJ_ADD since the partner (or > cable) is added in any case. Badhri, Oliver? OK by me. Regar

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-16 Thread Oliver Neukum
On Tue, 2016-11-15 at 14:29 +0100, Wim Osterholt wrote: > I experience a sliding scale. > With debug it crashes immediately. It may crash later on (even at shutdown > time). It's not even an oops but a warning. In the end it happens to just > work. This is very odd. We need to know where it crash

Re: add usb option device

2016-11-16 Thread Oliver Neukum
On Wed, 2016-11-16 at 11:49 -0600, Dan Williams wrote: > This will make option grab all the ports, as shown by your dmesg > output. But USB interfaces 0 and 1 are actually cdc-ether and should > *not* be grabbed by option. > > You want to limit option to grabbing bInterfaceClass=255 to make sure

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-15 Thread Oliver Neukum
On Tue, 2015-12-08 at 15:33 +0100, Peter Wu wrote: > Can you have a look? I guess that reset_resume needs different > treatment, but don't know how to do it properly as suspend is not > called > before system reset (because the device is apparently already in > suspended state). > > I think that t

Re: [PATCH] USB: storage: add "no SYNCHRONIZE CACHE" quirk

2015-12-15 Thread Oliver Neukum
On Thu, 2015-12-03 at 13:36 -0500, Alan Stern wrote: > This is an old problem, but it was never resolved and it still affects > people (Bugzilla #89511). In short, there are USB-(S)ATA bridges that > claim to be write-back but don't support the SYNCHRONIZE CACHE > command. > This causes errors w

Re: [PATCH] BugFix in XHCI controller driver for scatter gather DMA

2015-12-21 Thread Oliver Neukum
On Mon, 2015-12-21 at 17:34 +0530, Vikas Bansal wrote: > Pre-Condition > At the time of reset resume of a USB device, both self and bus powered > devices might go to a low power state or power off state depending on the > acceptable suspend time power of the system. > In case the device exper

error return of TIOCMIWAIT in case of device disconnect

2015-12-21 Thread Oliver Neukum
Hi, I've found that the TIOCMIWAIT ioctl, just returns -EIO if you unplug the device. That seems wrong to me. If we know that a device is gone we should report it. This isn't an ordinary hang up. Patch to follow. Regards Oliver -- To unsubscribe from this list:

[PATCH] usb: serial: return -ENODEV if disconnected during TIOCMIWAIT

2015-12-21 Thread Oliver Neukum
Disconnecting a device is not just a hang up. The device is gone. We should tell user space the truth immediately. Signed-off-by: Oliver Neukum --- drivers/usb/serial/generic.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c

Re: [PATCH] Add support for usbfs zerocopy.

2015-12-21 Thread Oliver Neukum
On Tue, 2015-12-22 at 01:12 +0100, Steinar H. Gunderson wrote: > On Tue, Dec 15, 2015 at 03:32:45PM +, David Laight wrote: > > That still isn't entirely correct. > > > > Someone with more knowledge than either of us has needs to sort out > > how to handle this properly. > > This discussion so

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Oliver Neukum
On Tue, 2015-12-22 at 09:48 +, Hayes Wang wrote: > Peter Wu [mailto:pe...@lekensteyn.nl] > > Sent: Tuesday, December 08, 2015 10:33 PM > [...] > > I found another problem with runtime PM. When a device is suspended via > > autosuspend and a system suspend takes place, there is no network I/O >

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Oliver Neukum
On Wed, 2015-12-23 at 03:31 +, Hayes Wang wrote: > Oliver Neukum [mailto:oneu...@suse.com] > [...] > > It is clear to me that you cannot get away with using the same operation > > for resume() and reset_resume() in your driver. It is fundamentally > > impossible. Firmwa

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Oliver Neukum
On Wed, 2015-12-23 at 09:20 +, Hayes Wang wrote: > Oliver Neukum [mailto:oneu...@suse.de] > > Sent: Wednesday, December 23, 2015 4:20 PM > [...] > > No, step (2) does not exist. Calls to suspend() and [reset_]resume() > > always balance. Usually a driver shouldn

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-23 Thread Oliver Neukum
On Wed, 2015-12-23 at 20:32 -0500, Alan Stern wrote: > I don't understand why the wakeup conditions are different. It seems > to me that the choice of which packets will generate a wakeup ought to > depend on the user's selection, not on the kind of suspend. For > instance, if the user says that

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-24 Thread Oliver Neukum
On Thu, 2015-12-24 at 10:14 -0500, Alan Stern wrote: > On Thu, 24 Dec 2015, Oliver Neukum wrote: > > > On Wed, 2015-12-23 at 20:32 -0500, Alan Stern wrote: > > But you cannot keep that setting if the system goes down > > or any broadcast packet would resume the whole sy

Re: [PATCH] Add support for usbfs zerocopy.

2015-12-25 Thread Oliver Neukum
On Thu, 2015-11-26 at 01:19 +0100, Steinar H. Gunderson wrote: Hi, just two small nits to pick: > +static int usbdev_mmap(struct file *file, struct vm_area_struct *vma) > +{ > + struct usb_memory *usbm = NULL; > + struct usb_dev_state *ps = file->private_data; > + size_t size =

Re: [PATCH 1/1] usb: cdc-acm: handle unlinked urb in acm read callback

2015-12-29 Thread Oliver Neukum
> to -ENOENT even those urbs might have data not processed yet. > Hence, data loss occurs. > > This patch lets bulk-in callback function handle unlinked urbs > to avoid data loss. > > Signed-off-by: Tang Jian Qiang > Signed-off-by: Lu Baolu > Cc: sta...@vger

Re: rndis/cdc_ether usb device causing Oops in 4.4rc1+ with NULL dereference

2015-12-31 Thread Oliver Neukum
On Thu, 2015-12-31 at 07:22 +0300, Vasily Galkin wrote: > rm *rc1*dmesgAfter switching from 4.3 to 4.4rc-s plugging device ID 1076:8002 > GCT Semiconductor, Inc. LU150 LTE Modem [Yota LU150] causes kernel Oops. > > The Oops is always reproducible when this device is plugged or system is > booted

Re: Re:rndis/cdc_ether usb device causing Oops in 4.4rc1+ with NULL dereference

2016-01-02 Thread Oliver Neukum
On Sat, 2016-01-02 at 06:11 +0300, Vasily Galkin wrote: > I reverted 823bd3433424aa959499e6fd8f2da842430a8d42 and recompiled cdc_ether > module for debian's 4.4rc6. > Device begin working normally as usual, no any Oopses or problems. > > Attaching lsusb output for this kernel. > > Note that this

Re: [PATCH v5 04/11] usbip: kernel module for userspace URBs transmission

2016-01-02 Thread Oliver Neukum
On Wed, 2015-12-30 at 15:10 +0900, Nobuo Iwata wrote: > Originally, USB/IP transmits requests and response PDUs for > preparation > to transfer URBs in user space, after the preparation, URBs are > transmitted in kernel space. > > To make easy to introduce application network protocols like > We

Re: [PATCH] cdc_acm: blacklist Samsung Phones in firmware update mode

2016-01-03 Thread Oliver Neukum
> There are 3 devices used by Samsung in firmware update mode: > idVendor=0x04e8 idProduct=0x6601 idProduct=0x685d IdProduct=0x68c3 > source: > (https://github.com/Benjamin-Dobell/Heimdall/blob/master/heimdall/ > source/BridgeManager.h) > > Signed-off-by: Jose Alonso

Re: rndis/cdc_ether usb device causing Oops in 4.4rc1+ with NULL dereference

2016-01-03 Thread Oliver Neukum
. Did you forget to submit it maybe, Oliver? Hi, it seems I am becoming forgetful. Vasily, could you test? Regards Oliver From f78b52d522f9adfae32af8d7313b51f3af2fcf30 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 22 Sep 2015 15:45:21 +0200 Subject: [PATC

Re: [PATCH] cdc_acm: blacklist Samsung Phones in firmware update mode

2016-01-03 Thread Oliver Neukum
On Mon, 2016-01-04 at 12:32 +0700, Lars Melin wrote: > On 2016-01-04 05:00, Jose Alonso wrote: > > > > The program Heimdall (http://glassechidna.com.au/heimdall) is used > > to flash a new firmware in Samsung Mobile Phones. It uses only the > > library libusb to access the device. > > > > The modul

Re: [PATCH] usb: serial: return -ENODEV if disconnected during TIOCMIWAIT

2016-01-04 Thread Oliver Neukum
On Sun, 2016-01-03 at 17:22 +0100, Johan Hovold wrote: > On Mon, Dec 21, 2015 at 02:17:22PM +0100, Oliver Neukum wrote: > > Disconnecting a device is not just a hang up. The device is gone. > > We should tell user space the truth immediately. > > I'm not sure abou

Re: [PATCH] usb: serial: return -ENODEV if disconnected during TIOCMIWAIT

2016-01-04 Thread Oliver Neukum
On Mon, 2016-01-04 at 12:06 +0100, Johan Hovold wrote: > Now, we could extend this long-since established behaviour, but I'm > not > sure it's worth it given that any further calls using the hung up tty > device will also return with errno set to -EIO by the tty layer. And > this we can't easily ch

Re: [PATCH] cdc_acm: blacklist Samsung Phones in firmware update mode

2016-01-04 Thread Oliver Neukum
On Mon, 2016-01-04 at 23:06 +0700, Lars Melin wrote: > On 2016-01-04 13:43, Oliver Neukum wrote: > > On Mon, 2016-01-04 at 12:32 +0700, Lars Melin wrote: > K > >> > >> 04e8:6601 is also used for Samsung SCH-U209 CDMA modem so can not be > >> ignored. > &

Re: xHCI driver issue (ASMedia Controller using xhci_hcd)

2016-01-06 Thread Oliver Neukum
On Wed, 2016-01-06 at 17:52 +, Steve Graham wrote: > In my case, my scanner problem has been fixed (so far) by tuning off > autosuspend: > > # echo -1 >/sys/module/usbcore/parameters/autosuspend Did you see any other device failing or is it specific to your scanner? Regards

[PATCH 2/2] usb: no locking for reading descriptors in sysfs

2016-01-21 Thread Oliver Neukum
s added by the > kernel 3.13 commit > "232275a USB: fix substandard locking for the sysfs files" > > Any comments to this proposal ? It seems okay to me. Please submit a patch. So this removes the locking making the point about -EINTR in the first path moot. Signed-o

[PATCH 1/2] usb: sysfs: make locking interruptible

2016-01-21 Thread Oliver Neukum
use interruptible sleep. Signed-off-by: Oliver Neukum --- drivers/usb/core/sysfs.c | 69 ++-- include/linux/device.h | 5 include/linux/usb.h | 7 ++--- 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/drivers/usb/core

Re: [PATCH 0/2] Add a skeleton module to perform a basic initialization on certain USB devices

2016-01-24 Thread Oliver Neukum
On Sat, 2016-01-23 at 08:39 -0800, Greg KH wrote: > Have your program install a udev rule to make it run automatically > when > the device is plugged in, and then just file a bug with the different > distros to have them pick up your program and add it to their > releases. > With free services like

Re: [PATCH 2/2] usb: no locking for reading descriptors in sysfs

2016-01-25 Thread Oliver Neukum
On Sun, 2016-01-24 at 13:22 -0800, Greg KH wrote: > On Thu, Jan 21, 2016 at 03:18:48PM +0100, Oliver Neukum wrote: > > Quting the relevant thread: > > > > > In fact, I suspect the locking added by the kernel 3.13 commit for > > > read_descriptors() is invalid be

Re: [PATCH 0/2] Add a skeleton module to perform a basic initialization on certain USB devices

2016-01-25 Thread Oliver Neukum
On Sun, 2016-01-24 at 14:48 -0800, Greg KH wrote: > On Sun, Jan 24, 2016 at 11:05:05PM +0100, Oliver Neukum wrote: > > On Sat, 2016-01-23 at 08:39 -0800, Greg KH wrote: > > > Have your program install a udev rule to make it run automatically > > > when > > > the

Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler

2016-01-26 Thread Oliver Neukum
On Thu, 2016-01-21 at 16:04 +0100, Hans de Goede wrote: > Hi, > > On 19-01-16 11:39, Oliver Neukum wrote: > > We have exactly one TMF. It must be locked against > > reuse. > > > > Signed-off-by: Oliver Neukum > > --- > > drivers/usb/storage/uas.

Re: EHCI vs OHCI ports

2016-01-27 Thread Oliver Neukum
On Wed, 2016-01-27 at 11:33 +0530, Muni Sekhar wrote: > [ Please keep me in CC as I'm not subscribed to the list] > > Hello, > > My test system is having two USB1.1 (OHCI) controllers and one USB2 > (EHCI) controller. > > I am assuming When a High-Speed device is connected to the port, the > EH

Re: [PATCH] HID: quirks: Add no_init_reports for AKAI midi controller

2016-01-28 Thread Oliver Neukum
On Wed, 2016-01-27 at 22:31 +0100, Jiri Kosina wrote: > On Wed, 27 Jan 2016, Stafford Horne wrote: > > > The midi controller times-out while initializing reports, this > > causes boot to take an extra 10 seconds. The device descriptor > > advertises that it has an internal HID device but seems to

regression with S3 and XHCI

2016-01-28 Thread Oliver Neukum
Hi, with the latest kernels I tested devices connected to XHCI are gone after resume. The ports are not resumed. An error is in dmesg: [ 614.639506] sd 5:0:0:0: [sdc] Starting disk [ 614.672568] xhci_hcd :00:14.0: port 7 resume PLC timeout [ 614.695152] xhci_hcd :00:14.0: port 6 resume

Re: regression with S3 and XHCI

2016-01-29 Thread Oliver Neukum
On Fri, 2016-01-29 at 14:10 +0200, Mathias Nyman wrote: > So everything was fine with 4.4 still? Yes. > I just saw that there are changes in PM allowing usb devices to stay suspended > if we enter suspend with devices runtime suspended, not sure if that has an > impat. > > Was this limited to

[PATCH] usb: retry reset if a device times out

2016-02-03 Thread Oliver Neukum
cracks. http://www.spinics.net/lists/linux-usb/msg103263.html Signed-off-by: Oliver Neukum CC: sta...@vger.kernel.org --- drivers/usb/core/hub.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index f912fe6..2124c4e 100644 --- a

Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler

2016-02-03 Thread Oliver Neukum
On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote: > On Tue, 26 Jan 2016, Oliver Neukum wrote: > > That is problematic. The ABORT_TMF does need IO for which we need > > to wait. And if we just submit and pretend the abort worked, the tag > > will be reused. > >

Re: [PATCH] usb: retry reset if a device times out

2016-02-03 Thread Oliver Neukum
On Wed, 2016-02-03 at 11:24 -0500, Alan Stern wrote: > On Wed, 3 Feb 2016, Oliver Neukum wrote: > > > Some devices I got show an inability to operate right after > > power on if they are already connected. They are beyond recovery > > if the descriptors are requested multi

Re: Writing to USB3 memory stick with 4.4 is 52 times slower than Win7 inside virtualbox

2016-02-04 Thread Oliver Neukum
On Wed, 2016-02-03 at 22:20 -0800, Marc MERLIN wrote: > But the main point remains that default mount options and default cp > work at horrible speed. I'm happy to try stuff to get around that > (nosync might be one, but having my stick write after I unmounted it, > makes me very nervous), so I'd

Re: [PATCH] usb: retry reset if a device times out

2016-02-04 Thread Oliver Neukum
On Thu, 2016-02-04 at 14:53 +0800, Peter Chen wrote: > On Wed, Feb 03, 2016 at 11:24:57AM -0500, Alan Stern wrote: > > On Wed, 3 Feb 2016, Oliver Neukum wrote: > > > > > Some devices I got show an inability to operate right after > > > power on if they are a

Re: [PATCH] usb: retry reset if a device times out

2016-02-04 Thread Oliver Neukum
On Thu, 2016-02-04 at 17:08 +0800, Peter Chen wrote: > On Thu, Feb 04, 2016 at 09:53:10AM +0100, Oliver Neukum wrote: > > On Thu, 2016-02-04 at 14:53 +0800, Peter Chen wrote: > > > On Wed, Feb 03, 2016 at 11:24:57AM -0500, Alan Stern wrote: > > > > On Wed, 3

[PATCH 04/13] uas: actually use TASK_ABORT iu

2016-02-04 Thread Oliver Neukum
Issue a TASK_ABORT iu to the device and wait for it to complete. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 1b901c8..e69ef2b 100644 --- a/drivers/usb/storage

[v2 RFC] introducing TMF in the UAS driver

2016-02-04 Thread Oliver Neukum
This is my second attempt, including the comments on tags Hans made and Alan's remarks on eh_abort_handler() I've dropped the locking as the SCSI layer does that already. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org

[PATCH 02/13] uas: reserve a tag for management

2016-02-04 Thread Oliver Neukum
UAS uses a shared tag space. We reserve tag #1 for management. That leaves us with an offset of 2. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers

[PATCH 09/13] uas: correct return values of uas_eh_abort_handler()

2016-02-04 Thread Oliver Neukum
If we succeed, we should report that. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d388e78..31ff1a0 100644 --- a/drivers/usb/storage

[PATCH 05/13] uas: handle reset() while a TMF is active

2016-02-04 Thread Oliver Neukum
A reset in progress obsoletes all TMFs. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index e69ef2b..4c1d6c3 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage

[PATCH 12/13] uas: handle response to LUN reset

2016-02-04 Thread Oliver Neukum
Simple evaluation of the response uis result codes Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 80 ++- 1 file changed, 65 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 843c73e

[PATCH 07/13] uas: handle errors in transmitting a TMF

2016-02-04 Thread Oliver Neukum
We need to give up on this TMF to have a free tag again. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 167 ++ 1 file changed, 110 insertions(+), 57 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index

[PATCH 13/13] uas: fix race between evaluation and completion in TMF results

2016-02-04 Thread Oliver Neukum
First evaluate, then notify the consumer. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d2d9244..d789227 100644 --- a/drivers/usb/storage/uas.c +++ b

[PATCH 11/13] uas: add eh_device_reset_handler

2016-02-04 Thread Oliver Neukum
This maps a device reset to a RESET LOGICAL UNIT and sends the TMF. Also factor out common code with abort handling. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage

[PATCH 06/13] uas: fix reset_resume will a TMF is running

2016-02-04 Thread Oliver Neukum
If we go into the reset_resume() code path, the device cannot report on the result of a TMF. We must forget about the request at the host level. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb

[PATCH 08/13] uas: use response codes of a TMF

2016-02-04 Thread Oliver Neukum
Make sure we consider a command abort only if the device confirms that. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index acd2034..d388e78 100644 --- a/drivers/usb

[PATCH 10/13] uas: correctly label reset functions

2016-02-04 Thread Oliver Neukum
A reset based on usb_reset_device() will reset the whole host, not just a bus. We should use the correct entry. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage

[PATCH 01/13] uas: add basic task management functions

2016-02-04 Thread Oliver Neukum
This just allocates the structures. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 44b096c..13e6313 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers

[PATCH 03/13] uas: use TMF_ABORT_TASK

2016-02-04 Thread Oliver Neukum
Use a TMF_ABORT_TASK TMF_IU in the abort handler, to deal with commands we need to get rid of. Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index

<    1   2   3   4   5   6   7   8   9   10   >