[PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-14 Thread Loic Poulain
Most of FTDI's devices have an EEPROM which records FTDI devices configuration setting (e.g. the VID, PID, I/O config...) and user data. FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte eeprom... This patch adds support for FTDI EEPROM read/write via USB control transfers and register

Re: [PATCH 3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

2018-06-14 Thread Jaejoong Kim
2018년 6월 15일 (금) 오전 3:14, Sergei Shtylyov 님이 작성: > > Hello! > > On 06/14/2018 12:23 PM, Jaejoong Kim wrote: > > > Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used > >I thought you removed the exports from the real kref_{get|put}(). :-) > Your patch subject and description are

Re: [PATCH 3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

2018-06-14 Thread Jaejoong Kim
Thanks for the review it. 2018년 6월 14일 (목) 오후 11:48, Alan Stern 님이 작성: > > On Thu, 14 Jun 2018, Jaejoong Kim wrote: > > > Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used > > only in f_mass_storage > > > > Signed-off-by: Jaejoong Kim > > This is only a partial solution. In fact,

Re: [PATCH 3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

2018-06-14 Thread Sergei Shtylyov
Hello! On 06/14/2018 12:23 PM, Jaejoong Kim wrote: > Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used I thought you removed the exports from the real kref_{get|put}(). :-) Your patch subject and description are simply misleading the way they are written. > only in

Re: USB role switches, usb-connector, typec and device trees

2018-06-14 Thread Mats Karrman
On 2018-06-13 09:06, Andrzej Hajda wrote: On 12.06.2018 19:33, Mats Karrman wrote: Hi Andrzej, On 2018-06-07 13:40, Andrzej Hajda wrote: On 06.06.2018 23:36, Mats Karrman wrote: Hello Gentlemen, I'm trying to get my head around USB role switches in connection with Type-C ports and

[PATCH v4] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-14 Thread Sebastian Andrzej Siewior
In the code path __usb_hcd_giveback_urb() -> wdm_in_callback() -> service_outstanding_interrupt() The function service_outstanding_interrupt() will unconditionally enable interrupts during unlock and invoke usb_submit_urb() with GFP_KERNEL. If the HCD completes in BH (like ehci does) then

Re: [PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-14 Thread Oliver Neukum
On Do, 2018-06-14 at 13:17 +0200, Sebastian Andrzej Siewior wrote: > @@ -964,6 +975,7 @@ static void wdm_disconnect(struct usb_interface *intf) > mutex_lock(>wlock); > kill_urbs(desc); > cancel_work_sync(>rxwork); > + cancel_work_sync(>service_outs_intr); >

Re: [PATCH 1/3] usb: gadget: storage: Fix reference count if fsg_alloc_inst() failed

2018-06-14 Thread Alan Stern
On Thu, 14 Jun 2018, Jaejoong Kim wrote: > The reference count is initialized in fsg_alloc_inst(). So if > fsg_alloc_inst() fails, we need to add kref_put() to free an > allocated memory. > > Signed-off-by: Jaejoong Kim > --- > drivers/usb/gadget/function/f_mass_storage.c | 1 + > 1 file

Re: [PATCH 2/3] usb: gadget: storage: Add error handling for no memory

2018-06-14 Thread Alan Stern
On Thu, 14 Jun 2018, Jaejoong Kim wrote: > fsg_common_set_num_buffers() may fail due to ENOMEM. So add > error handling for fail case. > > Signed-off-by: Jaejoong Kim > --- > drivers/usb/gadget/function/f_mass_storage.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH 3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

2018-06-14 Thread Alan Stern
On Thu, 14 Jun 2018, Jaejoong Kim wrote: > Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used > only in f_mass_storage > > Signed-off-by: Jaejoong Kim This is only a partial solution. In fact, fsg_common_get() isn't used anywhere, and fsg_common_put() is used in only one place.

Re: usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers

2018-06-14 Thread Sam Protsenko
+ Roger Quadros + Praneeth Bajjuri Tested-by: Sam Protsenko I've tested it on X15 board (DWC3 controller) on Android master, by doing "adb root". Without this patch I see backtrace and kernel panic (the same error as described in commit message). When this patch is applied, everything works

Re: [PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-14 Thread Sebastian Andrzej Siewior
On 2018-06-14 10:44:20 [+0200], Oliver Neukum wrote: > On Mi, 2018-06-13 at 22:28 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-13 19:43:55 [+0200], Oliver Neukum wrote: > Hi Sebastian, Hi Oliver, > > > I am just looking at your patch and I am wondering why > > > wdm_in_callback() won't

[PATCH] doc: usb: Fix typo in gadget_configfs documentation

2018-06-14 Thread Jaejoong Kim
Fix the directory name from 'configfs' to 'configs'. Signed-off-by: Jaejoong Kim --- Documentation/usb/gadget_configfs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt index 635e574..b8cb38a

[PATCH 3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

2018-06-14 Thread Jaejoong Kim
Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used only in f_mass_storage Signed-off-by: Jaejoong Kim --- drivers/usb/gadget/function/f_mass_storage.c | 6 ++ drivers/usb/gadget/function/f_mass_storage.h | 4 2 files changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH 0/3] usb: gadget: storage: fixes and remove export_symbol

2018-06-14 Thread Jaejoong Kim
Hi, This series fix a reference count for fail case, adds a error handling with ENOMEM and also remove EXPORT_SYMBOL_GLP for kref_{put, get}. Thanks, jaejoong Jaejoong Kim (3): usb: gadget: storage: Fix reference count if fsg_alloc_inst() failed usb: gadget: storage: Add error handling for

[PATCH 2/3] usb: gadget: storage: Add error handling for no memory

2018-06-14 Thread Jaejoong Kim
fsg_common_set_num_buffers() may fail due to ENOMEM. So add error handling for fail case. Signed-off-by: Jaejoong Kim --- drivers/usb/gadget/function/f_mass_storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_mass_storage.c

[PATCH 1/3] usb: gadget: storage: Fix reference count if fsg_alloc_inst() failed

2018-06-14 Thread Jaejoong Kim
The reference count is initialized in fsg_alloc_inst(). So if fsg_alloc_inst() fails, we need to add kref_put() to free an allocated memory. Signed-off-by: Jaejoong Kim --- drivers/usb/gadget/function/f_mass_storage.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-14 Thread Oliver Neukum
On Mi, 2018-06-13 at 22:28 +0200, Sebastian Andrzej Siewior wrote: > On 2018-06-13 19:43:55 [+0200], Oliver Neukum wrote: > > > > Hi Oliver, Hi Sebastian, > > I am just looking at your patch and I am wondering why > > wdm_in_callback() won't just call service_outstanding_interrupt() > > again