summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 373078d8f9..2116855233 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1046,15 +1046,16 @@ static int set_features(void)
1046 int pio_mode = 2; 1046 int pio_mode = 2;
1047 1047
1048 /* Find out the highest supported PIO mode */ 1048 /* Find out the highest supported PIO mode */
1049 if(identify_info[64] & 2) 1049 if (identify_info[53] & (1<<1)) { /* Is word 64 valid? */
1050 if (identify_info[64] & 2)
1050 pio_mode = 4; 1051 pio_mode = 4;
1051 else 1052 else if(identify_info[64] & 1)
1052 if(identify_info[64] & 1) 1053 pio_mode = 3;
1053 pio_mode = 3; 1054 }
1054 1055
1055 /* Update the table: set highest supported pio mode that we also support */ 1056 /* Update the table: set highest supported pio mode that we also support */
1056 features[0].parameter = 8 + pio_mode; 1057 features[0].parameter = 8 + pio_mode;
1057 1058
1058#ifdef HAVE_ATA_DMA 1059#ifdef HAVE_ATA_DMA
1059 if (identify_info[53] & (1<<2)) 1060 if (identify_info[53] & (1<<2))
1060 /* Ultra DMA mode info present, find a mode */ 1061 /* Ultra DMA mode info present, find a mode */