Re: [PATCH] usb: check for signals in chaoskey read function

2016-02-16 Thread Oliver Neukum
On Mon, 2016-02-15 at 18:49 -0800, Keith Packard wrote: > Call signal_pending before reading a chunk of data from the device so > that long read operations can be interrupted with a signal. Hi, why is this needed? You are doing this right after a mutex_lock_interruptible(). Regards

[PATCH v5 1/1] USB: core: let USB device know device node

2016-02-16 Thread Peter Chen
From: Peter Chen Although most of USB devices are hot-plug's, there are still some devices are hard wired on the board, eg, for HSIC and SSIC interface USB devices. If these kinds of USB devices are multiple functions, and they can supply other interfaces like i2c, gpios for other devices, we may

Re: [PATCH v3 0/2] usbip: vhci number of ports extension

2016-02-16 Thread Oliver Neukum
On Mon, 2016-02-15 at 16:43 -0800, Greg KH wrote: > On Tue, Feb 16, 2016 at 12:37:57AM +, fx IWATA NOBUO wrote: > > My requirement is more device can be attached than 31 to connect > > many IoT devices. > > That's an odd requirement to use the USB protocol for, especially when > that is a har

Re: [PATCH] usb: chipidea: fix return value check in ci_hdrc_pci_probe()

2016-02-16 Thread Peter Chen
On Sat, Feb 06, 2016 at 10:57:06PM +0800, weiyj...@163.com wrote: > From: Wei Yongjun > > In case of error, the function usb_phy_generic_register() > returns ERR_PTR() and never returns NULL. The NULL test in > the return value check should be replaced with IS_ERR(). > > Signed-off-by: Wei Yongj

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-16 Thread Heikki Krogerus
Hi, On Mon, Feb 15, 2016 at 04:30:18PM +0100, Oliver Neukum wrote: > On Thu, 2016-02-11 at 15:50 +0200, Heikki Krogerus wrote: > > Because USB Type-C ports (DRP ones) will select the data role randomly > > when you connect (to an other DRP port). USB Type-C spec defines that > > you can "prefer" h

Re: [PATCH 3/7] usb: gadget: pxa25x_udc: use readl/writel for mmio

2016-02-16 Thread Krzysztof Hałasa
Arnd Bergmann writes: > The barriers on a spinlock synchronize between CPUs but not an external > bus, so (on some architectures) a spinlock protecting an MMIO register > does not guarantee that two CPUs doing > > spin_lock(); > __raw_writel(address); > __raw_writel(data); >

commit eb6b92ecc0f9412623ab1584ddd8389b371638d4 - disconnect() and poll() don't cooperate

2016-02-16 Thread Oliver Neukum
Hi, in this commit you introduce a poll method that bails out if you poll a disconnected device. That is good but a bit insufficient. Poll needs to learn that a device is going away. usbtmc_disconnect() needs to call wakeup_all() on data->waitq Regards Oliver -- To unsub

RE: [PATCH v2 2/2] usb:dwc3: pass arch data to xhci-hcd child

2016-02-16 Thread Thang Q. Nguyen
Hi, Do you have any feedback on this change? Regards, Thang Q. Nguyen - -Original Message- From: Thang Q. Nguyen [mailto:tqngu...@apm.com] Sent: Monday, January 25, 2016 9:26 PM To: Felipe Balbi; Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-o...@vger.kernel.org; linux-ker...@vger.k

RE: [PATCH v2 1/2] usb:dwc3: Enable support for 64-bit system

2016-02-16 Thread Thang Q. Nguyen
Hi, Do you have any more feedback on this patch? Thanks, Thang Q. Nguyen - -Original Message- From: Thang Q. Nguyen [mailto:tqngu...@apm.com] Sent: Monday, January 25, 2016 9:26 PM To: Felipe Balbi; Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-o...@vger.kernel.org; linux-ker...@vge

commit 4b61b4f205eabfc9f863f805858aa5b32deb3de5 - usb: add HAS_IOMEM dependency to USB_APPLEDISPLAY

