Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-08 Thread Matthew Wilcox
On Thu, Dec 07, 2017 at 11:38:43AM +1100, Dave Chinner wrote: > > > cmpxchg is for replacing a known object in a store - it's not really > > > intended for doing initial inserts after a lookup tells us there is > > > nothing in the store. The radix tree "insert only if empty" makes > > > sense

Dual-role behavior with USB-C?

2017-12-08 Thread Takashi Matsuzawa
Hello. Just in case if you already have pointer or experience with this, any suggestion is highly appreciated. Some of the recent i.MX boards has USB-C socket for USB-OTG port, and I wonder how I can try the following steps (Dual-role behavior testing) with USB-C sockets.

Re: Lockdep is less useful than it was

2017-12-08 Thread Dave Chinner
On Fri, Dec 08, 2017 at 10:14:38AM -0800, Matthew Wilcox wrote: > At the moment, the radix tree actively disables the RCU checking that > enabling lockdep would give us. It has to, because it has no idea what > lock protects any individual access to the radix tree. The XArray can > use the RCU

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-08 Thread Dave Chinner
On Fri, Dec 08, 2017 at 12:35:07PM -0500, Alan Stern wrote: > On Fri, 8 Dec 2017, Byungchul Park wrote: > > > I'm sorry to hear that.. If I were you, I would also get > > annoyed. And.. thanks for explanation. > > > > But, I think assigning lock classes properly and checking > > relationship of

[PATCH 1/2] usb: musb: un-break davinci glue layer

2017-12-08 Thread Alejandro Mery
MUSB's davinci glue was made to depend on BROKEN by Felipe Balbi back in 2013 because of lack of active development. needed changes were actually trivial Fixes: 787f5627bec8 (usb: musb: make davinci and da8xx glues depend on BROKEN) Signed-off-by: Alejandro Mery ---

[PATCH 2/2] usb: musb: davinci: Pass file_mode in platform data

2017-12-08 Thread Alejandro Mery
as it was done for glues to allow setting the correct fifo_mode when multiple MUSB glue layers are built-in Fixes: 8a77f05aa39b ("usb: musb: Pass fifo_mode in platform data") Signed-off-by: Alejandro Mery --- drivers/usb/musb/davinci.c | 1 + 1 file changed, 1

Re: Lockdep is less useful than it was

2017-12-08 Thread Matthew Wilcox
On Fri, Dec 08, 2017 at 10:27:17AM -0500, Theodore Ts'o wrote: > So if you are adding complexity to the kernel with the argument, > "lockdep will save us", I'm with Dave --- it's just not a believable > argument. I think that's a gross misrepresentation of what I'm doing. At the moment, the

Re: [PATCH v2 09/14] usb: xhci: Add DbC support in xHCI driver

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 07:44:49PM +0200, Mathias Nyman wrote: > From: Lu Baolu > > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) > can be implemented with the Debug Capability(DbC). It presents a debug > device which is fully compliant with

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-08 Thread Alan Stern
On Fri, 8 Dec 2017, Geert Uytterhoeven wrote: > Hi Alan, > > On Thu, Dec 7, 2017 at 10:26 PM, Alan Stern wrote: > > On Thu, 7 Dec 2017, Dan Carpenter wrote: > >> The standard is to treat them like errors and try press forward in a > >> degraded mode but don't print a

[PATCH v2 09/14] usb: xhci: Add DbC support in xHCI driver

2017-12-08 Thread Mathias Nyman
From: Lu Baolu xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) can be implemented with the Debug Capability(DbC). It presents a debug device which is fully compliant with the USB framework and provides the equivalent of a very high performance

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-08 Thread Alan Stern
On Fri, 8 Dec 2017, Byungchul Park wrote: > I'm sorry to hear that.. If I were you, I would also get > annoyed. And.. thanks for explanation. > > But, I think assigning lock classes properly and checking > relationship of the classes to detect deadlocks is reasonable. > > In my opinion about

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-08 Thread Mathias Nyman
On 08.12.2017 13:06, Alexander Kappner wrote: Hi, I think we need to dig a bit deeper. It's good to check if spriv is valid but there are probably other reasons than kzalloc failing. I agree -- this small allocation is unlikely to fail in practice. Also, while my patch prevents the kernel

