Ben Hutchings | 26 Feb 20:34 2015
Picon

[PATCH net-next] usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers

Currently the usbnet core does not update the tx_packets statistic for
drivers with FLAG_MULTI_PACKET and there is no hook in the TX
completion path where they could do this.

cdc_ncm and dependent drivers are bumping tx_packets stat on the
transmit path while asix and sr9800 aren't updating it at all.

Add a packet count in struct skb_data so these drivers can fill it
in, initialise it to 1 for other drivers, and add the packet count
to the tx_packets statistic on completion.

Signed-off-by: Ben Hutchings <ben.hutchings@...>
---
I have only tested the asix driver after this change; I think cdc_ncm
and one of the non-multi-packet drivers should also be tested before
it's applied.

Ben.

 drivers/net/usb/asix_common.c |    2 ++
 drivers/net/usb/cdc_ncm.c     |    3 ++-
 drivers/net/usb/sr9800.c      |    1 +
 drivers/net/usb/usbnet.c      |    5 +++--
 include/linux/usb/usbnet.h    |   12 ++++++++++++
 5 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 5c55f11572ba..724a9b50df7a 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
(Continue reading)

Felipe Balbi | 26 Feb 19:25 2015
Picon

[PATCH v2 01/15] usb: musb: core: remove unnecessary logical comparison

devctl & MUSB_DEVCTL_HM represents a single bit,
just check for the bit, there's really no need
to compare the result against 0.

Signed-off-by: Felipe Balbi <balbi@...>
---
 drivers/usb/musb/musb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 2b018cf11106..625ff4321505 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -879,7 +879,7  <at>  <at>  b_host:
 	 */
 	if (int_usb & MUSB_INTR_RESET) {
 		handled = IRQ_HANDLED;
-		if ((devctl & MUSB_DEVCTL_HM) != 0) {
+		if (devctl & MUSB_DEVCTL_HM) {
 			/*
 			 * Looks like non-HS BABBLE can be ignored, but
 			 * HS BABBLE is an error condition. For HS the solution
--

-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Michiel vdG | 26 Feb 18:37 2015
Picon

[PATCH] USB: serial: cp210x: Adding Seletek device id's

These device ID's are not associated with the cp210x module currently,
but should be. This patch allows the devices to operate upon
connecting them to the usb bus as intended.

Tested personally, reviewed by manufacturer

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index f40c856..cf372f0 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
 <at>  <at>  -147,6 +147,8  <at>  <at>  static const struct usb_device_id id_table[] = {
        { USB_DEVICE(0x166A, 0x0305) }, /* Clipsal C-5000CT2 C-Bus
Spectrum Colour Touchscreen */
        { USB_DEVICE(0x166A, 0x0401) }, /* Clipsal L51xx C-Bus
Architectural Dimmer */
        { USB_DEVICE(0x166A, 0x0101) }, /* Clipsal 5560884 C-Bus
Multi-room Audio Matrix Switcher */
+       { USB_DEVICE(0x16C0, 0x09B0) }, /* Seletek */
+       { USB_DEVICE(0x16C0, 0x09B1) }, /* Seletek */
        { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
        { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH
PL512 Power Supply */
        { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH
RCM Remote Control for MARATON Power Supply */

--

-- 
     Michiel van de Garde
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
(Continue reading)

Felipe Balbi | 26 Feb 16:07 2015
Picon

[PATCH 1/7] usb: musb: core: remove unnecessary logical comparison

devctl & MUSB_DEVCTL_HM represents a single bit,
just check for the bit, there's really no need
to compare the result against 0.

Signed-off-by: Felipe Balbi <balbi@...>
---
 drivers/usb/musb/musb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 2b018cf11106..625ff4321505 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -879,7 +879,7  <at>  <at>  b_host:
 	 */
 	if (int_usb & MUSB_INTR_RESET) {
 		handled = IRQ_HANDLED;
-		if ((devctl & MUSB_DEVCTL_HM) != 0) {
+		if (devctl & MUSB_DEVCTL_HM) {
 			/*
 			 * Looks like non-HS BABBLE can be ignored, but
 			 * HS BABBLE is an error condition. For HS the solution
--

-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Johan Hovold | 26 Feb 15:42 2015

Re: Additional device id's for cp210x

[ Adding the linux-usb list as CC. ]

On Thu, Feb 26, 2015 at 02:04:46PM +0100, Michiel vdG wrote:
> Hi!
> 
> I'm contacting you for Lunatico Astronomia S. L. in Spain, they produce
> among other things USB devices for astronomy hobbyists and professionals.
> One such device should trigger the cp210 module to be loaded on
> usb-connect, but that never happens. My role, or stake, is that of a
> consumer who uses the product, hence I'm reaching out to you.
> 
> In my testing, I added this line:
> 
> { USB_DEVICE(0x16C0, 0x09B1) }, /* Seletek */
> 
> To the device ID list in drivers/usb/serial/cp210x.c.
> 
> And on compiling and booting with this change, the kernel loaded the cp210
> module as the usb cable was connected and the device then funtions as
> expected.
> 
> You can verify Lunatico is registered as the owner of this ID if needed
> here:
> http://www.voti.nl/pids/index.html
> And I can put you in touch with an engineer at Lunatico if that helps with
> anything?
> 
> Hope this was useful to you, please let me know what i can do to help
> resolve this issue.
> (while figuring out how to report this, i learned about
(Continue reading)

Dan Carpenter | 26 Feb 12:29 2015
Picon

re: usb-gadget: Initial merge of target module for UASP + BOT

Hello Sebastian Andrzej Siewior,

The patch c52661d60f63: "usb-gadget: Initial merge of target module
for UASP + BOT" from May 3, 2012, leads to the following static
checker warning:

	drivers/usb/gadget/legacy/tcm_usb_gadget.c:1155 usbg_submit_command()
	warn: bool is not less than zero.

drivers/usb/gadget/legacy/tcm_usb_gadget.c
  1153          INIT_WORK(&cmd->work, usbg_cmd_work);
  1154          ret = queue_work(tpg->workqueue, &cmd->work);
                      ^^^^^^^^^^^
This is a bool type.  Presumably we can remove the "if (ret < 0)" check?

  1155          if (ret < 0)
  1156                  goto err;
  1157  
  1158          return 0;
  1159  err:
  1160          kfree(cmd);
  1161          return -EINVAL;
  1162  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Peter Hung | 26 Feb 11:02 2015
Picon

[PATCH V8 00/10] USB: f81232: V8 patches

This series patch V8 is changed from V7 as following:

1. The V7 MSR strange delta value is checked with locking problem. We changed
   f81232_set_mctrl() & f81232_read_msr() lock mechanism, the old version is
   only locked with variable protection, new version will lock from start to
   end with these 2 function.   
2. f81232_set_baudrate() add error handling and no longer handle with baudrate
   B0, change to handle with f81232_set_termios()
3. When user set baudrate larger then 115200, we will change it with 115200
   and tty_encode_baud_rate() in f81232_set_termios().
4. V7 f81232_set_baudrate() divisor declared with type u8, it will make 
   baudrate set failed with smaller then B600 (115200/300=384 overflow :Q).
   We changed it with integer type for divisor larger then 256.

V7 (old change):

1. The buffer of usb_control_msg() in set_register()/get_register() are change
   from local variable to kmalloc(). (PATCH V7 02/11)
2. Change all set_register()/get_register() return value 0 is success, 
   otherwise are failed. ( return 0 of usb_control_msg() treat as -EIO, 
   PATCH V7 02/11)
3. tty_port_tty_get() called only when DCD has changed. (PATCH V7 05/11)  
4. remove likely()/unlikely() branch prediction.
5. Implement DTR/RTS control when baudrate B0. We drop DTR/RTS when B0, 
   otherwise enable it. (PATCH V7 08/11)
6. Change private struct line_control to modem_control with meanful. 
   (PATCH V7 06/11)
7. We confirmd MSR strange delta value is not locking-issue. The issue
   maybe reproduce with set MCR & get MSR before IIR notice with MSR changed.

(Continue reading)

Felipe Balbi | 25 Feb 23:54 2015
Picon

[PATCH] dma: cppi41: add missing directions bitfield

Without those we will see a kernel WARN()
when loading musb on am335x devices.

Signed-off-by: Felipe Balbi <balbi@...>
---
 drivers/dma/cppi41.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index 512cb8e2805e..4e9cc8e8100c 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
 <at>  <at>  -926,6 +926,7  <at>  <at>  static int cppi41_dma_probe(struct platform_device *pdev)
 	cdd->ddev.device_issue_pending = cppi41_dma_issue_pending;
 	cdd->ddev.device_prep_slave_sg = cppi41_dma_prep_slave_sg;
 	cdd->ddev.device_terminate_all = cppi41_stop_chan;
+	cdd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
 	cdd->ddev.dev = dev;
 	INIT_LIST_HEAD(&cdd->ddev.channels);
 	cpp41_dma_info.dma_cap = cdd->ddev.cap_mask;
--

-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Ameen Ali | 25 Feb 22:44 2015
Picon

[PATCH 5/5] ohci-tmio.c : missing 'break' statements

Redundant bitwise operation on 'pm' in 'switch' statement.

Signed-off-by : Ameen Ali <Ameenali023@...>
---
 drivers/usb/host/ohci-tmio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
index e9a6eec..c580615 100644
--- a/drivers/usb/host/ohci-tmio.c
+++ b/drivers/usb/host/ohci-tmio.c
 <at>  <at>  -102,10 +102,13  <at>  <at>  static void tmio_stop_hc(struct platform_device *dev)
 			dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports);
 		case 3:
 			pm |= CCR_PM_USBPW3;
+			break;
 		case 2:
 			pm |= CCR_PM_USBPW2;
+			break;
 		case 1:
 			pm |= CCR_PM_USBPW1;
+			break;
 	}
 	tmio_iowrite8(0, tmio->ccr + CCR_INTC);
 	tmio_iowrite8(0, tmio->ccr + CCR_ILME);
--

-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
(Continue reading)

Schmid, Carsten | 25 Feb 09:39 2015

USB driver support for high current charging

Hello,

there is a spec from USB regarding high current charging (on top of USB3.0).
Do you know if there is any driver support required, and if so, when will this be available with Linux?

Best regards
Carsten

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Mathias Nyman | 24 Feb 17:26 2015
Picon

[PATCH v2 0/3] xhci fixes for 4.0-rc2

Hi Greg

Second try, only change is adding testing credits to commit messages.

Three xhci patches for usb-linus this time.
Fixing issues like allocating the correct amount of DMA memory for xhci controller
(not less like it sometimes did),
fix Armada 375/38x XHCI support by making sure clocks are on before touching the
xhci controller, and finally fixing an issue where where some devices, mainly
scanners, use 'endpoint reset' requests to soft reset the device endpoint,
ending up getting the host and device out of sync.

The last 'endpoint reset' issue for scanners has been around for some time,
but 3.18 had some major changes in endpoint reset code, so backporting it to
older versions than 3.18 will be diffcult.

Mathias Nyman (2):
  xhci: Allocate correct amount of scratchpad buffers
  xhci: Clear the host side toggle manually when endpoint is 'soft
    reset'

Maxime Ripard (1):
  usb: XHCI: platform: Move the Marvell quirks after the enabling the
    clocks

 drivers/usb/host/xhci-plat.c |  19 ++++----
 drivers/usb/host/xhci-ring.c |   2 +-
 drivers/usb/host/xhci.c      | 100 +++++++++++++++++++++++++++++++++++++++----
 drivers/usb/host/xhci.h      |   7 ++-
 4 files changed, 106 insertions(+), 22 deletions(-)
(Continue reading)


Gmane