mirror of https://gitee.com/openkylin/linux.git
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: Denis Joseph Barrow <D.Barow@option.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4a3e818181
commit
89930b7b5e
|
@ -2762,18 +2762,21 @@ 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,
|
||||||
if (hso_net->skb_tx_buf) {
|
then restart the device. */
|
||||||
dev_dbg(&iface->dev,
|
if (hso_net->skb_tx_buf) {
|
||||||
"Transmitting lingering data\n");
|
dev_dbg(&iface->dev,
|
||||||
hso_net_start_xmit(hso_net->skb_tx_buf,
|
"Transmitting"
|
||||||
hso_net->net);
|
" lingering data\n");
|
||||||
hso_net->skb_tx_buf = NULL;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue