diff options
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 94d1de55607f..65b19695ebe2 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -344,7 +344,7 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co | |||
344 | pc->buffer = buf; | 344 | pc->buffer = buf; |
345 | pc->c[0] = REQUEST_SENSE; | 345 | pc->c[0] = REQUEST_SENSE; |
346 | pc->c[4] = pc->request_transfer = pc->buffer_size = SCSI_SENSE_BUFFERSIZE; | 346 | pc->c[4] = pc->request_transfer = pc->buffer_size = SCSI_SENSE_BUFFERSIZE; |
347 | rq->flags = REQ_SENSE; | 347 | rq->cmd_type = REQ_TYPE_SENSE; |
348 | pc->timeout = jiffies + WAIT_READY; | 348 | pc->timeout = jiffies + WAIT_READY; |
349 | /* NOTE! Save the failed packet command in "rq->buffer" */ | 349 | /* NOTE! Save the failed packet command in "rq->buffer" */ |
350 | rq->buffer = (void *) failed_command->special; | 350 | rq->buffer = (void *) failed_command->special; |
@@ -398,12 +398,12 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs) | |||
398 | int errors = rq->errors; | 398 | int errors = rq->errors; |
399 | unsigned long flags; | 399 | unsigned long flags; |
400 | 400 | ||
401 | if (!(rq->flags & (REQ_SPECIAL|REQ_SENSE))) { | 401 | if (!blk_special_request(rq) && !blk_sense_request(rq)) { |
402 | ide_end_request(drive, uptodate, nrsecs); | 402 | ide_end_request(drive, uptodate, nrsecs); |
403 | return 0; | 403 | return 0; |
404 | } | 404 | } |
405 | ide_end_drive_cmd (drive, 0, 0); | 405 | ide_end_drive_cmd (drive, 0, 0); |
406 | if (rq->flags & REQ_SENSE) { | 406 | if (blk_sense_request(rq)) { |
407 | idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer; | 407 | idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer; |
408 | if (log) { | 408 | if (log) { |
409 | printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number); | 409 | printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number); |
@@ -712,7 +712,7 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r | |||
712 | printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %d\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors); | 712 | printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %d\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors); |
713 | #endif /* IDESCSI_DEBUG_LOG */ | 713 | #endif /* IDESCSI_DEBUG_LOG */ |
714 | 714 | ||
715 | if (rq->flags & (REQ_SPECIAL|REQ_SENSE)) { | 715 | if (blk_sense_request(rq) || blk_special_request(rq)) { |
716 | return idescsi_issue_pc (drive, (idescsi_pc_t *) rq->special); | 716 | return idescsi_issue_pc (drive, (idescsi_pc_t *) rq->special); |
717 | } | 717 | } |
718 | blk_dump_rq_flags(rq, "ide-scsi: unsup command"); | 718 | blk_dump_rq_flags(rq, "ide-scsi: unsup command"); |
@@ -938,7 +938,7 @@ static int idescsi_queue (struct scsi_cmnd *cmd, | |||
938 | 938 | ||
939 | ide_init_drive_cmd (rq); | 939 | ide_init_drive_cmd (rq); |
940 | rq->special = (char *) pc; | 940 | rq->special = (char *) pc; |
941 | rq->flags = REQ_SPECIAL; | 941 | rq->cmd_type = REQ_TYPE_SPECIAL; |
942 | spin_unlock_irq(host->host_lock); | 942 | spin_unlock_irq(host->host_lock); |
943 | rq->rq_disk = scsi->disk; | 943 | rq->rq_disk = scsi->disk; |
944 | (void) ide_do_drive_cmd (drive, rq, ide_end); | 944 | (void) ide_do_drive_cmd (drive, rq, ide_end); |
@@ -992,7 +992,7 @@ static int idescsi_eh_abort (struct scsi_cmnd *cmd) | |||
992 | */ | 992 | */ |
993 | printk (KERN_ERR "ide-scsi: cmd aborted!\n"); | 993 | printk (KERN_ERR "ide-scsi: cmd aborted!\n"); |
994 | 994 | ||
995 | if (scsi->pc->rq->flags & REQ_SENSE) | 995 | if (blk_sense_request(scsi->pc->rq)) |
996 | kfree(scsi->pc->buffer); | 996 | kfree(scsi->pc->buffer); |
997 | kfree(scsi->pc->rq); | 997 | kfree(scsi->pc->rq); |
998 | kfree(scsi->pc); | 998 | kfree(scsi->pc); |
@@ -1042,7 +1042,7 @@ static int idescsi_eh_reset (struct scsi_cmnd *cmd) | |||
1042 | /* kill current request */ | 1042 | /* kill current request */ |
1043 | blkdev_dequeue_request(req); | 1043 | blkdev_dequeue_request(req); |
1044 | end_that_request_last(req, 0); | 1044 | end_that_request_last(req, 0); |
1045 | if (req->flags & REQ_SENSE) | 1045 | if (blk_sense_request(req)) |
1046 | kfree(scsi->pc->buffer); | 1046 | kfree(scsi->pc->buffer); |
1047 | kfree(scsi->pc); | 1047 | kfree(scsi->pc); |
1048 | scsi->pc = NULL; | 1048 | scsi->pc = NULL; |