* Lu Baolu wrote:
> Hi Ingo,
>
> On 03/02/2017 02:40 PM, Ingo Molnar wrote:
> > * Lu Baolu wrote:
> >
> >> Hi Ingo,
> >>
> >> How about this version? Any further comments?
> > So I have re-read the review feedback I gave on Jan 19 and found at least
> > one
> > thing I pointed out that you d
On Mon, 2017-02-27 at 10:31 +0200, Jonathan Dieter wrote:
> The usbip userspace tools call sprintf()/snprintf() and don't check for
> the return value which can lead the paths to overflow, truncating the
> final file in the path.
>
> More urgently, GCC 7 now warns that these aren't checked with
>
On Wed, Mar 15, 2017 at 04:58:47PM +0100, Bjørn Mork wrote:
> Johan Hovold writes:
>
> > + if ((!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) &&
> > + (!int_in || *int_in) && (!int_out || *int_out)) {
> > + return true;
> > + }
> > +
> > + return false;
> > +
On Thu, Mar 02, 2017 at 12:51:13PM +0100, Johan Hovold wrote:
> This series refactors the endpoint sanity checks by allowing subdrivers
> to specify a minimum number of endpoints required per type and letting
> core verify this during probe.
>
> Note that the checks are minimum (i.e. we allow furt
On 15.03.2017 22:48, Nathan Shearer wrote:
Does earlier kernels work better? 4.10 has a change in USB 3 port
disabling
which is also called when usb core fails to address a device.
37be6676 usb: hub: Fix auto-remount of safely removed or ejected USB-3
devices
Older kernels would re-enable usb3
+Alan
On 15 March 2017 at 15:00, Diego Viola wrote:
> On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola wrote:
>> On Tue, Mar 14, 2017 at 2:20 PM, Diego Viola wrote:
>>> On Thu, Mar 9, 2017 at 2:15 PM, Diego Viola wrote:
On Thu, Mar 9, 2017 at 11:11 AM, Diego Viola wrote:
> On Wed, Mar 8,
From: Hayes Wang
> Sent: 16 March 2017 06:28
> Replace &tp->napi with napi and tp->netdev with netdev.
>
> Signed-off-by: Hayes Wang
> ---
> drivers/net/usb/r8152.c | 44 +++-
> 1 file changed, 27 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/ne
On 13 March 2017 at 13:40, Johan Hovold wrote:
> Make sure to check the number of endpoints to avoid dereferencing a
> NULL-pointer should a malicious device lack endpoints.
>
> Fixes: 53f3a9e26ed5 ("mmc: USB SD Host Controller (USHC) driver")
> Cc: stable # 2.6.37
> Cc: David Vrabel
> Signe
On Thu, 16 Mar 2017, Ulf Hansson wrote:
> +Alan
>
> On 15 March 2017 at 15:00, Diego Viola wrote:
> > On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola wrote:
> >> On Tue, Mar 14, 2017 at 2:20 PM, Diego Viola wrote:
> >>> On Thu, Mar 9, 2017 at 2:15 PM, Diego Viola wrote:
> On Thu, Mar 9, 201
On 02/27/2017 01:31 AM, Jonathan Dieter wrote:
> The usbip userspace tools call sprintf()/snprintf() and don't check for
> the return value which can lead the paths to overflow, truncating the
> final file in the path.
>
> More urgently, GCC 7 now warns that these aren't checked with
> -Wformat-ov
On 01/30/2017 12:25 PM, Shuah Khan wrote:
> Change goto labels to meaningful names from a series of errNs.
>
> Signed-off-by: Shuah Khan
> ---
>
> Rebased to usb-next
Hi Felipe,
Are you planning to get this in or is there something you are
waiting in for me to do?
thanks,
-- Shuah
>
> dri
On Thu, Mar 16, 2017 at 12:45 PM, Diego Viola wrote:
> On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern
> wrote:
>> On Thu, 16 Mar 2017, Ulf Hansson wrote:
>>
>>> +Alan
>>>
>>> On 15 March 2017 at 15:00, Diego Viola wrote:
>>> > On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola
>>> > wrote:
>>> >> On
On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern wrote:
> On Thu, 16 Mar 2017, Ulf Hansson wrote:
>
>> +Alan
>>
>> On 15 March 2017 at 15:00, Diego Viola wrote:
>> > On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola wrote:
>> >> On Tue, Mar 14, 2017 at 2:20 PM, Diego Viola
>> >> wrote:
>> >>> On Thu, M
On Thu, Mar 16, 2017 at 12:51 PM, Diego Viola wrote:
> On Thu, Mar 16, 2017 at 12:45 PM, Diego Viola wrote:
>> On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern
>> wrote:
>>> On Thu, 16 Mar 2017, Ulf Hansson wrote:
>>>
+Alan
On 15 March 2017 at 15:00, Diego Viola wrote:
> On Tue
This driver have treated the interrupt endpoint as optional despite it
always being present (according to the datasheet). Let's consider it
mandatory instead.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mos7720.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/driv
Use the calc_num_ports rather than probe callback to determine which
interface to bind to.
This allows us to remove some duplicate code.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/aircable.c | 36
1 file changed, 8 insertions(+), 28 deletions(-)
dif
Use the new endpoint-remap functionality to configure the ports for
treo devices instead of poking around in the port structures after the
ports have been setup.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 82 ++
1 file changed, 24 ins
Use the calc_num_ports callback to ignore unused endpoints.
The driver binds to any interface with at least one bulk-in and one
bulk-out endpoint, but some devices can have three or more endpoints of
which only either the first or second pair of endpoints is needed.
This avoids allocating resourc
Add a probe callback to the generic driver and print the
only-for-testing message there.
This is a first step in getting rid of the CONFIG_USB_SERIAL_GENERIC
ifdef from usb-serial core.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c| 12
drivers/usb/serial/usb-ser
Setup each port to use the first bulk-out endpoint in calc_num_ports so
that core allocates the corresponding port resources for us.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/mxuport.c | 103 +--
1 file changed, 12 insertions(+), 91 deletions(-)
USB-serial core assigns endpoints to ports based on the order of the
endpoint descriptors. This mostly works fine, but some drivers have had
to resort to hacks to override this default.
This series enables subdrivers to modify the default port-endport
mapping by passing the endpoints to the driver
Print a message and register two ports for interfaces for which we do
not know how many ports there are instead of binding, allocating
resources, but not register any ports.
This provides a hint that anyone adding a dynamic device id must also
provide a reference id (driver info) from which the po
Setup each port to use the first bulk-out endpoint in calc_num_ports so
that core allocates the corresponding port resources for us.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 62 -
1 file changed, 11 insertions(+), 51 deletions(-)
Implement the "horrible endpoint hack" for some legacy devices as a
quirk and clean up the code somewhat.
Note that the bulk-endpoint check can be removed as core will already
have verified this.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/pl2303.c | 84 +-
Add a calc_num_ports callback to the generic driver and verify that the
device has the required endpoints there instead of in core.
Note that the generic driver num_ports field was never used.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c| 18 --
drivers/usb/s
Allow subdrivers to modify the port-endpoint mapping by passing the
endpoint descriptors to calc_num_ports.
The callback can now also be used to verify that the required endpoints
exists and abort probing otherwise.
This will allow us to get rid of a few hacks in subdrivers that are
already modif
We can now abort probe early after an error in calc_num_ports by
returning an errno instead of attempting to continue probing but not
register any ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/
Add an explicit sanity check to make sure we have the expected
endpoints. This will provide a descriptive error message in case an
expected endpoint is missing when probing.
Note that the driver already gracefully fails to probe (albeit with a
less descriptive error message) if a bulk-in endpoint
Some pl2303 devices require the use of the interrupt endpoint of an
unrelated interface. This has so far been dealt with in usb-serial core,
but can now be moved to a driver calc_num_ports callback.
Note that we relax the endpoint requirements checked by core and instead
verify that we have an int
Use the calc_num_ports rather than attach callback to determine which
interface to bind to in order to avoid allocating port-resources for
interfaces that won't be bound.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/ipaq.c | 18 ++
1 file changed, 10 insertions(+), 8 deleti
Simplify the endpoint sanity check by letting core verify that the
required endpoints are present and moving the max-packet check to
calc_num_ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 55 +
1 file changed, 11 insertions(+), 4
Relax the generic driver bulk-endpoint requirement. The driver handles
devices without bulk-out endpoints just fine these days.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/generic.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/generic.c b/dr
Use the calc_num_ports rather than attach callback to verify that the
required endpoints are present when in download mode.
This avoids allocating port resources for interfaces that won't be bound.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 25 +++--
1 file
Clean up the endpoint sanity check by letting core verify the single
interrupt endpoint, and verifying the bulk endpoints in calc_num_ports
after having determined the number of ports.
Note that the static type num_ports field was neither correct or used
(since calc_num_ports never returns zero).
These devices use the second bulk-out endpoint for writing. Instead of
using the resources of the second port structure setup by core, use the
new endpoint-remap functionality to simply ignore the first bulk-out
endpoint. This specifically avoids allocating resources for the unused
endpoint.
Note
Use the new endpoint-remap functionality to configure the ports for
clie_5 devices.
Note that the same bulk-out endpoint is being used for both ports.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 57 +++---
1 file changed, 23 insertions(+)
Verify that the required interrupt endpoint is present at probe rather
than at open to avoid allocating resources for an unusable device.
Note that the endpoint is only required when in download mode.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 10 ++
1 file changed, 2
Drop the redundant calc_num_ports callback from the clie_5 type, for
which the callback always returns zero and hence falls back to the type
num_ports value (2).
Signed-off-by: Johan Hovold
---
drivers/usb/serial/visor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/visor
These devices always require at least one bulk-out endpoint so let core
verify that.
This avoids attempting to send bulk data to the default pipe when
downloading firmware in boot mode.
Note that further endpoints are still needed when not in boot mode.
Signed-off-by: Johan Hovold
---
drivers/
On Thu, Mar 16, 2017 at 1:02 PM, Diego Viola wrote:
> On Thu, Mar 16, 2017 at 12:51 PM, Diego Viola wrote:
>> On Thu, Mar 16, 2017 at 12:45 PM, Diego Viola wrote:
>>> On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern
>>> wrote:
On Thu, 16 Mar 2017, Ulf Hansson wrote:
> +Alan
>
>>>
Clean up the mcs7715 port setup by using the new endpoint-remap
functionality provided by core. Instead of poking around in internal
port-structure fields, simply swap the endpoint descriptors of the two
ports in calc_num_ports before the port structures are even allocated.
Note that we still need
Clean up calc_num_ports with respect to handling older chips that lack
config data.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/f81534.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index be106f4e
Now that the endpoint-port mapping has been properly set up during
probe, we can switch to using the more efficient generic write
implementation.
Note that this currently mean that chars_in_buffer now overcounts
slightly as we always write a full endpoint-sized packet.
Also add a copyright entry.
Drop the redundant read-urb check from open. The presence of a bulk-in
endpoint is now verified during probe and core has allocated the
corresponding resources.
Signed-off-by: Johan Hovold
---
drivers/usb/serial/io_ti.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/serial/
These devices always require at least one bulk-out endpoint so let core
verify that.
This avoids attempting to send bulk data to the default pipe when
downloading firmware in boot mode.
Note that further endpoints are still needed when not in boot mode.
Signed-off-by: Johan Hovold
---
drivers/
From: Hayes Wang
Date: Thu, 16 Mar 2017 14:32:22 +0800
> Replace &tp->napi with napi and tp->netdev with netdev.
>
> Signed-off-by: Hayes Wang
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo i
On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern wrote:
> On Thu, 16 Mar 2017, Ulf Hansson wrote:
>
>> +Alan
>>
>> On 15 March 2017 at 15:00, Diego Viola wrote:
>> > On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola wrote:
>> >> On Tue, Mar 14, 2017 at 2:20 PM, Diego Viola
>> >> wrote:
>> >>> On Thu, M
> On Tue, 2017-03-14 at 12:29 +, Reshetova, Elena wrote:
> > > Elena Reshetova writes:
> > >
> > > > refcount_t type and corresponding API should be
> > > > used instead of atomic_t when the variable is used as
> > > > a reference counter. This allows to avoid accidental
> > > > refcounter ove
On Thu, Mar 16, 2017 at 2:14 PM, Diego Viola wrote:
> On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern
> wrote:
>> On Thu, 16 Mar 2017, Ulf Hansson wrote:
>>
>>> +Alan
>>>
>>> On 15 March 2017 at 15:00, Diego Viola wrote:
>>> > On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola
>>> > wrote:
>>> >> On T
While stress testing a usb controller using a bind/unbind looop, the
following error loop was observed.
usb 7-1.2: new low-speed USB device number 3 using xhci-hcd
usb 7-1.2: hub failed to enable device, error -108
usb 7-1-port2: cannot disable (err = -22)
usb 7-1-port2: couldn't allocate usb_devi
Hello,
I'm having an issue with a pcie connected Texas Instruments TUSB7340
host controller. I've been stress testing an embedded ARM system by
writing then reading back large blocks of data to UAS connected USB
3.0 storage. A typical test run writes 128GB of data and I'd say
about 75% of the ti
On Thu, Mar 09, 2017 at 06:52:56PM +0100, Gregory CLEMENT wrote:
> From: Hua Jing
s/echi/ehci/ in the subject.
>
> - Add a new compatible string for the Armada 3700 SoCs
>
> - add sbuscfg support for orion usb controller driver. For the SoCs
> without hlock, need to program BAWR/BARD/AHBBRST
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/dm9601.c |4 ++--
1 files changed, 2 insertions(+),
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/smsc95xx.c | 24
1 files cha
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/sr9800.c |4 ++--
1 files changed, 2 insertions(+),
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/mcs7830.c |4 ++--
1 files changed, 2 insertions(+)
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/sierra_net.c |4 ++--
1 files changed, 2 insertions
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/smsc75xx.c |4 ++--
1 files changed, 2 insertions(+
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/sr9700.c |4 ++--
1 files changed, 2 insertions(+),
The function usbnet_{get|set}_settings is no longer used,
so we remove it.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/usbnet.c | 35 ---
include/linux/usb/usbnet.h |4
2 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/drivers/net
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/asix_devices.c | 12 ++--
1 files changed, 6
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/cdc_ncm.c |4 ++--
1 files changed, 2 insertions(+)
The ethtool api {get|set}_settings is deprecated.
We add the new api {get|set}_link_ksettings to this driver.
As I don't have the hardware, I'd be very pleased if
someone may test this patch.
Signed-off-by: Philippe Reynes
---
drivers/net/usb/usbnet.c | 36 ++
The ethtool api {get|set}_settings is deprecated. On usbnet, it
was often implemented with usbnet_{get|set}_settings.
In this serie, I add usbnet_{get|set}_link_ksettings
in the first patch, then I update all the driver to
use this new api, and in the last patch I remove the
old api usbnet_{get|se
On Mon, Mar 13, 2017 at 04:45:52PM +0100, Johan Hovold wrote:
> On Mon, Mar 13, 2017 at 04:15:18PM +0100, Oliver Neukum wrote:
> > Am Montag, den 13.03.2017, 13:35 +0100 schrieb Johan Hovold:
> > > This series fixes a number of NULL-pointer dereferences due to
> > > missing
> > > endpoint sanity ch
The dwc2 hardware doesn't like to do DMA transfers without
aligning data in DWORD. The driver also assumes that, even
when there's no DMA, at dwc2_read_packet().
That cause buffer overflows, preventing some drivers to work.
In the specific case of uvc_driver, it uses an array where
it caches the
On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab wrote:
> The dwc2 hardware doesn't like to do DMA transfers without
> aligning data in DWORD. The driver also assumes that, even
> when there's no DMA, at dwc2_read_packet().
>
> That cause buffer overflows, preventing some drivers to
On Thu, Mar 16, 2017 at 09:04:54AM -0600, Shuah Khan wrote:
> On 02/27/2017 01:31 AM, Jonathan Dieter wrote:
> > The usbip userspace tools call sprintf()/snprintf() and don't check for
> > the return value which can lead the paths to overflow, truncating the
> > final file in the path.
> >
> > Mor
Hi Ingo,
On 03/16/2017 03:17 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> Hi Ingo,
>>
>> On 03/02/2017 02:40 PM, Ingo Molnar wrote:
>>> * Lu Baolu wrote:
>>>
Hi Ingo,
How about this version? Any further comments?
>>> So I have re-read the review feedback I gave on Jan 19 and fo
David Laight [mailto:david.lai...@aculab.com]
> Sent: Thursday, March 16, 2017 10:28 PM
[...]
> If you are really lucky the compiler will optimise it away.
> Otherwise it will generate another local variable and possibly
> a register spill to stack.
However, I could reduce the time for calculating
Check hw version first in probe(). Do nothing if the driver doesn't
support the chip.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 102 ++--
1 file changed, 63 insertions(+), 39 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/ne
Some Motorola phones like droid 4 use a custom CPCAP PMIC that has a
multiplexing USB PHY.
This USB PHY can operate at least in four modes using pin multiplexing
and two control GPIOS:
- Pass through companion PHY for the SoC USB PHY
- ULPI PHY for the SoC
- Pass through USB for the modem
- UART
On Mon, Mar 13, 2017 at 07:14:18PM +0900, Yoichi Yuasa wrote:
> Signed-off-by: Yoichi Yuasa
> ---
> drivers/usb/host/xhci-dbg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I can't take patches without any changelog text, sorry :(
--
To unsubscribe from this list: send the line "unsub
Usually usb phy need register one extcon device to get the connection
notifications. It will remove some duplicate code if the extcon device
is registered using common code instead of each phy driver having its
own related extcon APIs. So we add one pointer of extcon device into
usb phy structure,
Since usb phy core has added common code to register or unregister
extcon device, then phy-qcom-8x16-usb driver does not need its own
code to register/unregister extcon device, then remove them.
Signed-off-by: Baolin Wang
---
drivers/usb/phy/phy-qcom-8x16-usb.c | 20 +---
1 fil
On Tue, Jan 31, 2017 at 12:55 AM, Shuah Khan wrote:
> Change goto labels to meaningful names from a series of errNs.
>
> Signed-off-by: Shuah Khan
> ---
>
> Rebased to usb-next
>
> drivers/usb/dwc3/dwc3-exynos.c | 22 +++---
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
>
76 matches
Mail list logo