On Tue, Feb 18, 2014 at 12:47:41PM -0600, Felipe Balbi wrote:
> On Tue, Feb 18, 2014 at 10:00:30AM -0800, David Cohen wrote:
> > Hi Sarah,
> >
> > On Mon, Jan 06, 2014 at 07:02:19PM -0800, David Cohen wrote:
> > > When CONFIG_PCI and CONFIG_PM are not selected,
Hi Sarah,
On Mon, Jan 06, 2014 at 07:02:19PM -0800, David Cohen wrote:
> When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
> warning:
> drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
> but not used [-Wunused-function]
>
> It happ
On Tue, Jan 14, 2014 at 02:42:11PM -0800, David Cohen wrote:
> On Fri, Dec 20, 2013 at 12:23:36PM -0800, David Cohen wrote:
> > On Fri, Dec 20, 2013 at 08:55:27PM +0100, Pavel Machek wrote:
> > > On Sun 2013-12-15 11:25:08, David Cohen wrote:
> > > > On Sun, Dec 15, 2
ous patch.
> [Li Jun] You are right, I will re-split my patch set to resolve this, thanks!
It's difficult to read the e-mails you reply. Please, consider to quote
the text messages you're replying to.
Br, David Cohen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 20, 2013 at 12:23:36PM -0800, David Cohen wrote:
> On Fri, Dec 20, 2013 at 08:55:27PM +0100, Pavel Machek wrote:
> > On Sun 2013-12-15 11:25:08, David Cohen wrote:
> > > On Sun, Dec 15, 2013 at 06:51:12PM +0100, Pavel Machek wrote:
> > > > On Thu 2013-12-
On Wed, Jan 08, 2014 at 03:29:31PM +, David Laight wrote:
> > From: 'David Cohen'
> ...
> > I actually don't know what's the regular range of 'td_cnt'. But what got my
> > attention was this comment from patch description:
> >
> &g
On Wed, Jan 08, 2014 at 10:48:06AM -0500, Alan Stern wrote:
> On Tue, 7 Jan 2014, Greg KH wrote:
>
> > On Tue, Jan 07, 2014 at 05:44:26PM -0800, David Cohen wrote:
> > > From: jianqian
> > >
> > > There is a possible kernel panic faced on xhci_suspend(
On Wed, Jan 08, 2014 at 09:25:42AM +, David Laight wrote:
> > From: 'David Cohen'
> ...
> > > > The new kmalloc is going to be "n * sizeof(struct) - n *
> > > > sizeof(pointer)"
> > > > bigger. I don't know what is the
m with 1 usb3 host controller + 1 usb3 OTG
controller (Jianqiang, please correct me if I'm wrong).
How common is this configuration out there?
Br, David Cohen
>
> >This causes race condition during XHCI driver initialization,
> >
> > After USB2 hcd and USB2 r
is still doing initialization, it is possible to face
null pointer kernel panic in xhci_suspend() function.
This patch checks if xhci->shared_hcd is null to avoid panic.
Signed-off-by: jianqian
Signed-off-by: David Cohen
---
This is the kernel panic. The bug was discovered on current LTS kerne
On Tue, Jan 07, 2014 at 09:29:30AM +, David Laight wrote:
> > From: 'David Cohen'
> > On Mon, Jan 06, 2014 at 09:26:20AM +, David Laight wrote:
> > > > From: David Cohen
> > > > On Fri, Dec 20, 2013 at 09:26:35AM -0000, David Laight wrote:
>
On Mon, Jan 06, 2014 at 09:26:20AM +, David Laight wrote:
> > From: David Cohen
> > On Fri, Dec 20, 2013 at 09:26:35AM -, David Laight wrote:
> > > > From: David Cohen
> > > The effect of this change is really to remove the first allocation and
> > &g
: David Cohen
---
Change v1 -> v2:
- xhci_msix_sync_irqs() already uses __maybe_unused flag when CONFIG_PCI is
set. Proper solution is to add same flag when !CONFIG_PCI instead of define
function as inline.
drivers/usb/host/xhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
d
When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
warning:
drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
but not used [-Wunused-function]
Instead of creating nested #ifdefs, this patch fixes it by defining the
xHCI PCI stubs as inline.
Signed-off-by: David
On Fri, Jan 03, 2014 at 11:21:56AM +0800, Hayes Wang wrote:
> The return value should be the boolean value, not the error code.
>
> Signed-off-by: Hayes Wang
> Spotted-by: Dan Carpenter
> ---
> drivers/net/usb/r8152.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dri
On Fri, Dec 20, 2013 at 08:55:27PM +0100, Pavel Machek wrote:
> On Sun 2013-12-15 11:25:08, David Cohen wrote:
> > On Sun, Dec 15, 2013 at 06:51:12PM +0100, Pavel Machek wrote:
> > > On Thu 2013-12-12 21:18:23, David Cohen wrote:
> > > > This patch makes
;
It could be just nitpicking, but I think it's a waste of resource to
unnecessarily print to console while holding a lock.
If you move this dev_err() to after mutex_unlock() you'd achieve the
same result with a cheaper lock.
> rc->beaconing = -1;
A
On Fri, Dec 20, 2013 at 09:26:35AM -, David Laight wrote:
> > From: David Cohen
> > On Wed, Dec 18, 2013 at 11:24:47AM -, David Laight wrote:
> > > This saves a kzalloc() call on every transfer and some memory
> > > indirections.
> > >
> > &g
On Fri, Dec 20, 2013 at 11:29:04AM +0530, Kishon Vijay Abraham I wrote:
> Hi Felipe,
>
> On Friday 13 December 2013 12:01 AM, Felipe Balbi wrote:
> > In case pm_runtime_get*() fails, it still
> > increments pm usage counter, so we *must*
> > make sure to pm_runtime_put() even in those
> > cases.
>
> an additional page.
If you take this to embedded world there could be a bad side effect too.
The free memory isn't abundant and the fragmentation may make a bigger
kmalloc() to cost more than 2 smaller ones.
Br, David Cohen
>
> Signed-off-by: David Laight
> ---
>
> v2:
On Thu, Dec 12, 2013 at 09:18:22PM -0800, David Cohen wrote:
> Hi,
>
> These patches are proposal to extend the lack of #ifdef checks on PM callback
> to its implementation too.
>
> Currently SET_*_PM_OPS() macros make #ifdefs checks not necessary when setting
> the callba
On Tue, Dec 17, 2013 at 03:31:40PM -0800, David Cohen wrote:
> On Thu, Dec 12, 2013 at 03:38:38PM -0600, Felipe Balbi wrote:
> > hi all,
> >
> > these patches add pm_runtime support for all glue layers.
> >
> > I plan to add pm_runtime support for dwc3 after thes
notice you were removing #ifdef's around pm
callback functions. Instead of saying DWC3 will start to have warnings
when CONFIG_PM is not selected, I'd say your patch set is now a
dependence of my RFC :)
https://lkml.org/lkml/2013/12/13/4
Br, David Cohen
>
> Felipe Balbi (7):
>
ue->initialized)
Are you sure this is thread safe?
If you're sending this patch it means runtime_resume can be called
before omap2430_must_init(), but how about at the same time?
You defined 'initialized' as u8 type, then read/write operations won't
be atomic in ARM.
Br,
On Sun, Dec 15, 2013 at 06:51:12PM +0100, Pavel Machek wrote:
> On Thu 2013-12-12 21:18:23, David Cohen wrote:
> > This patch makes SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() more
> > smart.
> >
> > Despite those macros check for '#ifdef CONFIG_PM_SLEEP/R
On Fri, Dec 13, 2013 at 05:55:20PM -0500, Santosh Shilimkar wrote:
> On Friday 13 December 2013 12:23 AM, David Cohen wrote:
> > On Thu, Dec 12, 2013 at 07:25:55PM -0800, David Cohen wrote:
> >> On Thu, Dec 12, 2013 at 09:01:04PM -0500, Santosh Shilimkar wrote:
> >>>
On Fri, Dec 13, 2013 at 10:00:28AM -0800, David Cohen wrote:
> Hi Sarah,
>
> On Fri, Dec 13, 2013 at 09:48:15AM -0800, Sarah Sharp wrote:
> > On Thu, Dec 12, 2013 at 11:05:04AM -0500, Alan Stern wrote:
> > > On Wed, 11 Dec 2013, Julius Werner wrote:
> > >
>
Hi Sarah,
On Fri, Dec 13, 2013 at 09:48:15AM -0800, Sarah Sharp wrote:
> On Thu, Dec 12, 2013 at 11:05:04AM -0500, Alan Stern wrote:
> > On Wed, 11 Dec 2013, Julius Werner wrote:
> >
> > > >> ...although, the spec says that it does not wait for the port resets
> > > >> to complete. As far as I c
On Fri, Dec 13, 2013 at 09:19:34AM +0100, Ulf Hansson wrote:
> On 13 December 2013 06:18, David Cohen wrote:
> > From: Santosh Shilimkar
> >
> > Drivers using SET_*_PM_OPS() no longer need to #ifdef for CONFIG_PM_*
> > So, let's remove the unnecessary #ifdef
On Thu, Dec 12, 2013 at 07:25:55PM -0800, David Cohen wrote:
> On Thu, Dec 12, 2013 at 09:01:04PM -0500, Santosh Shilimkar wrote:
> > On Thursday 12 December 2013 08:51 PM, David Cohen wrote:
> > > On Thu, Dec 12, 2013 at 08:06:24PM -0500, Santosh Shilimkar wrote:
> > &g
stead of fixing the #ifdefs, we remove the need for it :)
Br, David Cohen
---
David Cohen (2):
pm: make PM macros more smart
usb/xhci: implement proper static inline stubs when !CONFIG_PM
Santosh Shilimkar (1):
usb/xhci-plat: remove unnecessary #ifdef checks for CONFIG_PM_SLEEP
drivers/usb
implementing them.
With this patch, drivers using SET_*_PM_OPS() macros don't need to #ifdef
the callbacks implementation as well.
Signed-off-by: David Cohen
---
include/linux/pm.h | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/linux/pm.h b/in
: David Cohen
---
drivers/usb/host/xhci.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 941d5f59e4dc..6a5e7a98de7e 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1771,8 +1771,10 @@ int
From: Santosh Shilimkar
Drivers using SET_*_PM_OPS() no longer need to #ifdef for CONFIG_PM_*
So, let's remove the unnecessary #ifdef's.
Signed-off-by: Santosh Shilimkar
Signed-off-by: David Cohen
---
drivers/usb/host/xhci-plat.c | 7 +--
1 file changed, 1 insertion(+), 6
On Thu, Dec 12, 2013 at 10:17:19PM -0600, Felipe Balbi wrote:
> On Thu, Dec 12, 2013 at 05:56:05PM -0800, David Cohen wrote:
> > On Thu, Dec 12, 2013 at 03:38:41PM -0600, Felipe Balbi wrote:
> > > teach the PCI glue about pm_runtime so that
> > > it's easier to teac
On Thu, Dec 12, 2013 at 09:01:04PM -0500, Santosh Shilimkar wrote:
> On Thursday 12 December 2013 08:51 PM, David Cohen wrote:
> > On Thu, Dec 12, 2013 at 08:06:24PM -0500, Santosh Shilimkar wrote:
> >> Otherwise you get below build warnings
> >>
> >> drivers/
On Thu, Dec 12, 2013 at 03:38:41PM -0600, Felipe Balbi wrote:
> teach the PCI glue about pm_runtime so that
> it's easier to teach dwc3 core about it
> later.
>
> No functional changes otherwise.
>
> Signed-off-by: Felipe Balbi
I was able to test this one with Intel M
truct usb_hcd *hcd = dev_get_drvdata(dev);
> @@ -220,7 +220,7 @@ static const struct dev_pm_ops xhci_plat_pm_ops = {
> #define DEV_PM_OPS (&xhci_plat_pm_ops)
> #else
> #define DEV_PM_OPS NULL
> -#endif /* CONFIG_PM */
> +#endif /* CONFIG_PM_SLEEP */
Ditto.
Br, David Cohen
>
On Thu, Dec 12, 2013 at 02:20:59AM +0200, Grazvydas Ignotas wrote:
> This is a hard to reproduce problem which leads to non-functional
> USB-OTG port in 0.1%-1% of all boots. Tracked it down to commit
> e25bec160158abe86c "omap2+: save and restore OTG_INTERFSEL",
> which introduces save/restore of
/**
+ * usb_ep_align_maybe - returns @len aligned to ep's maxpacketsize if
gadget
+ *requires quirk_ep_out_aligned_size, otherwise reguens len.
>>>
>>> “returns”
>>
>> I've got no idea how returns became reguens :)
>> But maybe Felipe can fix it when applying?
>
> Sur
On 12/10/2013 07:01 AM, Michal Nazarewicz wrote:
> On Tue, Dec 10 2013, David Cohen wrote:
>> I've got no idea how returns became reguens :)
>
> The keys are like right next to each other <http://bash.org/?5300>. ;)
I'll remember this excuse if I need some day :)
On 12/09/2013 06:34 PM, Michal Nazarewicz wrote:
> dOn Tue, Dec 10 2013, David Cohen wrote:
>> Due to USB controllers may have different restrictions, usb gadget layer
>> needs to provide a generic way to inform gadget functions to complain
>> with non-standard requirements.
From: Michal Nazarewicz
When endpoint changes (due to it being disabled or alt setting changed),
mimic the action as if the change happened after the request has been
queued, instead of retrying with the new endpoint.
Signed-off-by: Michal Nazarewicz
Cc: David Cohen
---
drivers/usb/gadget
requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.
Signed-off-by: David Cohen
Cc: Alan Stern
Cc: Michal Nazarewicz
---
include/linux/usb/gadget.h | 20
1 file changed, 20 insertions(+)
diff --git a/include/lin
g compilation warning:
$ drivers/usb/gadget/f_fs.c: In function 'ffs_epfile_io':
$ drivers/usb/gadget/f_fs.c:857:124: warning: comparison of distinct
pointer types lacks a cast [enabled by default]
---
David Cohen (3):
usb: gadget: move bitflags to the end of usb_gadget st
This patch moves all bitflags to the end of usb_gadget struct in order
to improve readability.
Signed-off-by: David Cohen
Acked-by: Michal Nazarewicz
---
include/linux/usb/gadget.h | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/linux/usb
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch sets necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index
From: Michal Nazarewicz
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad epout buffer to match above condition if quirk is found.
Signed-off-by: Michal Nazarewicz
Signed-off-by: David Cohen
On 12/06/2013 12:13 PM, Felipe Balbi wrote:
> On Tue, Nov 12, 2013 at 01:54:28PM +0100, Michal Nazarewicz wrote:
>> On Tue, Nov 12 2013, David Cohen wrote:
>>> On 11/11/2013 03:55 PM, Michal Nazarewicz wrote:
>>>> Come to think of it, perhaps even better helper wou
r directions.
Probably you want the v5 I sent (disregarding the v5.1 4/5 amend):
http://marc.info/?l=linux-usb&m=138420082526804&w=2
Br, David Cohen
signature.asc
Description: OpenPGP digital signature
On 11/25/2013 01:06 PM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Nov 12, 2013 at 01:04:46PM -0800, David Cohen wrote:
>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>> index 5452c0fce360..7c2d36f6ad4b 100644
>> --- a/drivers/usb/dwc3/gadget.c
>>
On 11/13/2013 07:52 AM, Alan Stern wrote:
On Tue, 12 Nov 2013, Paul Zimmerman wrote:
@@ -824,7 +832,7 @@ static ssize_t ffs_epfile_io(struct file *file,
req->context = &done;
req->complete = ffs_epfile_io_complete;
req->buf = data;
-
Hi Paul,
On 11/12/2013 03:09 PM, Paul Zimmerman wrote:
From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org]
On Behalf Of Alan Stern
Sent: Tuesday, November 12, 2013 7:51 AM
On Mon, 11 Nov 2013, David Cohen wrote:
Hi Alan, Michal,
On 11/11/2013 01:09 PM, Michal
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch implements necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/core.h | 6 ++
drivers/usb/dwc3/gadget.c | 23 +++
2 files changed, 29 insertions(+)
diff --git a
On 11/12/2013 01:04 PM, David Cohen wrote:
Hi,
These patches are a proposal to add gadget quirks in an immediate objective to
adapt f_fs when using DWC3 controller. But the quirk solution is generic and
can be used by other controllers to adapt gadget functions to their
non-standard
From: Michal Nazarewicz
When endpoint changes (due to it being disabled or alt setting changed),
mimic the action as if the change happened after the request has been
queued, instead of retrying with the new endpoint.
Signed-off-by: Michal Nazarewicz
Cc: David Cohen
---
drivers/usb/gadget
From: Michal Nazarewicz
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad epout buffer to match above condition if quirk is found.
Signed-off-by: Michal Nazarewicz
Acked-by: David Cohen
This patch moves all bitflags to the end of usb_gadget struct in order
to improve readability.
Signed-off-by: David Cohen
Acked-by: Michal Nazarewicz
---
include/linux/usb/gadget.h | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/linux/usb
requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.
Signed-off-by: David Cohen
Acked-by: Alan Stern
Acked-by: Michal Nazarewicz
---
include/linux/usb/gadget.h | 16
1 file changed, 16 insertions(+)
diff --git a/in
rom Michal Nazarewicz to address comments from Alan Stern
and mine.
- Modified patch 5/5 to apply request->length's pad internally to DWC3.
---
David Cohen (3):
usb: gadget: move bitflags to the end of usb_gadget struct
usb: gadget: add quirk_ep_out_aligned_size field to struct usb_
On 11/12/2013 04:59 AM, Michal Nazarewicz wrote:
> On Tue, Nov 12 2013, David Cohen wrote:
>> You need to update req->length otherwise it's going to crash DWC3.
>> I'd rather to keep your previous version.
>
> That's unfortunate. Do you want me to resend
IIUC, req->length should still be set to len, not to data_len.
>>
>> I misunderstood the first time I read it:
>> In order to avoid DWC3 to stall, we need to update req->length (this is
>> the most important fix). kmalloc() is updated too to prevent USB
>> controller to overflow buffer boundar
Nazarewicz
---
drivers/usb/gadget/f_fs.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
On Tue, Nov 12 2013, David Cohen wrote:
One curiosity here. This patch prints the following warning:
In file included from (...)/drivers/usb/gadget/g_ffs.c:55:0:
(...)/drivers/usb/gadget
On 11/11/2013 03:55 PM, Michal Nazarewicz wrote:
On Mon, Nov 11 2013, David Cohen wrote:
Due to USB controllers may have different restrictions, usb gadget layer
needs to provide a generic way to inform gadget functions to complain
with non-standard requirements.
This patch adds
On 11/11/2013 12:16 PM, David Cohen wrote:
From: Michal Nazarewicz
When endpoint changes (due to it being disabled or alt setting changed),
mimic the action as if the change happened after the request has been
queued, instead of retrying with the new endpoint.
Signed-off-by: Michal Nazarewicz
>ep, len) : len;
+
data = kmalloc(len, GFP_KERNEL);
On Mon, Nov 11 2013, David Cohen wrote:
Shouldn't this kmalloc() allocate 'data_len' bytes, instead of 'len'?
Yes, of coures.
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index e496b72..fd7
Hi Michal,
On 11/10/2013 08:50 AM, Michal Nazarewicz wrote:
From: Michal Nazarewicz
When endpoint changes (due to it being disabled or alt setting changed),
mimic the action as if the change happened after the request has been
queued, instead of retrying with the new endpoint.
Signed-off-by:
kes more sense then my understanding
of the quirk.
The main reason of this quirk it to prevent DWC3 to stall or to
overflow buffer after usb_ep_queue() above. Since req->length has to be
updated, I disagree with Alan in this case and give my ack to this
Michal's approach.
Br, David Cohen
rom Michal Nazarewicz to address comments from Alan Stern
on f_fs driver.
---
David Cohen (3):
usb: gadget: move bitflags to the end of usb_gadget struct
usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget
usb: dwc3: set gadget's quirk ep_out_align_size
Michal Nazare
requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.
Signed-off-by: David Cohen
Acked-by: Alan Stern
---
Michal,
I added prefix 'usb: f_fs: ' to patch's subject. I did not add 'usb: gadget:
f_fs' due to it
From: Michal Nazarewicz
When endpoint changes (due to it being disabled or alt setting changed),
mimic the action as if the change happened after the request has been
queued, instead of retrying with the new endpoint.
Signed-off-by: Michal Nazarewicz
Cc: David Cohen
---
drivers/usb/gadget
From: Michal Nazarewicz
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad epout buffer to match above condition if quirk is found.
Signed-off-by: Michal Nazarewicz
Acked-by: David Cohen
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch sets necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index
This patch moves all bitflags to the end of usb_gadget struct in order
to improve readability.
Signed-off-by: David Cohen
---
include/linux/usb/gadget.h | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/linux/usb/gadget.h b/include/linux/usb
ked
Since you're just moving that line here, you may want (or not) to clean
this up in a new patch for 3.13.
Br, David Cohen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
>ep, len) : len;
+
data = kmalloc(len, GFP_KERNEL);
On Mon, Nov 11 2013, David Cohen wrote:
Shouldn't this kmalloc() allocate 'data_len' bytes, instead of 'len'?
Yes, of coures.
Thanks. It looks fine. I'll test these patches now.
But the whole series becam
Hi Michal,
On 11/10/2013 08:50 AM, Michal Nazarewicz wrote:
> From: Michal Nazarewicz
>
> Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
> to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
> to pad epout buffer to match above condition if quirk i
mine on top of yours.
Br, David Cohen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.
Signed-off-by: David Cohen
---
Changes from v4 to v4.1:
- Simplified usb_ep_align_maxpacketsize() macro as per Alen Stern's request
include/linux/usb/gadget.h | 16
On 11/05/2013 10:13 AM, David Cohen wrote:
On 11/05/2013 07:41 AM, Alan Stern wrote:
On Tue, 5 Nov 2013, David Cohen wrote:
+static inline size_t usb_ep_align_maxpacketsize(struct usb_ep *ep, size_t len)
+{
+ int aligned;
+
+ if (ep->desc->bmAttributes & USB_ENDPOIN
On 11/05/2013 07:41 AM, Alan Stern wrote:
> On Tue, 5 Nov 2013, David Cohen wrote:
>
>>>> +static inline size_t usb_ep_align_maxpacketsize(struct usb_ep *ep, size_t
>>>> len)
>>>> +{
>>>> + int aligned;
>>>
Hi Alan,
On 11/05/2013 07:38 AM, Alan Stern wrote:
> On Tue, 5 Nov 2013, David Cohen wrote:
>
>>>> + /*
>>>> + * Controller requires buffer size to be aligned to
>>>> + * maxpacketsize of an out endpoint.
>
On 11/05/2013 06:50 AM, Alan Stern wrote:
> On Mon, 4 Nov 2013, David Cohen wrote:
>
>> Due to USB controllers may have different restrictions, usb gadget layer
>> needs to provide a generic way to inform gadget functions to complain
>> with non-standard requirement
On 11/05/2013 06:50 AM, Alan Stern wrote:
> On Mon, 4 Nov 2013, David Cohen wrote:
>
>> Due to USB controllers may have different restrictions, usb gadget layer
>> needs to provide a generic way to inform gadget functions to complain
>> with non-standard requirement
On 11/05/2013 06:52 AM, Alan Stern wrote:
> On Mon, 4 Nov 2013, David Cohen wrote:
>
>> Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
>> to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
>> to pad epout buffer to match abo
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch sets necessary quirk for it.
Signed-off-by: David Cohen
---
Changes from v4 to v4.1:
- just updated patch's subject. No actual code changed.
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 6 inser
Android's adbd service to work on Intel
Merrifield with f_fs instead of out-of-tree android gadget.
Changes from v3 to v4:
- replace u32 quirk flags by single unsigned:1 flag for ep out aligned size
quirk on usb_gadget
- add static inline helper to align ep out buf size
---
David Cohen (4):
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad epout buffer to match above condition if quirk is found.
Signed-off-by: David Cohen
---
drivers/usb/gadget/f_fs.c | 22
This patch moves all bitflags to the end of usb_gadget struct in order
to improve readability.
Signed-off-by: David Cohen
---
include/linux/usb/gadget.h | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/linux/usb/gadget.h b/include/linux/usb
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch adds necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index
requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.
Signed-off-by: David Cohen
---
include/linux/usb/gadget.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include/linux/usb/gadget.h b/include/linux/usb
Hi Alan,
Appreciate your comments. Please, see my reply.
On 10/30/2013 10:35 AM, Alan Stern wrote:
On Wed, 30 Oct 2013, David Cohen wrote:
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad
On 10/30/2013 10:35 AM, Felipe Balbi wrote:
> On Wed, Oct 30, 2013 at 10:06:18AM -0700, David Cohen wrote:
>> DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
>> This patch adds necessary quirk for it.
>>
>> Signed-off-by: David Cohen
>>
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires
to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs
to pad epout buffer to match above condition if quirk is found.
Signed-off-by: David Cohen
---
drivers/usb/gadget/f_fs.c | 17 +
1
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch adds necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 5452c0f
Android's adbd service to work on Intel
Merrifield with f_fs instead of out-of-tree android gadget.
---
David Cohen (3):
usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget
usb: ffs: check quirk to pad epout buf size when not aligned to
maxpacketsize
usb: dwc3: add
requires buffer size to be aligned to
MaxPacketSize.
Signed-off-by: David Cohen
---
include/linux/usb/gadget.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 942ef5e..9405d0f 100644
--- a/include/linux/usb/gadget.h
+++ b/in
On 10/29/2013 03:47 PM, Paul Zimmerman wrote:
From: David Cohen
Sent: Tuesday, October 29, 2013 2:53 PM
These patches are a proposal to add gadget quirks in an immediate objective to
adapt f_fs when using DWC3 controller. But the quirk solution is generic and
can be used by other controllers to
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 942ef5e..7014ad9 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -540,6 +540,11 @@ struct usb_gadget {
struct device dev;
unsignedout_epn
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch adds necessary quirk for it.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 5452c0f
101 - 200 of 227 matches
Mail list logo