Re: [PATCH 09/14] usb: xhci: Add DbC support in xHCI driver

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 05:59:10PM +0200, Mathias Nyman wrote: > From: Lu Baolu > > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) > can be implemented with the Debug Capability(DbC). It presents a debug > device which is fully compliant with

Re: [PATCH 0/4] USB over IP Secuurity fixes

2017-12-08 Thread Shuah Khan
On 12/08/2017 09:33 AM, Greg KH wrote: > On Fri, Dec 08, 2017 at 08:44:58AM -0700, Shuah Khan wrote: >> Hi Jakub, >> >> On 12/08/2017 08:14 AM, Secunia Research wrote: >>> Hi Shuah, >>> >>> Thanks a lot for the quick fixes. >> >> Thanks for finding them and doing all the leg work in >> pin

Re: [PATCH] musb-fixes for v4.15-rc3

2017-12-08 Thread Greg Kroah-Hartman
On Tue, Dec 05, 2017 at 08:42:44AM -0600, Bin Liu wrote: > Hi Greg, > > Here is only one musb patch for the next v4.15 -rc, which fixes the babble > condition handling for DA8xx. Please let me know if any change is needed. Now applied, thanks. greg k-h -- To unsubscribe from this list: send the

Re: [PATCH 0/4] USB over IP Secuurity fixes

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 08:44:58AM -0700, Shuah Khan wrote: > Hi Jakub, > > On 12/08/2017 08:14 AM, Secunia Research wrote: > > Hi Shuah, > > > > Thanks a lot for the quick fixes. > > Thanks for finding them and doing all the leg work in > pin pointing the issues. > > > > > Please, use this

Re: [PATCH] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-08 Thread Stefan Wahren
Hi Minas, Am 07.12.2017 um 17:51 schrieb Stefan Wahren: Hi Minas, Am 07.12.2017 um 09:40 schrieb Stefan Wahren: Before flushing fifos required to check AHB master state and flush when AHB master is in IDLE state. Signed-off-by: Minas Harutyunyan ---

[PATCH 2/2] usb: xhci: fix TDS for MTK xHCI1.1

2017-12-08 Thread Mathias Nyman
From: Chunfeng Yun For MTK's xHCI 1.0 or latter, TD size is the number of max packet sized packets remaining in the TD, not including this TRB (following spec). For MTK's xHCI 0.96 and older, TD size is the number of max packet sized packets remaining in the TD,

[PATCH 0/2] xhci fixes for usb-linus

2017-12-08 Thread Mathias Nyman
Hi Greg A couple xhci fixes for usb-linus, one sets the correct MTK quirks based on MTK host version, the other makes sure we don't add a device to the xhci list of devices before its properly allocated. -Mathias Chunfeng Yun (1): usb: xhci: fix TDS for MTK xHCI1.1 Mathias Nyman (1): xhci:

[PATCH 1/2] xhci: Don't add a virt_dev to the devs array before it's fully allocated

2017-12-08 Thread Mathias Nyman
Avoid null pointer dereference if some function is walking through the devs array accessing members of a new virt_dev that is mid allocation. Add the virt_dev to xhci->devs[i] _after_ the virt_device and all its members are properly allocated. issue found by KASAN: null-ptr-deref in

[PATCH 13/14] xhci: add port status tracing for Get Port Status hub requests

2017-12-08 Thread Mathias Nyman
Add tracing showing the port status register content each time the xhci roothub receives a Get Port Status request. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 1 + drivers/usb/host/xhci-trace.h | 5 + 2 files changed, 6 insertions(+)

[PATCH 11/14] usb: xhci: Cleanup printk debug message for ERST

2017-12-08 Thread Mathias Nyman
From: Lu Baolu Each event segment has been exposed through debugfs. There is no need to dump ERST content with printk in code. Remove it to make code more concise and readable. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman

[PATCH 14/14] xhci: add port status tracing for Get Hub Status requests

2017-12-08 Thread Mathias Nyman
Trace the port status of each port of a roothub when the xhci roothub receives a Get Hub Status request. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 2 ++ drivers/usb/host/xhci-trace.h | 5 + 2 files changed, 7 insertions(+) diff --git

[PATCH 12/14] usb: xhci: allow imod-interval to be configurable

