Commit 89930b7b authored by Denis Joseph Barrow's avatar Denis Joseph Barrow Committed by David S. Miller

hso: Fix URB submission -EINVAL.

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: default avatarDenis Joseph Barrow <D.Barow@option.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a3e8181
...@@ -2762,11 +2762,13 @@ static int hso_resume(struct usb_interface *iface) ...@@ -2762,11 +2762,13 @@ static int hso_resume(struct usb_interface *iface)
if (network_table[i] && if (network_table[i] &&
(network_table[i]->interface == iface)) { (network_table[i]->interface == iface)) {
hso_net = dev2net(network_table[i]); hso_net = dev2net(network_table[i]);
/* First transmit any lingering data, then restart the if (hso_net->flags & IFF_UP) {
* device. */ /* First transmit any lingering data,
then restart the device. */
if (hso_net->skb_tx_buf) { if (hso_net->skb_tx_buf) {
dev_dbg(&iface->dev, dev_dbg(&iface->dev,
"Transmitting lingering data\n"); "Transmitting"
" lingering data\n");
hso_net_start_xmit(hso_net->skb_tx_buf, hso_net_start_xmit(hso_net->skb_tx_buf,
hso_net->net); hso_net->net);
hso_net->skb_tx_buf = NULL; hso_net->skb_tx_buf = NULL;
...@@ -2776,6 +2778,7 @@ static int hso_resume(struct usb_interface *iface) ...@@ -2776,6 +2778,7 @@ static int hso_resume(struct usb_interface *iface)
goto out; goto out;
} }
} }
}
out: out:
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment