Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Yuyang Du
Hi Krzysztof, On Tue, Mar 07, 2017 at 10:25:31AM +0100, Krzysztof Opasiak wrote: > > If it' not some "top secret" device maybe try to send us descriptors > (lsusb -vd VID:PID)? Pasted at the end. Surprisingly, I don't see isochronous types. Is it bulk streams? Thanks, Yuyang -- Bus 002

RE: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Peter Chen
>>> You mean type-C trigger an ACPI event, and this ACPI event can notify >>> related USB controller driver doing role switch? >> >> No (firmware programs the dual-role hw/registers), but never mind. >> That could be the case. >> >>> If it is correct, there is a notifier between type-C and USB

usb: gadget: uvc: configfs: fails to enumerate in HOST

2017-03-07 Thread Ganesh Biradar
Hello experts, I'm working on a project which uses TI OMAP Plus platform. i'm trying to implement uvc gadget through configfs. kernel: 4.4 I have setup function and configfs according to configfs gadget. mount -t debugfs debugfs /mnt/ echo "device" > /mnt/488d.usb/mode modprobe -v configfs

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Guenter Roeck
On 03/07/2017 02:30 PM, Mats Karrman wrote: [ ... ] I'm still struggling to catch up on what you guys have been up to during the last year or so :-) and came across some patches of Guenter from last October: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1243527.html What

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Guenter Roeck
On 03/07/2017 12:57 AM, Heikki Krogerus wrote: On Tue, Mar 07, 2017 at 01:36:29AM +, Peter Chen wrote: On Mon, Mar 06, 2017 at 09:15:51AM +0800, Peter Chen wrote: What interface you use when you receive this event to handle dual-role switch? I am wonder if a common dual-role class is

Re: [PATCH 1/2] usb: xhci-mtk: rebuild xhci_mtk_setup()

2017-03-07 Thread Chunfeng Yun
On Tue, 2017-03-07 at 16:57 +0200, Mathias Nyman wrote: > On 07.03.2017 08:57, Chunfeng Yun wrote: > > simplify xhci_mtk_setup() and add xhci_mtk_start() for > > xhci_driver_overrides struct > > > > Code itself looks fine, but it's bit unclear for me what the benefit of this > is? > > >

Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

2017-03-07 Thread Chunfeng Yun
On Tue, 2017-03-07 at 17:10 +0200, Mathias Nyman wrote: > On 07.03.2017 05:32, Chunfeng Yun wrote: > > hcc_params is set in xhci_gen_setup() called from usb_add_hcd(), > > so checks the Maximum Primary Stream Array Size in the hcc_params > > register after adding primary hcd. > > > >

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Mats Karrman
On 2017-03-06 14:14, Heikki Krogerus wrote: Hi Mats, On Fri, Mar 03, 2017 at 08:27:08PM +0100, Mats Karrman wrote: My system is a bit different. It's an i.MX6 SoC with the typec phy and DP controller connected directly to the SoC and it's using DTB/OF. Is this "DP controller" a controller

Re: bug? dwc2: insufficient fifo memory

2017-03-07 Thread John Youn
+linux-usb On 2/24/2017 2:46 PM, John Stultz wrote: > Hey John, > So after the USB tree landed in 4.11-rc, I've been seeing the > following warning at bootup. > > It seems the fifo_mem/total_fifo_size value on hikey is 1920, but I'm > seeing the addresses zip upward quickly as the txfsz values

Re: [PATCH 10/29] drivers, md: convert stripe_head.count from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:57PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

Re: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-07 Thread Shaohua Li
On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations.

[PATCH 0/2] USB: iowarrior: fix missing endpoint sanity checks

2017-03-07 Thread Johan Hovold
These patches add the missing endpoint sanity checks to probe that are needed to prevent a couple of NULL-derefs which could be trigger by a malicious device. Johan Johan Hovold (2): USB: iowarrior: fix NULL-deref at probe USB: iowarrior: fix NULL-deref in write

Re: Subject: [PATCH v4] USB:Core: BugFix: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-03-07 Thread Alan Stern
On Tue, 7 Mar 2017, Ajay Kaher wrote: > > On Fri, 3 Mar 2017, Ajay Kaher wrote: > >  > > > > usb_class->kref is not accessible outside the file.c > > > > as usb_class is _static_ inside the file.c and > > > > pointer of usb_class->kref is not passed anywhere. > > > >  > > > > Hence as you wanted, 

[PATCH] [media] mceusb: fix NULL-deref at probe

2017-03-07 Thread Johan Hovold
Make sure to check for the required out endpoint to avoid dereferencing a NULL-pointer in mce_request_packet should a malicious device lack such an endpoint. Note that this path it hit during probe. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable

Implementing MSI support on my platform

2017-03-07 Thread Mason
Hello, As suggested by Marc, I'm trying to adapt drivers/pci/host/pcie-altera-msi.c to my platform. Here are my changes to the existing driver: diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c index 4e5d628e8cd4..914cd26b2a53 100644 ---

Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd

