Subject: CVS commit: src/sys/dev/ic
To: None <>
From: Manuel Bouyer <>
List: source-changes
Date: 08/09/2005 22:08:16
Module Name:	src
Committed By:	bouyer
Date:		Tue Aug  9 22:08:16 UTC 2005

Modified Files:
	src/sys/dev/ic: wdc.c

Log Message:
The ATA/ATAPI IDENTIFY data were designed to be converted on the fly to
host byte order (eventually the byte swapping could be wired in hardware, on
the 16 bit data bus). This was keept when wdc_exec_command() was created,
and as a result wdc_exec_command() is doing 16bit conversion to host byte
order. This is fine for IDENTIFY but doesn't work for other opaque data
structure, such as the ones for SMART.
So change wdc_exec_command() to do the conversion to host byte order only for
WDCC_IDENTIFY and ATAPI_IDENTIFY_DEVICE. This fixes atactl smart status
on big-endian hosts.

While here change __wdccommand_intr() to only use wdc_data{in,out}_pio, there
is no gain in doing the 32bit data port stuff locally.

To generate a diff of this commit:
cvs rdiff -r1.225 -r1.226 src/sys/dev/ic/wdc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.