[REGRESSION, BISECTED] cdc-acm: problem with MCP2200

2018-08-30 Thread manio
Hello, I am using USB-UART optical serial converter [1], which is based on MCP2200. It is connected to my RaspberryPi and the other side is connected to my remeha gas boiller. My problems starts with this commit: commit a81cf9799ad7299b03a4dff020d9685f9ac5f3e0 Author: Oliver Neukum Date: W

Re: [PATCH v3 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Andy Shevchenko
On Thu, Aug 30, 2018 at 3:35 AM wrote: > > From: Ajay Gupta > > Latest NVIDIA GPU card has USB Type-C interface. There is a > Type-C controller which can be accessed over I2C. > > This driver adds I2C bus driver to communicate with Type-C controller. > I2C client driver will be part of USB Type-C

Re: [PATCH v3 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Andy Shevchenko
On Thu, Aug 30, 2018 at 3:36 AM wrote: > > From: Ajay Gupta > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller > over I2C interface. > > This UCSI I2C driver uses I2C bus driver interface for communicating > with Type-C controller. > Few comments below. > +#include > +#include

Re: [PATCH] usb: gadget: atmel: remove pointless retrieval of DT name property

2018-08-30 Thread Nicolas Ferre
On 29/08/2018 at 22:01, Rob Herring wrote: The name is always non-NULL and then is not used anywhere in this function, so remove it. Indeed. Cc: Nicolas Ferre Acked-by: Nicolas Ferre Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Alexandre Belloni Cc: linux-arm-ker...@lists.infradead.or

[PATCH] Revert "cdc-acm: implement put_char() and flush_chars()"

2018-08-30 Thread Oliver Neukum
This reverts commit a81cf9799ad7299b03a4dff020d9685f9ac5f3e0. The patch causes a regression, which I cannot find the reason for. So let's revert for now, as a revert hurts only performance. I was trying to resolve the problem with Oliver but we don't get any conclusion for 5 months, so I am now s

[PATCH v1] USB: wusbcore: Switch to bitmap_zalloc()

2018-08-30 Thread Andy Shevchenko
Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko --- drivers/usb/wusbcore/wa-rpipe.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/wusb

A few questions about gadgetfs

2018-08-30 Thread Andrey Konovalov
Hi Alan, I have a few questions about gadgetfs. According to documentation usb_gadget_driver->setup "queues a response to ep0, or returns negative to stall". Do I understand correctly, that "stall" in this case means "retry the same request later" and it's unrelated to the STALL USB packet? Is

A question about 'lsusb'

2018-08-30 Thread Faisal Mehmood
Based on my (limited) understanding if I were to disable udev, the userspace should not be able to enumerate/interact with any newly connected device since udev handles uevents generated by kernel. (right?) So as a test, I disabled systemd-udevd and then plugged in a flash drive. I disabled suppor

RE: [PATCH v3 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Ajay Gupta
Hi Andy, > > Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C > > controller which can be accessed over I2C. > > > > This driver adds I2C bus driver to communicate with Type-C controller. > > I2C client driver will be part of USB Type-C UCSI driver. > > > > Some small comments be

Re: [Bug 200917] 4.18 regression: I/O error on external icybox disk enclosures

2018-08-30 Thread Alan Stern
On Wed, 29 Aug 2018, Klaus Kusche wrote: > Hello, > > On 24/08/2018 19:28, Alan Stern wrote: > > On Fri, 24 Aug 2018, Klaus Kusche wrote: > >> On 24/08/2018 17:39, Alan Stern wrote: > >>> On Fri, 24 Aug 2018, Klaus Kusche wrote: > On 24/08/2018 16:15, Alan Stern wrote: > > On Fri, 24 Aug

Re: A few questions about gadgetfs

2018-08-30 Thread Alan Stern
On Thu, 30 Aug 2018, Andrey Konovalov wrote: > Hi Alan, > > I have a few questions about gadgetfs. > > According to documentation usb_gadget_driver->setup "queues a response > to ep0, or returns negative to stall". > > Do I understand correctly, that "stall" in this case means "retry the > same

RE: [PATCH v3 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Ajay Gupta
Hi Andy, > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C > > interface. > > > > This UCSI I2C driver uses I2C bus driver interface for communicating > > with Type-C controller. > > > > Few comments below. > > > +#include > > +#include > > +#include > > +#include > >

Re: [PATCH v3 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Wolfram Sang
On Wed, Aug 29, 2018 at 05:33:17PM -0700, ajayk...@gmail.com wrote: > From: Ajay Gupta Can you add your full name to the gmail address, too? That would make patch processing a tad easier. Thanks, Wolfram signature.asc Description: PGP signature

Re: A question about 'lsusb'

2018-08-30 Thread Alan Stern
On Thu, 30 Aug 2018, Faisal Mehmood wrote: > Based on my (limited) understanding if I were to disable udev, the > userspace should not be able to enumerate/interact with any newly > connected device since udev handles uevents generated by kernel. > (right?) That's not quite right. Yes, udev does

[PATCH v4 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Ajay Gupta
Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver adds I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2

[PATCH v4 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Changes fr

Re: musb_hdrc HNP?

2018-08-30 Thread Takashi Matsuzawa
Hello. FYI. I made a progress on this, but no solution yet. >The smartphone does use HNP, it is not iPhone Carplay, correct? At this point, I am trying to see original HNP behavior between two pocketbeagles. (After seeing it works, I plan to replace B-device with a phone, and so customization

Re: musb_hdrc HNP?

2018-08-30 Thread Takashi Matsuzawa
Hello. I just confirmed what I wanted to see. I could do lsusb to list A-device (from b_host) and B-device (from a_host). Suspending from either side kicked role change between A-device and B-device (in both direction). I needed to wait 20ms after B-device seeing MUSB_INTR_CONNECT and before cal

Re: [PATCH v4 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Andy Shevchenko
On Fri, Aug 31, 2018 at 12:41 AM Ajay Gupta wrote: > > Latest NVIDIA GPU card has USB Type-C interface. There is a > Type-C controller which can be accessed over I2C. > > This driver adds I2C bus driver to communicate with Type-C controller. > I2C client driver will be part of USB Type-C UCSI driv

Re: [PATCH v4 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Andy Shevchenko
On Fri, Aug 31, 2018 at 12:41 AM Ajay Gupta wrote: > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller > over I2C interface. > > This UCSI I2C driver uses I2C bus driver interface for communicating > with Type-C controller. > Changes from v3 -> v4 > Fixed comments from Andy

[RFC 3/3] stk1160: Use non-coherent buffers for USB transfers

2018-08-30 Thread Ezequiel Garcia
Platforms without hardware coherency can benefit a lot from using non-coherent buffers. Moreover, platforms with hardware coherency aren't impacted by this change. For instance, on AM335x, while it's still not possible to capture full resolution frames, this patch enables half-resolution frame str

[RFC 1/3] HACK: ARM: dma-mapping: Get writeback memory for non-consistent mappings

2018-08-30 Thread Ezequiel Garcia
This is obviously a hack. Signed-off-by: Ezequiel Garcia --- arch/arm/include/asm/pgtable.h | 3 +++ arch/arm/mm/dma-mapping.c | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index a757401129f9..37

Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers

2018-08-30 Thread Christoph Hellwig
Please don't introduce new DMA_ATTR_NON_CONSISTENT users, it is a rather horrible interface, and I plan to kill it off rather sooner than later. I plan to post some patches for a better interface that can reuse the normal dma_sync_single_* interfaces for ownership transfers. I can happily include

Re: [RFC 3/3] stk1160: Use non-coherent buffers for USB transfers

2018-08-30 Thread Christoph Hellwig
> + dma_sync_single_for_cpu(&urb->dev->dev, urb->transfer_dma, > + urb->transfer_buffer_length, DMA_FROM_DEVICE); You can't ue dma_sync_single_for_cpu on non-coherent dma buffers, which is one of the major issues with them.

possible deadlock in __might_fault (3)

2018-08-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:58c3f14f86c9 Merge tag 'riscv-for-linus-4.19-rc2' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1379509240 kernel config: https://syzkaller.appspot.com/x/.config?x=531a917630d2a492 da

Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers

2018-08-30 Thread Ezequiel Garcia
On Thu, 2018-08-30 at 10:58 -0700, Christoph Hellwig wrote: > Please don't introduce new DMA_ATTR_NON_CONSISTENT users, it is > a rather horrible interface, and I plan to kill it off rather sooner > than later. I plan to post some patches for a better interface > that can reuse the normal dma_sync

RE: [PATCH 3/3] usb: renesas_usbhs: add suspend event support in gadget mode

2018-08-30 Thread Yoshihiro Shimoda
Hi Eugeniu, Thank you very much for the patches! > From: Eugeniu Rosca, Sent: Thursday, August 30, 2018 7:54 PM > > From: Veeraiyan Chidambaram > > When RCAR3 is in Gadget mode, if host is detached an interrupt > will be generated and Suspended state bit is set in interrupt status > register.

RE: [PATCH 2/3] usb: renesas_usbhs: enable DVSE interrupt

2018-08-30 Thread Yoshihiro Shimoda
Hi Eugeniu, > From: Eugeniu Rosca, Sent: Thursday, August 30, 2018 7:54 PM > > Commit [1] enabled the possibility of checking the DVST (Device State > Transition) bit of INTSTS0 (Interrupt Status Register 0) and calling > the irq_dev_state() handler if the DVST bit is set. But neither > commit [1

Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers

2018-08-30 Thread Christoph Hellwig
On Thu, Aug 30, 2018 at 07:11:35PM -0300, Ezequiel Garcia wrote: > On Thu, 2018-08-30 at 10:58 -0700, Christoph Hellwig wrote: > > Please don't introduce new DMA_ATTR_NON_CONSISTENT users, it is > > a rather horrible interface, and I plan to kill it off rather sooner > > than later. I plan to post

[PATCH 1/3] usb: renesas_usbhs: Add reset_control

2018-08-30 Thread Yoshihiro Shimoda
R-Car Gen3 needs to deassert resets of both host and peripheral. Since [eo]hci-platform is possible to assert the reset(s) when the probing failed, renesas_usbhs driver doesn't work correctly regardless of finished probing. To fix this issue, this patch adds reset_control on this renesas_usbhs driv

[PATCH 3/3] usb: renesas_usbhs: Add multiple clocks management

2018-08-30 Thread Yoshihiro Shimoda
R-Car Gen3 needs to enable clocks of both host and peripheral. Since [eo]hci-platform disables the reset(s) when the drivers are removed, renesas_usbhs driver doesn't work correctly. To fix this issue, this patch adds multiple clocks management on this renesas_usbhs driver. Signed-off-by: Yoshihir

[PATCH 2/3] dt-bindings: usb: renesas_usbhs: add clock-names property

2018-08-30 Thread Yoshihiro Shimoda
R-Car Gen3 needs to enable clocks of both host and peripheral. Otherwise, other side device cannot work correctly. So, this patch adds a property of clock-names for R-Car Gen3 as an optional. Signed-off-by: Yoshihiro Shimoda --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ 1 f

[PATCH 0/3] usb: renesas_usbhs: add reset_control and multiple clocks management

2018-08-30 Thread Yoshihiro Shimoda
This patch set is based on Felipe's usb.git / testing/next branch (the commit id is 5b394b2ddf0347bef56e50c69a58773c94343ff3) with the following patch: https://patchwork.kernel.org/patch/10574875/ Yoshihiro Shimoda (3): usb: renesas_usbhs: Add reset_control dt-bindings: usb: renesas_usbhs: ad

Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers

2018-08-30 Thread Tomasz Figa
On Fri, Aug 31, 2018 at 2:50 PM Christoph Hellwig wrote: > > On Thu, Aug 30, 2018 at 07:11:35PM -0300, Ezequiel Garcia wrote: > > On Thu, 2018-08-30 at 10:58 -0700, Christoph Hellwig wrote: > > > Please don't introduce new DMA_ATTR_NON_CONSISTENT users, it is > > > a rather horrible interface, and