2017-12-08 Thread Mathias Nyman
From: Adam Wallis The xHCI driver currently has the IMOD set to 160, which translates to an IMOD interval of 40,000ns (160 * 250)ns Commit 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller") introduced a QUIRK for the MTK platform to adjust this interval to

[PATCH 10/14] usb: xhci: Cleanup printk debug message for registers

2017-12-08 Thread Mathias Nyman
From: Lu Baolu The content of each register has been exposed through debugfs. There is no need to dump register content with printk in code lines. Remove them to make code more concise and readable. Signed-off-by: Lu Baolu Signed-off-by:

[PATCH 05/14] dt-bindings: usb-xhci: Document r8a7743 support

2017-12-08 Thread Mathias Nyman
From: Fabrizio Castro Document r8a7743 xhci support. The driver will use the fallback compatible string "renesas,rcar-gen2-xhci", therefore no driver change is needed. Signed-off-by: Fabrizio Castro Reviewed-by: Yoshihiro Shimoda

[PATCH 07/14] xhci: remove unnecessary boolean parameter from xhci_alloc_command

2017-12-08 Thread Mathias Nyman
commands with input contexts are allocated with the xhci_alloc_command_with_ctx helper. No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 5 ++--- drivers/usb/host/xhci-mem.c | 17 ++---

[PATCH 09/14] usb: xhci: Add DbC support in xHCI driver

2017-12-08 Thread Mathias Nyman
From: Lu Baolu xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) can be implemented with the Debug Capability(DbC). It presents a debug device which is fully compliant with the USB framework and provides the equivalent of a very high performance

[PATCH 03/14] usb: xhci: remove unused variable urb_priv

2017-12-08 Thread Mathias Nyman
From: Corentin Labbe Fix the build warning: variable 'urb_priv' set but not used Signed-off-by: Corentin Labbe Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2

[PATCH 04/14] usb: xhci: remove unused variable ep_ring

2017-12-08 Thread Mathias Nyman
From: Corentin Labbe Fix the build warning about variable 'ep_ring' set but not used [Minor commit message change -Mathias] Signed-off-by: Corentin Labbe Signed-off-by: Mathias Nyman ---

[PATCH 06/14] xhci: add helper to allocate command with input context

2017-12-08 Thread Mathias Nyman
Add a xhci_alloc_command_with_ctx() helper to get rid of one of the boolean parameters telling if a context should be allocated with the command. No functional changes, improves core readability Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mem.c | 24

[PATCH 08/14] usb: xhci: Make some static functions global

2017-12-08 Thread Mathias Nyman
From: Lu Baolu This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu

[PATCH 02/14] usb: xhci: remove unused variable ep

2017-12-08 Thread Mathias Nyman
From: Corentin Labbe Fix the build warning: variable 'ep' set but not used Signed-off-by: Corentin Labbe Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH 01/14] usb: xhci: remove unused variable last_freed_endpoint

2017-12-08 Thread Mathias Nyman
From: Corentin Labbe Fix the build warning about variable 'last_freed_endpoint' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe Signed-off-by: Mathias Nyman ---

[PATCH 00/14] xhci features for usb-next

2017-12-08 Thread Mathias Nyman
Hi Greg This series adds DbC (Debug Capaility) support to the xhci driver. It also includes some more tracing, does some cleanup, and allows different platfors to set their own interrupt moredation values for xchi. -Mathias Adam Wallis (1): usb: xhci: allow imod-interval to be configurable

Re: [PATCH 0/4] USB over IP Secuurity fixes

2017-12-08 Thread Shuah Khan
Hi Jakub, On 12/08/2017 08:14 AM, Secunia Research wrote: > Hi Shuah, > > Thanks a lot for the quick fixes. Thanks for finding them and doing all the leg work in pin pointing the issues. > > Please, use this email address: v...@secunia.com > > We have assigned the following CVEs to the

Re: [PATCH 0/4] USB over IP Secuurity fixes

2017-12-08 Thread Shuah Khan
On 12/07/2017 11:25 PM, Greg KH wrote: > On Thu, Dec 07, 2017 at 02:16:46PM -0700, Shuah Khan wrote: >> Jakub Jirasek from Secunia Research at Flexera reported security >> vulnerabilities in the USB over IP driver. This patch series all >> the 4 reported problems. > > Nice! > > These should also

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 03:57:30PM +0100, Greg KH wrote: > On Fri, Dec 08, 2017 at 02:44:12PM +, Michael Drake wrote: > > On 08/12/17 14:27, Greg KH wrote: > > > On Fri, Dec 08, 2017 at 10:30:43AM +, Michael Drake wrote: > > > > On 07/12/17 20:04, Greg KH wrote: > > > > > > > ---

