Date: Wed, 15 Oct 2008 00:21:56 GMT From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151401 for review Message-ID: <200810150021.m9F0LunD011337@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151401 Change 151401 by nwhitehorn@nwhitehorn_trantor on 2008/10/15 00:20:55 Move K2 SATA patch to correspond to ATA modularization. Affected files ... .. //depot/projects/ppc-g5/sys/dev/ata/ata-chipset.c#6 delete .. //depot/projects/ppc-g5/sys/dev/ata/chipsets/ata-serverworks.c#2 edit Differences ... ==== //depot/projects/ppc-g5/sys/dev/ata/chipsets/ata-serverworks.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-serverworks.c,v 1.1 2008/10/09 12:56:57 sos Exp $"); +__FBSDID("$FreeBSD: head/sys/dev/ata/chipsets/ata-serverworks.c 183724 2008-10-09 12:56:57Z sos $"); #include "opt_ata.h" #include <sys/param.h> @@ -57,6 +57,7 @@ static void ata_serverworks_tf_read(struct ata_request *request); static void ata_serverworks_tf_write(struct ata_request *request); static void ata_serverworks_setmode(device_t dev, int mode); +static int ata_serverworks_k2status(device_t dev); /* misc defines */ #define SWKS_33 0 @@ -98,6 +99,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); @@ -186,6 +197,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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810150021.m9F0LunD011337>