Hi all,
this is another attempt to make sure the dma_mask pointer is always
initialized for platform devices. Not doing so lead to lots of
boilerplate code, and makes platform devices different from all our
major busses like PCI where we always set up a dma_mask. In the long
run this should also
We still treat devices without a DMA mask as defaulting to 32-bits for
both mask, but a few releases ago we've started warning about such
cases, as they require special cases to work around this sloppyness.
Add a dma_mask field to struct platform_object so that we can initialize
the dma_mask pointe
If the HCD provides a localmem pool we will never use the DMA pools, so
don't create them.
Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory")
Signed-off-by: Christoph Hellwig
---
drivers/usb/core/buffer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --gi
The USB buffer allocation code is the only place in the usb core (and in
fact the whole kernel) that uses is_device_dma_capable, while the URB
mapping code uses the uses_dma flag in struct usb_bus. Switch the buffer
allocation to use the uses_dma flag used by the rest of the USB code,
and create a
The usb core is the only major place in the kernel that checks for
a non-NULL device dma_mask to see if a device is DMA capable. This
is generally a bad idea, as all major busses always set up a DMA mask,
even if the device is not DMA capable - in fact bus layers like PCI
can't even know if a devi
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/dma-mapping.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index f7d1eea32c78..14702e2d6fa8 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapp
Now that we have an explicit HCD_DMA flag, there is not need to override
these methods.
Signed-off-by: Christoph Hellwig
---
drivers/usb/host/max3421-hcd.c | 17 -
1 file changed, 17 deletions(-)
diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c
index
Xhci re-enables a slot on transaction error in set_address using
xhci_disable_slot() + xhci_alloc_dev().
But in this case, xhci_alloc_dev() creates debugfs entries upon an
existing device without cleaning up old entries, thus memory leaks.
So this patch simply moves calling xhci_debugfs_free_dev(
Hi,
>
>On 21/07/2019 21:32, Pawel Laszczak wrote:
>> This patch introduce new Cadence USBSS DRD driver to Linux kernel.
>>
>> The Cadence USBSS DRD Controller is a highly configurable IP Core which
>> can be instantiated as Dual-Role Device (DRD), Peripheral Only and
>> Host Only (XHCI)configurati
syzbot has found a reproducer for the following crash on:
HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver
git tree: https://github.com/google/kasan.git usb-fuzzer
console output: https://syzkaller.appspot.com/x/log.txt?x=150426ba60
kernel config: https://syzkaller.ap
>
> Yes, driver frees not used buffers here.
> I think that it's the safest place for this purpose.
>
> >
> +dma_free_coherent(priv_dev->sysdev, buf-
> >size,
> + buf->buf,
> +
> -Original Message-
> From: Felipe Balbi [mailto:ba...@kernel.org]
> Sent: 2019年8月8日 13:07
> To: Yinbo Zhu ; Greg Kroah-Hartman
> ; linux-usb@vger.kernel.org; open list
>
> Cc: Yinbo Zhu ; Xiaobo Xie ; Jiafei
> Pan ; Ran Wang
> Subject: [EXT] Re: [PATCH v1] usb: dwc3: remove the call t
>
>>
>> Yes, driver frees not used buffers here.
>> I think that it's the safest place for this purpose.
>>
>> >
>> + dma_free_coherent(priv_dev->sysdev, buf-
>> >size,
>> + buf->buf,
>> +
Hi,
Pawel Laszczak writes:
> Hi,
>
>>
>>Pawel Laszczak writes:
> +static int cdns3_gadget_start(struct cdns3 *cdns)
> +{
> + struct cdns3_device *priv_dev;
> + u32 max_speed;
> + int ret;
> +
> + priv_dev = kzalloc(sizeof(*priv_dev), GFP_KERNEL);
> + if (!priv_
Hi,
Yinbo Zhu writes:
>> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index
>> > 98bce85c29d0..a133d8490322 100644
>> > --- a/drivers/usb/dwc3/core.c
>> > +++ b/drivers/usb/dwc3/core.c
>> > @@ -300,8 +300,7 @@ static void dwc3_frame_length_adjustment(struct
>> > dwc3 *dwc)
>
15 matches
Mail list logo