Date: Sat, 4 Oct 2008 00:55:08 GMT From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 150916 for review Message-ID: <200810040055.m940t8ZF022737@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150916 Change 150916 by nwhitehorn@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810040055.m940t8ZF022737>