Re: USB vulnerability

2016-07-29 Thread roswest
On Thu Jul 28 2016 15:56:17 GMT-0400 (EDT), Alan Stern wrote: > On Thu, 28 Jul 2016, Alan Stern wrote: > >> Only bits 10..0 of the wMaxPacketSize field contain the maximum packet >> size; bits 12..11 contain something else (valid only for high-speed >> periodic endpoints) and bits 15..13 are res

Re: [PATCH V2 RFC 5/6] DT: bindings: bcm: Add Raspberry Pi Zero

2016-07-29 Thread Rob Herring
On Tue, Jul 26, 2016 at 06:53:32PM +, Stefan Wahren wrote: > Signed-off-by: Stefan Wahren > --- > .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt |4 > 1 file changed, 4 insertions(+) Acked-by: Rob Herring -- To unsubscribe from this list: send the line "unsubscribe linux-usb" i

Re: [PATCH V2 RFC 2/6] usb: dwc2: Add DT properties to specify fifo size in host/otg mode

2016-07-29 Thread Rob Herring
On Tue, Jul 26, 2016 at 06:53:29PM +, Stefan Wahren wrote: > Currently the fifo sizes for host/otg mode are defined per platform > and doesn't take the mode into account. So we will get errors > like this: > > dwc2 2098.usb: 256 invalid for host_nperio_tx_fifo_size. > dwc2 2098.usb: Se

Re: [PATCH v3 3/6] binding-doc: usb: usb-device: add optional properties for power sequence

2016-07-29 Thread Rob Herring
On Wed, Jul 20, 2016 at 05:40:26PM +0800, Peter Chen wrote: > Add optional properties for power sequence. > > Signed-off-by: Peter Chen > --- > Documentation/devicetree/bindings/usb/usb-device.txt | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) This probably should be put into

