[PATCH] usb: gadget: uvc: Fix return value in case of error

2016-07-16 Thread Christophe JAILLET
If this memory allocation fail, we will return 0, which means success.
Return -ENOMEM instead.

Signed-off-by: Christophe JAILLET 
---
 drivers/usb/gadget/function/uvc_configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/uvc_configfs.c 
b/drivers/usb/gadget/function/uvc_configfs.c
index 66753ba..31125a4 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -2023,7 +2023,7 @@ static int uvcg_streaming_class_allow_link(struct 
config_item *src,
if (!data) {
kfree(*class_array);
*class_array = NULL;
-   ret = PTR_ERR(data);
+   ret = -ENOMEM;
goto unlock;
}
cl_arr = *class_array;
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus

--
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


Re: [PATCH] usb: gadget: composite: Fix function used to free memory

2016-07-16 Thread Christophe JAILLET

Apologies,

this one has been sent by error.

It is the same as:
[PATCH 2/2] usb: gadget: composite: Fix function used to free memory
sent a couple of minutes before.

Best regards,
CJ

Le 16/07/2016 à 08:57, Christophe JAILLET a écrit :

'cdev->os_desc_req' has been allocated with 'usb_ep_alloc_request' so
'usb_ep_free_request' should be used to free it.

Signed-off-by: Christophe JAILLET 
---
  drivers/usb/gadget/composite.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 8241856..9fe73cf 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -2132,7 +2132,7 @@ int composite_os_desc_req_prepare(struct 
usb_composite_dev *cdev,
cdev->os_desc_req->buf = kmalloc(4096, GFP_KERNEL);
if (!cdev->os_desc_req->buf) {
ret = -ENOMEM;
-   kfree(cdev->os_desc_req);
+   usb_ep_free_request(ep0, cdev->os_desc_req);
goto end;
}
cdev->os_desc_req->context = cdev;




---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus


--
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


Re: [PATCH] usb: gadget: uvc: Fix return value in case of error

2016-07-16 Thread Laurent Pinchart
Hi Christophe,

Thank you for the patch.

On Saturday 16 Jul 2016 09:04:40 Christophe JAILLET wrote:
> If this memory allocation fail, we will return 0, which means success.
> Return -ENOMEM instead.
> 
> Signed-off-by: Christophe JAILLET 

Reviewed-by: Laurent Pinchart 

> ---
>  drivers/usb/gadget/function/uvc_configfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/uvc_configfs.c
> b/drivers/usb/gadget/function/uvc_configfs.c index 66753ba..31125a4 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -2023,7 +2023,7 @@ static int uvcg_streaming_class_allow_link(struct
> config_item *src, if (!data) {
>   kfree(*class_array);
>   *class_array = NULL;
> - ret = PTR_ERR(data);
> + ret = -ENOMEM;
>   goto unlock;
>   }
>   cl_arr = *class_array;

-- 
Regards,

Laurent Pinchart

--
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


Fwd: USB HID problem

2016-07-16 Thread Bruce Korb
I just found your address as a better one than linux-kernel:

***
My typing follows a line with a bunch of stars.  That is followed by
command output.

***
I have a USB 3.0 hub and switch that I need to use to switch devices
between a Linux desktop, laptop and MacBook Pro.  At first, I was
testing with just a keyboard and mouse.
The switch is connected to USB Bus 1.
With keyboard and mouse plugged in, OS/X is all happy and sees them fine.
They do not show up with "lsusb -t"

# lsusb -t
[...]
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
   |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
   |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M

# lsusb|sort
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 008: ID 05ac:1002 Apple, Inc. Extended Keyboard Hub [Mitsumi]
Bus 001 Device 010: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
[...]

***
As you see, with plain "lsusb",
the story is different, but the same story were my MS Natural
keyboard plugged in instead of the Apple.  Next, I plugged in
an SD card reader and, to my great surprise, it worked:

# lsusb -t
[...]
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
   |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
   |__ Port 1: Dev 25, If 0, Class=Mass Storage, Driver=usb-storage, 480M
   |__ Port 1: Dev 25, If 1, Class=Chip/SmartCard, Driver=, 480M
   |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M

***
so I was able to mount the device.

So therefore, Linux can work with USB devices hung off of a hub hanging off
of a switch, but not keyboards and mice.  And these are keyboards and mice
that work just fine when plugged directly into a motherboard USB port.

Why would that be?

Since I have tried several variations of hubs and switches, it gets down
to Linux needing some fixes.  Have they already been made?  If so,
where can I get the patch?  If not, please point me at some code so
I might be able to fix it -- at least for myself.

Thank you.  Regards, Bruce
***
The failing devices using usb-devices script have "no such file" errors:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 27 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=05ac ProdID=1002 Rev=01.22
S:  Manufacturer=Mitsumi Electric
S:  Product=Hub in Apple Extended USB Keyboard
C:  #Ifs= 0 Cfg#= 0 Atr= MxPwr=
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceNumber: No
such file or directory
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bAlternateSetting: No
such file or directory
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bNumEndpoints: No
such file or directory
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceClass: No
such file or directory
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceSubClass:
No such file or directory
cat: /sys/bus/usb/devices/usb1/1-1/1-1.2/1-*:?.*/bInterfaceProtocol:
No such file or directory
/usr/bin/usb-devices: line 79: printf: (none): invalid number
I:  If#= 0 Alt= 0 #EPs= 0 Cls=() Sub= Prot= Driver=

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 28 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046d ProdID=c245 Rev=69.00
S:  Manufacturer=Logitech
S:  Product=Gaming Mouse G400
C:  #Ifs= 0 Cfg#= 0 Atr= MxPwr=
cat: [...] No such file or directory
/usr/bin/usb-devices: line 79: printf: (none): invalid number
I:  If#= 0 Alt= 0 #EPs= 0 Cls=() Sub= Prot= Driver=

***
The same information gotten from /sys/kernel/debug/usb/devices:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 27 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=05ac ProdID=1002 Rev= 1.22
S:  Manufacturer=Mitsumi Electric
S:  Product=Hub in Apple Extended USB Keyboard
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 50mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 28 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046d ProdID=c245 Rev=69.00
S:  Manufacturer=Logitech
S:  Product=Gaming Mouse G400
C:  #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms
I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=
E:  Ad=82(I) Atr=03(Int.) MxPS=   2 Ivl=1ms

***
If it is any help, I plugged the Apple keyboard directly into a
motherboard port (bus 9):

# lsusb -t
/:  Bus 09.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
   |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
   |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
   |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/3p, 12M
   |__ Port 1: Dev 4, I

Re: [PATCH v2 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic power sequence library

2016-07-16 Thread Rob Herring
On Wed, Jul 13, 2016 at 10:06:45AM +0800, Peter Chen wrote:
> Add binding doc for generic power sequence library.

I'd written a review on last version, but forgot to send it out. Anyway, 
I mostly had the same comments as Philipp and Joshua. A couple of things 
they missed...

> 
> Signed-off-by: Peter Chen 
> ---
>  .../bindings/power/pwrseq/pwrseq-generic.txt   | 53 
> ++
>  1 file changed, 53 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
> 
> diff --git 
> a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt 
> b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
> new file mode 100644
> index 000..186c58c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
> @@ -0,0 +1,53 @@
> +The generic power sequence library
> +
> +Some hard-wired USB/MMC devices need to do power sequence to let the
> +device work normally, the typical power sequence like: enable USB
> +PHY clock, toggle reset pin, etc. But current Linux USB driver
> +lacks of such code to do it, it may cause some hard-wired USB devices
> +works abnormal or can't be recognized by controller at all. The
> +power sequence will be done before this device can be found at USB
> +bus.
> +
> +The power sequence properties is under the device node.
> +
> +Required properties:
> +- power-sequence: this device needs to do power sequence before enumeration
> +
> +Optional properties:
> +- clocks: the input clock for device.
> +- reset-gpios: Should specify the GPIO for reset.
> +- reset-duration-us: the duration in microsecond for assert reset signal.
> +
> +Below is the example of USB power sequence properties on USB device
> +nodes which have two level USB hubs.
> +
> +&usbotg1 {
> + vbus-supply = <®_usb_otg1_vbus>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_usb_otg1_id>;
> + status = "okay";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + hub: genesys@1 {

genesys: hub@1

> + compatible = "usb5e3,608";
> + reg = <1>;
> +
> + power-sequence;
> + clocks = <&clks IMX6SX_CLK_CKO>;
> + reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
> + reset-duration-us = <10>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + ethernet: asix@1 {

asix: ethernet@1

> + compatible = "usbb95,1708";
> + reg = <1>;
> +
> + power-sequence;
> + clocks = <&clks IMX6SX_CLK_IPG>;
> + reset-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* 
> ethernet_rst */
> + reset-duration-us = <15>;
> + };
> + };
> +};
> -- 
> 1.9.1
> 
> 
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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


Re: [PATCH v2 3/6] binding-doc: usb: usb-device: add optional properties for power sequence

2016-07-16 Thread Rob Herring
On Wed, Jul 13, 2016 at 10:06:47AM +0800, Peter Chen wrote:
> Add optional properties for power sequence.
> 
> Signed-off-by: Peter Chen 
> ---
>  Documentation/devicetree/bindings/usb/usb-device.txt | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt 
> b/Documentation/devicetree/bindings/usb/usb-device.txt
> index 1c35e7b..0ccaadf 100644
> --- a/Documentation/devicetree/bindings/usb/usb-device.txt
> +++ b/Documentation/devicetree/bindings/usb/usb-device.txt
> @@ -13,6 +13,10 @@ Required properties:
>  - reg: the port number which this device is connecting to, the range
>is 1-31.
>  
> +Optional properties:
> +power sequence properties, see
> +Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt for detail
> +
>  Example:
>  
>  &usb1 {
> @@ -24,5 +28,10 @@ Example:
>   hub: genesys@1 {
>   compatible = "usb5e3,608";
>   reg = <1>;
> +
> + power-sequence;
> + clocks = <&clks IMX6SX_CLK_CKO>;
> + reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
> + reset-duration-us = <10>;

These belong in the binding doc for the hub.

>   };
>  }
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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


Re: [PATCH v7 2/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-07-16 Thread Rob Herring
On Thu, Jul 14, 2016 at 04:59:19PM +0800, William Wu wrote:
> Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit,
> which specifies whether the USB2.0 PHY provides a free-running
> PHY clock, which is active when the clock control input is active.
> 
> Signed-off-by: William Wu 
> ---
> Changes in v7:
> - None
> 
> Changes in v6:
> - use '-' instead of '_' in dts (Rob Herring)
> 
> Changes in v5:
> - None
> 
> Changes in v4:
> - rebase on top of balbi testing/next, remove pdata (balbi)
> 
> Changes in v3:
> - None
> 
> Changes in v2:
> - None
> 
>  Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++
>  drivers/usb/dwc3/core.c| 5 +
>  drivers/usb/dwc3/core.h| 5 +
>  3 files changed, 13 insertions(+)

Acked-by: Rob Herring 
--
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


Re: [PATCH v7 3/5] usb: dwc3: make usb2 phy utmi interface configurable in DT

2016-07-16 Thread Rob Herring
On Thu, Jul 14, 2016 at 04:59:20PM +0800, William Wu wrote:
> Add snps,phyif-utmi-width devicetree property to configure
> the UTMI+ PHY with an 8- or 16-bit interface. UTMI+ PHY
> interface is a hardware property, and it's platform dependent.
> Normally,the PHYIF can be configured during coreconsultant.
   ^
space

> But for some specific USB cores(e.g. rk3399 SoC DWC3), the
> default PHYIF configuration value is fault, so we need to
> reconfigure it by software.
> 
> And refer to the DWC3 databook, the GUSB2PHYCFG.USBTRDTIM
> must be set to the corresponding value according to the
> UTMI+ PHY interface.
> 
> Signed-off-by: William Wu 
> ---
> Changes in v7:
> - remove quirk and use only one property to configure utmi (Heiko, Rob 
> Herring)
> 
> Changes in v6:
> - use '-' instead of '_' in dts (Rob Herring)
> 
> Changes in v5:
> - None
> 
> Changes in v4:
> - rebase on top of balbi testing/next, remove pdata (balbi)
> 
> Changes in v3:
> - None
> 
> Changes in v2:
> - add a quirk for phyif_utmi (balbi)
> 
>  Documentation/devicetree/bindings/usb/dwc3.txt |  3 +++
>  drivers/usb/dwc3/core.c| 25 +
>  drivers/usb/dwc3/core.h| 10 ++
>  3 files changed, 38 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt 
> b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 020b0e9..00cc541 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -47,6 +47,9 @@ Optional properties:
>   - snps,hird-threshold: HIRD threshold
>   - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" 
> for
> UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3.
> + - snps,phyif-utmi-width: the value to configure the core to support a UTMI+ 
> PHY
> + with an 8- or 16-bit interface. Value 8 select 8-bit
> + interface, value 16 select 16-bit interface.

Is 'phy_type = "utmi_wide"' not the same as 16-bit width?

Again, I think this should be common.

Rob
--
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


Re: [PATCH v7 4/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-07-16 Thread Rob Herring
On Thu, Jul 14, 2016 at 04:59:21PM +0800, William Wu wrote:
> Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit,
> which specifies whether disable delay PHY power change
> from P0 to P1/P2/P3 when link state changing from U0
> to U1/U2/U3 respectively.
> 
> Signed-off-by: William Wu 
> ---
> Changes in v7:
> - None
> 
> Changes in v6:
> - use '-' instead of '_' in dts (Rob Herring)
> 
> Changes in v5:
> - None
> 
> Changes in v4:
> - rebase on top of balbi testing/next, remove pdata (balbi)
> 
> Changes in v3:
> - None
> 
> Changes in v2:
> - None
> 
>  Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++
>  drivers/usb/dwc3/core.c| 5 +
>  drivers/usb/dwc3/core.h| 3 +++
>  3 files changed, 10 insertions(+)

Acked-by: Rob Herring 
--
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


Re: Fwd: USB HID problem

2016-07-16 Thread Greg KH
On Sat, Jul 16, 2016 at 12:40:43PM -0700, Bruce Korb wrote:
> [13026.604365] usb 1-1.3: USB disconnect, device number 28
> [13043.430087] usb 1-1.3: new full-speed USB device number 32 using xhci_hcd
> [13043.528010] usb 1-1.3: New USB device found, idVendor=046d, idProduct=c245
> [13043.528018] usb 1-1.3: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [13043.528023] usb 1-1.3: Product: Gaming Mouse G400
> [13043.528027] usb 1-1.3: Manufacturer: Logitech
> [13043.528309] usb 1-1.3: Not enough bandwidth for new device state.
> [13043.528319] usb 1-1.3: can't set config #1, error -28

That's your issue, odds are OS-X doesn't check the bandwidth needed for
the devices and tries to use them anyway.  We used to do that on Linux
many years ago, but had numerous problems with devices so we now follow
the specification.  It's better to have your device not work at all,
than to just randomly not work, don't you think?

sorry,

greg k-h
--
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


Re: Fwd: USB HID problem

2016-07-16 Thread Bruce Korb
On Sat, Jul 16, 2016 at 4:18 PM, Greg KH  wrote:
>> [13043.528023] usb 1-1.3: Product: Gaming Mouse G400
>> [13043.528027] usb 1-1.3: Manufacturer: Logitech
>> [13043.528309] usb 1-1.3: Not enough bandwidth for new device state.
>> [13043.528319] usb 1-1.3: can't set config #1, error -28
>
> That's your issue, odds are OS-X doesn't check the bandwidth needed for
> the devices and tries to use them anyway.  We used to do that on Linux
> many years ago, but had numerous problems with devices so we now follow
> the specification.  It's better to have your device not work at all,
> than to just randomly not work, don't you think?

That sounds right, but here we have a situation where a keyboard and a
mouse will overwhelm the bandwidth, but a Class-10/UDH-1 SSD will not.
I really don't type that fast.  I should be able to tell the driver
that I don't type several billion words per minute or move my hand
faster than sound, yes?  OK, I'm being a little facetious, but it does
seem to me that if a HID device is being used, there should be a way
to downgrade the claim that it is a "full speed USB device".

In any case, "better to" question, in my case, it's "no".  I do not
like having three keyboards stacked one on top of another.  So I
really need some way to fix this.  :(
--
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


Re: Fwd: USB HID problem

2016-07-16 Thread Greg KH
On Sat, Jul 16, 2016 at 04:27:05PM -0700, Bruce Korb wrote:
> On Sat, Jul 16, 2016 at 4:18 PM, Greg KH  wrote:
> >> [13043.528023] usb 1-1.3: Product: Gaming Mouse G400
> >> [13043.528027] usb 1-1.3: Manufacturer: Logitech
> >> [13043.528309] usb 1-1.3: Not enough bandwidth for new device state.
> >> [13043.528319] usb 1-1.3: can't set config #1, error -28
> >
> > That's your issue, odds are OS-X doesn't check the bandwidth needed for
> > the devices and tries to use them anyway.  We used to do that on Linux
> > many years ago, but had numerous problems with devices so we now follow
> > the specification.  It's better to have your device not work at all,
> > than to just randomly not work, don't you think?
> 
> That sounds right, but here we have a situation where a keyboard and a
> mouse will overwhelm the bandwidth, but a Class-10/UDH-1 SSD will not.
> I really don't type that fast.  I should be able to tell the driver
> that I don't type several billion words per minute or move my hand
> faster than sound, yes?  OK, I'm being a little facetious, but it does
> seem to me that if a HID device is being used, there should be a way
> to downgrade the claim that it is a "full speed USB device".

That's not how USB protocols work, they are driven from the host, not
the device, your computer is asking that keyboard if it constantly has
new data, it's not driven by how fast or slow you type.

> In any case, "better to" question, in my case, it's "no".  I do not
> like having three keyboards stacked one on top of another.  So I
> really need some way to fix this.  :(

Buy a USB 3 hub, that should resolve the issue for you, have you tried
that?

good luck,

greg k-h
--
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


Re: Fwd: USB HID problem

2016-07-16 Thread Bruce Korb
On Sat, Jul 16, 2016 at 4:33 PM, Greg KH  wrote:
> That's not how USB protocols work, they are driven from the host, not
> the device, your computer is asking that keyboard if it constantly has
> new data, it's not driven by how fast or slow you type.

Not a USB person, I didn't know.  I prefer "I have data ready" interrupts,
but that's not USB.

>> In any case, "better to" question, in my case, it's "no".  I do not
>> like having three keyboards stacked one on top of another.  So I
>> really need some way to fix this.  :(
>
> Buy a USB 3 hub, that should resolve the issue for you, have you tried
> that?

It *IS* a USB-3.0 hub plugged into a USB 3.0 port.
Those "Genesys Logic 4-port hub" thingys are USB 3.0.

$ lsusb|sort
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 005: ID 048d:1366 Integrated Technology Express, Inc.
Bus 001 Device 006: ID 05ac:1002 Apple, Inc. Extended Keyboard Hub [Mitsumi]
Bus 001 Device 007: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
Bus 001 Device 008: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
--
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


Re: [PATCH] rndis_host: Set random MAC for ZTE MF910

2016-07-16 Thread David Miller
From: Bjørn Mork 
Date: Fri, 15 Jul 2016 19:42:28 +0200

> David Laight  writes:
>> From: Bjørn Mork
>> Not only that, there certainly used to be manufacturers that used 'locally
>> administered' addresses on all their cards (as well as those that used 
>> unallocated
>> address blocks).
> 
> Sure. But is there any reason to care about those addresses?

And for that case, this patch we are discussing would be a bug fix.

I'm going to apply the "bp[0] & 0x02" patch.

--
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


Re: [PATCH] net: usb: ax88172x: use phy_ethtool_{get|set}_link_ksettings

2016-07-16 Thread David Miller
From: Philippe Reynes 
Date: Fri, 15 Jul 2016 15:25:36 +0200

> There are two generics functions phy_ethtool_{get|set}_link_ksettings,
> so we can use them instead of defining the same code in the driver.
> 
> Signed-off-by: Philippe Reynes 

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 info at  http://vger.kernel.org/majordomo-info.html