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

2017-03-06 Thread Laurent Pinchart
Hi Petr, Thank you for the patch. On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: > 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,

[PATCH 2/2] usb: xhci-mtk: fix checkpatch warning and erorr

2017-03-06 Thread Chunfeng Yun
there are two warnings and a erorr when checked by checkpatch.pl as following: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses Signed-off-by: Chunfeng Yun

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

2017-03-06 Thread Chunfeng Yun
simplify xhci_mtk_setup() and add xhci_mtk_start() for xhci_driver_overrides struct Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c

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

2017-03-06 Thread Petr Cvek
Dne 7.3.2017 v 06:58 Laurent Pinchart napsal(a): > Hi Petr, > > Thank you for the patch. > > On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: >> Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store >> methods") caused a stringification of an undefined macro argument "aname", >>

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-06 Thread Ajay Kaher
      > 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, there are no references of usb_class->kref > > 

[PATCH] usb: chipidea: udc: update gadget state after bus resume

2017-03-06 Thread Li Jun
Gadget state is set to be suspended when bus suspened, but not updated after resume, this patch saves the gadget state before suspend and restores it after resume. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h | 2 ++ drivers/usb/chipidea/udc.c | 21 +

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

2017-03-06 Thread Peter Chen
> >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 common user utility. >> > > >> > > Eg, if "data_role" has

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

2017-03-06 Thread Chunfeng Yun
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 --- drivers/usb/host/xhci-mtk.c |6 +++--- 1 file changed, 3

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

2017-03-06 Thread Chunfeng Yun
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 - drivers/usb/host/xhci-tegra.c |1 - 2 files changed, 2 deletions(-)

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

2017-03-06 Thread Peter Chen
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: 04abb6de2825 ("xhci: Read and parse new xhci

Re: usb: gadget: webcam broken?

2017-03-06 Thread Petr Cvek
Dne 2.3.2017 v 09:19 Roger Quadros napsal(a): > Petr, > > On 02/03/17 06:57, Petr Cvek wrote: >> Dne 2.3.2017 v 00:22 Laurent Pinchart napsal(a): >>> Hi Roger, >>> >>> On Wednesday 01 Mar 2017 17:09:51 Roger Quadros wrote: Hi, I'm no longer able to use g_webcam with uvc-gadget [1]

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-03-06 Thread Petr Cvek
Dne 24.1.2017 v 19:20 Felipe Balbi napsal(a): > > Hi, > > Petr Cvek writes: >>> Greg KH writes: >>> fine by me. Just lsusb will look funky ;-) >> >> Heh, true, but I thought lsusb would use a string if the device provided >> it. Haven't looked

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

2017-03-06 Thread Laurent Pinchart
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 > STREAMON event only but doesn't expect us to send that

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

2017-03-06 Thread Benjamin Block
On Mon, Mar 06, 2017 at 04:27:11PM +0100, Johannes Thumshirn wrote: > 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

Re: query on UCSI

2017-03-06 Thread Shah, Nehal-bakulchandra
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 find any mailbox related code. Am I missing something here? Thanks Nehal On 3/6/2017

Re: [Xen-devel] [PATCH 29/29] drivers, xen: convert grant_map.users from atomic_t to refcount_t

2017-03-06 Thread Boris Ostrovsky
On 03/06/2017 09:21 AM, 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. > > Signed-off-by:

[PATCH 0/5] USB: serial: fix missing sanity checks and refleak

2017-03-06 Thread Johan Hovold
These patches fix a NULL-deref and a couple of information leaks due to missing sanity checks in completion handlers. Included is also a tty-reference leak fix. Johan Johan Hovold (5): USB: serial: io_ti: fix NULL-deref in interrupt callback USB: serial: omninet: fix reference leaks at

[PATCH 1/5] USB: serial: io_ti: fix NULL-deref in interrupt callback

2017-03-06 Thread Johan Hovold
Fix a NULL-pointer dereference in the interrupt callback should a malicious device send data containing a bad port number by adding the missing sanity check. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold ---

[PATCH 2/5] USB: serial: omninet: fix reference leaks at open

