PERFORCE change 150916 for review
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Oct 4 00:55:08 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150916
Change 150916 by nwhitehorn at nwhitehorn_trantor on 2008/10/04 00:54:43
Fix K2 SATA to actually work. Should be harmless to other Serverworks
controllers, will ask for review.
Affected files ...
.. //depot/projects/ppc-g5/sys/dev/ata/ata-chipset.c#4 edit
Differences ...
==== //depot/projects/ppc-g5/sys/dev/ata/ata-chipset.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.228 2008/09/26 07:29:48 sos Exp $");
+__FBSDID("$FreeBSD: head/sys/dev/ata/ata-chipset.c 183380 2008-09-26 07:29:48Z sos $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -4806,6 +4806,16 @@
}
static int
+ata_serverworks_k2status(device_t dev)
+{
+ struct ata_channel *ch = device_get_softc(dev);
+
+ ATA_IDX_INL(ch,ATA_STATUS);
+
+ return ata_pci_status(dev);
+}
+
+static int
ata_serverworks_chipinit(device_t dev)
{
struct ata_pci_controller *ctlr = device_get_softc(dev);
@@ -4894,6 +4904,10 @@
/* chip does not reliably do 64K DMA transfers */
ch->dma.max_iosize = 126 * DEV_BSIZE;
+ /* For K2, we need to do a 4-byte read on the status reg */
+ if (ctlr->chip->chipid == ATA_K2)
+ ch->hw.status = ata_serverworks_k2status;
+
return 0;
}
More information about the p4-projects
mailing list