Re: [PATCH 3.16] staging: usbip stub_rx fix static checker warning on unnecessary checks

2018-11-10 Thread Ben Hutchings
& > - pdu->u.cmd_submit.transfer_buffer_length <= INT_MAX) { > + if (pdu->u.cmd_submit.transfer_buffer_length > 0) { > priv->urb->transfer_buffer = > kzalloc(pdu->u.cmd_submit.transfer_buffer_length, > GFP_KERNEL); -- Ben Hutchings Reality is just a crutch for people who can't handle science fiction. signature.asc Description: This is a digitally signed message part

[PATCH] usbip: vhci_hcd: Check rhport everywhere in vhci_hub_control()

2018-10-10 Thread Ben Hutchings
nge check. Fixes: 5b22f676118f ("usbip: vhci_hcd: check rhport before using in ...") Cc: sta...@vger.kernel.org Signed-off-by: Ben Hutchings --- drivers/usb/usbip/vhci_hcd.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/usb/usbip/vhci_h

Re: [Linux-kernel] [PATCH 3/4] usbnet: smsc95xx: check for csum being in last four bytes

2018-10-04 Thread Ben Hutchings
 * properly with extremely small packets */ >   long csstart = skb_checksum_start_offset(skb); -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom

Re: [Linux-kernel] [PATCH 2/4] usbnet: smsc95xx: align tx-buffer to word

2018-10-04 Thread Ben Hutchings
aligned fields in the network/transport headers. You can use #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to check that. It seems like NET_IP_ALIGN should be defined to 0 or 2 depending on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, but NET_IP_ALIGN predates the latter. Ben. -- Ben

Re: [PATCH 4.4 18/31] r8152: napi hangup fix after disconnect

2018-09-12 Thread Ben Hutchings
On Sat, 2018-08-25 at 09:43 +0200, Jiri Slaby wrote: > On 08/24/2018, 06:38 PM, Ben Hutchings wrote: > > On Fri, 2018-07-20 at 14:13 +0200, Greg Kroah-Hartman wrote: > > > 4.4-stable review patch.  If anyone has any objections, please

Re: [PATCH 1/2] USB: yurex: Fix buffer over-read in yurex_write()

2018-08-16 Thread Ben Hutchings
On Thu, 2018-08-16 at 04:15 +0200, Jann Horn wrote: > On Wed, Aug 15, 2018 at 10:44 PM Ben Hutchings > wrote: [...] > > @@ -446,6 +446,7 @@ static ssize_t yurex_write(struct file *file, const > > char __user *user_buffer, > > retval = -EFAULT; > &

[PATCH 2/2] USB: yurex: Check for truncation in yurex_read()

2018-08-15 Thread Ben Hutchings
ly possible for this to happen, but in case truncation occurs, WARN and return -EIO. Signed-off-by: Ben Hutchings --- drivers/usb/misc/yurex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 1232dd49556d..6d9fd5f64903 100644 --- a/d

[PATCH 1/2] USB: yurex: Fix buffer over-read in yurex_write()

2018-08-15 Thread Ben Hutchings
ample/yurex_clock.pl writes an integer without a null terminator. It seems like it must have worked by chance!) Always add a null byte after the written data. Enlarge the buffer to allow for this. Cc: sta...@vger.kernel.org Signed-off-by: Ben Hutchings --- drivers/usb/misc/yurex.c | 5 +++-- 1

Re: [PATCH] usbip: Fix misuse of strncpy()

2018-07-26 Thread Ben Hutchings
On Tue, 2018-07-24 at 11:04 -0600, Shuah Khan wrote: > On 07/20/2018 08:12 PM, Ben Hutchings wrote: > > gcc 8 reports: > > > > usbip_device_driver.c: In function ‘read_usb_vudc_device’: > > usbip_device_driver.c:106:2: error: ‘strncpy’ specified bound 256 equals &g

[PATCH] usbip: Fix misuse of strncpy()

2018-07-20 Thread Ben Hutchings
re already doing so let's ensure they're still null- terminated. We can't easily use strlcpy() here, so use snprintf(). usbip_common.c has the same problem. Signed-off-by: Ben Hutchings Cc: sta...@vger.kernel.org --- tools/usb/usbip/libsrc/usbip_common.c|

Re: [PATCH 4.4 068/134] usb: dwc2: Make sure we disconnect the gadget state

2018-04-01 Thread Ben Hutchings
;lock, flags); > + dwc2_hsotg_disconnect(hsotg); >   dwc2_hsotg_core_init_disconnected(hsotg, false); >   spin_unlock_irqrestore(&hsotg->lock, flags); >  dwc2_hsotg_core_connect(hsotg); -- Ben Hutchings Software Developer, Co

[PATCH] usbip: Correct maximum value of CONFIG_USBIP_VHCI_HC_PORTS

2018-01-28 Thread Ben Hutchings
pport") Signed-off-by: Ben Hutchings --- drivers/usb/usbip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/usbip/Kconfig b/drivers/usb/usbip/Kconfig index eeefa29f8aa2..a20b65cb6678 100644 --- a/drivers/usb/usbip/Kconfig +++ b/drivers/usb/usbip/Kconfig @@ -

[PATCH stable 3.18-4.9] xhci: Fix ring leak in failure path of xhci_alloc_virt_device()

2018-01-11 Thread Ben Hutchings
xhci_alloc_virt_device() where ring cache allocation fails, in which case we need to free the ring allocated for endpoint 0. Signed-off-by: Ben Hutchings --- This is build-tested only. Ben. drivers/usb/host/xhci-mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH 4.4 13/49] usb: dwc2: Fix UDC state tracking

