es: 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_hcd.c b/drivers/
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;
> &
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/drivers/usb/misc
/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 file
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
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|4 ++--
tools/usb/usbip/
static void dwc2_conn_id_status_change(s
> dwc2_core_init(hsotg, false, -1);
> dwc2_enable_global_interrupts(hsotg);
> spin_lock_irqsave(>lock, flags);
> + dwc2_hsotg_disconnect(hsotg);
> dwc2_hsotg_core_init_disconnected(hsotg, false)
4286 ("usbip: vhci-hcd: Add USB3 SuperSpeed support")
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
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..a20b6
_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 <ben.hutchi...@codethink.co.uk>
---
This is build-tested only.
Ben.
drivers/usb/host/xhci-mem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletio
/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(>gadget, USB_STATE_NOTATTACHED);
> }
>
> /**
>
>
>
--
Ben Hutchings
Software Developer, Codethink Ltd.
--
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
== USB_CDC_NCM_NTB32_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, Codethi
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
elect for USB_COMMON dependency")
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
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/dri
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,
> > +
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 <b...@decadent.org.uk>
---
drivers/net/usb/catc.c | 25 ++---
1
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 <b...@decadent.org.uk>
---
drivers/net/usb/rtl8150.c | 34 ++
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
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/n
n.org>
Tested-by: Lisandro Damián Nicanor Pérez Meyer <lisan...@debian.org>
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
drivers/net/usb/pegasus.c | 29 +
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/drivers/net/usb/pegasus.c b/dri
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
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 [
am 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
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 computer.
signature.asc
Description
; + 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
ything "INTR" 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
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 Hutchings <b
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 b...@decadent.org.uk
---
This is untested
.
Fix by calculating the delta as a signed long.
Told you I hadn't tested it.
Ben.
Cc: Ben Hutchings ben.hutchi...@codethink.co.uk
Reported-by: Florian Bruhin m...@the-compiler.org
Fixes: 7a1e890e2168 (usbnet: Fix tx_bytes statistic running backward in
cdc_ncm)
Signed-off-by: Bjørn Mork bj
, 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 ben.hutchi...@codethink.co.uk
---
I noticed this bug while trying to fix the tx_packets statistic
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.hutchi...@codethink.co.uk
---
I have only tested the asix driver after this change
On Wed, 2015-02-11 at 14:55 +0800, Johan Hovold wrote:
On Tue, Feb 10, 2015 at 08:39:26PM +, 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 free if the underlying serial driver
-driver-kref);
+ tty-ops = usb_console_fake_tty_ops;
[...]
Do we also need:
__module_get(tty-driver-owner);
or am I missing something?
Ben.
--
Ben Hutchings
I say we take off; nuke the site from orbit. It's the only way to be sure.
signature.asc
);
+ if (!reg)
+ 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
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 arnaud.pat...@rtp-net.org
Signed-off-by: Ben Hutchings b
On Wed, 2014-11-05 at 20:56 -0600, Felipe Balbi wrote:
On Thu, Nov 06, 2014 at 01:25:39AM +, 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' and 'm'
selections here (dependent on USB_MUSB_HDRC
*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
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
: sta...@vger.kernel.org # 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
= ~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
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, 2014 at 03:56:31AM +, Ben Hutchings wrote:
For the benefit
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 b...@decadent.org.uk
Dear Maintainer,
linux 3.12.9-1 introduced a regression in xhci_hcd: USB3 does not work
any more! (see the Kernel log
, 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's the marketing department's job.
They asked us to note
.
Thanks for your answer. I would study udev rule first.
Does the udev alwayes exist for all Linux system, such as
Android, embedded system, and so on?
They may not have udev, but if not they will normally have an alternate
such as mdev.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking
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 b...@decadent.org.uk writes:
BH And what were those error messages?
BH Which USB devices are you
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
On Sat, 2014-01-04 at 05:44 +0800, jida...@jidanni.org wrote:
BH == Ben Hutchings b...@decadent.org.uk 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 done an aptitude update on writing onto
# fdisk -l
odd about skb merged by receive offload?
I've not entirely sorted out the full structure of skb.
There 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
number of fragments in the skb is going to be 17 (including
the '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
)
--
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
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 product names are trademarked.
--
To unsubscribe from this list: send the line unsubscribe
= -ENODEV;
+ goto out;
+ }
[...]
I think this should read the MAC address from EEPROM and copy it to both
dev_addr to perm_addr. MAC address changes should not persist if the
driver is reloaded.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer
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-Serial hub devices.
Thanks
Andrew
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
SKBs from network stack can always guarantee
to be divided by 1024, that is fine, seems I worry about too much, :-)
Not that I have any experience with USB drivers, but perhaps
usb_sg_init()?
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing
On Thu, 2013-07-25 at 22:52 +0800, Ming Lei wrote:
[...]
On Thu, Jul 25, 2013 at 9:34 PM, Ben Hutchings
bhutchi...@solarflare.com wrote:
Not that I have any experience with USB drivers, but perhaps
usb_sg_init()?
USB SG library doesn't support submitting SG URB asynchronously
, this
skb_linearize() call is not needed : All frames reaching your xmit
function should already be linear
Look at the hw_features initialisation...
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
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 that ethtool
could set those features after boot
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 eric.duma...@gmail.com
wrote:
...
I guess that if a driver does
,
- index, MCU_TYPE_PLA, data, sizeof(data), 500);
+ index, MCU_TYPE_PLA, ocp_data, sizeof(ocp_data),
+ 500);
[...]
There seems to be another bug here: USB buffers must be DMA-able,
therefore cannot be placed on the stack.
Ben.
--
Ben Hutchings
)))
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
selected.
I don't know, if no one else strongly objects, I can be convinced that
this is needed, but so far, I don't see why it really is, or what this
is going to help with.
Ben.
--
Ben Hutchings
friends: People who know you well, but like you anyway.
signature.asc
Description
On Fri, 2013-03-15 at 08:02 +0100, Bjørn Mork wrote:
Ben Hutchings b...@decadent.org.uk 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, preferring MBIM for dual NCM/MBIM
having a Kconfig option for that,
though.
Ben.
--
Ben Hutchings
Humans are not rational beings; they are rationalising beings.
signature.asc
Description: This is a digitally signed message part
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.
--
Ben Hutchings, Staff Engineer
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.
signature.asc
Description
On Mon, Mar 04, 2013 at 10:57:22PM +0100, Bjørn Mork wrote:
Signed-off-by: Bjørn Mork bj...@mork.no
---
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 living before acquiring
-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 case.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
On Mon, Jan 21, 2013 at 09:33:15AM -0800, Sarah Sharp wrote:
On Mon, Jan 21, 2013 at 12:00:14AM +, 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 Wed, Dec 19, 2012 at 03:15:09AM +, Ben
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 +, Ben Hutchings wrote:
[...]
I set sysctl kernel.printk=8 and recorded the screen during shutdown,
from which I transcribe
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.
- Albert Camus
--
To unsubscribe from this list: send
On Mon, 2012-12-17 at 13:28 -0800, Sarah Sharp wrote:
On Sun, Dec 16, 2012 at 12:37:00AM +, 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 a second time. This still
of changes is very vague).
Ben.
--
Ben Hutchings
Theory and practice are closer in theory than in practice.
- John Levine, moderator of comp.compilers
signature.asc
Description: This is a digitally signed message part
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
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 the inc_deq()
function requires a 3rd argument ('consumer
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
74 matches
Mail list logo