aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-30 23:45:41 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-30 23:45:41 -0400
commit1c7da74c4aab595a994beb5fe728ebf0d0b41f59 (patch)
tree64128abdf9550ebb51d8f3ee6732d7350b9c62f2 /drivers/scsi/ide-scsi.c
parentaebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (diff)
parent1bdfd554be94def718323659173517c5d4a69d25 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 94d1de55607f..1427a41e8441 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);
@@ -708,11 +708,11 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
708static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block) 708static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block)
709{ 709{
710#if IDESCSI_DEBUG_LOG 710#if IDESCSI_DEBUG_LOG
711 printk (KERN_INFO "rq_status: %d, dev: %s, cmd: %x, errors: %d\n",rq->rq_status, rq->rq_disk->disk_name,rq->cmd[0],rq->errors); 711 printk (KERN_INFO "dev: %s, cmd: %x, errors: %d\n", rq->rq_disk->disk_name,rq->cmd[0],rq->errors);
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;