Re: Lockdep is less useful than it was

2017-12-08 Thread Theodore Ts'o
On Thu, Dec 07, 2017 at 02:38:03PM -0800, Matthew Wilcox wrote: > I think it was a mistake to force these on for everybody; they have a > much higher false-positive rate than the rest of lockdep, so as you say > forcing them on leads to fewer people using *any* of lockdep. > > The bug you're

RE: [PATCH 0/4] USB over IP Secuurity fixes

2017-12-08 Thread Secunia Research
Hi Shuah, Thanks a lot for the quick fixes. Please, use this email address: v...@secunia.com We have assigned the following CVEs to the issues: CVE-2017-16911 usbip: prevent vhci_hcd driver from leaking a socket pointer address CVE-2017-16912 usbip: fix stub_rx: get_pipe() to validate endpoint

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 02:44:12PM +, Michael Drake wrote: > On 08/12/17 14:27, Greg KH wrote: > > On Fri, Dec 08, 2017 at 10:30:43AM +, Michael Drake wrote: > > > On 07/12/17 20:04, Greg KH wrote: > > > > > --- lsusb-v.orig2017-12-07 21:01:26.153185002 +0100 > > > > +++

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Michael Drake
On 08/12/17 14:27, Greg KH wrote: On Fri, Dec 08, 2017 at 10:30:43AM +, Michael Drake wrote: On 07/12/17 20:04, Greg KH wrote: --- lsusb-v.orig2017-12-07 21:01:26.153185002 +0100 +++ lsusb-v.new 2017-12-07 21:01:32.806517978 +0100 @@ -1110,9 +1110,9 @@ bDescriptorType

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 10:30:43AM +, Michael Drake wrote: > On 07/12/17 20:04, Greg KH wrote: > > On Thu, Dec 07, 2017 at 07:24:35PM +, Michael Drake wrote: > > > On 07/12/17 17:26, Greg KH wrote: > > > > On Thu, Dec 07, 2017 at 05:14:10PM +, Michael Drake wrote: > > > > > On 07/12/17

Re: RFC: FT232H based FPGA configuration adapter drivers

2017-12-08 Thread Anatolij Gustschin
Hi Geert, On Fri, 8 Dec 2017 10:27:46 +0100 Geert Uytterhoeven ge...@linux-m68k.org wrote: [...] >A quick Google shows the FT232H chip in MPSSE mode can also support i2c. >I guess your design can be extended for that, too, using another VID/PID >pair? Yes, this should be doable. Thanks,

[PATCH] doc: usb: chipidea: Fix typo in 'enumerate'

2017-12-08 Thread Fabio Estevam
From: Fabio Estevam Fix the spelling of 'enumerate' in this document. Signed-off-by: Fabio Estevam --- Documentation/usb/chipidea.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/usb/chipidea.txt

dwc2 gadget driver does not generate DISABLE event on unplugging USB cable

2017-12-08 Thread Jun Sun
Hi, all, I have a raspberry pi zero w board and I'm currently configuring the device as USB gadget and connects it to PC. I'm using configfs/functionfs to send a vendor specific interface with single buik in and bulk out endpoint each. When I unplug the USB cable, there is no DISABLE event

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-08 Thread Heikki Krogerus
On Thu, Dec 07, 2017 at 05:40:40PM +0100, Hans de Goede wrote: > Hi, > > On 07-12-17 16:00, Heikki Krogerus wrote: > > Hi Hans, > > > > On Tue, Dec 05, 2017 at 03:56:05PM +0100, Hans de Goede wrote: > > > Hi, > > > > > > On 01-12-17 09:38, Heikki Krogerus wrote: > > > > Hi, > > > > > > > >

Re: USB: hub: Checking communication difficulties

