Do not resume any I/O, including the delayed write queue, on closed
ports.
Note that this currently has no functional impact due to the
usb_autopm_get_interface() in close(), but that call is about to be
removed by a follow-up patch.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
port = serial->port[i];
portdata = usb_get_serial_port_data(port);
- if (!portdata)
+ if (!portdata || !portdata->opened)
continue;
while ((urb = usb_get_from_anchor(&portdata->delayed))) {
}
}
- if (portdata->opened) {
- err = sierra_submit_rx_urbs(port, GFP_ATOMIC);
- if (err)
- ec++;
- }
+ err = sierra_submit_rx_urbs(port, GFP_ATOMIC);
+ if (err)
+ ec++;
}
intfdata->suspended = 0;
spin_unlock_irq(&intfdata->susp_lock);