2016-02-16 Thread Oliver Neukum
Hi, you make USB_APPLEDISPLAY depend on HAS_IOMEM. I am afraid you got it the wrong way round. There is really no reason for a high level USB driver to access memory. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

Re: [PATCH 3/7] usb: gadget: pxa25x_udc: use readl/writel for mmio

2016-02-16 Thread Arnd Bergmann
On Tuesday 16 February 2016 10:26:14 Krzysztof Hałasa wrote: > Arnd Bergmann writes: > > > The barriers on a spinlock synchronize between CPUs but not an external > > bus, so (on some architectures) a spinlock protecting an MMIO register > > does not guarantee that two CPUs doing > > > > sp

Re: commit 4b61b4f205eabfc9f863f805858aa5b32deb3de5 - usb: add HAS_IOMEM dependency to USB_APPLEDISPLAY

2016-02-16 Thread Vegard Nossum
On 02/16/2016 12:00 PM, Oliver Neukum wrote: Hi, you make USB_APPLEDISPLAY depend on HAS_IOMEM. I am afraid you got it the wrong way round. There is really no reason for a high level USB driver to access memory. Alright, let's have a look. The warning I was fixing in this patch was: warni

Re: [PATCH 1/3] usb: core: Allow compilation on platforms where NO_DMA=y

2016-02-16 Thread Vegard Nossum
On 02/15/2016 09:38 PM, Vegard Nossum wrote: On 02/15/2016 01:28 PM, Geert Uytterhoeven wrote: On Mon, Feb 15, 2016 at 12:49 PM, Vegard Nossum wrote: On 02/15/2016 12:21 PM, Geert Uytterhoeven wrote: [...] Assuming this still lets the platform actually run USB drivers (which it looks like

Re: [PATCH 3/7] usb: gadget: pxa25x_udc: use readl/writel for mmio

2016-02-16 Thread Krzysztof Hałasa
Arnd Bergmann writes: > Both writes leave the CPU core within the spinlock but are not serialized > with anything else, so there is no ordering between the CPUs when they > enter the shared bus, other than having address before data. You'd > expect to see address0, data0, address1, data1, but it

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-16 Thread Oliver Neukum
On Tue, 2016-02-16 at 11:22 +0200, Heikki Krogerus wrote: > > That question has not been answered. It would be awkward for the OS > > to find itself in the slave role, which it is ill equipped for. So > > the data role should be switched before the new device is announced > > to user space. How is

Re: [PATCH 3/7] usb: gadget: pxa25x_udc: use readl/writel for mmio

2016-02-16 Thread Arnd Bergmann
On Tuesday 16 February 2016 14:24:10 Krzysztof Hałasa wrote: > Arnd Bergmann writes: > > > Both writes leave the CPU core within the spinlock but are not serialized > > with anything else, so there is no ordering between the CPUs when they > > enter the shared bus, other than having address befor

Re: [PATCH v7 02/10] usb: dbc: probe and setup xhci debug capability

2016-02-16 Thread Mathias Nyman
Hi Most of my concerns are due to the early printk restrictions. As you say in the documentation: "Keep in mind that things such as interrupt, system memory, DMA memory, PCI configure space access, etc., are all different from a normal device driver." I don't know the details of these subsystems

Re: [PATCH] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread Felipe Balbi
Hi, John Youn writes: > On 2/12/2016 2:05 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: >>> On 2/10/2016 1:07 PM, Felipe Balbi wrote: John Youn writes: >>> Basically assign all the resources in advance. >> >> I thought about that, but wouldn't this, essentially,

[PATCH v2 0/3] usb: Allow compilation on platforms where NO_DMA=y

2016-02-16 Thread Geert Uytterhoeven
Hi Greg, Some platforms don't have DMA, but we should still be able to build USB drivers for these platforms. They could still be used through vhci_hcd, usbip_host, or maybe something like USB passthrough in UML from a capable host. This patch series allows to compile USB on platforms whe

[PATCH v2 1/3] usb: core: Allow compilation on platforms where NO_DMA=y

2016-02-16 Thread Geert Uytterhoeven
Some platforms don't have DMA, but we should still be able to build USB drivers for these platforms. They could still be used through vhci_hcd, usbip_host, or maybe something like USB passthrough in UML from a capable host. If NO_DMA=y: ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko]

[PATCH v2 2/3] usb: host: Host drivers relying on DMA should depend on HAS_DMA

2016-02-16 Thread Geert Uytterhoeven
If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/usb/host/xhci-plat-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/xhci-mtk.ko] undefined! ERROR: "dma_pool_destroy" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/host/xhci-hcd.ko] undefined! ERR

