aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-timing.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h
index a20c4cbbfcdb..ebe884d76881 100644
--- a/drivers/ide/ide-timing.h
+++ b/drivers/ide/ide-timing.h
@@ -29,7 +29,7 @@
29#include <linux/hdreg.h> 29#include <linux/hdreg.h>
30 30
31struct ide_timing { 31struct ide_timing {
32 short mode; 32 u8 mode;
33 short setup; /* t1 */ 33 short setup; /* t1 */
34 short act8b; /* t2 for 8-bit io */ 34 short act8b; /* t2 for 8-bit io */
35 short rec8b; /* t2i for 8-bit io */ 35 short rec8b; /* t2i for 8-bit io */
@@ -76,7 +76,7 @@ static struct ide_timing ide_timing[] = {
76 76
77 { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 960, 0 }, 77 { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 960, 0 },
78 78
79 { -1 } 79 { 0xff }
80}; 80};
81 81
82#define IDE_TIMING_SETUP 0x01 82#define IDE_TIMING_SETUP 0x01
@@ -122,17 +122,18 @@ static void ide_timing_merge(struct ide_timing *a, struct ide_timing *b, struct
122 if (what & IDE_TIMING_UDMA ) m->udma = max(a->udma, b->udma); 122 if (what & IDE_TIMING_UDMA ) m->udma = max(a->udma, b->udma);
123} 123}
124 124
125static struct ide_timing* ide_timing_find_mode(short speed) 125static struct ide_timing *ide_timing_find_mode(u8 speed)
126{ 126{
127 struct ide_timing *t; 127 struct ide_timing *t;
128 128
129 for (t = ide_timing; t->mode != speed; t++) 129 for (t = ide_timing; t->mode != speed; t++)
130 if (t->mode < 0) 130 if (t->mode == 0xff)
131 return NULL; 131 return NULL;
132 return t; 132 return t;
133} 133}
134 134
135static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing *t, int T, int UT) 135static int ide_timing_compute(ide_drive_t *drive, u8 speed,
136 struct ide_timing *t, int T, int UT)
136{ 137{
137 struct hd_driveid *id = drive->id; 138 struct hd_driveid *id = drive->id;
138 struct ide_timing *s, p; 139 struct ide_timing *s, p;