Re: Query on usb/core/devio.c

2018-10-09 Thread Mayuresh Kulkarni
First of all thanks for the comments. It is really helpful to get better insights of this driver. On Mon, 8 Oct 2018 21:59:44 +0200 Oliver Neukum wrote: > 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

Re: Query on usb/core/devio.c

2018-10-09 Thread Oliver Neukum
On Di, 2018-10-09 at 10:51 +0100, Mayuresh Kulkarni wrote: > > The USB core driver has a module-param "usb_autosuspend_delay" whose default > value is 2 sec. AFAIU, the PM core will wait at-least 2 sec before scheduling > the suspend of this USB device. > So, if the user-space driving any of the

Re: Query on usb/core/devio.c

2018-10-09 Thread Greg KH
On Tue, Oct 09, 2018 at 10:51:53AM +0100, Mayuresh Kulkarni wrote: > With all due respect, one of the possible reason for this could be, > power saving on mobile/tablet platforms (running Android). These > platforms usually have a single USB port. Specifically from our point > of view, these platf

usb: gadget: f_fs: Add support for CCID descriptors.

2018-10-09 Thread Vincent Pelletier
Nothing to remap, only check length. Define a minimal structure for CCID descriptor only used to check length. As this descriptor shares the same value as HID descriptors, keep track and compare current interface's class to expected HID and CCID standard values. Signed-off-by: Vincent Pelletier -

Re: USB mass storage device inaccessible, freezes lsusb

2018-10-09 Thread Alan Stern
On Mon, 8 Oct 2018, Christoph Groth wrote: > 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 w

[hid:for-4.20/google 2/3] ERROR: "cros_ec_cmd_xfer_status" [drivers/hid/hid-google-hammer.ko] undefined!