2017-03-06 Thread Johan Hovold
This driver needlessly took another reference to the tty on open, a reference which was then never released on close. This lead to not just a leak of the tty, but also a driver reference leak that prevented the driver from being unloaded after a port had once been opened. Fixes: 4a90f09b20f4

[PATCH 4/5] USB: serial: io_ti: fix information leak in completion handler

2017-03-06 Thread Johan Hovold
Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that can be triggered by a malicious device. This avoids leaking 128 kB of memory content from after the URB transfer buffer to user space. Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field

[PATCH 3/5] USB: serial: omninet: drop open callback

2017-03-06 Thread Johan Hovold
Remove the now redundant open callback and let core call the generic handler for us instead. Signed-off-by: Johan Hovold --- drivers/usb/serial/omninet.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index

[PATCH 5/5] USB: serial: safe_serial: fix information leak in completion handler

2017-03-06 Thread Johan Hovold
Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that could be triggered by a malicious device. This avoids leaking up to 56 bytes from after the URB transfer buffer to user space. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable

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

2017-03-06 Thread Sergei Shtylyov
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 situations. Signed-off-by:

usb bus resets when harddisk wakes up after spindown

2017-03-06 Thread Alexander 'Leo' Bergolth
Hi! I have an external 2 disk hd enclosure with a UASP capable JMicron USB 3 bridge: [1.271826] usb 4-1: New USB device found, idVendor=152d, idProduct=9561 [1.271952] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5 [1.272075] usb 4-1: Product: JMS56x Series [

RE: Panic in quirk_usb_early_handoff

2017-03-06 Thread David Laight
> From: Mason > Sent: 06 March 2017 15:46 ... > >> The issue was that, on this platform, the PCI configuration space > >> and memory space are multiplexed; in other words they reside at > >> the same physical address, with a bit in MMIO to choose one or > >> the other. > > > > Time to shoot

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Johan Hovold
On Mon, Mar 06, 2017 at 04:01:36PM +0100, Johan Hovold wrote: > On Mon, Mar 06, 2017 at 02:14:51PM +0100, Oliver Neukum wrote: > > Am Montag, den 06.03.2017, 12:27 +0100 schrieb Johan Hovold: > > > On Mon, Mar 06, 2017 at 10:54:44AM +0100, Oliver Neukum wrote: > > > > True, but again not specific

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Mason
On 06/03/2017 16:27, David Laight wrote: > Mason wrote: >> >>> So the kernel panics in xhci_find_next_ext_cap() >>> ( drivers/usb/host/xhci-ext-caps.h:122 ) >>> http://lxr.free-electrons.com/source/drivers/usb/host/xhci-ext-caps.h?v=4.9#L122 >>> >>> Any idea how this can happen? >>> >>> base

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

2017-03-06 Thread Johannes Thumshirn
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. The subject is

RE: Panic in quirk_usb_early_handoff

2017-03-06 Thread David Laight
From: Mason > Sent: 06 March 2017 13:50 > On 06/03/2017 13:42, Mason wrote: > > > So the kernel panics in xhci_find_next_ext_cap() > > ( drivers/usb/host/xhci-ext-caps.h:122 ) > > http://lxr.free-electrons.com/source/drivers/usb/host/xhci-ext-caps.h?v=4.9#L122 > > > > Any idea how this can

[PATCH 03/29] drivers, char: convert vma_data.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Bin Liu
On Mon, Mar 06, 2017 at 04:29:33PM +0200, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > > <<< No Message Collected >>> > > You need to resend this. See also [1] Not sure what is wrong. This happens to me too, see [2]. And I sent the patch v2 an hour ago, but the patch

Re: [PATCH V3] usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW

2017-03-06 Thread Greg Kroah-Hartman
On Mon, Mar 06, 2017 at 04:48:50PM +0200, Felipe Balbi wrote: > > Hi, > > yuan linyu writes: > > From: yuan linyu > > > > a lot of embeded system SOC (e.g. freescale T2080) have both > > PCI and USB modules. But USB module is controlled by

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Johan Hovold
On Mon, Mar 06, 2017 at 02:14:51PM +0100, Oliver Neukum wrote: > Am Montag, den 06.03.2017, 12:27 +0100 schrieb Johan Hovold: > > On Mon, Mar 06, 2017 at 10:54:44AM +0100, Oliver Neukum wrote: > > > Yes, it would be wrong to see this as an attribute per driver. > > > It needs to apply when you

Re: [PATCH 1/4 linux-next] usb: gadget: udc: atmel: Check fifo configuration values against device tree

2017-03-06 Thread Felipe Balbi
cristian.bir...@microchip.com writes: > From: Cristian Birsan > > Check fifo configuration values against device tree values for endpoint > fifo in auto configuration mode (fifo_mode=0). > > Signed-off-by: Cristian Birsan > --- >

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Oliver Neukum
Am Montag, den 06.03.2017, 12:27 +0100 schrieb Johan Hovold: > On Mon, Mar 06, 2017 at 10:54:44AM +0100, Oliver Neukum wrote: > > > >  > > Yes, it would be wrong to see this as an attribute per driver. > > It needs to apply when you match. AFAICS every serial subdriver > > has a device table.

Re: [PATCH v2] usb: dwc2: pci: Fix error handling in dwc2_pci_probe

2017-03-06 Thread Felipe Balbi
Hi, Vardan Mikayelyan writes: > Move usb_phy_generic_register() function call to the top, to simplify > error handling. > > Replace kzalloc() with devm_kzalloc(). > > After platform_device_add(), if we error out, we must do > platform_device_unregister(), which

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Mason
On 06/03/2017 15:30, Robin Murphy wrote: > On 06/03/17 12:42, Mason wrote: > >> $ arm-linux-gnueabihf-addr2line -i -e vmlinux c039fe44 >> arch/arm/include/asm/io.h:119 >> >> In other words, readl() >> Not as helpful as expected... > > I guess your toolchain isn't generating whatever debug info

Re: [PATCH v2 00/14] usb: dwc2: Add hibernation feature support.

2017-03-06 Thread Felipe Balbi
Hi, Vardan Mikayelyan writes: > The functions with name hibernation are misnamed originally. They were only > responsible for partial power down and not for hibernation. > > This patch set adds the real hibernation support for dwc2 driver and renames > existing

[PATCH v2] usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer

2017-03-06 Thread Bin Liu
The CPPI 4.1 driver polls register to workaround the premature TX interrupt issue, but it causes audio playback underrun when triggered in Isoch transfers. Isoch doesn't do back-to-back transfers, the TX should be done by the time the next transfer is scheduled. So skip this polling workaround

Re: [PATCH V3] usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW

2017-03-06 Thread Felipe Balbi
Hi, yuan linyu writes: > From: yuan linyu > > a lot of embeded system SOC (e.g. freescale T2080) have both > PCI and USB modules. But USB module is controlled by registers directly, > it have no relationship with PCI module. > > when say N here

Re: [PATCH v3 17/20] usb: gadget: pch_udc: Replace PCI pool old API

2017-03-06 Thread Felipe Balbi
Peter Senna Tschudin writes: > On Sun, Feb 26, 2017 at 08:24:22PM +0100, Romain Perier wrote: >> The PCI pool API is deprecated. This commits replaces the PCI pool old >> API by the appropriated function with the DMA pool API. >> > Reviewed-by: Peter Senna Tschudin

[PATCH 20/29] drivers, s390: convert qeth_reply.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 18/29] drivers, s390: convert urdev.ref_count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