[PATCH v2 3/3] usb: dwc2: USB_DWC2 should depend on HAS_DMA

2016-02-16 Thread Geert Uytterhoeven
If NO_DMA=y: ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined! ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterho

Re: commit 4b61b4f205eabfc9f863f805858aa5b32deb3de5 - usb: add HAS_IOMEM dependency to USB_APPLEDISPLAY

2016-02-16 Thread Oliver Neukum
On Tue, 2016-02-16 at 13:12 +0100, Vegard Nossum wrote: > Alright, let's have a look. The warning I was fixing in this patch > was: > > warning: (USB_APPLEDISPLAY) selects BACKLIGHT_LCD_SUPPORT which > has > unmet direct dependencies (HAS_IOMEM) > > The problem is that USB_APPLEDISPLAY has

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-16 Thread Petr Kulhavy
Hello Rob, is there any follow-up on this one? Thanks Petr On 12.02.2016 18:24, Petr Kulhavy wrote: On 12.02.2016 17:21, Rob Herring wrote: On Thu, Feb 11, 2016 at 12:01:06PM +0100, Petr Kulhavy wrote: + - mentor,power : Specifies the maximum current in milliamperes the controller can +

Minor xhci issues (failed to peer) on Dell XPS 13 9350 (Skylake)

2016-02-16 Thread Andy Lutomirski
I get some warnings at boot on all kernels I've tried. On 4.5-rc4, I see: [0.229429] usbcore: registered new interface driver usbfs [0.229436] usbcore: registered new interface driver hub [0.229451] usbcore: registered new device driver usb [1.057998] xhci_hcd :00:14.0: xHCI H

Re: [PATCH] documentation: add kernel-dot.emacs.txt

2016-02-16 Thread Geyslan G. Bem
Hello, 2016-02-16 15:10 GMT-03:00 Tiago Natel de Moura : > Hello folks, > > The patch have some problem with the c-mode-hook setup, in the usage of > c-cleanup-list. On my emacs24 it throw the following error: > > "Invalid indentation setting for symbol c-cleanup-list" > > After talk with Geyslan,

[PATCH] documentation: add kernel-dot.emacs.txt

2016-02-16 Thread Geyslan G. Bem
This patch adds kernel-dot-emacs.txt (elisp) which deliver best indentation, comments and white space highlighting functionalities. This also changes the CodingStyle and 00-INDEX files by referencing the new kernel-dot-emacs. Signed-off-by: Geyslan G. Bem Reviewed-by: Tiago Natel de Moura ---

Re: [PATCH] usb: check for signals in chaoskey read function

2016-02-16 Thread Keith Packard
Oliver Neukum writes: > why is this needed? You are doing this right after a > mutex_lock_interruptible(). When the device isn't contended, this mutex will never block and so mutex_lock_interruptible will never check for a signal. I had mistakenly assumed that usb_bulk_msg would abort when a si

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-16 Thread Rob Herring
On Fri, Feb 12, 2016 at 11:26 AM, Sergei Shtylyov wrote: > Hello. > > > On 02/12/2016 07:21 PM, Rob Herring wrote: > >>> This adds DT support for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. >>> >>> Signed-off-by: Petr Kulhavy >>> --- >>> .../devicetree/bindings/usb/da8xx-usb.txt |

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-16 Thread Rob Herring
On Fri, Feb 12, 2016 at 11:24 AM, Petr Kulhavy wrote: > > On 12.02.2016 17:21, Rob Herring wrote: >> >> On Thu, Feb 11, 2016 at 12:01:06PM +0100, Petr Kulhavy wrote: >>> >>> + - mentor,power : Specifies the maximum current in milliamperes the >>> controller can >>> + supply in host mode. >> >>

Re: [PATCH v2] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread Felipe Balbi
Hi, John Youn writes: > The assignement of EP transfer resources was not handled properly in the > dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer > resource index on SET_INTERFACE") previously fixed one aspect of this > where resources may be exhausted with multiple calls to SE

Re: NEC uPD720200 xHCI Controller dies when Runtime PM enabled

2016-02-16 Thread main . haarp
On 2016-02-08 15:31, Mathias Nyman wrote: > Hi > > On 06.02.2016 19:08, Mike Murdoch wrote: >> Bug ID: 111251 >> >> Hello, >> >> I have a NEC uPD720200 USB3.0 controller in a Thinkpad W520 laptop on >> kernel 4.4.1-gentoo. >> >> 0e:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host >> Co

Re: [PATCH v2] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread John Youn
On 2/16/2016 1:28 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> The assignement of EP transfer resources was not handled properly in the >> dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer >> resource index on SET_INTERFACE") previously fixed one aspect of this >> wher

[PATCH 0/2] usb: dwc2: Fix host descriptor DMA issues

2016-02-16 Thread John Youn
This series contains two fixes for the host in Descriptor DMA mode. Tang, Jianqiang (1): usb: dwc2: host: fix the data toggle error in full speed descriptor dma Vardan Mikayelyan (1): usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc drivers/usb/dwc2/hcd_ddma.c | 23 +

[PATCH 1/2] usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc

2016-02-16 Thread John Youn
From: Vardan Mikayelyan Fixes memory manipulation issues and makes Host DDMA bulk transfers work. dwc2_process_non_isoc_desc() must return non zero value ONLY when failure happens in one of the queued descriptors. After receiving non zero value the caller must stop processing of remaining QTDs a

[PATCH v2 1/2] usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc

2016-02-16 Thread John Youn
From: Vardan Mikayelyan Fixes memory manipulation issues and makes Host DDMA bulk transfers work. dwc2_process_non_isoc_desc() must return non zero value ONLY when failure happens in one of the queued descriptors. After receiving non zero value the caller must stop processing of remaining QTDs a

[PATCH v2 2/2] usb: dwc2: host: fix the data toggle error in full speed descriptor dma

2016-02-16 Thread John Youn
From: Tang, Jianqiang There will be data toggle error happen for full speed buld-out transfer. The data toggle bit is saved in qh for non-control transfers, it is wrong to check the qtd for that case. Also fix one static analysis tool issue after fix the data toggle error. John Youn: * Added W

[PATCH v2 0/2] usb: dwc2: Fix host descriptor DMA issues

2016-02-16 Thread John Youn
Sorry, messed up the emails. V2 is just a resend with e-mails fixed up. This series contains two fixes for the host in Descriptor DMA mode. v2: * Resend with proper e-mails Tang, Jianqiang (1): usb: dwc2: host: fix the data toggle error in full speed descriptor dma Vardan Mikayelyan (1):

Re: [PATCH] usb: storage: make US_DEBUGPX print with LOGLEVEL_DEBUG

2016-02-16 Thread Victor Dodon
On Sun, Feb 14, 2016 at 05:20:21PM -0800, Greg Kroah-Hartman wrote: > On Wed, Feb 10, 2016 at 04:13:43PM -0800, Victor Dodon wrote: > > The US_DEBUGPX macro uses printk without specifying a kernel log level, so > > the default kernel log level is used, which may not match LOGLEVEL_DEBUG > > used in

Re: [PATCH] usb: storage: make US_DEBUGPX print with LOGLEVEL_DEBUG

2016-02-16 Thread Greg Kroah-Hartman
On Tue, Feb 16, 2016 at 03:45:39PM -0800, Victor Dodon wrote: > On Sun, Feb 14, 2016 at 05:20:21PM -0800, Greg Kroah-Hartman wrote: > > On Wed, Feb 10, 2016 at 04:13:43PM -0800, Victor Dodon wrote: > > > The US_DEBUGPX macro uses printk without specifying a kernel log level, so > > > the default ke

Re: [PATCH net,stable] qmi_wwan: add "4G LTE usb-modem U901"

2016-02-16 Thread David Miller
From: Bjørn Mork Date: Fri, 12 Feb 2016 16:42:14 +0100 > Thomas reports: > > T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > P: Vendor=05c6 ProdID=6001 Rev=00.00 > S: Manufacturer=USB Modem > S: Product=USB Mod

Re: Minor xhci issues (failed to peer) on Dell XPS 13 9350 (Skylake)

2016-02-16 Thread Greg Kroah-Hartman
On Tue, Feb 16, 2016 at 10:01:13AM -0800, Andy Lutomirski wrote: > I get some warnings at boot on all kernels I've tried. On 4.5-rc4, I see: > > [0.229429] usbcore: registered new interface driver usbfs > [0.229436] usbcore: registered new interface driver hub > [0.229451] usbcore: re

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

2016-02-16 Thread Peter Chen
On Wed, Feb 10, 2016 at 11:33:18AM +0100, Oliver Neukum wrote: > Some devices I got show an inability to operate right after > power on if they are already connected. They are beyond recovery > if the descriptors are requested multiple times. So in case of > a timeout we rather bail early and reset

[PATCH v3] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread John Youn
The assignement of EP transfer resources was not handled properly in the dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE") previously fixed one aspect of this where resources may be exhausted with multiple calls to SET_INTERFACE. However, it introduc

Re: Minor xhci issues (failed to peer) on Dell XPS 13 9350 (Skylake)

2016-02-16 Thread Andy Lutomirski
On Tue, Feb 16, 2016 at 6:33 PM, Greg Kroah-Hartman wrote: > On Tue, Feb 16, 2016 at 10:01:13AM -0800, Andy Lutomirski wrote: >> I get some warnings at boot on all kernels I've tried. On 4.5-rc4, I see: >> >> [0.229429] usbcore: registered new interface driver usbfs >> [0.229436] usbcore:

TODO List For Linux USB

2016-02-16 Thread Anil Nair
Hi All, I would like to contribute to Linux USB kernel but i am confused on where to start, If possible can you guys guide me regarding where to find the TODO list, so that I can start on with small patches. Thanking All. -- Regards, Anil Nair -- To unsubscribe from this list: send the line "un

Re: TODO List For Linux USB

2016-02-16 Thread Greg KH
On Wed, Feb 17, 2016 at 11:47:56AM +0530, Anil Nair wrote: > Hi All, > > I would like to contribute to Linux USB kernel but i am confused on > where to start, If you don't know where to start, or what to do, why do you want to contribute? > If possible can you guys guide me regarding where to fi

Re: TODO List For Linux USB

2016-02-16 Thread Anil Nair
Hi, On Wed, Feb 17, 2016 at 12:00 PM, Greg KH wrote: > On Wed, Feb 17, 2016 at 11:47:56AM +0530, Anil Nair wrote: >> Hi All, >> >> I would like to contribute to Linux USB kernel but i am confused on >> where to start, > > If you don't know where to start, or what to do, why do you want to > contr

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-16 Thread Heikki Krogerus
On Tue, Feb 16, 2016 at 02:39:47PM +0100, Oliver Neukum wrote: > On Tue, 2016-02-16 at 11:22 +0200, Heikki Krogerus wrote: > > > That question has not been answered. It would be awkward for the OS > > > to find itself in the slave role, which it is ill equipped for. So > > > the data role should be