2017-12-07 Thread Ben Hutchings
2 insertions(+) > > --- a/drivers/usb/dwc2/gadget.c > +++ b/drivers/usb/dwc2/gadget.c > @@ -2206,6 +2206,8 @@ void dwc2_hsotg_disconnect(struct dwc2_h >   >   call_gadget(hsotg, disconnect); >   hsotg->lx_state = DWC2_L3; > + > + usb_gadget_set_state(&

Re: [PATCH 4.4 27/56] cdc_ncm: Set NTB format again after altsetting switch for Huawei devices

2017-11-14 Thread Ben Hutchings
32_FORMAT) { [...] usbnet_read_cmd() doesn't do any byte-swapping, so it looks like curr_ntb_format will have little-endian byte order (__le16 not u16). The comparison will then need to be done using le16_to_cpu(curr_ntb_format). Ben. -- Ben Hutchings Software Developer, Codethink Ltd. -- To

[PATCH] usbip: tools: Install all headers needed for libusbip development

2017-09-30 Thread Ben Hutchings
usbip_host_driver.h now depends on several additional headers, which need to be installed along with it. Fixes: 021aed845303 ("staging: usbip: userspace: migrate usbip_host_driver ...") Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with ...") Signed-o

[PATCH] Partially revert "usb: Kconfig: using select for USB_COMMON dependency"

2017-04-17 Thread Ben Hutchings
t for USB_COMMON dependency") Signed-off-by: Ben Hutchings --- drivers/usb/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index fbe493d44e81..8270abe6c677 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -15

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread Ben Hutchings
On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > From: Ben Hutchings [...] > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > + RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, > > +

[PATCH net 4/4] catc: Use heap buffer for memory size test

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 25 ++--- 1 file changed, 18 insert

[PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/rtl8150.c | 34 +++--- 1 file changed, 27

[PATCH net 3/4] catc: Combine failure cleanup code in catc_probe()

2017-02-04 Thread Ben Hutchings
Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 3daa41bdd4ea..985909eab72c 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net

[PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
án Nicanor Pérez Meyer Signed-off-by: Ben Hutchings --- drivers/net/usb/pegasus.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 24e803fe9a53..36674484c6fb 100644 --- a/drivers/net/usb

[PATCH net 0/4] Fix on-stack USB buffers

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). This series fixes all the instances I could find where USB networking drivers do that. Ben. Ben Hutchings (4): pegasus: Use heap buffers for all register access

Re: [PATCH 3/3] dm9601: add support ethtool style utility

2016-03-11 Thread Ben Hutchings
On Fri, 2016-03-11 at 11:33 +, Ben Hutchings wrote: > On Fri, 2016-03-11 at 19:08 +0800, Joseph Chang wrote: > > > > I tested by > >  ./ethtool -E eth0 magic 0x9620 offset 0 length 3 value 0xf1 value 0xf2 > > value 0xf3 > > > > I think ethtool need [

Re: [PATCH 3/3] dm9601: add support ethtool style utility

2016-03-11 Thread Ben Hutchings
I right? > > Oh, I can see it goes wrong~ Thanks~ [...] You can only pass one byte on the command line and that forces the length to be 1.  To set multiple bytes, you need to provide them on stdin instead. Ben. -- Ben Hutchings 73.46% of all statistics are made up. signature.asc De

Re: [PATCH 3/3] dm9601: add support ethtool style utility

2016-03-10 Thread Ben Hutchings
te1) >    ./ethtool -E eth0 magic 0x9620 offset 2 value 0xf3  (write 0xf3 to eeprom > byte2) [...] So you only tested writing 1 byte at a time.  Try again with 3 bytes and you'll see how it goes wrong. Ben. -- Ben Hutchings To err is human; to really foul things up requires a comput

Re: [PATCH 3/3] dm9601: add support ethtool style utility

2016-03-10 Thread Ben Hutchings
dm_write_eeprom_word(dev, offset / 2, > +      data[0] | data[1] << 8); > + done = 2; > + } > + data += done; > + offset += done; > + len -= done; > + } > + return 0; > +} [...] Ben. -- Ben Hutchings To err is human; to really foul things up requires a computer. signature.asc Description: This is a digitally signed message part