2018-10-09 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-4.20/google head: 8f35260e0b6cc09d77bcbbc21554342aa79ceb2f commit: eb1aac4c8744f75460c34d71b0c73bebf3e8ee5c [2/3] HID: google: add support tablet mode switch for Whiskers config: x86_64-randconfig-s0-10091927 (attached as

xHCI enable slot command if there are several ports connected

2018-10-09 Thread Dmitry Malkin
Hi guys, Could someone can give me a hint to this question: if there are multiple connected USB devices (multiple ports with set PORTSC.CCS bit) to xHCI and I issue the very first enable slot command which port will be "enabled"? I don't see anything regarding this in specification (also I c

Re: [PATCH] usb: dwc3: gadget: Properly check last unaligned/zero chain TRB

2018-10-09 Thread Thinh Nguyen
Hi Felipe, On 8/2/2018 8:17 PM, Thinh Nguyen wrote: > Current check for the last extra TRB for zero and unaligned transfers > does not account for isoc OUT. The last TRB of the Buffer Descriptor for > isoc OUT transfers will be retired with HWO=0. As a result, we won't > return early. The req->rem

[hid:for-4.20/google 2/3] drivers/hid/hid-google-hammer.c:73: undefined reference to `cros_ec_cmd_xfer_status'

2018-10-09 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-4.20/google head: 8f35260e0b6cc09d77bcbbc21554342aa79ceb2f commit: eb1aac4c8744f75460c34d71b0c73bebf3e8ee5c [2/3] HID: google: add support tablet mode switch for Whiskers config: x86_64-randconfig-s3-10092338 (attached as

Re: xHCI enable slot command if there are several ports connected

2018-10-09 Thread Alan Stern
On Tue, 9 Oct 2018, Dmitry Malkin wrote: > Hi guys, > > Could someone can give me a hint to this question: > > if there are multiple connected USB devices (multiple ports with set > PORTSC.CCS bit) to xHCI and I issue the very first enable slot command > which port will be "enabled"? > > I do

Re: USB mass storage device inaccessible, freezes lsusb

2018-10-09 Thread Christoph Groth
On Tue, 9 Oct 2018, Alan Stern wrote: > On Mon, 8 Oct 2018, Christoph Groth wrote: > > > 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 st

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

2018-10-09 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: >>> 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 would be >>to add a timer on udc/co

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

2018-10-09 Thread Anurag Kumar Vulisha
Hi Felipe, >-Original Message- >From: Felipe Balbi [mailto:ba...@kernel.org] >Sent: Tuesday, October 09, 2018 12:51 PM >To: Anurag Kumar Vulisha ; gre...@linuxfoundation.org >Cc: v.anuragku...@gmail.com; linux-usb@vger.kernel.org; linux- >ker...@vger.kernel.org; thinh.ngu...@synopsys.com

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

2018-10-09 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: >>> Thanks for spending your time in reviewing this patch. The reason for >>> adding the >>> timer is when streams are enabled there could be chances for the host and >>> gadget >>> controller to become out of sync, the gadget may wait for the host to issue >>

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

2018-10-09 Thread Bjørn Mork
Oliver Neukum writes: > 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 >> --- >>

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

2018-10-09 Thread Bjørn Mork
Igor Russkikh writes: > +static int __aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value, > + u16 index, u16 size, void *data, int nopm) > +{ > + int ret; > + int (*fn)(struct usbnet *dev, u8 cmd, u8 reqtype, u16 value, > + u16 index, void *data,

Re: [PATCH net-next 01/19] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE

2018-10-09 Thread Bjørn Mork
Igor Russkikh writes: >> +static const struct driver_info aqc111_info = { > + .description= "Aquantia AQtion USB to 5GbE Controller", > +}; > + > +#define AQC111_USB_ETH_DEV(vid, pid, table) \ > + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ > + USB_DEVICE_ID_MATC

Re: [PATCH net-next 09/19] net: usb: aqc111: Implement RX data path

2018-10-09 Thread Bjørn Mork
Igor Russkikh writes: > From: Dmitry Bezrukov > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh > --- You'd want some description here. Bjørn

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

2018-10-09 Thread Bjørn Mork
Igor Russkikh writes: > +struct aq_tx_packet_desc { > + struct { > + u32 length:21; > + u32 checksum:7; > + u32 drop_padding:1; > + u32 vlan_tag:1; > + u32 cphi:1; > + u32 dicf:1; > + }; > + struct { > +

Re: [PATCH net-next 07/19] net: usb: aqc111: Add support for getting and setting of MAC address

2018-10-09 Thread Igor Russkikh
Hi Andrew, >> +if (ret < 0) >> +goto out; >> + >> +memcpy(dev->net->dev_addr, buf, ETH_ALEN); >> +memcpy(dev->net->perm_addr, dev->net->dev_addr, ETH_ALEN); > > Is this really the permanent address? If i call aqc111_set_mac_addr() > followed by aqc111_get_mac() i still get

Re: [PATCH net-next 07/19] net: usb: aqc111: Add support for getting and setting of MAC address

2018-10-09 Thread Andrew Lunn
On Tue, Oct 09, 2018 at 02:34:36PM +, Igor Russkikh wrote: > Hi Andrew, > > >> + if (ret < 0) > >> + goto out; > >> + > >> + memcpy(dev->net->dev_addr, buf, ETH_ALEN); > >> + memcpy(dev->net->perm_addr, dev->net->dev_addr, ETH_ALEN); > > > > Is this really the permanent address? I

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

2018-10-09 Thread Lubomir Rintel
On Mon, 2018-10-08 at 15:21 +0200, Greg Kroah-Hartman wrote: > 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/

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

2018-10-09 Thread Greg Kroah-Hartman
On Tue, Oct 09, 2018 at 04:51:03PM +0200, Lubomir Rintel wrote: > On Mon, 2018-10-08 at 15:21 +0200, Greg Kroah-Hartman wrote: > > 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 201

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

2018-10-09 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

[PATCH 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2018-10-09 Thread Paul Elder
Since "usb: gadget: uvc: enqueue uvc_request_data in setup handler for control OUT requests" it is no longer necessary for userspace to call ioctl UVCIOC_SEND_RESPONSE in response to receiving a UVC_EVENT_SETUP from the uvc function driver for a control OUT request. This change means that for cont

[PATCH 5/6] usb: musb: gadget: implement send_response

2018-10-09 Thread Paul Elder
This patch implements a mechanism to signal the MUSB driver to reply to a control OUT request with STALL or ACK. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- drivers/usb/musb/musb_gadget_ep0.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/dri

[PATCH 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2018-10-09 Thread Paul Elder
We now have a mechanism to signal the UDC driver to reply to a control OUT request with STALL or ACK, and we have packaged the setup stage data and the data stage data of a control OUT request into a single UVC_EVENT_DATA for userspace to consume. The ioctl UVCIOC_SEND_RESPONSE in the case of a con

[PATCH 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2018-10-09 Thread Paul Elder
This patch series adds a mechanism to allow asynchronously validating the data stage of a control out request, and for stalling or suceeding the request accordingly. This mechanism is implemented for MUSB, and is used by UVC. At the same time, UVC packages the setup stage and data stage data togeth

[PATCH 1/6] usb: uvc: include videodev2.h in g_uvc.h

2018-10-09 Thread Paul Elder
V4L2_EVENT_PRIVATE_START is used in g_uvc.h but is defined in videodev2.h, which is not included and causes a compiler warning: linux/usb/g_uvc.h:15:28: error: ‘V4L2_EVENT_PRIVATE_START’ undeclared here (not in a function) #define UVC_EVENT_FIRST (V4L2_EVENT_PRIVATE_START + 0) Include videode

[PATCH 4/6] usb: gadget: add functions to signal udc driver to delay status stage

2018-10-09 Thread Paul Elder
A usb gadget function driver may or may not want to delay the status stage of a control OUT request. An instance it might want to is to asynchronously validate the data of a class-specific request. Add a function usb_ep_delay_status to allow function drivers to choose to delay the status stage in

[PATCH 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2018-10-09 Thread Paul Elder
Currently, for uvc class-specific control IN and OUT requests, in the setup handler a UVC_EVENT_SETUP with the setup control is enqueued to userspace. In response to this, the uvc function driver expects userspace to call ioctl UVCIOC_SEND_RESPONSE containing uvc request data. In the case of contr