aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:36 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:36 -0400
commit97100fc816badbbc162644cfde7ad39ae9211fb4 (patch)
tree904faf5453c2dea32fa3fde5fda230118f3effda /drivers/scsi
parentbe3c096ebdbe3c828aacb5473751a22840753eff (diff)
ide: add device flags
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields to IDE_DFLAG_* flags. While at it: - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48 - fixup some comments - remove needless g->flags zeroing from ide*_probe() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/scsi')
-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}