2017-12-08 Thread SF Markus Elfring
> Greg maintains USB and he's has blocked Markus, How do you think about to reconsider this blockage? > because he never listens to feedback I am listening … > but instead just repsonds that he has a different opinion. I choose such a reaction in some cases. My responses can vary. It seems

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-08 Thread Dan Carpenter
On Wed, Dec 06, 2017 at 09:20:05PM +0100, Geert Uytterhoeven wrote: > Hi Markus, > > On Wed, Dec 6, 2017 at 6:51 PM, SF Markus Elfring > wrote: > >> The system will come to a grinding halt anyway if it can't allocate 24 or > >> 40 bytes. > > > > Maybe. > > Since

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-08 Thread Alexander Kappner
Hi, > I think we need to dig a bit deeper. It's good to check if spriv is valid but there are probably other reasons than kzalloc failing. I agree -- this small allocation is unlikely to fail in practice. Also, while my patch prevents the kernel oops, it also prevents the debugfs entries

Re: [PATCH v2] usb: host: Implement workaround for Erratum A-009611

2017-12-08 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > On Fri, Dec 08, 2017 at 05:49:41PM +0800, yinbo@nxp.com wrote: >> From: "yinbo.zhu" >> >> Description: This is a occasional problem where the software > > No need for a "Description:" word. That's just

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Michael Drake
On 07/12/17 20:04, Greg KH wrote: On Thu, Dec 07, 2017 at 07:24:35PM +, Michael Drake wrote: On 07/12/17 17:26, Greg KH wrote: On Thu, Dec 07, 2017 at 05:14:10PM +, Michael Drake wrote: On 07/12/17 15:16, Greg KH wrote: On Thu, Dec 07, 2017 at 04:01:23PM +0100, Greg KH wrote: Oops,

Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-08 Thread Greg KH
On Fri, Dec 08, 2017 at 10:10:56AM +, Michael Drake wrote: > On 07/12/17 20:02, Greg KH wrote: > > On Thu, Dec 07, 2017 at 07:18:39PM +, Michael Drake wrote: > > > This fixes a divide by zero which happened when an array, > > > without an explicit entry count (ultimately calculated from >

Re: [PATCH v2] usb: host: Implement workaround for Erratum A-009611

2017-12-08 Thread Greg Kroah-Hartman
On Fri, Dec 08, 2017 at 05:49:41PM +0800, yinbo@nxp.com wrote: > From: "yinbo.zhu" > > Description: This is a occasional problem where the software No need for a "Description:" word. That's just assumed here, right? > issues an End Transfer command while a USB transfer

Re: [PATCH v2] usb: host: Implement workaround for Erratum A-007463

2017-12-08 Thread Greg Kroah-Hartman
On Fri, Dec 08, 2017 at 05:49:40PM +0800, yinbo@nxp.com wrote: > From: "yinbo.zhu" I need a "real name" here, I doubt you sign documents as: "yinbo.zhu" right? :) Also, you sent 3 patches, yet no way to know what order to apply them in. Please fix that up by

Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-08 Thread Michael Drake
On 07/12/17 20:02, Greg KH wrote: On Thu, Dec 07, 2017 at 07:18:39PM +, Michael Drake wrote: This fixes a divide by zero which happened when an array, without an explicit entry count (ultimately calculated from the value in the descriptor data's bLength field) was used on field with a

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-08 Thread Byungchul Park
On 12/8/2017 4:25 PM, Dave Chinner wrote: On Fri, Dec 08, 2017 at 01:45:52PM +0900, Byungchul Park wrote: On Fri, Dec 08, 2017 at 09:22:16AM +1100, Dave Chinner wrote: On Thu, Dec 07, 2017 at 11:06:34AM -0500, Theodore Ts'o wrote: On Wed, Dec 06, 2017 at 06:06:48AM -0800, Matthew Wilcox

Re: RFC: FT232H based FPGA configuration adapter drivers

2017-12-08 Thread Geert Uytterhoeven
Hi Anatolij, On Thu, Dec 7, 2017 at 3:31 PM, Anatolij Gustschin wrote: > I have to rework drivers for custom FT232H based FPGA configuration > adapters to make them suitable for including in mainline kernel. These > adapters should be usable via low-level drivers for FPGA Manager

[PATCH v2] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-08 Thread Minas Harutyunyan
Before flushing fifos required to check AHB master state and flush when AHB master is in IDLE state. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/core.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/dwc2/core.c