linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] M68k IDE updates
@ 2003-04-22 13:55 Mudama, Eric
  0 siblings, 0 replies; 30+ messages in thread
From: Mudama, Eric @ 2003-04-22 13:55 UTC (permalink / raw)
  To: 'Geert Uytterhoeven'
  Cc: Paul Mackerras, Alan Cox, Linux Kernel Development, Linus Torvalds



-----Original Message-----
> Geert Uytterhoeven wrote:
>
> However, there's also a routine that involves more magic:
> taskfile_lib_get_identify(). While trying to understand that one, I found
more
> commands that should call the (possible byteswapping) hwif->ata_input_id()
> operations, like SMART commands. So first we need a clearer
differentiation
> between commands that transfer on-platter data, or other drive data.
> 
> Any comments from the IDE experts?
> 
> Gr{oetje,eeting}s,
> 
>						Geert


I'm hardly an expert, but all the specs can be found at http://www.t13.org

"typical" commands that involve platter data as of ATA-7 are:

COMMAND NAME			hex	decimal
===========================	===	=======

standard:

READ SECTOR(S)			20	32
READ SECTOR(S) w/ retry		21	33
WRITE SECTOR(S)			30	48
WRITE SECTOR(S) w/ retry	31	49
WRITE VERIFY			3c	60
READ MULTIPLE			c4	196
WRITE MULTIPLE			c5	197
READ DMA				c8	200
READ DMA w/ retry			c9	201
WRITE DMA				ca	202
WRITE DMA w/ retry		cb	203

48-bit feature set:

READ SECTOR(S) EXT		24	36
READ DMA EXT			25	37
READ MULTIPLE EXT			29	41
WRITE SECTOR(S) EXT		34	52
WRITE DMA EXT			35	53
WRITE MULTIPLE EXT		39	57

queued feature set:

READ DMA QUEUED EXT		26	38
WRITE DMA QUEUED EXT		36	54
SERVICE				a2	162
READ DMA QUEUED			c7	199
WRITE DMA QUEUED			cc	204

ata-7 fua feature set:

WRITE DMA FUA EXT			3d	61
WRITE DMA QUEUED FUA EXT	3e	62
WRITE MULTIPLE FUA EXT		ce	206

stream feature set:

READ STREAM DMA			2a	42
READ STREAM				2b	43
WRITE STREAM DMA			3a	58
WRITE STREAM			3b	59


Additionally I think the WRITE BUFFER / READ BUFFER pair are supposed to
work in the same format as a single sector write, however, they never go to
the media. (And of course byte-swapping doesn't matter, since if you issue a
read buffer, you must have immediately prior issued a write buffer command)

--eric

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [PATCH] M68k IDE updates
@ 2003-04-13 13:06 Geert Uytterhoeven
  2003-04-13 14:10 ` Alan Cox
  0 siblings, 1 reply; 30+ messages in thread
From: Geert Uytterhoeven @ 2003-04-13 13:06 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, Linux Kernel Development, Geert Uytterhoeven

M68k IDE updates: Add m68k-isms to the generic ide_fix_driveid()

--- linux-2.5.x/drivers/ide/ide-iops.c	Mon Sep 16 09:49:17 2002
+++ linux-m68k-2.5.x/drivers/ide/ide-iops.c	Wed Oct  2 23:01:40 2002
@@ -360,6 +360,23 @@
 	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);

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2003-04-24 13:59 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.GSO.4.21.0304221802570.16017-100000@vervain.sonytel.be>
2003-04-23 11:27 ` [PATCH] M68k IDE updates Richard Zidlicky
2003-04-23 11:04   ` Alan Cox
2003-04-23 20:19     ` John Bradford
2003-04-24  9:47       ` Richard Zidlicky
2003-04-24 11:26         ` Geert Uytterhoeven
2003-04-24 13:14           ` Richard Zidlicky
2003-04-24 14:11             ` Geert Uytterhoeven
2003-04-22 13:55 Mudama, Eric
  -- strict thread matches above, loose matches on Subject: below --
2003-04-13 13:06 Geert Uytterhoeven
2003-04-13 14:10 ` Alan Cox
2003-04-13 23:43   ` Paul Mackerras
2003-04-14  8:39     ` Geert Uytterhoeven
2003-04-14  9:19       ` Benjamin Herrenschmidt
2003-04-14  9:24         ` Geert Uytterhoeven
2003-04-14 12:19           ` Alan Cox
2003-04-14 12:21       ` Alan Cox
2003-04-14 13:44         ` Geert Uytterhoeven
2003-04-14 16:03           ` Alan Cox
2003-04-15  4:45       ` Jamie Lokier
2003-04-15  8:11         ` Geert Uytterhoeven
2003-04-15  9:23           ` Jörn Engel
2003-04-15  9:52             ` Geert Uytterhoeven
2003-04-14 12:48     ` Alan Cox
2003-04-14 12:48     ` Alan Cox
2003-04-14 17:44     ` Linus Torvalds
2003-04-14 19:54       ` Geert Uytterhoeven
2003-04-14 22:31         ` Paul Mackerras
2003-04-15  8:14           ` Geert Uytterhoeven
2003-04-21 16:55       ` Geert Uytterhoeven
2003-04-22 14:49         ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).