diff options
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 01b1943b315e..95495e4219ff 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -404,26 +404,10 @@ void ide_fix_driveid(u16 *id) | |||
404 | { | 404 | { |
405 | #ifndef __LITTLE_ENDIAN | 405 | #ifndef __LITTLE_ENDIAN |
406 | # ifdef __BIG_ENDIAN | 406 | # ifdef __BIG_ENDIAN |
407 | struct hd_driveid *driveid = (struct hd_driveid *)id; | ||
408 | int i; | 407 | int i; |
409 | 408 | ||
410 | for (i = 0; i < 256; i++) { | 409 | for (i = 0; i < 256; i++) |
411 | /* these words are accessed as two 8-bit values */ | ||
412 | if (i == 47 || i == 49 || i == 51 || i == 52 || i == 59) | ||
413 | continue; | ||
414 | if (i == 60 || i == 61) /* ->lba_capacity is 32-bit */ | ||
415 | continue; | ||
416 | if (i == 98 || i == 99) /* ->spg is 32-bit */ | ||
417 | continue; | ||
418 | if (i > 99 && i < 104) /* ->lba_capacity_2 is 64-bit */ | ||
419 | continue; | ||
420 | |||
421 | id[i] = __le16_to_cpu(id[i]); | 410 | id[i] = __le16_to_cpu(id[i]); |
422 | } | ||
423 | |||
424 | driveid->lba_capacity = __le32_to_cpu(driveid->lba_capacity); | ||
425 | driveid->spg = __le32_to_cpu(driveid->spg); | ||
426 | driveid->lba_capacity_2 = __le64_to_cpu(driveid->lba_capacity_2); | ||
427 | # else | 411 | # else |
428 | # error "Please fix <asm/byteorder.h>" | 412 | # error "Please fix <asm/byteorder.h>" |
429 | # endif | 413 | # endif |
@@ -752,7 +736,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
752 | #endif | 736 | #endif |
753 | 737 | ||
754 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ | 738 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ |
755 | if ((speed & 0xf8) == XFER_PIO_0 && !(drive->driveid->capability & 8)) | 739 | if ((speed & 0xf8) == XFER_PIO_0 && ata_id_has_iordy(drive->id) == 0) |
756 | goto skip; | 740 | goto skip; |
757 | 741 | ||
758 | /* | 742 | /* |