提交 89930b7b 编写于 作者: D Denis Joseph Barrow 提交者: 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: NDenis Joseph Barrow <D.Barow@option.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4a3e8181
......@@ -2762,18 +2762,21 @@ static int hso_resume(struct usb_interface *iface)
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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册