Hi Felipe,
On Thu, Dec 10, 2015 at 01:09:58PM -0600, Felipe Balbi wrote:
> instead of using:
>
> if (condition) {
> dev_WARN_ONCE(dev, true, "foo");
> return -EINVAL;
> }
>
> let's use:
>
> if (dev_WARN_ONCE(dev, condition, "foo"))
> r
If dwc3_gadget_init_endpoint() fails after allocate some of the eps, we
need to free their memory to avoid leak.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb
If dwc3_gadget_init_endpoint() fails after allocate some of the eps, we
need to free their memory to avoid leak.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3
Hi Mr. Balbi, :)
On 09/11/2013 05:38 PM, David Cohen wrote:
If dwc3_gadget_init_endpoint() fails after allocate some of the eps, we
need to free their memory to avoid leak.
Signed-off-by: David Cohen
---
drivers/usb/dwc3/gadget.c | 13 -
1 file changed, 8 insertions(+), 5
Add PCI id for Intel Merrifield
Signed-off-by: David Cohen
---
drivers/usb/dwc3/dwc3-pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 997ebe4..2e252aa 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3
Hi Greg,
On 09/26/2013 01:14 PM, Greg KH wrote:
On Thu, Sep 26, 2013 at 01:01:44PM -0700, David Cohen wrote:
Add PCI id for Intel Merrifield
Signed-off-by: David Cohen
---
drivers/usb/dwc3/dwc3-pci.c | 2 ++
1 file changed, 2 insertions(+)
Nice, Felipe, mind if I just pick this up now
From: David Cohen
Signed-off-by: David Cohen
---
drivers/usb/chipidea/ci_hdrc_pci.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c
b/drivers/usb/chipidea/ci_hdrc_pci.c
index 08a724b..d514332 100644
--- a/drivers/usb/chipidea/ci_hdrc_pci.c
+++ b
From: David Cohen
In order to fill a struct with zeroes just the first element needs to
be set to 0, the rest can me omitted. This looks cleaner when reading
the code.
This patch does such clean up change on last item of pci id list.
Signed-off-by: David Cohen
---
drivers/usb/chipidea
On 10/01/2013 02:29 PM, David Cohen wrote:
From: David Cohen
I gotta fix my e-mail to use @linux.intel.com.
Please, see my v2 patches.
BR, David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majo
Signed-off-by: David Cohen
---
drivers/usb/chipidea/ci_hdrc_pci.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c
b/drivers/usb/chipidea/ci_hdrc_pci.c
index 08a724b..d514332 100644
--- a/drivers/usb/chipidea/ci_hdrc_pci.c
+++ b/drivers/usb/chipidea
In order to fill a struct with zeroes just the first element needs to
be set to 0, the rest can me omitted. This looks cleaner when reading
the code.
This patch does such clean up change on last item of pci id list.
Signed-off-by: David Cohen
---
drivers/usb/chipidea/ci_hdrc_pci.c | 2 +-
1
Hi Greg,
On 10/02/2013 10:21 PM, Greg KH wrote:
On Tue, Oct 01, 2013 at 02:32:58PM -0700, David Cohen wrote:
Signed-off-by: David Cohen
---
drivers/usb/chipidea/ci_hdrc_pci.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c
b/drivers/usb/chipidea
aration of ‘USB_ETHERNET_MODULE_PARAMETERS’ [-Wimplicit-int]
drivers/usb/gadget/g_ffs.c:81:1: warning: function declaration isn’t a
prototype [-Wstrict-prototypes]
This patch adds the missing header.
Signed-off-by: David Cohen
---
drivers/usb/gadget/g_ffs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/
On 10/04/2013 02:51 PM, Greg KH wrote:
On Fri, Oct 04, 2013 at 02:48:46PM -0700, David Cohen wrote:
Due to lack of "u_ether.h" header file, g_ffs.c compiles with following
warning:
It does? In what tree/branch/release is this happening?
This is intended for Linus' 3.12-rc3.
On 10/04/2013 03:03 PM, David Cohen wrote:
On 10/04/2013 02:51 PM, Greg KH wrote:
On Fri, Oct 04, 2013 at 02:48:46PM -0700, David Cohen wrote:
Due to lack of "u_ether.h" header file, g_ffs.c compiles with following
warning:
It does? In what tree/branch/release is this happening?
warning by making USB_ETHERNET_MODULE_PARAMETERS to
be used iff u_ether.h is included, otherwise it is not needed.
Signed-off-by: David Cohen
---
drivers/usb/gadget/g_ffs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
index 5327c8
Hi Greg,
On 10/04/2013 03:30 PM, David Cohen wrote:
If USB_FUNCTIONFS is selected without USB_FUNCTIONFS_ETH and
USB_FUNCTIONFS_RNIS, u_ether.h won't be included and then
USB_ETHERNET_MODULE_PARAMAETERS macro won't be available causing the
following warning compilation:
drivers/
Hi Sergei,
(replying from my personal e-mail)
On Sun, Oct 6, 2013 at 3:02 PM, Sergei Shtylyov
wrote:
>
> Hello.
>
> On 05-10-2013 0:30, David Cohen wrote:
>
>> If USB_FUNCTIONFS is selected without USB_FUNCTIONFS_ETH and
>> USB_FUNCTIONFS_RNIS, u_ether.h
gadget_is_dwc3() is necessary to check whether we are running on
Desineware USB3 DRD controller.
This macro was previously removed by commit
ed9cbda63d45638b69ce62412e3a3c7b00644835 due to it wasn't needed
anymore. We're adding it again as things have changed.
Signed-off-by: D
DWC3 requires buffer size to be aligned to maxpacketsize of an out
endpoint. ffs_epfile_io() needs to pad epout buffer to match above
condition if DWC3 controller is used.
This patch solves an specific situation but a more generic solution
should be found.
Signed-off-by: David Cohen
ut-of-tree android gadget. If this same situation is happening in
other still untested places, a more generic solution may be required.
---
David Cohen (2):
usb: gadget: re-introduce gadget_is_dwc3()
usb: ffs/dwc3: pad epout buffer size when not aligned to maxpacketsize
drivers/usb/gadget/f
qirks) &&
> !IS_ALIGNED(len, ep->ep->desc->wMaxPacketSize))
> len = align_length(orig_len, wMaxPacketSize);
That makes sense. I'll send a new version.
Thanks,
David Cohen
--
To unsubscribe from this list: send the line "uns
IGNED_SIZE necessary to inform when
controller's epout requires buffer size to be aligned to MaxPacketSize.
Signed-off-by: David Cohen
---
include/linux/usb/gadget.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 942ef5e..7014a
Use USB_GADGET_QUIRK_EP_OUT_ALIGNED_SIZE quirk to check 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
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 quirks field to struct usb_gadget
usb: ffs: check quirk to pad epout buf size when not aligned to
maxpacketsize
usb: dwc3: add
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
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
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
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
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
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
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
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
>>
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
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
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
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
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
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):
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
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
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
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 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;
>>>
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
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
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
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
>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
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
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 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
Acked-by: 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
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
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:
>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
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
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
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
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
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
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_
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
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
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
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
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
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
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 Sergio,
On 04/04/2013 09:57 AM, Sergio Aguirre wrote:
It is possible that we fail on xhci_mem_init, just before doing
the INIT_LIST_HEAD, and calling xhci_mem_cleanup.
Problem is that, the list_for_each_entry_safe macro, dereferences next
assuming is not NULL (which is the case for a uniniti
'next'
pointer, causing a kernel panic if this is not yet initialized.
Let's protect from that by moving inits to the beginning.
Signed-off-by: Sergio Aguirre
---
Acked-by: David Cohen
drivers/usb/host/xhci-mem.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-
gt;cmd_ring->first_seg->dma);
@@ -2444,8 +2446,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
if (xhci_setup_port_arrays(xhci, flags))
goto fail;
- INIT_LIST_HEAD(&xhci->lpm_failed_devs);
-
Please don't remove newlines in bug fix patches. T
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
>>
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 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
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
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
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
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
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
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.
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 :)
/**
+ * 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 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
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 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
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 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
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
: 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
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
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
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
1 - 100 of 227 matches
Mail list logo