aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 7d3d03f98914..67e9ed95f669 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -331,7 +331,8 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r
331 if (blk_sense_request(rq) || blk_special_request(rq)) { 331 if (blk_sense_request(rq) || blk_special_request(rq)) {
332 struct ide_atapi_pc *pc = (struct ide_atapi_pc *)rq->special; 332 struct ide_atapi_pc *pc = (struct ide_atapi_pc *)rq->special;
333 333
334 if (drive->using_dma && !idescsi_map_sg(drive, pc)) 334 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) &&
335 idescsi_map_sg(drive, pc) == 0)
335 pc->flags |= PC_FLAG_DMA_OK; 336 pc->flags |= PC_FLAG_DMA_OK;
336 337
337 return idescsi_issue_pc(drive, pc); 338 return idescsi_issue_pc(drive, pc);
@@ -415,7 +416,7 @@ static void ide_scsi_remove(ide_drive_t *drive)
415 416
416 ide_scsi_put(scsi); 417 ide_scsi_put(scsi);
417 418
418 drive->scsi = 0; 419 drive->dev_flags &= ~IDE_DFLAG_SCSI;
419} 420}
420 421
421static int ide_scsi_probe(ide_drive_t *); 422static int ide_scsi_probe(ide_drive_t *);
@@ -767,7 +768,7 @@ static int ide_scsi_probe(ide_drive_t *drive)
767 !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t)))) 768 !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
768 return -ENODEV; 769 return -ENODEV;
769 770
770 drive->scsi = 1; 771 drive->dev_flags |= IDE_DFLAG_SCSI;
771 772
772 g = alloc_disk(1 << PARTN_BITS); 773 g = alloc_disk(1 << PARTN_BITS);
773 if (!g) 774 if (!g)
@@ -808,7 +809,7 @@ static int ide_scsi_probe(ide_drive_t *drive)
808 809
809 put_disk(g); 810 put_disk(g);
810out_host_put: 811out_host_put:
811 drive->scsi = 0; 812 drive->dev_flags &= ~IDE_DFLAG_SCSI;
812 scsi_host_put(host); 813 scsi_host_put(host);
813 return err; 814 return err;
814} 815}