RE: [PATCH v13 08/10] usbip: exporting devices: change to usbip_list.c

2016-12-06 Thread fx IWATA NOBUO
Hello, > > + rc = get_importable_devices(host, sockfd); > > if (rc < 0) { > > err("failed to get device list from %s", host); > > + close(sockfd); > > return -1; > > } > Why not just close before if? I will move before if. > After fixing suggestion

[PATCH] usb: mtu3: fix U3 port link issue

2016-12-06 Thread Chunfeng Yun
the issue is introduced when @is_u3_ip is used in mtu3_device_enabe() before initialized in mtu3_mem_alloc(), so get global IP information at first before used by following functins. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 18

[PATCH] usb: mtu3: enable auto switch from U3 to U2

2016-12-06 Thread Chunfeng Yun
inform mac2 to build U2 link automatically after U3 detect fail without software setting soft_connect. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/mtu3/mtu3_core.c

RE: [PATCH v13 00/10] usbip: exporting devices

2016-12-06 Thread fx IWATA NOBUO
Hello, > That doesn't tell me much. I am looking to see in the above where are > the server and client located. Sorry. The 'goal' section is added in later version. I will add reference to ASCII diagram in section 2. Also improve diagram in section 2. NEW) - dedicates devices from

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 7:54 PM, Chanwoo Choi wrote: > Hi John, > > I give a some guide for extcon API. > This patch uses the deprecated extcon API (extcon_get_cable_state_). > So, I recommend that you better to use following extcon API: > - extcon_get_cable_state_() ->

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread Chanwoo Choi
Hi John, I give a some guide for extcon API. This patch uses the deprecated extcon API (extcon_get_cable_state_). So, I recommend that you better to use following extcon API: - extcon_get_cable_state_() -> extcon_get_state() - extcon_register_notifier() -> devm_extcon_register_notifier() Best