2017-03-07 Thread Mathias Nyman
On 07.03.2017 05:32, Chunfeng Yun wrote: hcc_params is set in xhci_gen_setup() called from usb_add_hcd(), so checks the Maximum Primary Stream Array Size in the hcc_params register after adding primary hcd. Signed-off-by: Chunfeng Yun ---

Re: [PATCH 1/1] usb: host: xhci-dbg: HCIVERSION should be a binary number

2017-03-07 Thread Mathias Nyman
On 07.03.2017 05:04, Peter Chen wrote: According to xHCI spec, HCIVERSION containing a BCD encoding of the xHCI specification revision number, 0100h corresponds to xHCI version 1.0. Change "100" as "0x100". Cc: Lu Baolu Cc: stable Fixes:

[PATCH 1/2] USB: iowarrior: fix NULL-deref at probe

2017-03-07 Thread Johan Hovold
Make sure to check for the required interrupt-in endpoint to avoid dereferencing a NULL-pointer should a malicious device lack such an endpoint. Note that a fairly recent change purported to fix this issue, but added an insufficient test on the number of endpoints only, a test which can now be

Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct

2017-03-07 Thread Mathias Nyman
On 07.03.2017 13:02, Thierry Reding wrote: On Tue, Mar 07, 2017 at 11:32:23AM +0800, Chunfeng Yun wrote: because hcd_priv_size is already size of xhci_hcd struct, extra_priv_size is not needed anymore for MTK and tegra drivers. Signed-off-by: Chunfeng Yun ---

[PATCH 2/2] USB: iowarrior: fix NULL-deref in write

2017-03-07 Thread Johan Hovold
Make sure to verify that we have the required interrupt-out endpoint for IOWarrior56 devices to avoid dereferencing a NULL-pointer in write should a malicious device lack such an endpoint. Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.") Cc: stable #

Re: [PATCH 1/2] usb: xhci-mtk: rebuild xhci_mtk_setup()

2017-03-07 Thread Mathias Nyman
On 07.03.2017 08:57, Chunfeng Yun wrote: simplify xhci_mtk_setup() and add xhci_mtk_start() for xhci_driver_overrides struct Code itself looks fine, but it's bit unclear for me what the benefit of this is? Signed-off-by: Chunfeng Yun ---

RE: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to

RE: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to

Re: [PATCH] uvc-gadget: Fix Set Interface (alternate setting) response behaviour

2017-03-07 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > Hi Felipe, > > On Tuesday 07 Mar 2017 12:57:40 Felipe Balbi wrote: >> Laurent Pinchart writes: >> > On Friday 03 Mar 2017 13:17:15 Roger Quadros wrote: >> >> On alternate setting change, webcam gadget sends us a

Re: [PATCH] uvc-gadget: Fix Set Interface (alternate setting) response behaviour

2017-03-07 Thread Laurent Pinchart
Hi Felipe, On Tuesday 07 Mar 2017 12:57:40 Felipe Balbi wrote: > Laurent Pinchart writes: > > On Friday 03 Mar 2017 13:17:15 Roger Quadros wrote: > >> On alternate setting change, webcam gadget sends us a UVC_EVENT_STREAMON > >> or UVC_EVENT_STREAMOFF event. It expects delayed status response on

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Yuyang Du
Hi, On Mon, Mar 06, 2017 at 10:19:39AM +0100, Krzysztof Opasiak wrote: > >I did the experiment. Our device "requires" that the SUPER_SPPED be used. > >So, we are attempting to add SUPER_SPEED support to usbip. To assess the > >effort, could you please give us some pointers on how to do it? And

Re: [PATCH] uvc-gadget: Fix Set Interface (alternate setting) response behaviour

2017-03-07 Thread Felipe Balbi
Hi, Laurent Pinchart writes: > Hi Roger, > > Thank you for the patch. > > On Friday 03 Mar 2017 13:17:15 Roger Quadros wrote: >> On alternate setting change, webcam gadget sends us a UVC_EVENT_STREAMON >> or UVC_EVENT_STREAMOFF event. It expects delayed status

Re: query on UCSI

2017-03-07 Thread Heikki Krogerus
Hi, On Tue, Mar 07, 2017 at 12:39:39AM +0530, Shah, Nehal-bakulchandra wrote: > Hi Heikki , > > > Thanks for the prompt reply. > If i understood correctly the current driver(drivers/usb/misc/ucsi.c) supports > the OPM and rest all is taken care by EC FW with BIOS . > In ucsi.c file i did not

Re: [PATCH 2/2] usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct

2017-03-07 Thread Thierry Reding
On Tue, Mar 07, 2017 at 11:32:23AM +0800, Chunfeng Yun wrote: > because hcd_priv_size is already size of xhci_hcd struct, > extra_priv_size is not needed anymore for MTK and tegra drivers. > > Signed-off-by: Chunfeng Yun > --- > drivers/usb/host/xhci-mtk.c |1 -

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sergei Shtylyov
On 3/7/2017 10:52 AM, Reshetova, Elena wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena

Re: usb: gadget: webcam broken?

