<div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-family:Arial,Helvetica,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);color:rgb(0,0,0);font-size:12.8px"></div><div style="font-size:12.8px"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 10:21 AM Bobby Jones <<a href="mailto:rjones@gateworks.com">rjones@gateworks.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello net-dev,<br>
<br>
I'm diagnosing a problem with the Toby MPCI-L201 cellular modem where<br>
http operations hang. This is reproducible on the most recent kernel<br>
by turning on the rndis_host driver and executing a wget or similar<br>
http command. I found I was able to still ping but not transfer any<br>
data. After bisecting I've found that commit<br>
a5a18bdf7453d505783e40e47ebb84bfdd35f93b introduces this hang.<br>
<br>
For reference the patch contents are:<br>
<br>
> rndis_host: Set valid random MAC on buggy devices<br>
><br>
> Some devices of the same type all export the same, random MAC address. This<br>
> behavior has been seen on the ZTE MF910, MF823 and MF831, and there are<br>
> probably more devices out there. Fix this by generating a valid random MAC<br>
> address if we read a random MAC from device.<br>
><br>
> Also, changed the memcpy() to ether_addr_copy(), as pointed out by<br>
> checkpatch.<br>
><br>
> Suggested-by: Bjørn Mork <<a href="mailto:bjorn@mork.no" target="_blank">bjorn@mork.no</a>><br>
> Signed-off-by: Kristian Evensen <<a href="mailto:kristian.evensen@gmail.com" target="_blank">kristian.evensen@gmail.com</a>><br>
> Signed-off-by: David S. Miller <<a href="mailto:davem@davemloft.net" target="_blank">davem@davemloft.net</a>><br>
> diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c<br>
> index 524a47a28120..4f4f71b2966b 100644<br>
> --- a/drivers/net/usb/rndis_host.c<br>
> +++ b/drivers/net/usb/rndis_host.c<br>
> @@ -428,7 +428,11 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)<br>
> dev_err(&intf->dev, "rndis get ethaddr, %d\n", retval);<br>
> goto halt_fail_and_release;<br>
> }<br>
> - memcpy(net->dev_addr, bp, ETH_ALEN);<br>
> +<br>
> + if (bp[0] & 0x02)<br>
> + eth_hw_addr_random(net);<br>
> + else<br>
> + ether_addr_copy(net->dev_addr, bp);<br>
><br>
> /* set a nonzero filter to enable data transfers */<br>
> memset(u.set, 0, sizeof *u.set);<br>
<br>
I know that there is some internal routing done by the modem firmware,<br>
and I'm assuming that overwriting the MAC address breaks said routing.<br>
Can anyone suggest what a proper fix would be?<br>
<br>
Thanks,<br>
Bobby<br></blockquote><div><br></div><div>Adding some individuals and lists in hopes for feedback.</div></div></div>