Re: [PATCH] cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind

2016-03-08 Thread Ben Hutchings
about it. > Beats me.  I can only say that I always find naming difficult... > We could ask Ben, who introduced it in: [...] It is supposed to imply that the device generates link-change interrupts.  Of course it is also possible for a device driver to satisfy the requirement by polling the link state. Ben. -- Ben Hutchings Sturgeon's Law: Ninety percent of everything is crap. signature.asc Description: This is a digitally signed message part

[PATCH] usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message

2015-11-17 Thread Ben Hutchings
usb_parse_ss_endpoint_companion() now decodes the burst multiplier correctly in order to check that it's <= 3, but still uses the wrong expression if warning that it's > 3. Fixes: ff30cbc8da42 ("usb: Use the USB_SS_MULT() macro to get the ...") Signed-off-by: Ben Hutchi

[PATCH] USB: musb: Fix order of conditions for assigning end point operations

2015-05-23 Thread Ben Hutchings
Currently we always assign one of the two common implementations of ep_offset and ep_select operations, overwriting any platform-specific implementations. Fixes: d026e9c76aac ("usb: musb: Change end point selection to use ...") Signed-off-by: Ben Hutchings --- This is untested; I ju

Re: [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics

2015-05-22 Thread Ben Hutchings
mitted frame. > > Fix by calculating the delta as a signed long. Told you I hadn't tested it. Ben. > Cc: Ben Hutchings > Reported-by: Florian Bruhin > Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in > cdc_ncm") > Signed-off-by: Bj

[RFC][PATCH] usbnet: Fix tx_bytes statistic running backward in cdc_ncm

2015-02-26 Thread Ben Hutchings
ace. Also, tx_bytes is only incremented by usbnet in the completion path. Fix this by requiring drivers that set FLAG_MULTI_FRAME to set a tx_bytes delta along with the tx_packets count. Signed-off-by: Ben Hutchings --- I noticed this bug while trying to fix the tx_packets statistic in asix. It depe

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

2015-02-26 Thread Ben Hutchings
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 --- I have only tested the asix driver after this change; I think cdc_ncm and o

Re: [PATCH] USB: console: fix potential use after free

2015-02-15 Thread Ben Hutchings
On Wed, 2015-02-11 at 14:55 +0800, Johan Hovold wrote: > On Tue, Feb 10, 2015 at 08:39:26PM +0000, Ben Hutchings wrote: > > On Mon, 2015-01-05 at 16:04 +0100, Johan Hovold wrote: > > > Use tty kref to release the fake tty in usb_console_setup to avoid use > > > after fr

Re: [PATCH] USB: console: fix potential use after free

2015-02-10 Thread Ben Hutchings
amp;tty->ldisc_sem); > + INIT_LIST_HEAD(&tty->tty_files); > + kref_get(&tty->driver->kref); > + tty->ops = &usb_console_fake_tty_ops; [...] Do we also need: __module_get(tty->driver->owner)

Re: "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform

2014-11-11 Thread Ben Hutchings
reg = ADVERTISE_ALL | ADVERTISE_CSMA; > + asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, reg); [...] Why is there no sleep after setting the RESET bit? Doesn't that make the following register writes unreliable? Ben. -- Ben Hutchings Experience is directly proportional to the value of equipment destroyed. - Carolyn Scheppner signature.asc Description: This is a digitally signed message part

Re: [PATCH] drivers/usb/musb/Kconfig: Use menu instead of choice for Platform Glue Layer

2014-11-05 Thread Ben Hutchings
On Wed, 2014-11-05 at 20:56 -0600, Felipe Balbi wrote: > On Thu, Nov 06, 2014 at 01:25:39AM +0000, Ben Hutchings wrote: > > A Kconfig choice only allows one 'y' selection or multiple 'm' > > selections, but it is valid to have any combination of 'y&#x

[PATCH] drivers/usb/musb/Kconfig: Use menu instead of choice for Platform Glue Layer

2014-11-05 Thread Ben Hutchings
A Kconfig choice only allows one 'y' selection or multiple 'm' selections, but it is valid to have any combination of 'y' and 'm' selections here (dependent on USB_MUSB_HDRC). Use a menu instead. Reported-by: Arnaud Patard Signed-off-by: Ben Hutchings --

Re: [PATCH fix for 3.17 1/2] xhci: Check for eps[ep_index].ring being NULL after an usb_device_reset

2014-09-28 Thread Ben Hutchings
k_ep_ring, bool check_virt_dev, const char *func) [...] Using three bool parameters is error-prone; please consider replacing them with a flags parameter and named flags. Ben. -- Ben Hutchings This sentence contradicts itself - no actually it doesn't. signature.asc Description: This is a digitally signed message part

Re: [PATCH net-next v2 00/12] cdc_ncm: add buffer tuning and stats using ethtool

2014-06-08 Thread Ben Hutchings
. If that's still not small enough, the answer might be to put a limited reimplementation of ethtool in busybox, toybox or similar. Ben. -- Ben Hutchings Never attribute to conspiracy what can adequately be explained by stupidity. signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/5] USB: ftdi_sio: fix null deref at port probe

2014-06-05 Thread Ben Hutchings
; Tested-by: Mike Remski > Cc: # 2.3.61 [...] Or maybe 2.6.31? Ben. -- Ben Hutchings I say we take off; nuke the site from orbit. It's the only way to be sure. signature.asc Description: This is a digitally signed message part

Re: Bug#738113: linux-image-3.12-1-amd64: regression in xhci_hcd: USB3 doesn't work anymore

2014-03-09 Thread Ben Hutchings
On Fri, 2014-03-07 at 10:32 -0800, Sarah Sharp wrote: > On Tue, Feb 11, 2014 at 06:11:09PM +0100, Andreas Cadhalpun wrote: > > Hi, > > > > thanks for looking into the issue. > > > > On 11.02.2014 17:40, Sarah Sharp wrote: > > >On Sat, Feb 08, 201

Re: [PATCH net-next v2 10/13] r8152: support IPv6

2014-03-09 Thread Ben Hutchings
+ th = tcp_hdr(skb); > + > + th->check = 0; > + th->check = ~tcp_v6_check(0, &ipv6h->saddr, &ipv6h->daddr, 0); [...] I think you need to call skb_cow_head() before editing the header here. Ben. -- Ben Hutchings I say we take off; nuke the site from orbit. It's the only way to be sure. signature.asc Description: This is a digitally signed message part

Re: Bug#738113: linux-image-3.12-1-amd64: regression in xhci_hcd: USB3 doesn't work anymore

2014-02-07 Thread Ben Hutchings
On Fri, 2014-02-07 at 21:06 +0100, Andreas Cadhalpun wrote: > Package: src:linux > Version: 3.12.9-1 > Severity: important > X-Debbugs-CC: Ben Hutchings > > Dear Maintainer, > > linux 3.12.9-1 introduced a regression in xhci_hcd: USB3 does not work > any more! (see t

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Ben Hutchings
n't think I've seen this particular symptom though, and it might indicate a bug in usbnet. [...] > [2] http://i.imgur.com/NCanPUY.jpg For those joining us on linux-usb, this is a photo of the panic. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that&

Re: [PATCH net-next v2 6/6] r8152: support RTL8153

2014-01-08 Thread Ben Hutchings
ike this. Creating an udev rule to select a specific > > counfiguration when the device is plugged is more useful for normal > > usage. > > Thanks for your answer. I would study udev rule first. > Does the udev alwayes exist for all Linux system, such as > Android, emb

Re: Bug#733826: [PATCH] xhci: Set scatter-gather limit to avoid failed block writes.

2014-01-06 Thread Ben Hutchings
ainst the Debian kernel package by following the instructions here: http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official Ben. -- Ben Hutchings Any smoothly functioning technology is indistinguishable from a rigged demo. signature.asc Description: This is a digitally signed message part

Re: Bug#733826: crazy loop "xhci_hcd Too many fragments"

2014-01-06 Thread Ben Hutchings
On Mon, Jan 06, 2014 at 10:06:33AM -0500, Alan Stern wrote: > On Mon, 6 Jan 2014, Ben Hutchings wrote: > > > On Sat, 2014-01-04 at 05:44 +0800, jida...@jidanni.org wrote: > > > >>>>> "BH" == Ben Hutchings writes: > > > BH> And what were

Re: Bug#733826: crazy loop "xhci_hcd Too many fragments"

2014-01-05 Thread Ben Hutchings
On Sat, 2014-01-04 at 05:44 +0800, jida...@jidanni.org wrote: > >>>>> "BH" == Ben Hutchings writes: > BH> And what were those error messages? > BH> Which USB devices are you using (this is probably disk or network > BH> related)? > > I had

[PATCH] xhci: Avoid infinite loop when sg urb requires too many trbs

2014-01-05 Thread Ben Hutchings
d not return an error code that suggests it might be worth retrying. Change it to -EINVAL. Reported-by: jida...@jidanni.org References: http://bugs.debian.org/733907 Fixes: 35773dac5f86 ('usb: xhci: Link TRB must not occur within a USB payload burst') Cc: stable # 3.12 Signed-off-by

Re: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-18 Thread Ben Hutchings
e has been some work to allow for using both the frags array and frag list, but a driver will not see such an skb if it does not advertise the NETIF_F_FRAGLIST feature. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job.

Re: [PATCH] usb: xhci: Link TRB must not occur with a USB payload burst.

2013-11-15 Thread Ben Hutchings
27;head' area). (I'm ignoring NETIF_F_FRAGLIST which is not normally supported by physical device drivers.) I don't know how many fragments that can end up as, at the USB level. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the

Re: [Pull request] Fix moxa firmware filenames

2013-09-29 Thread Ben Hutchings
> moxa: Fix firmware file names. (2013-09-05 13:18:07 +0200) > > ---- -- Ben Hutchings Life is like a sewer: what you get out of it depends on what you put into it. signature.asc Description: This is a digitally signed message part

Re: [PATCH 01/51] DMA-API: provide a helper to set both DMA and coherent DMA masks

2013-09-19 Thread Ben Hutchings
f. I would suggest: "The coherent mask can always be set to the same or a smaller mask than the streaming mask." Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare pr

Re: [PATCH-SR9700] Merge USB 1.1 Ethernet Adapter SR9700 Device Driver into the Linux Kernel

2013-08-20 Thread Ben Hutchings
usb_interface *intf) > +{ [...] > + /* read MAC */ > + if (sr_read(dev, PAR, ETH_ALEN, dev->net->dev_addr) < 0) { > + printk(KERN_ERR "Error reading MAC address\n"); > + ret = -ENODEV; > + goto out; > + } [...] I

Re: [PULL] Moxa UPort firmware

2013-08-09 Thread Ben Hutchings
On Fri, 2013-08-09 at 09:10 +0200, Andrew Lunn wrote: > On Thu, Aug 08, 2013 at 11:00:20PM +0200, Ben Hutchings wrote: > > On Thu, 2013-08-08 at 12:20 +0200, Andrew Lunn wrote: > > > Hi Ben, David > > > > > > Here is a pull request for firmware for Moxa USB-Ser

Re: [PULL] Moxa UPort firmware

2013-08-08 Thread Ben Hutchings
the Moxa USB-Serial hubs (2013-08-08 > 12:04:52 +0200) [...] Pulled and pushed out, thanks. Ben. -- Ben Hutchings The two most common things in the universe are hydrogen and stupidity. signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ben Hutchings
On Thu, 2013-07-25 at 22:52 +0800, Ming Lei wrote: [...] > On Thu, Jul 25, 2013 at 9:34 PM, Ben Hutchings > wrote: > > > > Not that I have any experience with USB drivers, but perhaps > > usb_sg_init()? > > USB SG library doesn't support submitting SG URB as

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ben Hutchings
e the problem. > > > > If one skb has 2 fragments of 32KB, couldn't they be split into 64 1K > > segments by the device driver ? > > OK, if length of fragments of all SKBs from network stack can always guarantee > to be divided by 1024, that is fine, seems I wor

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
On Mon, 2013-07-22 at 11:47 -0700, Eric Dumazet wrote: > On Mon, 2013-07-22 at 19:38 +0100, Ben Hutchings wrote: > > On Mon, 2013-07-22 at 11:29 -0700, Grant Grundler wrote: > > > On Mon, Jul 22, 2013 at 10:07 AM, Eric Dumazet > > > wrote: > > > ... >

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
should already be linear > > As Ben Hutchings pointed out, hw_features is still setting this...but > I'm not sure how that matters. > > ax88179_set_features() doesn't allow setting SG or TSO features. But > I expect it would be "not too difficult" to add such

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-22 Thread Ben Hutchings
tx_hdr2 |= 0x80008000; /* Enable padding */ > > > > - skb_linearize(skb); > > + if (skb_linearize(skb)) > > + return NULL; > > + > > > > I guess that if a driver does not advertise NETIF_F_SG, this > skb_linearize() call i

Re: [PATCH net 2/2] usb/net/r815x: fix cast to restricted __le32

2013-07-15 Thread Ben Hutchings
pe(udev, 0), > RTL815x_REQ_GET_REGS, RTL815x_REQT_READ, > - index, MCU_TYPE_PLA, &data, sizeof(data), 500); > + index, MCU_TYPE_PLA, &ocp_data, sizeof(ocp_data), > + 500); [...]

Re: [PATCH] USB: serial/ftdi_sio.c Fix kernel oops

2013-06-12 Thread Ben Hutchings
> + if (old_termios && > + (old_termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)) == > (termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB))) > goto no_data_parity_stop_changes; > -- Ben Hutchings friends: People who know you well, but like you anyway. signature.asc Description: This is a digitally signed message part

Re: [PATCH] build some drivers only when compile-testing

2013-05-23 Thread Ben Hutchings
wer architecture. > > +config COMPILE_TEST > > + bool "Compile also drivers which will not load" if EXPERT > > EXPERT is getting to be the "let's hide it here" option, isn't it... This little detail seems likely to reduce the usefulness of randco

Re: [PATCH net,stable-3.8] net: cdc_ncm, cdc_mbim: allow user to prefer NCM for backwards compatibility

2013-03-16 Thread Ben Hutchings
On Fri, 2013-03-15 at 08:02 +0100, Bjørn Mork wrote: > Ben Hutchings writes: > > > On Thu, 2013-03-14 at 12:05 +0100, Bjørn Mork wrote: > >> commit bd329e1 ("net: cdc_ncm: do not bind to NCM compatible MBIM devices") > >> introduced a new policy, prefer

Re: [PATCH net,stable-3.8] net: cdc_ncm, cdc_mbim: allow user to prefer NCM for backwards compatibility

2013-03-14 Thread Ben Hutchings
t least for Debian, where we can't assume kernel and userland are always updated together - I think the compile-time default should be false, and the userland package (presumably ModemManager?) can install a modprobe.conf file to override that once it can handle MBIM. We handled KMS transiti

Re: RFC: [PATCH 1/3] usb: cdc_ncm: patch for VMware

2013-03-11 Thread Ben Hutchings
/* * Check if we are running on VMware's hypervisor and bail out * if we are not. */ if (x86_hyper != &x86_hyper_vmware) return -ENODEV; Obviously for a non-x86-specific driver this needs to be conditional on #ifdef CONFIG_X86. Ben. -

Re: [RFC] USB: storage: in-kernel modeswitching is deprecated

2013-03-04 Thread Ben Hutchings
On Mon, Mar 04, 2013 at 10:57:22PM +0100, Bjørn Mork wrote: > Signed-off-by: Bjørn Mork > --- > So, is something like this good enough? > > > Bjørn [...] I think this comment is good, but then it's not my driver. Ben. -- Ben Hutchings We get into the habit of livi

