hso for error -22 (-EINVAL) printk's
Subsystems (4)
PATCH 1/1 hso for error -22 (-EINVAL) printk's
Added check for IFF_UP in hso_resume, this should eliminate -EINVAL (-22) errors caused from urb's being submitted twice, once by hso_resume & once in hso_net_open, if suspend/resume USB power saving mode is enabled
Signed-off-by Denis Joseph Barrow <[email protected]>
---
drivers/net/usb/hso.c +14 -11
@@ -2606,18 +2606,21 @@if (network_table[i] && (network_table[i]->interface == iface)) { hso_net =dev2net (network_table[i]); -/* First transmit any lingering data, then restart the -* device. */ -if (hso_net->skb_tx_buf) { -dev_dbg (&iface->dev, -"Transmitting lingering data\n" ); -hso_net_start_xmit (hso_net->skb_tx_buf, - hso_net->net); - hso_net->skb_tx_buf =NULL ; +if (hso_net->flags &IFF_UP ) { +/* First transmit any lingering data, +then restart the device. */ +if (hso_net->skb_tx_buf) { +dev_dbg (&iface->dev, +"Transmitting" +" lingering data\n" ); +hso_net_start_xmit (hso_net->skb_tx_buf, + hso_net->net); + hso_net->skb_tx_buf =NULL ; + } + result =hso_start_net_device (network_table[i]); +if (result) + goto out; } - result =hso_start_net_device (network_table[i]); -if (result) - goto out; } }
Signature · 6 lines
best regards, D.J. Barrow -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 25 lines · Denis Joseph Barrow
Added check for
IFF_UPinhso_resume, this should eliminate-EINVAL(-22) errors caused from urb's being submitted twice, once byhso_resume& once inhso_net_open, if suspend/resume USB power saving mode is enabledSigned-off-by Denis Joseph Barrow <[email protected]>---
Index:linux-2.6.27-rc6/drivers/net/usb/hso.c
===================================================================drivers/net/usb/hso.c +4
-8@@ -2606,18 +2606,21 @@if (network_table[i] && (network_table[i]->interface == iface)) { hso_net =dev2net (network_table[i]); -/* First transmit any lingering data, then restart the -* device. */ -if (hso_net->skb_tx_buf) { -dev_dbg (&iface->dev, -"Transmitting lingering data\n" ); -hso_net_start_xmit (hso_net->skb_tx_buf, - hso_net->net); - hso_net->skb_tx_buf =NULL ; +if (hso_net->flags &IFF_UP ) { +/* First transmit any lingering data, +then restart the device. */ +if (hso_net->skb_tx_buf) {
drivers/net/usb/hso.c line 2622
Quoted 10 lines
drivers/net/usb/hso.c +10
-0+dev_dbg (&iface->dev, +"Transmitting" +" lingering data\n" ); +hso_net_start_xmit (hso_net->skb_tx_buf, + hso_net->net); + hso_net->skb_tx_buf =NULL ; + } + result =hso_start_net_device (network_table[i]); +if (result) + goto out;
you should be checking netif_running() not IFF_UP