2017-03-07 Thread Roger Quadros
-- 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-info.html

Re: [PATCH v19 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2017-03-07 Thread Baolin Wang
On 3 March 2017 at 10:23, NeilBrown wrote: > On Mon, Feb 20 2017, Baolin Wang wrote: > >> Currently the Linux kernel does not provide any standard integration of this >> feature that integrates the USB subsystem with the system power regulation >> provided by PMICs meaning that

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Krzysztof Opasiak
On 03/07/2017 01:52 AM, Yuyang Du wrote: Hi Greg, On Mon, Mar 06, 2017 at 11:05:47AM +0100, Greg KH wrote: I did the experiment. Our device "requires" that the SUPER_SPPED be used. So, we are attempting to add SUPER_SPEED support to usbip. To assess the effort, could you please give us some

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Krzysztof Opasiak
Hi, On 03/07/2017 01:43 AM, Yuyang Du wrote: ( ... ) There is also other side, the protocol. Probably we won't be able to handle this using exiting protocol messages. At first glance I see at least one reason: Documentation/usb/usbip_protocol.txt: USBIP_RET_SUBMIT: Reply for submitting an

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Heikki Krogerus
On Tue, Mar 07, 2017 at 01:36:29AM +, Peter Chen wrote: > >On Mon, Mar 06, 2017 at 09:15:51AM +0800, Peter Chen wrote: > >> > > What interface you use when you receive this event to handle > >> > > dual-role switch? I am wonder if a common dual-role class is > >> > > needed, then we can have a

[PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-07 Thread Petr Cvek
Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store methods") caused a stringification of an undefined macro argument "aname", so three UVC parameters (streaming_interval, streaming_maxpacket and streaming_maxburst) were named "aname". Add the definition of "aname" to the main

Re: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Yuyang Du
Hi Greg, On Mon, Mar 06, 2017 at 11:05:47AM +0100, Greg KH wrote: > > I did the experiment. Our device "requires" that the SUPER_SPPED be used. > > So, we are attempting to add SUPER_SPEED support to usbip. To assess the > > effort, could you please give us some pointers on how to do it? And what

Re: USB wifi bug with Ubuntu16.04 LTS 4.4.0-64 kernel

2017-03-07 Thread Greg KH
On Tue, Mar 07, 2017 at 10:12:15AM +0200, pete wrote: > Hello, > > this is my first bug report and I tried to collect all the info in the end > of my email. Sorry if I missed something! The info provided is showing my > computer with kernel 4.4.0-62 which is working fine. I don't have the same >

Re: Question: Does usbip support USB 3.0?

2017-03-07 Thread Yuyang Du
Hi Oliver, On Mon, Mar 06, 2017 at 10:30:11AM +0100, Oliver Neukum wrote: > > Just SuperSpeed or also streams? Just one more speed is easier than > a totally new feature. > I think we only need isochronous transfer, so no streams. Hope it's easier, but I can't call it right now, :) Thanks,

Re: [PATCH] uvc-gadget: Fix Set Interface (alternate setting) response behaviour

2017-03-07 Thread Roger Quadros
Laurent, On 06/03/17 22:50, Laurent Pinchart wrote: > Hi Roger, > > Thank you for the patch. > > On Friday 03 Mar 2017 13:17:15 Roger Quadros wrote: >> On alternate setting change, webcam gadget sends us a UVC_EVENT_STREAMON >> or UVC_EVENT_STREAMOFF event. It expects delayed status response on

Re: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
On Mon, Mar 06, 2017 at 04:20:58PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

Re: [PATCH v4 0/3] dmaengine: cppi41: Add dma support to da8xx

2017-03-07 Thread Vinod Koul
On Mon, Jan 30, 2017 at 06:49:18PM +0100, Alexandre Bailon wrote: > This series add support of DA8xx to CPPI 4.1 driver. > As the CPPI 4.1 is now generic, we only had to add the glue for DA8xx. Applied this one as well, thanks -- ~Vinod -- To unsubscribe from this list: send the line

USB wifi bug with Ubuntu16.04 LTS 4.4.0-64 kernel

2017-03-07 Thread pete
Hello, this is my first bug report and I tried to collect all the info in the end of my email. Sorry if I missed something! The info provided is showing my computer with kernel 4.4.0-62 which is working fine. I don't have the same data for you with the 4.4.0-64 kernel (because I couldn't

Re: [PATCH v5 0/5] dmaengine: cppi41: Make CPPI 4.1 driver more generic

2017-03-07 Thread Vinod Koul
On Wed, Feb 15, 2017 at 02:56:31PM +0100, Alexandre Bailon wrote: > This series intend to make the CPPI 4.1 more generic in order to > add a new platform (the DA8xx). > To achieve that, all the IRQ code present in CPPI 4.1 driver has been moved > to MUSB DSPS driver. > Other changes mainly update

RE: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> On 03/06/2017 03:21 PM, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > situations. > >

RE: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hello. > > On 03/06/2017 05:20 PM, Elena Reshetova wrote: > > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > >