39 lines
929 B
Diff
39 lines
929 B
Diff
To: linus, alan
|
|
Cc: lkml
|
|
Subject: [PATCH] M68k IDE updates
|
|
|
|
From: Linux/m68k legacy
|
|
|
|
M68k IDE updates: Add m68k-isms to the generic ide_fix_driveid()
|
|
|
|
---
|
|
drivers/ide/ide-iops.c | 17 +++++++++++++++++
|
|
1 file changed, 17 insertions(+)
|
|
|
|
--- linux-m68k-2.6.21.orig/drivers/ide/ide-iops.c
|
|
+++ linux-m68k-2.6.21/drivers/ide/ide-iops.c
|
|
@@ -313,6 +313,23 @@ void ide_fix_driveid (struct hd_driveid
|
|
int i;
|
|
u16 *stringcast;
|
|
|
|
+#ifdef __mc68000__
|
|
+ if (!MACH_IS_AMIGA && !MACH_IS_MAC && !MACH_IS_Q40 && !MACH_IS_ATARI)
|
|
+ return;
|
|
+
|
|
+#ifdef M68K_IDE_SWAPW
|
|
+ if (M68K_IDE_SWAPW) { /* fix bus byteorder first */
|
|
+ u_char *p = (u_char *)id;
|
|
+ u_char t;
|
|
+ for (i = 0; i < 512; i += 2) {
|
|
+ t = p[i];
|
|
+ p[i] = p[i+1];
|
|
+ p[i+1] = t;
|
|
+ }
|
|
+ }
|
|
+#endif
|
|
+#endif /* __mc68000__ */
|
|
+
|
|
id->config = __le16_to_cpu(id->config);
|
|
id->cyls = __le16_to_cpu(id->cyls);
|
|
id->reserved2 = __le16_to_cpu(id->reserved2);
|