|
@@ -756,7 +756,7 @@ int ide_driveid_update(ide_drive_t *drive)
|
|
int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
|
|
int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
|
|
{
|
|
{
|
|
ide_hwif_t *hwif = drive->hwif;
|
|
ide_hwif_t *hwif = drive->hwif;
|
|
- int error;
|
|
|
|
|
|
+ int error = 0;
|
|
u8 stat;
|
|
u8 stat;
|
|
|
|
|
|
// while (HWGROUP(drive)->busy)
|
|
// while (HWGROUP(drive)->busy)
|
|
@@ -767,6 +767,10 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
|
|
hwif->dma_host_off(drive);
|
|
hwif->dma_host_off(drive);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ /* Skip setting PIO flow-control modes on pre-EIDE drives */
|
|
|
|
+ if ((speed & 0xf8) == XFER_PIO_0 && !(drive->id->capability & 0x08))
|
|
|
|
+ goto skip;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Don't use ide_wait_cmd here - it will
|
|
* Don't use ide_wait_cmd here - it will
|
|
* attempt to set_geometry and recalibrate,
|
|
* attempt to set_geometry and recalibrate,
|
|
@@ -814,6 +818,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
|
|
drive->id->dma_mword &= ~0x0F00;
|
|
drive->id->dma_mword &= ~0x0F00;
|
|
drive->id->dma_1word &= ~0x0F00;
|
|
drive->id->dma_1word &= ~0x0F00;
|
|
|
|
|
|
|
|
+ skip:
|
|
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
if (speed >= XFER_SW_DMA_0)
|
|
if (speed >= XFER_SW_DMA_0)
|
|
hwif->dma_host_on(drive);
|
|
hwif->dma_host_on(drive);
|