Hello,
I guess value of priv->urb might be NULL.
But I'd like to confirm whether the NULL pointer is sdev or udev.
(priv must not be NULL).
In the code
http://elixir.free-electrons.com/linux/latest/source/drivers/usb/usbip/stub_main.c#L250,
could you find message L.255 or L.259 in your message
Hi,
On Wed, May 10, 2017 at 9:31 AM, Johan Hovold wrote:
> On Mon, May 08, 2017 at 10:22:08PM +0200, Stefan Wahren wrote:
>>
>> > Stefan Wahren hat am 25. April 2017 um 20:11
>> > geschrieben:
>> >
>> >
>> > > Stefan Wahren hat
On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote:
> On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote:
> > We have one register for each EP to set the maximum packet size for both
> > TX and RX.
> > If for example an RX programming would happen before the previous TX
> > transfer
On Fri, May 05, 2017 at 07:52:33AM -0500, Alexandre Bailon wrote:
> If dma_request_slave_channel() failed to return a channel,
> then the driver will print an error and request to defer probe,
> regardless of the cause of the failure.
> Only defer if the DMA is not ready yet and print an error to
Hi Felipe,
On 4/21/2017 10:26 AM, John Youn wrote:
> On 04/18/2017 05:47 AM, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Thinh Nguyen writes:
(Thinh, for whatever I didn't receive your email via the list, replying
to myself)
>>>
>>> Could it be because of the
Hi,
On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote:
> We have one register for each EP to set the maximum packet size for both
> TX and RX.
> If for example an RX programming would happen before the previous TX
> transfer finishes we would reset the TX packet side.
>
> To fix
On Wed, 10 May 2017, Johan Hovold wrote:
> Add missing sanity check on the non-SuperSpeed hub-descriptor length in
> order to avoid parsing and leaking two bytes of uninitialised slab data
> through sysfs removable-attributes (or a compound-device debug
> statement).
>
> Note that we only make
On Wed, 10 May 2017, Johan Hovold wrote:
> Flag the first and only port as removable while also leaving the
> remaining bits (including the reserved bit zero) unset in accordance
> with the specifications:
>
> "Within a byte, if no port exists for a given location, the bit
> field
* Peter Ujfalusi [170510 01:45]:
> The device would not boot to prompt most of the time before patch 5 (packet
> size
> reset fix).
> With that patch in, the device would boot up fine most of the cases, but will
> fail pretty fast with my stress test [1].
> After the first
On Mon, May 08, 2017 at 10:22:08PM +0200, Stefan Wahren wrote:
>
> > Stefan Wahren hat am 25. April 2017 um 20:11
> > geschrieben:
> >
> >
> > > Stefan Wahren hat am 22. April 2017 um 22:50
> > > geschrieben:
> > >
> > >
> > > Hi,
> > >
> >
* Peter Ujfalusi [170510 01:46]:
> The external request lines are used by tusb6010 on OMAP24xx platforms.
> Update the map so the driver can use dmaengine API to request the DMA
> channel. At the same time add temporary map containing only the external
> DMA request numbers
* Peter Ujfalusi [170510 01:45]:
> We have one register for each EP to set the maximum packet size for both
> TX and RX.
> If for example an RX programming would happen before the previous TX
> transfer finishes we would reset the TX packet side.
>
> To fix this issue,
* Peter Ujfalusi [170510 01:45]:
> When the port_window support was verified it was done on setup where only
> the MEM_TO_DEV direction was enabled. This got un-noticed and thus only
> this direction worked.
>
> Now that I have managed to get a setup to verify both
Fix up the root-hub descriptor to accommodate the variable-length
DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as
removable (and leaving the reserved bit zero unset).
Also add a build-time constraint on VHCI_HC_PORTS which must never be
greater than USB_MAXCHILDREN (but
This series fixes some issues with how we handle hub descriptors,
including a couple of small slab info leaks that could be triggered by a
malicious hub.
Note that the usbip fix has been compile tested only.
Johan
Changes in v2
- mark the single dummy_hcd port as removable (patch 1)
- add
Add define for the maximum number of ports on a SuperSpeed hub as per
USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub
descriptor.
This specifically avoids benign attempts to update the DeviceRemovable
mask for non-existing ports (should we get that far).
Fixes: dbe79bbe9dcb
A SuperSpeed hub descriptor does not have any variable-length fields so
bail out when reading a short descriptor.
This avoids parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes.
Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes")
Cc: stable
Add missing sanity check on the non-SuperSpeed hub-descriptor length in
order to avoid parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes (or a compound-device debug
statement).
Note that we only make sure that the DeviceRemovable field is always
present
Flag the first and only port as removable while also leaving the
remaining bits (including the reserved bit zero) unset in accordance
with the specifications:
"Within a byte, if no port exists for a given location, the bit
field representing the port characteristics shall be 0."
Use the new define for the maximum number of SuperSpeed ports instead of
a constant when allocating xHCI root hubs.
Signed-off-by: Johan Hovold
---
drivers/usb/host/xhci-mem.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
On Wed, May 10, 2017 at 11:11:37AM -0400, Alan Stern wrote:
> On Wed, 10 May 2017, Johan Hovold wrote:
>
> > On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote:
> > > On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote:
> > > > On Wed, 10 May 2017, Johan Hovold wrote:
> >
> > >
On Wed, 10 May 2017, Johan Hovold wrote:
> On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote:
> > On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote:
> > > On Wed, 10 May 2017, Johan Hovold wrote:
>
> > > > /* USB 2.0 spec Section 11.24.4.5 */
> > > > -static int
On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote:
> On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote:
> > On Wed, 10 May 2017, Johan Hovold wrote:
> > > /* USB 2.0 spec Section 11.24.4.5 */
> > > -static int get_hub_descriptor(struct usb_device *hdev, void *data)
> > >
On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote:
> On Wed, 10 May 2017, Johan Hovold wrote:
>
> > Add missing sanity check on the non-SuperSpeed hub-descriptor length in
> > order to avoid parsing and leaking two bytes of uninitialised slab data
> > through sysfs removable-attributes
On Wed, 10 May 2017, Johan Hovold wrote:
> On Wed, May 10, 2017 at 10:04:32AM -0400, Alan Stern wrote:
> > On Wed, 10 May 2017, Johan Hovold wrote:
> >
> > > A SuperSpeed hub descriptor does not have any variable-length fields so
> > > bail out when reading a short descriptor.
> >
> > You mean:
On Wed, May 10, 2017 at 10:00:35AM -0400, Alan Stern wrote:
> On Wed, 10 May 2017, Johan Hovold wrote:
>
> > Only flag the first and only port as non-removable in accordance with
> > the specifications, while also leaving the reserved bit zero unset.
> >
> > "Within a byte, if no port exists
On Wed, 10 May 2017, Johan Hovold wrote:
> Add define for the maximum number of ports on a SuperSpeed hub as per
> USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub
> descriptor.
>
> This specifically avoids benign attempts to update the DeviceRemovable
> mask for non-existing
On Wed, May 10, 2017 at 10:04:32AM -0400, Alan Stern wrote:
> On Wed, 10 May 2017, Johan Hovold wrote:
>
> > A SuperSpeed hub descriptor does not have any variable-length fields so
> > bail out when reading a short descriptor.
>
> You mean: bail out when reading a descriptor that is not exactly
On Wed, 10 May 2017, Johan Hovold wrote:
> Add missing sanity check on the non-SuperSpeed hub-descriptor length in
> order to avoid parsing and leaking two bytes of uninitialised slab data
> through sysfs removable-attributes (or a compound-device debug
> statement).
>
> Note that we only make
On Wed, 10 May 2017, Johan Hovold wrote:
> A SuperSpeed hub descriptor does not have any variable-length fields so
> bail out when reading a short descriptor.
You mean: bail out when reading a descriptor that is not exactly the
right length. The existing code already bails out when it reads a
On Wed, 10 May 2017, Johan Hovold wrote:
> Only flag the first and only port as non-removable in accordance with
> the specifications, while also leaving the reserved bit zero unset.
>
> "Within a byte, if no port exists for a given location, the bit
> field representing the port
This patch adds a struct device member to UDC data structure and
makes changes to the arguments of dev_err and dev_dbg calls so that
the debug prints work for both pci and platform devices.
Signed-off-by: Raviteja Garimella
---
Resending PATCH v4 since one of the patches is missing
signature.
Changes in PATCH v4:
===
-- Rebased with Balbi's git repo testing/next branch.
-- Removed a patch that replaces pci_pool calls with dma_pool
since the change is already pushed by other submitter.
Resending
Change the argument from NULL to a struct device for the
dma_pool_create call during dma init.
Signed-off-by: Raviteja Garimella
---
drivers/usb/gadget/udc/snps_udc_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
This patch adds platform driver support for Synopsys UDC.
A new driver file (snps_udc_plat.c) is created for this purpose
where the platform driver registration is done based on OF
node.
Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2
and Cygnus) work with this driver.
New
The device node is used for UDCs integrated into Broadcom's
iProc family of SoCs'. The UDC is based on Synopsys Designware
Cores AHB Subsystem USB Device Controller IP.
Signed-off-by: Raviteja Garimella
---
Documentation/devicetree/bindings/usb/iproc-udc.txt |
On 09.05.2017 16:50, Maël Lavault wrote:
On Tue, 2017-05-09 at 11:34 +0300, Felipe Balbi wrote:
Hi,
Maël Lavault writes:
Le 28 avr. 2017 15:57, "Maël Lavault"
Hi Nuobo,
I am currently trying to resolve an issue regarding a similar problem
to the one that your patch is solving:
usbip: safe completion against usb_kill_urb()
In some cases, when we still have urbs pending to complete and meanwhile
the stack calls stub_shutdown_connection, we run into
Add missing sanity check on the non-SuperSpeed hub-descriptor length in
order to avoid parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes (or a compound-device debug
statement).
Note that we only make sure that the DeviceRemovable field is always
present
Add define for the maximum number of ports on a SuperSpeed hub as per
USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub
descriptor.
This specifically avoids benign attempts to update the DeviceRemovable
mask for non-existing ports (should we get that far).
Fixes: dbe79bbe9dcb
Change the argument from NULL to a struct device for the
dma_pool_create call during dma init.
Signed-off-by: Raviteja Garimella
---
drivers/usb/gadget/udc/snps_udc_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
Fix up the root-hub descriptor to accommodate the variable-length
DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as
removable (and leaving the reserved bit zero unset).
Also add a build-time constraint on VHCI_HC_PORTS which must never be
greater than USB_MAXCHILDREN (but
A SuperSpeed hub descriptor does not have any variable-length fields so
bail out when reading a short descriptor.
This avoids parsing and leaking two bytes of uninitialised slab data
through sysfs removable-attributes.
Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes")
Cc: stable
Use the new define for the maximum number of SuperSpeed ports instead of
a constant when allocating xHCI root hubs.
Signed-off-by: Johan Hovold
---
drivers/usb/host/xhci-mem.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
Only flag the first and only port as non-removable in accordance with
the specifications, while also leaving the reserved bit zero unset.
"Within a byte, if no port exists for a given location, the bit
field representing the port characteristics shall be 0."
Also add a comment
This series fixes some issues with how we handle hub descriptors,
including a couple of small slab info leaks that could be triggered by a
malicious hub.
Note that the usbip fix has been compile tested only.
Johan
Johan Hovold (6):
USB: gadget: dummy_hcd: fix hub-descriptor removable fields
This patch adds platform driver support for Synopsys UDC.
A new driver file (snps_udc_plat.c) is created for this purpose
where the platform driver registration is done based on OF
node.
Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2
and Cygnus) work with this driver.
New
The device node is used for UDCs integrated into Broadcom's
iProc family of SoCs'. The UDC is based on Synopsys Designware
Cores AHB Subsystem USB Device Controller IP.
Signed-off-by: Raviteja Garimella
---
Documentation/devicetree/bindings/usb/iproc-udc.txt |
This patch adds a struct device member to UDC data structure and
makes changes to the arguments of dev_err and dev_dbg calls so that
the debug prints work for both pci and platform devices.
Signed-off-by: Raviteja Garimella
---
Changes in PATCH v4:
===
-- Rebased with Balbi's git repo testing/next branch.
-- Removed a patch that replaces pci_pool calls with dma_pool
since the change is already pushed by other submitter.
Resending PATCH v3 after rebasing with testing/next branch in
Felipe Balbi's git
The previously reserved 12th bit in GHWCFG4 now indicates that the
controller supports the Dynamic Power Reduction (Active Clock Gating)
during no traffic scenarios such as L0, idle, resume and suspend
states.
Signed-off-by: Razmik Karapetyan
---
drivers/usb/dwc2/hw.h | 1 +
Backup PCGCCTL1 register when entering hibernation mode and
restore it after exiting from hibernation, to keep active ACG
feature.
Signed-off-by: Razmik Karapetyan
---
drivers/usb/dwc2/core.c | 2 ++
drivers/usb/dwc2/core.h | 1 +
2 files changed, 3 insertions(+)
diff
PCGCCTL1 (Power and Clock Control) register will be used
for controlling the core`s active clock gating feature.
Signed-off-by: Razmik Karapetyan
---
drivers/usb/dwc2/hw.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
Added function for supporting Active Clock Gating functionality.
This function checks GHWCFG4 register and if ACG supported,
it sets GATEEN bit in PCGCCTL1 register and enables ACG.
According to ACG functional specification, enabling of ACG feature
in host mode done in host initialization, before
In short this feature specifies, that controller supports Dynamic Power
Reduction
during no traffic scenarios.
Changes in v3:
-added commit for backup and restore of ACG support register
Razmik Karapetyan (4):
usb: dwc2: Define PCGCCTL1 register in hw.h
usb: dwc2: Define Active Clock
I took DTS parts for v4.12-next.
Sorry for the late response.
Matthias
On 06/04/17 12:28, Kishon Vijay Abraham I wrote:
On Friday 31 March 2017 01:05 PM, Chunfeng Yun wrote:
The default value of RX detection stable time is 10us, and this
margin is too big for some critical cases which cause
Hi
I am currently seeing a error with the designware driver on
Intel/Altera ARM Cortex A9 Cyclone SOC V Hardware. The USB PHY is a
TUSB1210 without a hw reset line connected. The error only occurs on
plugging in of the device in host mode. Once the USB device is
enumerated i have not seen any
With the port_window support in DMAengine and the sDMA driver we can
convert the driver to DMAengine.
Signed-off-by: Peter Ujfalusi
---
drivers/usb/musb/tusb6010_omap.c | 201 ---
1 file changed, 80 insertions(+), 121 deletions(-)
diff
-20170510 with g_ncm module since with this
we can use the quirk to avoid skb_reserve and get properly aligned buffers for
DMA.
The n810 is using nfsroot.
The device would not boot to prompt most of the time before patch 5 (packet size
reset fix).
With that patch in, the device would boot up fine most
When using the g_ncm for networking this flag will make sure that the
buffer is alligned to 32bit so the DMA can be used to offload the data
movement.
Signed-off-by: Peter Ujfalusi
---
drivers/usb/musb/tusb6010.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
We have one register for each EP to set the maximum packet size for both
TX and RX.
If for example an RX programming would happen before the previous TX
transfer finishes we would reset the TX packet side.
To fix this issue, only modify the TX or RX part of the register.
Signed-off-by: Peter
For tusb6010 the DMA functionality only possible if the buffer is 32bit
aligned (SYNC access to FIFO) since with ASYNC access the TX/RX offset
registers will corrupt eventually.
The MUSB_G_NO_SKB_RESERVE will set the quirk_avoids_skb_reserve flag in
usb_gadget struct to provide correctly aligned
Handle the DMA TX in a similar way as we do for the RX: in the DMA
completion callback.
Since we are no longer using DMA completion interrupt for the TX we can as
wall keep these interrupts disabled, but keep the handler for debug
purposes.
Signed-off-by: Peter Ujfalusi
When the port_window support was verified it was done on setup where only
the MEM_TO_DEV direction was enabled. This got un-noticed and thus only
this direction worked.
Now that I have managed to get a setup to verify both direction it turned
out that the setup was incorrect:
omap_desc members
For the DMA we have ch (channel), dmareq and sync_dev parameters both
within the tusb_omap_dma_ch and tusb_omap_dma_ch struct.
By creating a common struct the code can be simplified when selecting
between the shared or multichannel DMA parameters.
Signed-off-by: Peter Ujfalusi
The external request lines are used by tusb6010 on OMAP24xx platforms.
Update the map so the driver can use dmaengine API to request the DMA
channel. At the same time add temporary map containing only the external
DMA request numbers for DT booted case on omap24xx since the tusb6010 stack
is not
Having one musb_ep_select() instead the two calls in if/else is the same
thing, but makes the code a bit simpler to follow.
Signed-off-by: Peter Ujfalusi
---
drivers/usb/musb/tusb6010_omap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
Instead of requesting the DMA channel in tusb_omap_dma_allocate() do it
when the controller is created and in runtime work from the DMA channel
pool.
This change is needed for the DMAengine conversion of the driver since the
tusb_omap_dma_allocate() is called in interrupt context which might lead
Hi,
Bin Liu writes:
>> Greg Kroah-Hartman writes:
>> >>> Greg Kroah-Hartman writes:
>> >> > On Tue, May 09, 2017 at 10:10:45AM +0300, Felipe Balbi wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> Felipe Balbi
Hi,
David Laight writes:
> From: Felipe Balbi
>> Sent: 09 May 2017 08:07
>> Instead, we can require caller to pass a buffer for the function to
>> use. This cleans things quite a bit.
> ...
>> -dwc3_gadget_event_string(const struct dwc3_event_devt *event)
>>
70 matches
Mail list logo