Re: [PATCH v3 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-29 Thread Rob Herring
On Wed, Jul 20, 2016 at 05:40:24PM +0800, Peter Chen wrote: > Add binding doc for generic power sequence library. > > Signed-off-by: Peter Chen > Acked-by: Philipp Zabel > --- > .../bindings/power/pwrseq/pwrseq-generic.txt | 48 > ++ > 1 file changed, 48 insertions(+)

Re: [v3,2/6] power: add power sequence library

2016-07-29 Thread Matthias Kaehlcke
Hi Peter, Thanks for your work on this, a few comments inline On 07/20/2016 02:40 AM, Peter Chen wrote: ... +static int pwrseq_generic_on(struct device_node *np, struct pwrseq *pwrseq) +{ ... + if (gpiod_reset) { + u32 duration_us = 50; + + of_property_rea

[PACTH v3 0/2] usb: xhci: plat: Enable PM, async resume/suspend

2016-07-29 Thread robert . foss
From: Robert Foss This series enables runtime PM and asynchronous resume/suspend support for xhci-plat devices. Changes since v1: - Added Signed-off-by: Robert Foss - Added proper metadata tags to series. Changes since v2: - Added missing changelog to cover-letter. - Added error checking to pm

[PACTH v3 1/2] usb: xhci: plat: Enable runtime PM

2016-07-29 Thread robert . foss
From: Andrew Bresticker Enable runtime PM for the xhci-plat device so that the parent device may implement runtime PM. Signed-off-by: Andrew Bresticker Tested-by: Robert Foss Signed-off-by: Robert Foss --- drivers/usb/host/xhci-plat.c | 24 ++-- 1 file changed, 22 inserti

[PACTH v3 2/2] usb: xhci: plat: Enable async suspend/resume

2016-07-29 Thread robert . foss
From: Andrew Bresticker USB host controllers can take a significant amount of time to suspend and resume, adding several hundred miliseconds to the kernel resume time. Since the XHCI controller has no outside dependencies (other than clocks, which are suspended late/resumed early), allow it to su

[PATCH] musb: omap2430: do not assume balanced enable()/disable()

2016-07-29 Thread Andreas Kemnade
The code assumes that omap2430_musb_enable() and omap2430_musb_disable() is called in a balanced way. The That fact is broken by the fact that musb_init_controller() calls musb_platform_disable() to switch from unknown state to off state. That means that phy_power_off() is called first so that phy

Re: pwc over musb: 100% frame drop (lost) on high resolution stream

2016-07-29 Thread Matwey V. Kornilov
Hello, I've found that the following commit fixes the issue: commit 7694ca6e1d6f01122f05039b81f70f64b1ec4063 Author: Viresh Kumar Date: Fri Apr 22 16:58:42 2016 +0530 cpufreq: omap: Use generic platdev driver The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform

Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-29 Thread Robert Jarzmik
Felipe Balbi writes: > Hi Robert, > > Robert Jarzmik writes: >> Felipe Balbi writes: >> >>> Hi, >>> >>> Robert Jarzmik writes: I don't know if there are other users than pxa, I'll make the assumption there aren't. >>> >>> yeah, we can keep patches in linux-next for as long as p

Re: USB vulnerability

2016-07-29 Thread Alan Stern
On Fri, 29 Jul 2016, Felipe Balbi wrote: > Hi, > > Alan Stern writes: > > On Fri, 29 Jul 2016, Felipe Balbi wrote: > > > >> slightly unrelated, but... > > > >> > -maxp = usb_endpoint_maxp(&endpoint->desc) & 0x07ff; > >> > >> usb_endpoint_maxp() should probably be updated to retu

Re: xhci_hcd crash on linux 4.7.0

2016-07-29 Thread Alex Damian
On Fri, Jul 29, 2016 at 2:53 PM, Greg KH wrote: > On Fri, Jul 29, 2016 at 10:58:03AM +0100, Alex Damian wrote: >> Hi Greg, >> >> I managed to reproduce with a untainted kernel, see dmesg paste below. >> The stack seemed corrupted as well ? >> >> I refered to it as a crash since after a couple of t

Re: USB vulnerability

2016-07-29 Thread Felipe Balbi
Hi, Alan Stern writes: > On Fri, 29 Jul 2016, Felipe Balbi wrote: > >> slightly unrelated, but... > >> > - maxp = usb_endpoint_maxp(&endpoint->desc) & 0x07ff; >> >> usb_endpoint_maxp() should probably be updated to return only maximum >> packet size. Then we would need to introduce usb

Re: [PATCH] usb: gadget: Add per-lun inquiry string

2016-07-29 Thread Krzysztof Opasiak
On 07/29/2016 01:45 PM, Philipp Gesang wrote: > Introduce an attribute "inquiry_string" to the lun. > > In some environments, e. g. BIOS boot menus, the inquiry string > is the only information about devices presented to the user. The > default string depends on the "cdrom" bit of the first lun

Re: USB vulnerability

2016-07-29 Thread Alan Stern
On Fri, 29 Jul 2016, Felipe Balbi wrote: > slightly unrelated, but... > > - maxp = usb_endpoint_maxp(&endpoint->desc) & 0x07ff; > > usb_endpoint_maxp() should probably be updated to return only maximum > packet size. Then we would need to introduce usb_endpoint_mult() or > something al

Re: xhci_hcd crash on linux 4.7.0

2016-07-29 Thread Greg KH
On Fri, Jul 29, 2016 at 10:58:03AM +0100, Alex Damian wrote: > Hi Greg, > > I managed to reproduce with a untainted kernel, see dmesg paste below. > The stack seemed corrupted as well ? > > I refered to it as a crash since after a couple of these issues, the > machine hard freezes - I set up a se

Re: [PACTH v1 1/2] usb: xhci: plat: Enable runtime PM

2016-07-29 Thread Robert Foss
On 2016-07-28 08:24 PM, Felipe Balbi wrote: Hi, robert.f...@collabora.com writes: From: Andrew Bresticker Enable runtime PM for the xhci-plat device so that the parent device may implement runtime PM. Signed-off-by: Andrew Bresticker Tested-by: Robert Foss Signed-off-by: Robert Foss ---

Re: [PATCH] usb: lvstest: Remove deprecated create_singlethread_workqueue

2016-07-29 Thread Tejun Heo
On Thu, Jul 28, 2016 at 02:15:11PM +0530, Bhaktipriya Shridhar wrote: > The workqueue has a single work item(&lvs->rh_work) and hence > doesn't require ordering. Also, it is not being used on a memory > reclaim path. Hence, the singlethreaded workqueue has been replaced > with the use of system_wq.

Re: [PATCH] usb: dwc2: Remove deprecated create_singlethread_workqueue

2016-07-29 Thread Tejun Heo
On Thu, Jul 28, 2016 at 01:57:29PM +0530, Bhaktipriya Shridhar wrote: > alloc_ordered_workqueue replaces the deprecated > create_singlethread_workqueue. > > There are multiple work items on the work queue, which require > ordering. Hence, an ordered workqueue has been used. > > The workqueue "wq_

Re: [RFC] usb: host: u132-hcd: Remove deprecated create_singlethread_workqueue

2016-07-29 Thread Tejun Heo
Hello, Alan. On Wed, Jul 27, 2016 at 04:45:19PM -0400, Alan Stern wrote: > > Hmm... That doesn't really make them dependable during memory reclaim. > > True. But it does mean that they can't cause a deadlock by waiting > indefinitely for some other memory to be paged out to the very device > the

Re: [PATCH] usb:serial: Add Fintek F81532/534 driver

2016-07-29 Thread One Thousand Gnomes
O > +static int f81534_set_normal_register(struct usb_device *dev, u16 reg, u8 > data) > +{ > + size_t count = F81534_USB_MAX_RETRY; > + int status; > + u8 *tmp; > + > + tmp = kmalloc(sizeof(u8), GFP_KERNEL); > + if (!tmp) > + return -ENOMEM; You end up doing huge

[PATCH] usb: gadget: Add per-lun inquiry string

2016-07-29 Thread Philipp Gesang
Introduce an attribute "inquiry_string" to the lun. In some environments, e. g. BIOS boot menus, the inquiry string is the only information about devices presented to the user. The default string depends on the "cdrom" bit of the first lun as well as the kernel version and allows no further custom

Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-29 Thread Felipe Balbi
Hi Robert, Robert Jarzmik writes: > Felipe Balbi writes: > >> Hi, >> >> Robert Jarzmik writes: >>> I don't know if there are other users than pxa, I'll make the assumption >>> there >>> aren't. >> >> yeah, we can keep patches in linux-next for as long as possible. If >> nobody complains, we'r

VBUS GPIO for drivers/phy (was: Re: [RFC] usb: phy: generic: get rid of VBUS handling)

2016-07-29 Thread Felipe Balbi
Hi, (next time, please create a new thread :-) Zhangfei Gao writes: > Hi, Balbi & Robert > > Have one question about commit 7acc9973e3c4 ("usb: phy: generic: add > vbus support"). > Sorry asking here. > > Commit 7acc9973e3c4 ("usb: phy: generic: add vbus support") is adding > GPIO-based VBUS h

Re: xhci_hcd crash on linux 4.7.0

2016-07-29 Thread Alex Damian
Hi Greg, I managed to reproduce with a untainted kernel, see dmesg paste below. The stack seemed corrupted as well ? I refered to it as a crash since after a couple of these issues, the machine hard freezes - I set up a serial console via a USB cable, but I don't get the kernel oops out of the ma

Re: USB vulnerability

2016-07-29 Thread Felipe Balbi
Hi, Alan Stern writes: > On Thu, 28 Jul 2016, Alan Stern wrote: > >> Only bits 10..0 of the wMaxPacketSize field contain the maximum packet >> size; bits 12..11 contain something else (valid only for high-speed >> periodic endpoints) and bits 15..13 are reserved (see Table 9-13 in the >> USB-2.0

Re: USB vulnerability

2016-07-29 Thread Felipe Balbi
Hi, roswest writes: > [ Unknown signature status ] > > Alan, > > Hi, I am an engineer at Cisco Systems, and this summer we tasked some > interns with performing USB fuzzing. One of the interns, Jake Lamberson, > was able to cause a kernel panic when emulating an HID keyboard because > the OHCI d

Re: [PACTH v1 0/2] usb: xhci: plat: Enable PM, async resume/suspend

2016-07-29 Thread Felipe Balbi
Hi, Robert Foss writes: > This series should be labelled v2 instead of v1. right, and you should also list your changes since v1. -- balbi signature.asc Description: PGP signature

Re: [PACTH v1 1/2] usb: xhci: plat: Enable runtime PM

2016-07-29 Thread Felipe Balbi
Hi, robert.f...@collabora.com writes: > From: Andrew Bresticker > > Enable runtime PM for the xhci-plat device so that the parent device > may implement runtime PM. > > Signed-off-by: Andrew Bresticker > Tested-by: Robert Foss > Signed-off-by: Robert Foss > --- > drivers/usb/host/xhci-plat.c

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-29 Thread Rafał Miłecki
HI Rob, I got problems following your objections, so it took me some time to go back to this. On 21 July 2016 at 22:42, Rob Herring wrote: > On Wed, Jul 20, 2016 at 10:06:23AM +0200, Rafał Miłecki wrote: >> On 20 July 2016 at 03:02, Rob Herring wrote: >> > On Fri, Jul 15, 2016 at 11:10:45PM +02