option.c (418f19ea17a99421b22a64e101e14b6a16bed66d) option.c (50de36f7af3b1d791c402478210790c582126fe5)
1/*
2 USB Driver for GSM modems
3
4 Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
5
6 This driver is free software; you can redistribute it and/or modify
7 it under the terms of Version 2 of the GNU General Public License as
8 published by the Free Software Foundation.

--- 640 unchanged lines hidden (view full) ---

649 this_urb = portdata->out_urbs[i];
650 if (test_and_set_bit(i, &portdata->out_busy)) {
651 if (time_before(jiffies,
652 portdata->tx_start_time[i] + 10 * HZ))
653 continue;
654 usb_unlink_urb(this_urb);
655 continue;
656 }
1/*
2 USB Driver for GSM modems
3
4 Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
5
6 This driver is free software; you can redistribute it and/or modify
7 it under the terms of Version 2 of the GNU General Public License as
8 published by the Free Software Foundation.

--- 640 unchanged lines hidden (view full) ---

649 this_urb = portdata->out_urbs[i];
650 if (test_and_set_bit(i, &portdata->out_busy)) {
651 if (time_before(jiffies,
652 portdata->tx_start_time[i] + 10 * HZ))
653 continue;
654 usb_unlink_urb(this_urb);
655 continue;
656 }
657 if (this_urb->status != 0)
658 dbg("usb_write %p failed (err=%d)",
659 this_urb, this_urb->status);
660
661 dbg("%s: endpoint %d buf %d", __func__,
662 usb_pipeendpoint(this_urb->pipe), i);
663
664 /* send the data */
665 memcpy(this_urb->transfer_buffer, buf, todo);
666 this_urb->transfer_buffer_length = todo;
667
668 this_urb->dev = port->serial->dev;
669 err = usb_submit_urb(this_urb, GFP_ATOMIC);
670 if (err) {
671 dbg("usb_submit_urb %p (write bulk) failed "
657 dbg("%s: endpoint %d buf %d", __func__,
658 usb_pipeendpoint(this_urb->pipe), i);
659
660 /* send the data */
661 memcpy(this_urb->transfer_buffer, buf, todo);
662 this_urb->transfer_buffer_length = todo;
663
664 this_urb->dev = port->serial->dev;
665 err = usb_submit_urb(this_urb, GFP_ATOMIC);
666 if (err) {
667 dbg("usb_submit_urb %p (write bulk) failed "
672 "(%d, has %d)", this_urb,
673 err, this_urb->status);
668 "(%d)", this_urb, err);
674 clear_bit(i, &portdata->out_busy);
675 continue;
676 }
677 portdata->tx_start_time[i] = jiffies;
678 buf += todo;
679 left -= todo;
680 }
681

--- 449 unchanged lines hidden ---
669 clear_bit(i, &portdata->out_busy);
670 continue;
671 }
672 portdata->tx_start_time[i] = jiffies;
673 buf += todo;
674 left -= todo;
675 }
676

--- 449 unchanged lines hidden ---