Re: query on UCSI

2017-03-06 Thread Heikki Krogerus
Hi, On Mon, Mar 06, 2017 at 02:41:17PM +0530, Shah, Nehal-bakulchandra wrote: > Hi Greg and Heikki, > > > I can see that ucsi acpi interface driver is available in kernel tree. I have > following queries on the same. Kindly pardon my ignorance as i am a novice to > this. > > - Is there any

[PATCH 25/29] drivers, usb: convert ffs_data.ref from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 09/29] drivers, md: convert table_device.count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 01/29] drivers, block: convert xen_blkif.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 19/29] drivers, s390: convert lcs_reply.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 15/29] drivers, media: convert vb2_dma_sg_buf.refcount from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 17/29] drivers, pci: convert hv_pci_dev.refs from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 27/29] drivers, usb: convert ep_data.count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 23/29] drivers: convert vme_user_vma_priv.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 07/29] drivers, md: convert dm_dev_internal.count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 29/29] drivers, xen: convert grant_map.users from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 16/29] drivers, media: convert vb2_vmalloc_buf.refcount from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 14/29] drivers, media: convert vb2_dc_buf.refcount from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 04/29] drivers, connector: convert cn_callback_entry.refcnt from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Robin Murphy
[+linux-pci, just in case] On 06/03/17 12:42, Mason wrote: > On 03/03/2017 20:02, Robin Murphy wrote: > >> On 03/03/17 17:15, Mason wrote: >> > [1.264893] Unable to handle kernel paging request at virtual address > d08664f4 >> >> Note that that's a reasonable approximation of a

[PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Felipe Balbi
Hi, Roger Quadros writes: > <<< No Message Collected >>> You need to resend this. See also [1] [1] https://marc.info/?l=linux-usb=148854335620717=2 -- balbi signature.asc Description: PGP signature

[PATCH 28/29] drivers: convert sbd_duart.map_guard from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 05/29] drivers, md, bcache: convert cached_dev.count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 06/29] drivers, md: convert dm_cache_metadata.ref_count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 26/29] drivers, usb: convert dev_data.count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 02/29] drivers, firewire: convert fw_node.ref_count from atomic_t to refcount_t

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

[PATCH 00/29] drivers, mics refcount conversions

2017-03-06 Thread Elena Reshetova
This series, for various different drivers, replaces atomic_t reference counters with the new refcount_t type and API (see include/linux/refcount.h). By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. The below patches are

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

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

2017-03-06 Thread Elena Reshetova
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 Reshetova Signed-off-by:

Re: [PATCH] HID: usbhid: extend polling interval configuration to joysticks

2017-03-06 Thread Jiri Kosina
On Sat, 25 Feb 2017, Tobias Jakobi wrote: > For mouse devices we can currently change the polling interval > via usbhid.mousepoll. Implement the same thing for joysticks, so > users can reduce input latency this way. > > This has been tested with a Logitech RumblePad 2 with jspoll=2, > resulting

[RESEND PATCH v3 5/8] phy: phy-mt65xx-usb3: add support for new version phy

2017-03-06 Thread Chunfeng Yun
There are some variations from mt2701 to mt2712: 1. banks shared by multiple ports are put back into each port, such as SPLLC and U2FREQ; 2. add a new bank MISC for u2port, and CHIP for u3port; 3. bank's offset in each port are also rearranged; Signed-off-by: Chunfeng Yun

Re: [PATCH] HID: usbhid: extend polling interval configuration to joysticks

2017-03-06 Thread Tobias Jakobi
Jiri Kosina wrote: > On Sat, 25 Feb 2017, Tobias Jakobi wrote: > >> For mouse devices we can currently change the polling interval >> via usbhid.mousepoll. Implement the same thing for joysticks, so >> users can reduce input latency this way. >> >> This has been tested with a Logitech RumblePad 2

[RESEND PATCH v3 3/8] phy: phy-mt65xx-usb3: split SuperSpeed port into two ones

2017-03-06 Thread Chunfeng Yun
Currently usb3 port in fact includes two sub-ports, but it is not flexible for some cases, such as following one: usb3 port0 includes u2port0 and u3port0; usb2 port0 includes u2port1; If wants to support only HS, we can use u2port0 or u2port1, when select u2port0, u3port0 is not needed; If

[RESEND PATCH v3 1/8] phy: phy-mt65xx-usb3: improve RX detection stable time

2017-03-06 Thread Chunfeng Yun
The default value of RX detection stable time is 10us, and this margin is too big for some critical cases which cause U3 link fail and link to U2(probability is about 1%). So change it to 5us. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 18

[RESEND PATCH v3 6/8] arm64: dts: mt8173: split usb SuperSpeed port into two ports

2017-03-06 Thread Chunfeng Yun
split the old SuperSpeed port node into a HighSpeed one and a new SuperSpeed one. Signed-off-by: Chunfeng Yun --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git