Re: [PATCH] USB: storage: fix Huawei mode switching regression

2013-03-04 Thread Ben Hutchings
ystems. The long term plan is to remove > the list, not to add to it. Ref: > http://permalink.gmane.org/gmane.linux.usb.general/28543 [...] Can you add a comment to this effect? Ben. -- Ben Hutchings Always try to do things in chronological order; it's less confusing that way. si

Re: [PATCH, resubmit] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-02-07 Thread Ben Hutchings
} [...] Isn't tmp going to be in little-endian byte order, so this doesn't work correctly on a big-endian system? There are a lot of reads and writes of 16-bit registers using ax88179_{read,write}_cmd(); maybe you should add ax88179_{read,write}_le16() to handle this specific ca

Re: xHCI immediately wakes up Asus P8Z68-V LX in S5

2013-01-21 Thread Ben Hutchings
On Mon, Jan 21, 2013 at 09:33:15AM -0800, Sarah Sharp wrote: > On Mon, Jan 21, 2013 at 12:00:14AM +0000, Ben Hutchings wrote: > > I finally got enough email out of the way to get back to this: > > > > On Wed, 2012-12-19 at 16:23 -0800, Sarah Sharp wrote: > > > On W

Re: xHCI immediately wakes up Asus P8Z68-V LX in S5

2013-01-20 Thread Ben Hutchings
I finally got enough email out of the way to get back to this: On Wed, 2012-12-19 at 16:23 -0800, Sarah Sharp wrote: > On Wed, Dec 19, 2012 at 03:15:09AM +0000, Ben Hutchings wrote: [...] > > I set sysctl kernel.printk=8 and recorded the screen during shutdown, > > from which I

Re: [REVERT][v3.x.y] EHCI: Update qTD next pointer in QH overlay region during unlink

2013-01-17 Thread Ben Hutchings
revert needs to be done there and cc'd to stable. We only revert directly in stable branches if the revert is not appropriate in mainline. Ben. -- Ben Hutchings We get into the habit of living before acquiring the habit of thinking.

Re: xHCI immediately wakes up Asus P8Z68-V LX in S5

2012-12-18 Thread Ben Hutchings
On Mon, 2012-12-17 at 13:28 -0800, Sarah Sharp wrote: > On Sun, Dec 16, 2012 at 12:37:00AM +0000, Ben Hutchings wrote: > > Since Linux 3.2.16, my desktop with an Asus P8Z68-V LX motherboard > > always wakes up a few seconds after I shutdown. I then have to switch > > it off

xHCI immediately wakes up Asus P8Z68-V LX in S5

2012-12-15 Thread Ben Hutchings
pping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- /sys/bus/pci/devices/:04:00.0/power/wakeup' does *not* work around this. I can try updating the BIOS if you think this might help (the description of changes is very vague).

Re: kmemleak report on isp1763 and sierra MC8705

2012-11-25 Thread Ben Hutchings
ection) it was leaking 1192 bytes > > > per occurrence. > > > > The leak affects every failed probe, for example due to blacklisted > > interfaces which is quite common, so commit 0658a3366db7 ("usb: use > > usb_serial_put in usb_serial_probe errors) should be backported to the > > <= 3.4 stable trees. > > Thanks, now applied. Also queued up for 3.2. Ben. -- Ben Hutchings Never attribute to conspiracy what can adequately be explained by stupidity. signature.asc Description: This is a digitally signed message part

Re: [stable] xHCI: handle command after aborting the command ring

2012-10-14 Thread Ben Hutchings
On Sat, 2012-10-13 at 12:00 -0700, Jonathan Nieder wrote: > Hi Ben, > > Ben Hutchings wrote: > > > I'm trying to apply: > > > > commit b63f4053cc8aa22a98e3f9a97845afe6c15d0a0d > [...] > > to 3.2.y. A simple cherry-pick doesn't compile because t

[stable] xHCI: handle command after aborting the command ring

2012-10-13 Thread Ben Hutchings
d argument ('consumer'), and I don't know what the correct value would be. Please provide a backported version or just let me know the correct value of consumer would be. Ben. -- Ben Hutchings Humans are not rational beings; they are rationalising beings. signature.asc Description: T