diff options
-rw-r--r-- | drivers/ide/h8300/ide-h8300.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide.c | 2 | ||||
-rw-r--r-- | drivers/ide/legacy/ide-4drives.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 32 |
8 files changed, 9 insertions, 39 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index bde7a585f198..e2cdd2e9cdec 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -80,7 +80,7 @@ static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
80 | outb(tf->lbah, io_ports->lbah_addr); | 80 | outb(tf->lbah, io_ports->lbah_addr); |
81 | 81 | ||
82 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 82 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) |
83 | outb((tf->device & HIHI) | drive->select.all, | 83 | outb((tf->device & HIHI) | drive->select, |
84 | io_ports->device_addr); | 84 | io_ports->device_addr); |
85 | } | 85 | } |
86 | 86 | ||
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index f8d8642903da..ecfb87c10097 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -495,7 +495,7 @@ static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf) | |||
495 | tf->lbal = drive->sect; | 495 | tf->lbal = drive->sect; |
496 | tf->lbam = drive->cyl; | 496 | tf->lbam = drive->cyl; |
497 | tf->lbah = drive->cyl >> 8; | 497 | tf->lbah = drive->cyl >> 8; |
498 | tf->device = (drive->head - 1) | drive->select.all; | 498 | tf->device = (drive->head - 1) | drive->select; |
499 | tf->command = ATA_CMD_INIT_DEV_PARAMS; | 499 | tf->command = ATA_CMD_INIT_DEV_PARAMS; |
500 | } | 500 | } |
501 | 501 | ||
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index cec744cbbde0..925fd037cdde 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -181,7 +181,7 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
181 | tf_outb(tf->lbah, io_ports->lbah_addr); | 181 | tf_outb(tf->lbah, io_ports->lbah_addr); |
182 | 182 | ||
183 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 183 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) |
184 | tf_outb((tf->device & HIHI) | drive->select.all, | 184 | tf_outb((tf->device & HIHI) | drive->select, |
185 | io_ports->device_addr); | 185 | io_ports->device_addr); |
186 | } | 186 | } |
187 | EXPORT_SYMBOL_GPL(ide_tf_load); | 187 | EXPORT_SYMBOL_GPL(ide_tf_load); |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 58a2caf17903..242cfd09e16b 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -446,7 +446,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) | |||
446 | SELECT_DRIVE(drive); | 446 | SELECT_DRIVE(drive); |
447 | msleep(50); | 447 | msleep(50); |
448 | 448 | ||
449 | if (ide_read_device(drive) != drive->select.all && present == 0) { | 449 | if (ide_read_device(drive) != drive->select && present == 0) { |
450 | if (drive->dn & 1) { | 450 | if (drive->dn & 1) { |
451 | /* exit with drive0 selected */ | 451 | /* exit with drive0 selected */ |
452 | SELECT_DRIVE(&hwif->drives[0]); | 452 | SELECT_DRIVE(&hwif->drives[0]); |
@@ -1211,7 +1211,7 @@ EXPORT_SYMBOL_GPL(ide_unregister_region); | |||
1211 | void ide_init_disk(struct gendisk *disk, ide_drive_t *drive) | 1211 | void ide_init_disk(struct gendisk *disk, ide_drive_t *drive) |
1212 | { | 1212 | { |
1213 | ide_hwif_t *hwif = drive->hwif; | 1213 | ide_hwif_t *hwif = drive->hwif; |
1214 | unsigned int unit = (drive->select.all >> 4) & 1; | 1214 | unsigned int unit = drive->dn & 1; |
1215 | 1215 | ||
1216 | disk->major = hwif->major; | 1216 | disk->major = hwif->major; |
1217 | disk->first_minor = unit << PARTN_BITS; | 1217 | disk->first_minor = unit << PARTN_BITS; |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 7624b937398a..9d3482d907c9 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -114,7 +114,7 @@ static void ide_port_init_devices_data(ide_hwif_t *hwif) | |||
114 | memset(drive, 0, sizeof(*drive)); | 114 | memset(drive, 0, sizeof(*drive)); |
115 | 115 | ||
116 | drive->media = ide_disk; | 116 | drive->media = ide_disk; |
117 | drive->select.all = (unit<<4)|0xa0; | 117 | drive->select = (unit << 4) | ATA_DEVICE_OBS; |
118 | drive->hwif = hwif; | 118 | drive->hwif = hwif; |
119 | drive->ready_stat = ATA_DRDY; | 119 | drive->ready_stat = ATA_DRDY; |
120 | drive->bad_wstat = BAD_W_STAT; | 120 | drive->bad_wstat = BAD_W_STAT; |
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c index c76d55de6996..9e85b1ec9607 100644 --- a/drivers/ide/legacy/ide-4drives.c +++ b/drivers/ide/legacy/ide-4drives.c | |||
@@ -14,7 +14,7 @@ MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port"); | |||
14 | static void ide_4drives_init_dev(ide_drive_t *drive) | 14 | static void ide_4drives_init_dev(ide_drive_t *drive) |
15 | { | 15 | { |
16 | if (drive->hwif->channel) | 16 | if (drive->hwif->channel) |
17 | drive->select.all ^= 0x20; | 17 | drive->select ^= 0x20; |
18 | } | 18 | } |
19 | 19 | ||
20 | static const struct ide_port_ops ide_4drives_port_ops = { | 20 | static const struct ide_port_ops ide_4drives_port_ops = { |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 0eced0ae2e86..c2e85fc21b5a 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -705,7 +705,7 @@ static void scc_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
705 | scc_ide_outb(tf->lbah, io_ports->lbah_addr); | 705 | scc_ide_outb(tf->lbah, io_ports->lbah_addr); |
706 | 706 | ||
707 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 707 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) |
708 | scc_ide_outb((tf->device & HIHI) | drive->select.all, | 708 | scc_ide_outb((tf->device & HIHI) | drive->select, |
709 | io_ports->device_addr); | 709 | io_ports->device_addr); |
710 | } | 710 | } |
711 | 711 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 02984f1f041a..3e418b996ef5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -279,36 +279,6 @@ typedef union { | |||
279 | } special_t; | 279 | } special_t; |
280 | 280 | ||
281 | /* | 281 | /* |
282 | * ATA-IDE Select Register, aka Device-Head | ||
283 | * | ||
284 | * head : always zeros here | ||
285 | * unit : drive select number: 0/1 | ||
286 | * bit5 : always 1 | ||
287 | * lba : using LBA instead of CHS | ||
288 | * bit7 : always 1 | ||
289 | */ | ||
290 | typedef union { | ||
291 | unsigned all : 8; | ||
292 | struct { | ||
293 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
294 | unsigned head : 4; | ||
295 | unsigned unit : 1; | ||
296 | unsigned bit5 : 1; | ||
297 | unsigned lba : 1; | ||
298 | unsigned bit7 : 1; | ||
299 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
300 | unsigned bit7 : 1; | ||
301 | unsigned lba : 1; | ||
302 | unsigned bit5 : 1; | ||
303 | unsigned unit : 1; | ||
304 | unsigned head : 4; | ||
305 | #else | ||
306 | #error "Please fix <asm/byteorder.h>" | ||
307 | #endif | ||
308 | } b; | ||
309 | } select_t, ata_select_t; | ||
310 | |||
311 | /* | ||
312 | * Status returned from various ide_ functions | 282 | * Status returned from various ide_ functions |
313 | */ | 283 | */ |
314 | typedef enum { | 284 | typedef enum { |
@@ -529,8 +499,8 @@ struct ide_drive_s { | |||
529 | unsigned long timeout; /* max time to wait for irq */ | 499 | unsigned long timeout; /* max time to wait for irq */ |
530 | 500 | ||
531 | special_t special; /* special action flags */ | 501 | special_t special; /* special action flags */ |
532 | select_t select; /* basic drive/head select reg value */ | ||
533 | 502 | ||
503 | u8 select; /* basic drive/head select reg value */ | ||
534 | u8 retry_pio; /* retrying dma capable host in pio */ | 504 | u8 retry_pio; /* retrying dma capable host in pio */ |
535 | u8 waiting_for_dma; /* dma currently in progress */ | 505 | u8 waiting_for_dma; /* dma currently in progress */ |
536 | 506 | ||