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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 81c16cba5417..b1b506f31be8 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -452,7 +452,7 @@ static inline void idescsi_add_settings(ide_drive_t *drive) { ; }
452 */ 452 */
453static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi) 453static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
454{ 454{
455 if (drive->id && (drive->id->config & 0x0060) == 0x20) 455 if ((drive->id[ATA_ID_CONFIG] & 0x0060) == 0x20)
456 set_bit(IDE_AFLAG_DRQ_INTERRUPT, &drive->atapi_flags); 456 set_bit(IDE_AFLAG_DRQ_INTERRUPT, &drive->atapi_flags);
457 clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform); 457 clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
458#if IDESCSI_DEBUG_LOG 458#if IDESCSI_DEBUG_LOG
@@ -811,6 +811,7 @@ static int ide_scsi_probe(ide_drive_t *drive)
811 struct gendisk *g; 811 struct gendisk *g;
812 static int warned; 812 static int warned;
813 int err = -ENOMEM; 813 int err = -ENOMEM;
814 u16 last_lun;
814 815
815 if (!warned && drive->media == ide_cdrom) { 816 if (!warned && drive->media == ide_cdrom) {
816 printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n"); 817 printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
@@ -836,12 +837,12 @@ static int ide_scsi_probe(ide_drive_t *drive)
836 837
837 host->max_id = 1; 838 host->max_id = 1;
838 839
839 if (drive->id->last_lun) 840 last_lun = drive->id[ATA_ID_LAST_LUN];
840 debug_log("%s: id->last_lun=%u\n", drive->name, 841 if (last_lun)
841 drive->id->last_lun); 842 debug_log("%s: last_lun=%u\n", drive->name, last_lun);
842 843
843 if ((drive->id->last_lun & 0x7) != 7) 844 if ((last_lun & 7) != 7)
844 host->max_lun = (drive->id->last_lun & 0x7) + 1; 845 host->max_lun = (last_lun & 7) + 1;
845 else 846 else
846 host->max_lun = 1; 847 host->max_lun = 1;
847 848