diff options
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index bb8b3b123c7d..f71d1b34c3b1 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -270,36 +270,19 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs) | |||
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | 272 | ||
273 | static inline unsigned long get_timeout(struct ide_atapi_pc *pc) | ||
274 | { | ||
275 | return max_t(unsigned long, WAIT_CMD, pc->timeout - jiffies); | ||
276 | } | ||
277 | |||
278 | static int idescsi_expiry(ide_drive_t *drive) | ||
279 | { | ||
280 | struct ide_atapi_pc *pc = drive->pc; | ||
281 | |||
282 | debug_log("%s called for %lu at %lu\n", __func__, | ||
283 | pc->scsi_cmd->serial_number, jiffies); | ||
284 | |||
285 | pc->flags |= PC_FLAG_TIMEDOUT; | ||
286 | |||
287 | return 0; /* we do not want the ide subsystem to retry */ | ||
288 | } | ||
289 | |||
290 | /* | 273 | /* |
291 | * Our interrupt handler. | 274 | * Our interrupt handler. |
292 | */ | 275 | */ |
293 | static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) | 276 | static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) |
294 | { | 277 | { |
295 | return ide_pc_intr(drive, idescsi_pc_intr, get_timeout(drive->pc), | 278 | return ide_pc_intr(drive, idescsi_pc_intr, NULL, NULL, ide_io_buffers); |
296 | idescsi_expiry, NULL, NULL, ide_io_buffers); | ||
297 | } | 279 | } |
298 | 280 | ||
299 | static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) | 281 | static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) |
300 | { | 282 | { |
301 | return ide_transfer_pc(drive, idescsi_pc_intr, | 283 | return ide_transfer_pc(drive, idescsi_pc_intr, |
302 | get_timeout(drive->pc), idescsi_expiry); | 284 | ide_scsi_get_timeout(drive->pc), |
285 | ide_scsi_expiry); | ||
303 | } | 286 | } |
304 | 287 | ||
305 | static inline int idescsi_set_direction(struct ide_atapi_pc *pc) | 288 | static inline int idescsi_set_direction(struct ide_atapi_pc *pc) |
@@ -348,7 +331,7 @@ static ide_startstop_t idescsi_issue_pc(ide_drive_t *drive, | |||
348 | drive->pc = pc; | 331 | drive->pc = pc; |
349 | 332 | ||
350 | return ide_issue_pc(drive, idescsi_transfer_pc, | 333 | return ide_issue_pc(drive, idescsi_transfer_pc, |
351 | get_timeout(pc), idescsi_expiry); | 334 | ide_scsi_get_timeout(pc), ide_scsi_expiry); |
352 | } | 335 | } |
353 | 336 | ||
354 | /* | 337 | /* |