RE: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-10-08 Thread Anurag Kumar Vulisha
Hi Felipe, >-Original Message- >From: Felipe Balbi [mailto:ba...@kernel.org] >Sent: Tuesday, October 09, 2018 11:07 AM >To: Anurag Kumar Vulisha ; Anurag Kumar Vulisha >; gre...@linuxfoundation.org >Cc: v.anuragku...@gmail.com; linux-usb@vger.kernel.org; linux- >ker...@vger.kernel.org; thi

[PATCH] usb: gadget: musb: fix short isoc packets with inventra dma for pandaboard es

2018-10-08 Thread Paul Elder
Handling short packets (length < max packet size) in the Inventra DMA engine in the MUSB driver causes the MUSB DMA controller to hang. An example of a problem that is caused by this problem is when streaming video out of a UVC gadget, only the first video frame is transferred. For short packets (

[PATCH v2] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Adam Borowski
A spanking new machine I just got has all but one USB ports wired as 3.0. Booting defconfig resulted in no keyboard or mouse, which was pretty uncool. Let's enable that -- USB3 is ubiquitous rather than an oddity. As 'y' not 'm' -- recovering from initrd problems needs a keyboard. Signed-off-by:

Re: [PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Ingo Molnar
* Greg Kroah-Hartman wrote: > On Mon, Oct 08, 2018 at 12:32:23PM +0200, Adam Borowski wrote: > > A spanking new machine I just got has all but one USB ports wired as 3.0. > > Booting defconfig resulted in no keyboard or mouse, which was pretty > > uncool. Let's enable that -- USB3 is ubiquitou

RE: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-10-08 Thread Felipe Balbi
(no top-posting, please) Hi, Anurag Kumar Vulisha writes: > Hi Felipe, > > Please let us know if you have any suggestions / comments on this patch > series. > If you feel this patch series are okay, can we proceed with them? I really don't like this dwc3-specific timer. The best way here wo

[PATCH] usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable

2018-10-08 Thread wan . ahmad . zainie . wan . mohamad
From: Wan Ahmad Zainie Add missing pm_runtime_disable() to remove(), in order to avoid an Unbalanced pm_runtime_enable when the module is removed and re-probed. Error log: root@intel-corei7-64:~# modprobe -r intel_xhci_usb_role_switch root@intel-corei7-64:~# modprobe intel_xhci_usb_role_switch i

RE: [RFC] usb: chipidea: Add minimal support for HSIC interface on i.MX6QDL

2018-10-08 Thread Peter Chen
> > The topic has been discussed before: [1] And there is some implementation in > the > vendor kernel: [2] > > It seems like two things need to be done: > > 1. Switch the pinmux of the strobe signal to use a pullup after >the core has been initialized. > 2. Enable HSIC mode and HSIC cloc

Re: Query on usb/core/devio.c

2018-10-08 Thread Oliver Neukum
On Mo, 2018-10-08 at 11:16 -0400, Alan Stern wrote: > On Mon, 8 Oct 2018, Oliver Neukum wrote: > > > On Mo, 2018-10-08 at 10:50 +0100, Mayuresh Kulkarni wrote: > > > > > > As a result of this, the USB suspend (L2) does not seem to happen, even > > > if all the interface drivers of a composite US

Re: [PATCH] usbip: vhci_hcd: check port number before using

2018-10-08 Thread Shuah Khan
On 10/08/2018 02:01 PM, Sudip Mukherjee wrote: > On Mon, Oct 8, 2018 at 8:29 PM Shuah Khan wrote: >> >> Hi Sudip, >> >> On 10/08/2018 01:19 PM, Sudip Mukherjee wrote: >>> From: Sudip Mukherjee >>> >>> The port number is checked and it just prints an error message but it >>> still continues to use

Re: [PATCH] usbip: vhci_hcd: check port number before using

2018-10-08 Thread Sudip Mukherjee
On Mon, Oct 8, 2018 at 8:29 PM Shuah Khan wrote: > > Hi Sudip, > > On 10/08/2018 01:19 PM, Sudip Mukherjee wrote: > > From: Sudip Mukherjee > > > > The port number is checked and it just prints an error message but it > > still continues to use the invalid port. And as a result it accesses > > me

Re: [PATCH] usbip: vhci_hcd: check port number before using

2018-10-08 Thread Shuah Khan
Hi Sudip, On 10/08/2018 01:19 PM, Sudip Mukherjee wrote: > From: Sudip Mukherjee > > The port number is checked and it just prints an error message but it > still continues to use the invalid port. And as a result it accesses > memory which is not its resulting in BUG report from KASAN. Yes th

[PATCH] usbip: vhci_hcd: check port number before using

2018-10-08 Thread Sudip Mukherjee
From: Sudip Mukherjee The port number is checked and it just prints an error message but it still continues to use the invalid port. And as a result it accesses memory which is not its resulting in BUG report from KASAN. Reported-by: syzbot+600b03e0cf1b73bb2...@syzkaller.appspotmail.com Cc: sta

Re: [PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Adam Borowski
On Mon, Oct 08, 2018 at 03:19:44PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 08, 2018 at 12:32:23PM +0200, Adam Borowski wrote: > > A spanking new machine I just got has all but one USB ports wired as 3.0. > > Booting defconfig resulted in no keyboard or mouse, which was pretty > > uncool. Le

Re: [PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Randy Dunlap
On 10/8/18 8:20 AM, Alan Stern wrote: > On Mon, 8 Oct 2018, Greg Kroah-Hartman wrote: > >> On Mon, Oct 08, 2018 at 12:32:23PM +0200, Adam Borowski wrote: >>> A spanking new machine I just got has all but one USB ports wired as 3.0. >>> Booting defconfig resulted in no keyboard or mouse, which was

RE: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-10-08 Thread Anurag Kumar Vulisha
Hi Felipe, Please let us know if you have any suggestions / comments on this patch series. If you feel this patch series are okay, can we proceed with them? Thanks, Anurag Kumar Vulisha >-Original Message- >From: Anurag Kumar Vulisha [mailto:anurag.kumar.vuli...@xilinx.com] >Sent: Satu

Re: [PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Alan Stern
On Mon, 8 Oct 2018, Greg Kroah-Hartman wrote: > On Mon, Oct 08, 2018 at 12:32:23PM +0200, Adam Borowski wrote: > > A spanking new machine I just got has all but one USB ports wired as 3.0. > > Booting defconfig resulted in no keyboard or mouse, which was pretty > > uncool. Let's enable that -- US

Re: Query on usb/core/devio.c

2018-10-08 Thread Alan Stern
On Mon, 8 Oct 2018, Oliver Neukum wrote: > On Mo, 2018-10-08 at 10:50 +0100, Mayuresh Kulkarni wrote: > > > > As a result of this, the USB suspend (L2) does not seem to happen, even if > > all the interface drivers of a composite USB device report "idle" to USB > > core driver. The USB suspend

Re: [PATCH net-next 00/19] Add support for Aquantia AQtion USB to 5/2.5GbE devices

2018-10-08 Thread Igor Russkikh
On 08.10.2018 17:21, Oliver Neukum wrote: >> The code of this driver is based on original ASIX sources and was extended >> by Aquantia for 5G multigig support. > > Thank you for the driver. It is good to see drivers for cool hardware. > Unfortunately there have been a few issues I have tried t

Re: [PATCH net-next 19/19] net: usb: aqc111: Add support for wake on LAN by MAGIC packet

2018-10-08 Thread Andrew Lunn
On Mon, Oct 08, 2018 at 02:12:59PM +, Igor Russkikh wrote: > Hi Andrew, > > >> + if (aqc111_data->dpa) { > >> + aqc111_set_phy_speed(dev, AUTONEG_DISABLE, SPEED_100); > > > > I don't think that works. You should leave AUTONEG on, but only > > advertise SPEED_100 and

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Oliver Neukum
On Mo, 2018-10-08 at 17:10 +0300, Igor Russkikh wrote: > Hi Oliver, > > > > + aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MAJOR, > > > + 1, 1, &aqc111_data->fw_ver.major); > > > + aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MINOR, > > > + 1, 1, &aqc111_data->fw_

Re: [PATCH net-next 00/19] Add support for Aquantia AQtion USB to 5/2.5GbE devices

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:24 +, Igor Russkikh wrote: > This patchset introduces support for new multigig ethernet to USB dongle, > developed jointly by Aquantia (Phy) and ASIX (USB MAC). > > The driver has similar structure with other ASIX MAC drivers (AX88179), but > with a number of important

Re: [GIT PULL] usb: chipidea: changes for v4.20-rc1

2018-10-08 Thread Greg Kroah-Hartman
On Mon, Oct 08, 2018 at 01:58:00AM +, Peter Chen wrote: > The following changes since commit 1652a83fa494b12e20fc02a2cc3ddbcd75d53170: > > Merge 4.19-rc4 into usb-next (2018-09-16 22:44:14 +0200) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/gi

Re: [PATCH net-next 18/19] net: usb: aqc111: Implement get/set_link_ksettings callbacks

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:25 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > +static int aqc111_get_link_ksettings(struct net_device *net, > + struct ethtool_link_ksettings *elk) > +{ > + struct usbnet *dev = netdev_priv(net); > + enum usb_device_spe

Re: [PATCH net-next 15/19] net: usb: aqc111: Add support for VLAN_CTAG_TX/RX offload

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:25 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh > --- > drivers/net/usb/aqc111.c | 14 ++ > drivers/net/usb/aqc111.h | 7 ++- > 2 files changed, 20 insertions(+), 1 deletion(-) >

Re: [PATCH net-next 13/19] net: usb: aqc111: Add support for TSO

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:25 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh > --- > drivers/net/usb/aqc111.c | 3 +++ > drivers/net/usb/aqc111.h | 6 -- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Igor Russkikh
Hi Oliver, >> +aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MAJOR, >> +1, 1, &aqc111_data->fw_ver.major); >> +aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_FW_VER_MINOR, >> +1, 1, &aqc111_data->fw_ver.minor); >> +aqc111_read_cmd(dev, AQ_ACCESS_MAC, AQ_

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Igor Russkikh
Hi Andrew, + struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0]; >>> >>> Having to do this cast all the time is quiet ugly. It seems like some >>> other usb_net drivers use netdev_priv(). >> >> As I see most of usb usbnet based devices use the same theme with accessing >>

Re: [PATCH net-next 08/19] net: usb: aqc111: Implement TX data path

2018-10-08 Thread Oliver Neukum
On Mo, 2018-10-08 at 13:43 +, Igor Russkikh wrote: > > > + skb_push(skb, AQ_TX_HEADER_SIZE); > > > + cpu_to_le64s(&tx_hdr); > > > > Is that portable? tx_hdr is a structure of 2x u32 bitfields. What > > endian have you tested that one? > > > > You are right, this is wrong for BE hardware. >

Re: [PATCH net-next 19/19] net: usb: aqc111: Add support for wake on LAN by MAGIC packet

2018-10-08 Thread Igor Russkikh
Hi Andrew, >> +if (aqc111_data->dpa) { >> +aqc111_set_phy_speed(dev, AUTONEG_DISABLE, SPEED_100); > > I don't think that works. You should leave AUTONEG on, but only > advertise SPEED_100 and trigger auto-neg. If you force it to 100, > there is no guarantee the pee

Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:24 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > +static void aqc111_configure_rx(struct usbnet *dev, > + struct aqc111_data *aqc111_data) > +{ > + u8 reg8 = 0; > + u8 queue_num = 0; > + u16 reg16 = 0; > + u16 link_spee

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:24 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Implement PHY power up/down sequences. > AQC111, depending on FW used, may has PHY being controlled either > directly (dpa = 1) or via vendor command interface (dpa = 0). > Drivers supports both themes. > We determ

Re: [PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Greg Kroah-Hartman
On Mon, Oct 08, 2018 at 12:32:23PM +0200, Adam Borowski wrote: > A spanking new machine I just got has all but one USB ports wired as 3.0. > Booting defconfig resulted in no keyboard or mouse, which was pretty > uncool. Let's enable that -- USB3 is ubiquitous rather than an oddity. > As 'y' not 'm

Re: [PATCH 01/14] phy: phy-pxa-usb: add a new driver

2018-10-08 Thread Greg Kroah-Hartman
On Sun, Oct 07, 2018 at 08:47:28PM +0200, Lubomir Rintel wrote: > On Tue, 2018-09-25 at 10:53 +0530, Kishon Vijay Abraham I wrote: > > > > On Thursday 23 August 2018 02:12 AM, Lubomir Rintel wrote: > > > Turned from arch/arm/mach-mmp/devices.c into a proper PHY driver, > > > so > > > that in can b

Re: [PATCH net-next 04/19] net: usb: aqc111: Various callbacks implementation

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:24 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Reset, stop callbacks, driver unbind callback. > More register defines required for these callbacks. > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh > --- > drivers/net/usb/aqc111.c | 48

Re: [PATCH net-next 03/19] net: usb: aqc111: Add implementation of read and write commands

2018-10-08 Thread Oliver Neukum
On Fr, 2018-10-05 at 10:24 +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Read/write command register defines and functions > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh > --- > drivers/net/usb/aqc111.c | 124 > +++ > d

Re: [PATCH net-next 14/19] net: usb: aqc111: Implement set_rx_mode callback

2018-10-08 Thread Igor Russkikh
Hi Andrew, >> +{ >> +struct usbnet *dev = netdev_priv(net); >> +struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0]; > >> +u8 *m_filter = ((u8 *)dev->data) + 12; > > Please could you explain is. Oh, that was a legacy code, the idea is it used spare area in dev->data

Re: [PATCH net-next 08/19] net: usb: aqc111: Implement TX data path

2018-10-08 Thread Igor Russkikh
>> +skb_push(skb, AQ_TX_HEADER_SIZE); >> +cpu_to_le64s(&tx_hdr); > > Is that portable? tx_hdr is a structure of 2x u32 bitfields. What > endian have you tested that one? > You are right, this is wrong for BE hardware. We don't have such a hardware to check unfortunately. Think its bet

[RFC] usb: chipidea: Add minimal support for HSIC interface on i.MX6QDL

2018-10-08 Thread Frieder Schrempf
Current mainline doesn't support USB hosts 2 and 3 which only use HSIC mode and I was wondering how this would need to be implemented. The topic has been discussed before: [1] And there is some implementation in the vendor kernel: [2] It seems like two things need to be done: 1. Switch the pinmu

Re: [PATCH v2] usb: typec: tcpm: Report back negotiated PPS voltage and current

2018-10-08 Thread Guenter Roeck
On 10/08/2018 05:53 AM, Adam Thomson wrote: Currently when requesting a specific voltage or current through the psy interface, for PPS, when reading back from that interface the values will always be the same as previously given, if the request was successful. However PPS only allows for 20mV vol

Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

2018-10-08 Thread Igor Russkikh
Hi Andrew, > Hi Igor, Dmitry > > Please could you explain why you decided to not use drivers/net/phy? > The previous patch introduced basically what you need to export a > standard Linux MDIO bus. From that you can use a standard Linux PHY > driver. Thats again because of this product has tight

[PATCH v2] usb: typec: tcpm: Report back negotiated PPS voltage and current

2018-10-08 Thread Adam Thomson
Currently when requesting a specific voltage or current through the psy interface, for PPS, when reading back from that interface the values will always be the same as previously given, if the request was successful. However PPS only allows for 20mV voltage steps and 50mA current steps, and the psy

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Andrew Lunn
On Mon, Oct 08, 2018 at 09:09:54AM +, Igor Russkikh wrote: > Hi Andrew, > > >> > >> + struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0]; > > > > Having to do this cast all the time is quiet ugly. It seems like some > > other usb_net drivers use netdev_priv(). > > As I s

Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

2018-10-08 Thread Andrew Lunn
On Mon, Oct 08, 2018 at 09:29:26AM +, Igor Russkikh wrote: > Hi Andrew, > > >>aqc111_read_fw_version(dev, aqc111_data); > >> + aqc111_data->autoneg = AUTONEG_ENABLE; > >> + aqc111_data->advertised_speed = (usb_speed == USB_SPEED_SUPER) ? > >> + SPEED_500

Re: Query on usb/core/devio.c

2018-10-08 Thread Oliver Neukum
On Mo, 2018-10-08 at 10:50 +0100, Mayuresh Kulkarni wrote: > > As a result of this, the USB suspend (L2) does not seem to happen, even if > all the interface drivers of a composite USB device report "idle" to USB core > driver. The USB suspend seem to happen only when the caller in user-space (i

[PATCH] x86/defconfig: Enable CONFIG_USB_XHCI_HCD

2018-10-08 Thread Adam Borowski
A spanking new machine I just got has all but one USB ports wired as 3.0. Booting defconfig resulted in no keyboard or mouse, which was pretty uncool. Let's enable that -- USB3 is ubiquitous rather than an oddity. As 'y' not 'm' -- recovering from initrd problems needs a keyboard. Signed-off-by:

Re: [PATCH] usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc

2018-10-08 Thread Heikki Krogerus
On Sun, Oct 07, 2018 at 04:46:12PM -0700, Stephen Boyd wrote: > This must have been copy pasted from the function above. Fix it. > > Signed-off-by: Stephen Boyd Acked-by: Heikki Krogerus > --- > drivers/usb/typec/class.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Query on usb/core/devio.c

2018-10-08 Thread Mayuresh Kulkarni
Hi Greg KH, I have a query regarding the USB-FS driver, usb/core/devio.c. It looks like it takes a PM ref-count on the USB device in its .open() and release the PM ref-count on the USB device in its .release(). As a result of this, the USB suspend (L2) does not seem to happen, even if all the

Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

2018-10-08 Thread Igor Russkikh
Hi Andrew, >> aqc111_read_fw_version(dev, aqc111_data); >> +aqc111_data->autoneg = AUTONEG_ENABLE; >> +aqc111_data->advertised_speed = (usb_speed == USB_SPEED_SUPER) ? >> + SPEED_5000 : SPEED_1000; > > USB 3 has a raw bandwidth of 5Gbps. But it is

Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

2018-10-08 Thread Igor Russkikh
Hi Andrew, >> >> +struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0]; > > Having to do this cast all the time is quiet ugly. It seems like some > other usb_net drivers use netdev_priv(). As I see most of usb usbnet based devices use the same theme with accessing private d

RE: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-08 Thread David Laight
From: David Miller > Sent: 05 October 2018 22:24 > > From: Ben Dooks > Date: Tue, 2 Oct 2018 17:56:02 +0100 > > > - memcpy(skb->data, &tx_cmd_a, 4); > > + ptr = skb_push(skb, 8); > > + tx_cmd_a = cpu_to_le32(tx_cmd_a); > > + tx_cmd_b = cpu_to_le32(tx_cmd_b); > > + memcpy(ptr, &tx_cmd_

Re: [PATCH net-next 00/19] Add support for Aquantia AQtion USB to 5/2.5GbE devices

2018-10-08 Thread Igor Russkikh
Hi Andrew, > Nice patch set, well broken up, easy to review. > Thanks a lot for your detailed review, your comments are really useful! I'll respond to some of your comments separately. Regards, Igor

Re: USB mass storage device inaccessible, freezes lsusb

2018-10-08 Thread Christoph Groth
On Sun, 7 Oct 2018, Alan Stern wrote: > On Fri, 5 Oct 2018, Christoph Groth wrote: > > > I would be grateful for hints on how solve or further debug this > > problem. > > A good start would be to post a usbmon trace showing what happens when > you plug in the Garmin device. Also you could post th