Re: [RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-06 Thread John Youn
On 12/6/2016 5:48 PM, John Stultz wrote: > Hey John, > Just wanted to send this by you, as it seems something is > slightly off with the GOTGCTL state when removing a otg adapter > cable. The following seems to work around the issue I'm seeing. > > Let me know if you have any thoughts on this.

Re: [PATCH 03/12] power_supply: axp288_charger: Replace the extcon API

2016-12-06 Thread Chanwoo Choi
Hi Sebastian, On 2016년 12월 07일 12:05, Sebastian Reichel wrote: > Hi Chanwoo, > > On Tue, Dec 06, 2016 at 09:26:14AM +0900, Chanwoo Choi wrote: >> Could you please review and pick the patch3/4 for power-supply driver? > > Patches look fine. As I expect the merge window to open next week I >

Re: [PATCH 03/12] power_supply: axp288_charger: Replace the extcon API

2016-12-06 Thread Sebastian Reichel
Hi Chanwoo, On Tue, Dec 06, 2016 at 09:26:14AM +0900, Chanwoo Choi wrote: > Could you please review and pick the patch3/4 for power-supply driver? Patches look fine. As I expect the merge window to open next week I would rather not queue this for 4.10 and instead do it once 4.10-rc1 has been

[RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-06 Thread John Stultz
Hey John, Just wanted to send this by you, as it seems something is slightly off with the GOTGCTL state when removing a otg adapter cable. The following seems to work around the issue I'm seeing. Let me know if you have any thoughts on this. thanks -john When removing a USB-A to USB-otg

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 4:35 PM, John Stultz wrote: > On Tue, Dec 6, 2016 at 4:26 PM, John Youn wrote: >> On 12/6/2016 4:05 PM, John Stultz wrote: >>> On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: Also, do you really

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 4:26 PM, John Youn wrote: > On 12/6/2016 4:05 PM, John Stultz wrote: >> On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: >>> Also, do you really need this at all? Wasn't your system previously >>> able to detect the ID pin

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Youn
On 12/6/2016 4:05 PM, John Stultz wrote: > On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: >> On 12/6/2016 12:06 AM, John Stultz wrote: >>> This patch wires up extcon support to the dwc2 driver >>> so that devices that use a modern generic phy driver >>> and don't use the

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: > On 12/6/2016 12:06 AM, John Stultz wrote: >> This patch wires up extcon support to the dwc2 driver >> so that devices that use a modern generic phy driver >> and don't use the usb-phy infrastructure can still >> signal

RE: [PATCH v13 05/10] usbip: exporting devices: modifications to daemon

2016-12-06 Thread fx IWATA NOBUO
Hello, > how about usbip_meta_driver_set(type)? Good. I'd like to confirm the 'type' parameter. #define USBIP_DRIVER_TYPE_HOST 0 #define USBIP_DRIVER_TYPE_DEVICE 1 Then usbip_meta_driver_init should not be included. It must be usbip_meta_driver_set(USBIP_DRIVER_TYPE_HOST). Thank you,

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Youn
On 12/6/2016 12:06 AM, John Stultz wrote: > This patch wires up extcon support to the dwc2 driver > so that devices that use a modern generic phy driver > and don't use the usb-phy infrastructure can still > signal connect/disconnect events. > > Cc: Wei Xu > Cc: Guodong Xu

Re: [PATCH] usb: gadget: udc: atmel: Fix check in usba_ep_enable()

2016-12-06 Thread Boris Brezillon
Hi Felipe, I realize I sent this patch to your old @ti.com email address. Do you want me to resend it? Regards, Boris On Tue, 6 Dec 2016 22:59:43 +0100 Boris Brezillon wrote: > desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK is not necessarily > equal

Re: no USB rootfs after wake

2016-12-06 Thread Alan Stern
On Tue, 6 Dec 2016, Steffen Dirkwinkel wrote: > Hi all, > > I've been trying to debug issues with my rootfs on usb 3 flash drives > and suspending to ram. > > Symptoms: > > If I suspend and wake while my laptop is plugged into a charger > everything works perfectly. It looks like my laptop

[PATCH] usb: gadget: udc: atmel: Fix check in usba_ep_enable()

2016-12-06 Thread Boris Brezillon
desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK is not necessarily equal to ep->index and that's perfectly fine. The usba endpoint index is just an internal identifier used by the driver to know which registers to use for a USB endpoint. Enforcing this constraint is not only useless, but can

no USB rootfs after wake

2016-12-06 Thread Steffen Dirkwinkel
Hi all, I've been trying to debug issues with my rootfs on usb 3 flash drives and suspending to ram. Symptoms: If I suspend and wake while my laptop is plugged into a charger everything works perfectly. It looks like my laptop keeps usb power on if a charger is plugged in. Without a charger

Re: net/gadget: slab-out-of-bounds write in dev_config

2016-12-06 Thread Andrey Konovalov
On Tue, Dec 6, 2016 at 4:30 PM, Alan Stern wrote: > On Tue, 6 Dec 2016, Andrey Konovalov wrote: > >> Hi! >> >> I've got the following error report while running the syzkaller fuzzer. >> >> ep0_write() doesn't check the length, so a user can cause an >> out-of-bounds

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-06 Thread Alan Stern
[CC: list drastically trimmed] On Tue, 6 Dec 2016, Andrey Konovalov wrote: > On Tue, Dec 6, 2016 at 1:28 PM, Andrey Konovalov > wrote: > > On Mon, Dec 5, 2016 at 8:31 PM, Alan Stern > > wrote: > >> On Mon, 5 Dec 2016, Andrey Konovalov wrote:

Re: [PATCH] add dlink dwm-158 to usb-serial-option

2016-12-06 Thread 'Greg KH'
On Tue, Dec 06, 2016 at 09:18:40PM +0100, Giuseppe Lippolis wrote: > > Any chance you can resend this in a format we can apply it in (tabs > properly > > used, no line-wrap, correct signed-off-by, good subject and changelog > text, > > etc.)? > > Adding registration for 3G modem DWM-158 in

Re: [PATCH v2 RESEND] usb: gadget: udc-core: Rescan pending list on driver unbind

2016-12-06 Thread Alan Stern
Krzysztof: Your patch doesn't address a bug that has been present in usb_add_gadget_udc_release() for some time. If the bind callback fails with any error other than -EPROBE_DEFER, the driver remains unbound to the gadget but it is not added back on to the gadget_driver_pending_list. As a

AW: [PATCH] add dlink dwm-158 to usb-serial-option

2016-12-06 Thread Giuseppe Lippolis
> Any chance you can resend this in a format we can apply it in (tabs properly > used, no line-wrap, correct signed-off-by, good subject and changelog text, > etc.)? Adding registration for 3G modem DWM-158 in usb-serial-option Signed-off-by: Giuseppe Lippolis diff

Re: [PATCH] add dlink dwm-158 to usb-serial-option

2016-12-06 Thread Greg KH
On Tue, Dec 06, 2016 at 08:55:02PM +0100, Giuseppe Lippolis wrote: > I all, > This patch will add the 3G modem dwm-158 found inside the DWR-512 from > Dlink. > The modem have 2 cdc_ether interface and 4 usb-serial. > > I tested the patch in the current lede system and compiled on the latest >

[PATCH] add dlink dwm-158 to usb-serial-option

2016-12-06 Thread Giuseppe Lippolis
I all, This patch will add the 3G modem dwm-158 found inside the DWR-512 from Dlink. The modem have 2 cdc_ether interface and 4 usb-serial. I tested the patch in the current lede system and compiled on the latest linux tree. diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c

Re: USB stops working if a malfunctioning USB device is connected

2016-12-06 Thread PrasannaKumar Muralidharan
On 7 December 2016 at 01:09, Alan Stern wrote: > On Tue, 6 Dec 2016, PrasannaKumar Muralidharan wrote: > >> > The issue did not appear for a day with 4.9-rc5. Will check for a >> > couple more days and get back. >> >> I have been running 4.9-rc5 for quite some time. Did

Re: [PATCH v9 1/2] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-12-06 Thread John Youn
On 12/6/2016 4:00 AM, Ayaka wrote: > Hello John > I still waiting them be merged, but I still can't find it at next-20161206. > Can you resubmit this fixing the checkpatch issues? You can add my ack: Acked-by: John Youn <johny...@synopsys.com> Regards, John > 從我的 iPad

Re: USB stops working if a malfunctioning USB device is connected

2016-12-06 Thread Alan Stern
On Tue, 6 Dec 2016, PrasannaKumar Muralidharan wrote: > > The issue did not appear for a day with 4.9-rc5. Will check for a > > couple more days and get back. > > I have been running 4.9-rc5 for quite some time. Did not observe the > crash so far but some times my USB port stops recognising the

Re: USB stops working if a malfunctioning USB device is connected

2016-12-06 Thread PrasannaKumar Muralidharan
> The issue did not appear for a day with 4.9-rc5. Will check for a > couple more days and get back. I have been running 4.9-rc5 for quite some time. Did not observe the crash so far but some times my USB port stops recognising the device. After rebooting the system the USB port starts working.

Re: [BUG 4.9] New led trigger usbport gets the kernel to panic

2016-12-06 Thread Rafał Miłecki
On 6 December 2016 at 18:26, Pavel Machek wrote: > On Fri 2016-12-02 09:48:18, Ralph Sennhauser wrote: >> On Thu, 1 Dec 2016 17:56:07 +0100 >> Rafał Miłecki wrote: >> >> > On 12/01/2016 03:28 PM, Ralph Sennhauser wrote: >> > > Below the oops with your debug patch

Re: [BUG 4.9] New led trigger usbport gets the kernel to panic

2016-12-06 Thread Pavel Machek
On Fri 2016-12-02 09:48:18, Ralph Sennhauser wrote: > On Thu, 1 Dec 2016 17:56:07 +0100 > Rafał Miłecki wrote: > > > On 12/01/2016 03:28 PM, Ralph Sennhauser wrote: > > > Below the oops with your debug patch applied. > > > > > > (...) > > > > > > root@wrt1900acs:/# cd

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-06 Thread Andrey Konovalov
On Tue, Dec 6, 2016 at 1:28 PM, Andrey Konovalov wrote: > On Mon, Dec 5, 2016 at 8:31 PM, Alan Stern wrote: >> On Mon, 5 Dec 2016, Andrey Konovalov wrote: >> >>> Hi! >>> >>> I've got the following error report while running the syzkaller fuzzer.

Re: net/gadget: slab-out-of-bounds write in dev_config

2016-12-06 Thread Alan Stern
On Tue, 6 Dec 2016, Andrey Konovalov wrote: > Hi! > > I've got the following error report while running the syzkaller fuzzer. > > ep0_write() doesn't check the length, so a user can cause an > out-of-bounds with both size and data controlled. > There's a comment which says "IN DATA+STATUS

Re: [PATCH 2/3] usb: musb: Add a quirk to preserve MUSB_DEVCTL during suspend

2016-12-06 Thread Sekhar Nori
On Monday 05 December 2016 10:17 PM, Bin Liu wrote: > On Fri, Dec 02, 2016 at 03:23:50PM +0100, Alexandre Bailon wrote: >> On 11/29/2016 06:56 PM, Bin Liu wrote: >>> On Tue, Nov 29, 2016 at 06:41:04PM +0100, Alexandre Bailon wrote: On 11/29/2016 05:16 PM, Bin Liu wrote: > Hi, > >

Re: [PATCH 2/3] usb: musb: Add a quirk to preserve MUSB_DEVCTL during suspend

2016-12-06 Thread Bin Liu
On Tue, Dec 06, 2016 at 06:29:31PM +0530, Sekhar Nori wrote: > On Monday 05 December 2016 10:17 PM, Bin Liu wrote: > > On Fri, Dec 02, 2016 at 03:23:50PM +0100, Alexandre Bailon wrote: > >> On 11/29/2016 06:56 PM, Bin Liu wrote: > >>> On Tue, Nov 29, 2016 at 06:41:04PM +0100, Alexandre Bailon

net/gadget: slab-out-of-bounds write in dev_config

2016-12-06 Thread Andrey Konovalov
Hi! I've got the following error report while running the syzkaller fuzzer. ep0_write() doesn't check the length, so a user can cause an out-of-bounds with both size and data controlled. There's a comment which says "IN DATA+STATUS caller makes len <= wLength". While I'm not exactly sure what

[PATCH 1/1] Fixed to checkpatch errors to usbtmc.c

2016-12-06 Thread Ozgur Karatas
Hello all, I will solve a checkpatch.pl script errors. drivers/usb/class/usbtmc.c:719: ERROR: else should follow close brace '}' drivers/usb/class/usbtmc.c:735: ERROR: space required after that ',' (ctx:VxV) drivers/usb/class/usbtmc.c:735: ERROR: space required after that ',' (ctx:VxV)

[PATCH v2 RESEND] usb: gadget: udc-core: Rescan pending list on driver unbind

2016-12-06 Thread Krzysztof Opasiak
Since: commit 855ed04a3758 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") if we load gadget module but there is no free udc available then it will be stored on a pending gadgets list. $ modprobe g_zero.ko $ modprobe g_ether.ko [] udc-core: couldn't find an

Re: [PATCH RESEND] usb: gadget: udc-core: Rescan pending list on driver unbind

2016-12-06 Thread kbuild test robot
-core-Rescan-pending-list-on-driver-unbind/20161206-185131 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: x86_64-randconfig-s0-12061826 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux

Re: usb/gadget: use-after-free in gadgetfs_setup

2016-12-06 Thread Andrey Konovalov
On Mon, Dec 5, 2016 at 8:31 PM, Alan Stern wrote: > On Mon, 5 Dec 2016, Andrey Konovalov wrote: > >> Hi! >> >> I've got the following error report while running the syzkaller fuzzer. >> >> On commit 3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (Dec 2). >> >> BUG: KASAN:

Re: [PATCH] usbip: fix warning in vhci_hcd_probe/lockdep_init_map

2016-12-06 Thread Andrey Konovalov
On Mon, Dec 5, 2016 at 9:00 PM, Shuah Khan wrote: > Hi Andrey, > > On 12/05/2016 12:56 PM, Shuah Khan wrote: >> vhci_hcd calls sysfs_create_group() with dynamically allocated sysfs >> attributes triggering the lock-class key not persistent warning. Call >>

Re: [PATCH v9 1/2] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-12-06 Thread Ayaka
Hello John I still waiting them be merged, but I still can't find it at next-20161206. 從我的 iPad 傳送 > John Youn <john.y...@synopsys.com> 於 2016年10月25日 上午9:30 寫道: > >> On 10/23/2016 2:33 AM, ayaka wrote: >> >> >>> On 10/22/2016 03:27 AM, John Youn wrote

Re: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver

2016-12-06 Thread Raviteja Garimella
Hi Rob, On Tue, Dec 6, 2016 at 4:34 AM, Rob Herring wrote: > On Wed, Nov 30, 2016 at 11:35:09AM +0530, Raviteja Garimella wrote: >> This patch adds documentation for Synopsis Designware Cores AHB >> Subsystem Device Controller (UDC). >> >> Signed-off-by: Raviteja Garimella

[PATCH RESEND] usb: gadget: udc-core: Rescan pending list on driver unbind

2016-12-06 Thread Krzysztof Opasiak
Since: commit 855ed04a3758 ("usb: gadget: udc-core: independent registration of gadgets and gadget drivers") if we load gadget module but there is no free udc available then it will be stored on a pending gadgets list. $ modprobe g_zero.ko $ modprobe g_ether.ko [] udc-core: couldn't find an

Re: [PATCH v13 07/10] usbip: exporting devices: new application-side daemon

2016-12-06 Thread Krzysztof Opasiak
Sorry for spam but previous mail didn't reach linux-usb due to some problems with my company mail server. On 12/06/2016 10:48 AM, Krzysztof Opasiak wrote: > Hi, > > On 12/06/2016 09:44 AM, fx IWATA NOBUO wrote: >> Hello, >> >>> sizeof(rhist), sizeof(rserv) >> >> I will fix them. >> >>> BTW. >>>

Re: [PATCH v13 05/10] usbip: exporting devices: modifications to daemon

2016-12-06 Thread Krzysztof Opasiak
Hi, On 12/06/2016 05:40 AM, fx IWATA NOBUO wrote: > Hello, > >>> usbip_driver_ has widely used as function names and file >>> names for host side abstraction. >>> If they were usbip_host_, I can use usbip_driver_open/close >>> for both host(stub/vudc) and vhci. >> >> usbip_host() is not correct

RE: [PATCH v13 07/10] usbip: exporting devices: new application-side daemon

2016-12-06 Thread fx IWATA NOBUO
Hello, > sizeof(rhist), sizeof(rserv) I will fix them. > BTW. > The read_record() function is really weird and probably it should be > also refactored. We pass 3 arrays but pass size only for 2 of them and > size of third argument is hard coded inside this function:( Comment "the 3rd part

[RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
This patch wires up extcon support to the dwc2 driver so that devices that use a modern generic phy driver and don't use the usb-phy infrastructure can still signal connect/disconnect events. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir

[RFC][PATCH 3/3 v2] usb: dwc2: Force port resume on switching to device mode

2016-12-06 Thread John Stultz
From: Chen Yu We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu

[RFC][PATCH 0/3 v2] Try to connect HiKey's usb extcon to dwc2 driver

2016-12-06 Thread John Stultz
After feedback from Kishon and John, I've reworked my efforts to add extcon support to the phy-hi6220-usb driver and instead have added the extcon support to the dwc2 driver directly. This avoids odd interactions trying to wire the generic phy to the otg gadget structure to send proper

[RFC][PATCH 2/3 v2] usb: dwc2: Avoid suspending if we're in gadget mode

2016-12-06 Thread John Stultz
I've found when booting HiKey with the usb gadget cable attached if I then try to connect via adb, I get an infinite spew of: dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790ecb18 ep1out, 0) dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790eca18 ep1in, 0) It seems that the usb