[RESEND PATCH v3 2/8] phy: phy-mt65xx-usb3: increase LFPS filter threshold

2017-03-06 Thread Chunfeng Yun
Increase LFPS filter threshold to avoid some fake remote wakeup signal which cause U3 link fail and link to U2 only at about 0.01% probability. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c |9 + 1 file changed, 9 insertions(+) diff --git

[RESEND PATCH v3 7/8] arm64: dts: mt8173: move clock from phy node into port nodes

2017-03-06 Thread Chunfeng Yun
there is a reference clock for each port, HighSpeed port is 48M, and SuperSpeed port is 26M which usually comes from 26M oscillator directly, but some SoCs is not. it is flexible to move it into port node. Signed-off-by: Chunfeng Yun ---

[RESEND PATCH v3 8/8] dt-bindings: phy-mt65xx-usb: add support for new version phy

2017-03-06 Thread Chunfeng Yun
add a new compatible string for "mt2712", and move reference clock into each port node; Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 93 +--- 1 file changed, 80

[RESEND PATCH v3 4/8] phy: phy-mt65xx-usb3: move clock from phy node into port nodes

2017-03-06 Thread Chunfeng Yun
the reference clock of HighSpeed port is 48M which comes from PLL; the reference clock of SuperSpeed port is 26M which usually comes from 26M oscillator directly, but some SoCs are not, add it for compatibility, and put them into port node for flexibility. Signed-off-by: Chunfeng Yun

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Mason
On 06/03/2017 13:42, Mason wrote: > So the kernel panics in xhci_find_next_ext_cap() > ( drivers/usb/host/xhci-ext-caps.h:122 ) > http://lxr.free-electrons.com/source/drivers/usb/host/xhci-ext-caps.h?v=4.9#L122 > > Any idea how this can happen? > > base =

Re: [PATCH] HID: get rid of HID_QUIRK_NO_INIT_REPORTS

2017-03-06 Thread Benjamin Tissoires
On Mar 06 2017 or thereabouts, Jiri Kosina wrote: > On Thu, 5 Jan 2017, Benjamin Tissoires wrote: > > > For case 1, the hiddev documentation provides an ioctl to do the > > init manually. A solution could be to retrieve the requested report > > when EVIOCGUSAGE is called, in the same way hidraw

Re: [PATCH] HID: usbhid: Use pr_ and remove unnecessary OOM messages

2017-03-06 Thread Jiri Kosina
On Wed, 1 Mar 2017, Joe Perches wrote: > Use a more common logging style and remove the unnecessary > OOM messages as there is default dump_stack when OOM. > > Miscellanea: > > o Hoist an assignment in an if > o Realign arguments > o Realign a deeply indented if descendent above a printk > >

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

2017-03-06 Thread Heikki Krogerus
Hi Peter, 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 common user utility. > > > > > > Eg, if "data_role" has

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

2017-03-06 Thread Heikki Krogerus
Hi Mats, On Fri, Mar 03, 2017 at 08:27:08PM +0100, Mats Karrman wrote: > On 2017-03-03 13:59, Heikki Krogerus wrote: > > > On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: > > > > > How would something like that sound to you guys? > > Complicated... Need to marinate on that

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Mason
On 03/03/2017 20:02, Robin Murphy wrote: > On 03/03/17 17:15, Mason wrote: > [1.264893] Unable to handle kernel paging request at virtual address d08664f4 > > Note that that's a reasonable approximation of a vmalloc address... > [1.272248] pgd = c0004000 [

Re: [PATCH] HID: get rid of HID_QUIRK_NO_INIT_REPORTS

2017-03-06 Thread Jiri Kosina
On Thu, 5 Jan 2017, Benjamin Tissoires wrote: > For case 1, the hiddev documentation provides an ioctl to do the > init manually. A solution could be to retrieve the requested report > when EVIOCGUSAGE is called, in the same way hidraw does. I would be > tempted to not change the behavior and

Re: VL805 USB 3.0 does not see connected devices (only on x86_64) (x86 is ok)

2017-03-06 Thread Oliver Neukum
Am Freitag, den 24.02.2017, 16:41 +0300 schrieb c400: > when i disable IOMMU -> "Enable Intel DMA Remapping Device by > default" > the USB flash drive becomes completely invisible. > Same stuff when i completely disable recompile kernel without IOMMU The DMA map for the device seems to be

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Johan Hovold
On Mon, Mar 06, 2017 at 10:54:44AM +0100, Oliver Neukum wrote: > Am Montag, den 06.03.2017, 10:23 +0100 schrieb Johan Hovold: > > [ +CC: Greg ] > > > > On Fri, Mar 03, 2017 at 07:29:02PM +0100, Oliver Neukum wrote: > > > > > > Am Donnerstag, den 02.03.2017, 12:51 +0100 schrieb Johan Hovold: > >

Re: Cannot dump USB report descriptors, not even after unbinding the device

2017-03-06 Thread Krzysztof Opasiak
Hi, On 03/03/2017 09:48 PM, Alan Stern wrote: On Fri, 3 Mar 2017, László Monda wrote: Hi Krzysztof, and thank you for the help! Oh now I see. I missed this when I was reading this email for the first time. root@spark ~ # echo -n 2-10.3 > /sys/bus/usb/drivers/usb/unbind You are trying

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Oliver Neukum
Am Montag, den 06.03.2017, 10:23 +0100 schrieb Johan Hovold: > [ +CC: Greg ] > > On Fri, Mar 03, 2017 at 07:29:02PM +0100, Oliver Neukum wrote: > > > > Am Donnerstag, den 02.03.2017, 12:51 +0100 schrieb Johan Hovold: > > > > > > This series refactors the endpoint sanity checks by allowing > > >

Re: query on UCSI

2017-03-06 Thread Greg KH
On Mon, Mar 06, 2017 at 02:41:17PM +0530, Shah, Nehal-bakulchandra wrote: > Hi Greg and Heikki, > > > I can see that ucsi acpi interface driver is available in kernel tree. I have > following queries on the same. Kindly pardon my ignorance as i am a novice to > this. > > - Is there any

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-06 Thread Johan Hovold
[ +CC: Greg ] On Fri, Mar 03, 2017 at 07:29:02PM +0100, Oliver Neukum wrote: > Am Donnerstag, den 02.03.2017, 12:51 +0100 schrieb Johan Hovold: > > This series refactors the endpoint sanity checks by allowing > > subdrivers > > to specify a minimum number of endpoints required per type and > >

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

2017-03-06 Thread Oliver Neukum
Am Freitag, den 03.03.2017, 20:27 +0100 schrieb Mats Karrman: > On 2017-03-03 13:59, Heikki Krogerus wrote: > > > > > On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: > > > > > > > How would something like that sound to you guys? > > Complicated... Need to marinate on that

Re: [PATCH 03/21] USB: serial: refactor and clean up endpoint handling

2017-03-06 Thread Johan Hovold
On Mon, Mar 06, 2017 at 10:27:09AM +0100, Johan Hovold wrote: > On Sat, Mar 04, 2017 at 02:21:28AM +0800, kbuild test robot wrote: > > Hi Johan, > > > > [auto build test WARNING on usb/usb-testing] > > [also build test WARNING on v4.10 next-20170303] > > [if your patch is applied to the wrong git

Re: Question: Does usbip support USB 3.0?

2017-03-06 Thread Greg KH
On Mon, Mar 06, 2017 at 09:02:11AM +0800, Yuyang Du wrote: > Hi Greg, > > On Thu, Feb 23, 2017 at 08:51:03AM +0100, Greg KH wrote: > > And again, what specifically are you referring to, and again, have you > > tried the code out yourself? What is preventing you from testing this > > in your

Re: [PATCH] HID: usbhid: Use pr_ and remove unnecessary OOM messages

2017-03-06 Thread Benjamin Tissoires
On Mar 01 2017 or thereabouts, Joe Perches wrote: > Use a more common logging style and remove the unnecessary > OOM messages as there is default dump_stack when OOM. > > Miscellanea: > > o Hoist an assignment in an if > o Realign arguments > o Realign a deeply indented if descendent above a

  1   2   >