Re: Oddity with EP configuration

2017-06-13 Thread Benjamin Herrenschmidt
On Wed, 2017-06-14 at 12:00 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2017-06-14 at 10:33 +1000, Benjamin Herrenschmidt wrote: > > On Tue, 2017-06-13 at 15:08 +1000, Benjamin Herrenschmidt wrote: > > > Now, what I observe is that when the mass storage gets bound to the > > > UDC driver: > > >

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Peter Chen
On Tue, Jun 13, 2017 at 10:22:26AM -0400, Alan Stern wrote: > On Tue, 13 Jun 2017, Felipe Balbi wrote: > > > > > Hi Alan, > > > > Alan Stern writes: > > > Felipe: > > > > > > A UDC driver will invoke the gadget driver's ->disconnect callback > > > whenever the D+

Re: Oddity with EP configuration

2017-06-13 Thread Benjamin Herrenschmidt
On Wed, 2017-06-14 at 10:33 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2017-06-13 at 15:08 +1000, Benjamin Herrenschmidt wrote: > > Now, what I observe is that when the mass storage gets bound to the > > UDC driver: > > > >  - First the endpoints are properly allocated by my match callback, >

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-13 Thread Peter Chen
On Tue, Jun 13, 2017 at 12:24:42PM +0200, Ulf Hansson wrote: > [...] > > > + > > +/** > > + * of_pwrseq_on - Carry out power sequence on for device node > > + * > > + * @np: the device node would like to power on > > + * > > + * Carry out a single device power on. If multiple devices > > + *

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-13 Thread Alan Cox
On Tue, 13 Jun 2017 09:52:07 +0300 Tal Shorer wrote: > If a tty driver wants to notify the user of some exceptional event, > such as a usb cdc acm device set_line_coding event, it needs a way to > modify the mask returned by poll() and possible also add wait queues. > In

Re: [PATCH 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding

2017-06-13 Thread Alan Cox
On Mon, 12 Jun 2017 20:26:13 +0300 Tal Shorer wrote: > The user can issue USB_F_GET_LINE_CODING to get the current line coding > as set by the host (or the default if unset yet). No this is not how to do it. We don't want weirdass ioctls for each different tty device type.

Re: Oddity with EP configuration

2017-06-13 Thread Benjamin Herrenschmidt
On Tue, 2017-06-13 at 15:08 +1000, Benjamin Herrenschmidt wrote: > Now, what I observe is that when the mass storage gets bound to the > UDC driver: > >  - First the endpoints are properly allocated by my match callback, > ie, epautoconf is called to allocate EPs to the function. > >  - But

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread John Youn
On 6/13/2017 3:31 PM, Paul Zimmerman wrote: > On Tue, 13 Jun 2017 21:57:42 +, John Youn wrote: > >> On 6/13/2017 2:39 PM, Paul Zimmerman wrote: >>> On Tue, 13 Jun 2017 18:33:09 +, John Youn >>> wrote: >>> On 6/13/2017 12:32 AM, Felipe

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread Paul Zimmerman
On Tue, 13 Jun 2017 21:57:42 +, John Youn wrote: > On 6/13/2017 2:39 PM, Paul Zimmerman wrote: > > On Tue, 13 Jun 2017 18:33:09 +, John Youn > > wrote: > > > >> On 6/13/2017 12:32 AM, Felipe Balbi wrote: > >>> > >>> Hi, > >>> > >>> Thinh

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread John Youn
On 6/13/2017 2:39 PM, Paul Zimmerman wrote: > On Tue, 13 Jun 2017 18:33:09 +, John Youn wrote: > >> On 6/13/2017 12:32 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Thinh Nguyen writes: >> this could be, I don't remember if I

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread Paul Zimmerman
On Tue, 13 Jun 2017 18:33:09 +, John Youn wrote: > On 6/13/2017 12:32 AM, Felipe Balbi wrote: > > > > Hi, > > > > Thinh Nguyen writes: > this could be, I don't remember if I checked this or not :-) > >

[PATCH] USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks

2017-06-13 Thread Alan Stern
Using the syzkaller kernel fuzzer, Andrey Konovalov generated the following error in gadgetfs: > BUG: KASAN: use-after-free in __lock_acquire+0x3069/0x3690 > kernel/locking/lockdep.c:3246 > Read of size 8 at addr 88003a2bdaf8 by task kworker/3:1/903 > > CPU: 3 PID: 903 Comm: kworker/3:1 Not

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread John Youn
On 6/13/2017 12:32 AM, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: this could be, I don't remember if I checked this or not :-) Really, the best way here, IMHO, would be to re-verify what's going on

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread Thinh Nguyen
Hi, On 6/13/2017 12:32 AM, Felipe Balbi wrote: > Thinh Nguyen writes: this could be, I don't remember if I checked this or not :-) Really, the best way here, IMHO, would be to re-verify what's going on

Re: gadgetfs: how to wait for USB device initialization?

2017-06-13 Thread Andrey Konovalov
On Tue, Jun 13, 2017 at 6:22 PM, Tal Shorer wrote: > On Tue, Jun 13, 2017 at 7:02 PM, Tal Shorer wrote: >> On Tue, Jun 13, 2017 at 3:21 PM, Andrey Konovalov >> wrote: >>> Hi! >>> >>> I'm trying to use gadgetfs to fuzz USB

Re: usb/gadget: potential deadlock in gadgetfs_suspend

2017-06-13 Thread Andrey Konovalov
On Tue, Jun 13, 2017 at 7:44 PM, Alan Stern wrote: > On Tue, 13 Jun 2017, Andrey Konovalov wrote: > >> Hi Alan, >> >> Thanks for the patch! >> >> I've been testing with your patch applied and the "bad spinlock magic" >> crashes seem to be gone. However I got another

Re: usb/gadget: potential deadlock in gadgetfs_suspend

2017-06-13 Thread Alan Stern
On Tue, 13 Jun 2017, Andrey Konovalov wrote: > Hi Alan, > > Thanks for the patch! > > I've been testing with your patch applied and the "bad spinlock magic" > crashes seem to be gone. However I got another crash (happened only > once over the night), which happens during "spin_lock_irqsave >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-13 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: > On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern > wrote: > > Let's get some help from people who understand PCI well. > > > > Here's the general problem: Kai-Heng has a PCI-based USB

Re: [PATCH net,stable] qmi_wwan: new Telewell and Sierra device IDs

2017-06-13 Thread David Miller
From: Bjørn Mork Date: Tue, 13 Jun 2017 19:10:18 +0200 > A new Sierra Wireless EM7305 device ID used in a Toshiba laptop, > and two Longcheer device IDs entries used by Telewell TW-3G HSPA+ > branded modems. > > Reported-by: Petr Kloc > Reported-by: Teemu

[PATCH] USB: qcserial: new Sierra Wireless EM7305 device ID

2017-06-13 Thread Bjørn Mork
A new Sierra Wireless EM7305 device ID used in a Toshiba laptop. Reported-by: Petr Kloc Cc: Signed-off-by: Bjørn Mork --- drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/qcserial.c

[PATCH net,stable] qmi_wwan: new Telewell and Sierra device IDs

2017-06-13 Thread Bjørn Mork
A new Sierra Wireless EM7305 device ID used in a Toshiba laptop, and two Longcheer device IDs entries used by Telewell TW-3G HSPA+ branded modems. Reported-by: Petr Kloc Reported-by: Teemu Likonen Signed-off-by: Bjørn Mork --- The following

Re: [PATCH net-next v2 0/2] r8152: adjust runtime suspend/resume

2017-06-13 Thread David Miller
From: Hayes Wang Date: Tue, 13 Jun 2017 15:14:38 +0800 > v2: > For #1, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). > > v1: > Improve the flow about runtime suspend/resume and make the code > easy to read. Series applied. -- To unsubscribe from this list: send

[PATCH] dt-bindings: usb: exynos-usb: Add missing required VDD properties

2017-06-13 Thread Krzysztof Kozlowski
Since commit bd8ce544ec35 ("usb: dwc3: exynos: Make provision for vdd regulators") vdd33-supply and vdd10-supply are required so document them in bindings. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/usb/exynos-usb.txt | 4 1 file changed, 4

Re: gadgetfs: how to wait for USB device initialization?

2017-06-13 Thread Tal Shorer
On Tue, Jun 13, 2017 at 7:02 PM, Tal Shorer wrote: > On Tue, Jun 13, 2017 at 3:21 PM, Andrey Konovalov > wrote: >> Hi! >> >> I'm trying to use gadgetfs to fuzz USB device drivers by simply >> connecting random devices for now. >> >> What I want to

Re: gadgetfs: how to wait for USB device initialization?

2017-06-13 Thread Tal Shorer
On Tue, Jun 13, 2017 at 3:21 PM, Andrey Konovalov wrote: > Hi! > > I'm trying to use gadgetfs to fuzz USB device drivers by simply > connecting random devices for now. > > What I want to achieve right now is the following: > > 1. mount gadgetfs > 2. emulate connection of a

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-13 Thread Jiri Kosina
On Tue, 13 Jun 2017, Benjamin Tissoires wrote: > > I tried to cook some script that formats the list in the same way than > > yours. > > > > I just noticed that you have in CONFIG_HID_CHICONY: > > { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) }, > > while in v4.12-rc5

Re: gadgetfs: how to wait for USB device initialization?

2017-06-13 Thread Alan Stern
On Tue, 13 Jun 2017, Andrey Konovalov wrote: > Hi! > > I'm trying to use gadgetfs to fuzz USB device drivers by simply > connecting random devices for now. > > What I want to achieve right now is the following: > > 1. mount gadgetfs > 2. emulate connection of a new USB device > 3. wait for the

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Alan Stern
On Tue, 13 Jun 2017, Felipe Balbi wrote: > > Hi Alan, > > Alan Stern writes: > > Felipe: > > > > A UDC driver will invoke the gadget driver's ->disconnect callback > > whenever the D+ pullup is turned off. During gadget driver unbinding, > > this happens

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-13 Thread Benjamin Tissoires
On Jun 13 2017 or thereabouts, Benjamin Tissoires wrote: > On Jun 13 2017 or thereabouts, Jiri Kosina wrote: > > So I've now pushed the latest version to 'for-4.12/driver-matching-fix' of > > hid.git, and if no more issues are discovered, I'll push that to Linus > > this week so that we finally

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-13 Thread Benjamin Tissoires
On Jun 13 2017 or thereabouts, Jiri Kosina wrote: > So I've now pushed the latest version to 'for-4.12/driver-matching-fix' of > hid.git, and if no more issues are discovered, I'll push that to Linus > this week so that we finally get rid of this long-lasting PITA (while > still heading towards

Re: [v2 1/1] usb:host:xhci support option to disable xHCI 1.0 USB2 HW LPM

2017-06-13 Thread Mathias Nyman
On 06.06.2017 09:33, Thang Q. Nguyen wrote: On Mon, Jun 5, 2017 at 9:33 PM, Mathias Nyman wrote: On 05.06.2017 15:57, Thang Q. Nguyen wrote: On Mon, Jun 5, 2017 at 6:14 PM, Mathias Nyman wrote: On 20.05.2017 10:24, Thang Q. Nguyen

Re: [PATCH v4] xhci: AMD Promontory USB disable port support

2017-06-13 Thread Mathias Nyman
On 13.06.2017 14:26, Jiahau Chang wrote: 2017-06-07 16:02 GMT+08:00 Mathias Nyman : On 06.06.2017 13:13, Jiahau Chang wrote: v4: Remove the patch code in case USB_PORT_FEAT_REMOTE_WAKE_MASK For AMD Promontory xHCI host, although you can disable USB 2.0 ports in

gadgetfs: how to wait for USB device initialization?

2017-06-13 Thread Andrey Konovalov
Hi! I'm trying to use gadgetfs to fuzz USB device drivers by simply connecting random devices for now. What I want to achieve right now is the following: 1. mount gadgetfs 2. emulate connection of a new USB device 3. wait for the device to finish initializing 4. unmount gadgetfs 5. goto 1 The

Re: [PATCH v4] xhci: AMD Promontory USB disable port support

2017-06-13 Thread Jiahau Chang
2017-06-07 16:02 GMT+08:00 Mathias Nyman : > On 06.06.2017 13:13, Jiahau Chang wrote: >> >> v4: Remove the patch code in case USB_PORT_FEAT_REMOTE_WAKE_MASK >> >> For AMD Promontory xHCI host, although you can disable USB 2.0 ports in >> BIOS >> settings, those ports

Re: [PATCH v2 0/8] ACPI / PM: Suspend-to-idle rework to deal with spurious ACPI wakeups

2017-06-13 Thread Rafael J. Wysocki
On Tuesday, June 13, 2017 07:54:22 AM Dominik Brodowski wrote: > Rafael, > > On Mon, Jun 12, 2017 at 10:46:47PM +0200, Rafael J. Wysocki wrote: > > Hi All, > > > > On Thursday, June 08, 2017 02:00:40 AM Rafael J. Wysocki wrote: > > > Hi All, > > > > > > This series is a replacement for commit

Re: [PATCH v2 2/8] USB / PCI / PM: Allow the PCI core to do the resume cleanup

2017-06-13 Thread Rafael J. Wysocki
On Tuesday, June 13, 2017 10:52:52 AM Greg KH wrote: > On Mon, Jun 12, 2017 at 10:49:40PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > hcd_pci_resume_noirq() used as a universal _resume_noirq handler for > > PCI USB controllers calls

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-13 Thread Jiri Kosina
On Fri, 9 Jun 2017, Hans de Goede wrote: > So I've decided to just go ahead and give this patch a second pair > of eyes, it is mostly good, but I did find some issues, comments > inline. Thanks for all the comments, highly appreciated. [ ... snipped the ones that have been put into v2 ... ] >

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-13 Thread Ulf Hansson
[...] > + > +/** > + * of_pwrseq_on - Carry out power sequence on for device node > + * > + * @np: the device node would like to power on > + * > + * Carry out a single device power on. If multiple devices > + * need to be handled, use of_pwrseq_on_list() instead. > + * > + * Return a pointer to

Re: usb/gadget: potential deadlock in gadgetfs_suspend

2017-06-13 Thread Andrey Konovalov
On Mon, Jun 12, 2017 at 10:25 PM, Alan Stern wrote: > > As you surmised, this was caused by a race. The race was between > dummy_udc_stop() and set_link_state(), both in dummy_hcd.c. A symptom > of this race is that the first routine clears dum->driver while the >

Re: [PATCH 8/9] tty: ircomm: remove dead and broken ioctl code

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 11:57:14AM +0200, Johan Hovold wrote: > On Tue, Jun 13, 2017 at 11:48:41AM +0200, Greg Kroah-Hartman wrote: > > On Tue, Jun 06, 2017 at 12:27:04PM +0100, Alan Cox wrote: > > > On Tue, 6 Jun 2017 12:54:40 +0200 > > > Johan Hovold wrote: > > > > > > >

Re: [PATCH 8/9] tty: ircomm: remove dead and broken ioctl code

2017-06-13 Thread Johan Hovold
On Tue, Jun 13, 2017 at 11:57:14AM +0200, Johan Hovold wrote: > On Tue, Jun 13, 2017 at 11:48:41AM +0200, Greg Kroah-Hartman wrote: > > On Tue, Jun 06, 2017 at 12:27:04PM +0100, Alan Cox wrote: > > > On Tue, 6 Jun 2017 12:54:40 +0200 > > > Johan Hovold wrote: > > > > > > >

Re: [PATCH 8/9] tty: ircomm: remove dead and broken ioctl code

2017-06-13 Thread Johan Hovold
On Tue, Jun 13, 2017 at 11:48:41AM +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 06, 2017 at 12:27:04PM +0100, Alan Cox wrote: > > On Tue, 6 Jun 2017 12:54:40 +0200 > > Johan Hovold wrote: > > > > > Remove three ifdefed and broken implementations of TIOCSSERIAL and > > >

Re: [PATCH 0/9] tty: drop broken alt-speed handling

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 06, 2017 at 12:54:32PM +0200, Johan Hovold wrote: > Setting an alt-speed using TIOCSSERIAL and SPD flags has been deprecated > since v2.1.69 and has been broken for all tty drivers but serial-core > since v3.10 and commit 6865ff222cca ("TTY: do not warn about setting > speed via

Re: [PATCH 8/9] tty: ircomm: remove dead and broken ioctl code

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 06, 2017 at 12:27:04PM +0100, Alan Cox wrote: > On Tue, 6 Jun 2017 12:54:40 +0200 > Johan Hovold wrote: > > > Remove three ifdefed and broken implementations of TIOCSSERIAL and > > TIOCGICOUNT, and parity handling in set_termios which had suffered > > severe bit

Re: [PATCH v2 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding

2017-06-13 Thread Tal Shorer
On Tue, Jun 13, 2017 at 12:19 PM, Greg KH wrote: > On Tue, Jun 13, 2017 at 09:52:12AM +0300, Tal Shorer wrote: >> The user can issue USB_F_GET_LINE_CODING to get the current line coding >> as set by the host (or the default if unset yet). >> >> Signed-off-by: Tal

Re: [PATCH v2 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding

2017-06-13 Thread Greg KH
On Tue, Jun 13, 2017 at 09:52:12AM +0300, Tal Shorer wrote: > The user can issue USB_F_GET_LINE_CODING to get the current line coding > as set by the host (or the default if unset yet). > > Signed-off-by: Tal Shorer > --- > Documentation/ioctl/ioctl-number.txt | 1 + >

Re: [PATCH v2 2/8] USB / PCI / PM: Allow the PCI core to do the resume cleanup

2017-06-13 Thread Greg KH
On Mon, Jun 12, 2017 at 10:49:40PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > hcd_pci_resume_noirq() used as a universal _resume_noirq handler for > PCI USB controllers calls pci_back_from_sleep() which is unnecessary > and may become problematic. >

Re: [PATCH 03/11] Creation of "usb_device_auth" LSM hook

2017-06-13 Thread Salvatore Mesoraca
2017-06-12 23:31 GMT+02:00 Casey Schaufler : > Return the error reported by the hook rather than -EPERM. Agreed, anyway this part will be, probably, dropped in the next version (read Greg and Krzysztof answers). I'm sorry :( Thank you very much for the time you spent on

Re: [PATCH 03/11] Creation of "usb_device_auth" LSM hook

2017-06-13 Thread Salvatore Mesoraca
2017-06-12 21:38 GMT+02:00 Greg Kroah-Hartman : > No, like Krzysztof said, you can already do this today, just fine, from > userspace. I think that support has been there for over a decade now, > why are you not taking advantage of this already? > No need to add extra

Re: [PATCH 03/11] Creation of "usb_device_auth" LSM hook

2017-06-13 Thread Salvatore Mesoraca
2017-06-12 19:35 GMT+02:00 Krzysztof Opasiak : > Could you please explain me why we need LSM for this? > > There are tools like usbguard[1] and as far as I can tell it looks like they > can do everything for you... I have to admit that this is the first time I read about

Re: [PATCH 2/3] usb: dwc3: gadget: Fix early exit in set/clear ep halt

2017-06-13 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> this could be, I don't remember if I checked this or not :-) >>> >>> Really, the best way here, IMHO, would be to re-verify what's going >>> on >>> with macOS and revert my orignal patch since it's,

Re: Gadget driver ->disconnect callback during unbinding

2017-06-13 Thread Felipe Balbi
Hi Alan, Alan Stern writes: > Felipe: > > A UDC driver will invoke the gadget driver's ->disconnect callback > whenever the D+ pullup is turned off. During gadget driver unbinding, > this happens automatically when usb_gadget_remove_driver() calls >

[PATCH net-next v2 0/2] r8152: adjust runtime suspend/resume

2017-06-13 Thread Hayes Wang
v2: For #1, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). v1: Improve the flow about runtime suspend/resume and make the code easy to read. Hayes Wang (2): r8152: split rtl8152_resume function r8152: move calling delay_autosuspend function drivers/net/usb/r8152.c | 107

[PATCH net-next v2 1/2] r8152: split rtl8152_resume function

2017-06-13 Thread Hayes Wang
Split rtl8152_resume() into rtl8152_runtime_resume() and rtl8152_system_resume(). Besides, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 99 ++--- 1 file changed,

[PATCH net-next v2 2/2] r8152: move calling delay_autosuspend function

2017-06-13 Thread Hayes Wang
Move calling delay_autosuspend() in rtl8152_runtime_suspend(). Calling delay_autosuspend() as late as possible. The original flows are 1. check if the driver/device is busy now. 2. set wake events. 3. enter runtime suspend. If the wake event occurs between (1) and (2), the device may

[PATCH v3] net: phy: Make phy_ethtool_ksettings_get return void

2017-06-13 Thread Yuval Shaia
Make return value void since function never return meaningfull value Signed-off-by: Yuval Shaia Acked-by: Sergei Shtylyov --- v0 ->v1: * These files were missing in v0 * drivers/net/ethernet/renesas/ravb_main.c

Re: [PATCH v3] USB: qcserial: expose methods for modem control

2017-06-13 Thread Johan Hovold
On Mon, Jun 12, 2017 at 11:52:41AM -0700, Magnus Lynch wrote: > The qcserial driver fails to expose the .tiocmget and .tiocmset methods > available from usb_wwan. These methods are required by ioctl commands > dealing with the modem control signals DTR, RTS, etc. > > With these methods not set

Re: [PATCH v5 0/6] reset: APIs to manage a list of resets

2017-06-13 Thread Vivek Gautam
On 06/01/2017 10:21 PM, Philipp Zabel wrote: A set of patches to allow consumers to get and de/assert or trigger a number of resets at the same time. A patch on top of Vivek's original API extension is added to hide the reset_control_array behind a struct reset_control so that the consumer

[PATCH v2 2/8] usb: gadget: u_serial: propagate poll() to the next layer

2017-06-13 Thread Tal Shorer
In order for a serial function to add flags to the poll() mask of their tty files, propagate the poll() callback to the next layer so it can return a mask if it sees fit to do so. Signed-off-by: Tal Shorer --- drivers/usb/gadget/function/u_serial.c | 16

[PATCH v2 3/8] usb: gadget: f_acm: validate set_line_coding requests

2017-06-13 Thread Tal Shorer
We shouldn't accept malformed set_line_coding requests. All values were taken from table 17 (section 6.3.11) of the cdc1.2 spec available at http://www.usb.org/developers/docs/devclass_docs/ The table is in the file PTSN120.pdf. Signed-off-by: Tal Shorer ---

[PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-13 Thread Tal Shorer
If a tty driver wants to notify the user of some exceptional event, such as a usb cdc acm device set_line_coding event, it needs a way to modify the mask returned by poll() and possible also add wait queues. In order to do that, we allow the driver to supply a poll() callback of its own, which

[PATCH v2 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding

2017-06-13 Thread Tal Shorer
The user can issue USB_F_GET_LINE_CODING to get the current line coding as set by the host (or the default if unset yet). Signed-off-by: Tal Shorer --- Documentation/ioctl/ioctl-number.txt | 1 + drivers/usb/gadget/function/f_acm.c | 19 +++

[PATCH v2 8/8] usb: gadget: u_serial: remove port_line_config from struct gserial

2017-06-13 Thread Tal Shorer
GetLineCoding and SetLineCoding are a cdc-acm thing. It doesn't make sense to have that in the generic u_serial layer. Moreso, f_acm has its own port_line_coding in its own struct and it uses that, while the one in struct gserial is set once upon initialization and then never used. Also, the

[PATCH v2 5/8] usb: gadget: f_acm: initialize port_line_coding when creating an instance

2017-06-13 Thread Tal Shorer
Initialize acm->port_line_coding with something that makes sense so that we can return a valid line coding if the host requests GetLineCoding before requesting SetLineCoding Signed-off-by: Tal Shorer --- drivers/usb/gadget/function/f_acm.c | 6 ++ 1 file changed, 6

[PATCH v2 4/8] usb: gadget: u_serial: propagate ioctl() to the next layer

2017-06-13 Thread Tal Shorer
In order for a serial function to implement its own ioctl() calls, propagate the ioctl() callback to the next layer so it can handle it if it sees fit to do so. Signed-off-by: Tal Shorer --- drivers/usb/gadget/function/u_serial.c | 15 +++

[PATCH v2 7/8] usb: gadget: f_acm: notify the user on SetLineCoding

2017-06-13 Thread Tal Shorer
Notify the user with a POLLPRI event when the host issues a SetLineCoding request so that they can act upon it, for example by configuring the line coding on a real serial port. The event is cleared when the user reads the line coding using USB_F_ACM_GET_LINE_CODING ioctl() Signed-off-by: Tal

[PATCH v2 0/8] Allow f_acm gadgets to notify the user about SetLineCoding requests

2017-06-13 Thread Tal Shorer
I'm currently working on a project where I'd like to have an omap board running linux be a usb-to-uart converter (using f_acm), and I've ran into an issue: there's no way for the application to know if the host has issued a SetLineCoding requests (after which parity/baudrate should be changed to

Re: [PATCH v5 3/6] reset: hide reset control arrays behind struct reset_control

2017-06-13 Thread Vivek Gautam
Hi Philipp, On 06/01/2017 10:22 PM, Philipp Zabel wrote: Reset controls already may control multiple reset lines with a single hardware bit. So from the user perspective, reset control arrays are not at all different from single reset controls. Therefore, hide reset control arrays behind

[PATCH] usb: Fix typo in the definition of Endpoint[out]Request

2017-06-13 Thread Benjamin Herrenschmidt
The current definition is wrong. This breaks my upcoming Aspeed virtual hub driver. Signed-off-by: Benjamin Herrenschmidt --- include/linux/usb/hcd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/usb/hcd.h

patch "USB: usbip: convert to use DRIVER_ATTR_RW" added to driver-core-next

2017-06-13 Thread gregkh
This is a note to let you know that I've just added the patch titled USB: usbip: convert to use DRIVER_ATTR_RW to my driver-core git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git in the driver-core-next branch. The patch will show up in