|
|
@@ -46,9 +46,6 @@ static void rtsx_usb_sg_timed_out(unsigned long data)
|
|
|
|
|
|
dev_dbg(&ucr->pusb_intf->dev, "%s: sg transfer timed out", __func__);
|
|
|
usb_sg_cancel(&ucr->current_sg);
|
|
|
-
|
|
|
- /* we know the cancellation is caused by time-out */
|
|
|
- ucr->current_sg.status = -ETIMEDOUT;
|
|
|
}
|
|
|
|
|
|
static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr,
|
|
|
@@ -67,12 +64,15 @@ static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr,
|
|
|
ucr->sg_timer.expires = jiffies + msecs_to_jiffies(timeout);
|
|
|
add_timer(&ucr->sg_timer);
|
|
|
usb_sg_wait(&ucr->current_sg);
|
|
|
- del_timer_sync(&ucr->sg_timer);
|
|
|
+ if (!del_timer_sync(&ucr->sg_timer))
|
|
|
+ ret = -ETIMEDOUT;
|
|
|
+ else
|
|
|
+ ret = ucr->current_sg.status;
|
|
|
|
|
|
if (act_len)
|
|
|
*act_len = ucr->current_sg.bytes;
|
|
|
|
|
|
- return ucr->current_sg.status;
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
int rtsx_usb_transfer_data(struct rtsx_ucr *ucr, unsigned int pipe,
|