From owner-p4-projects@FreeBSD.ORG Sat Oct 4 00:55:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FE2C106568A; Sat, 4 Oct 2008 00:55:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63D5A1065688 for ; Sat, 4 Oct 2008 00:55:08 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 51D8B8FC08 for ; Sat, 4 Oct 2008 00:55:08 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m940t8Rv022739 for ; Sat, 4 Oct 2008 00:55:08 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m940t8ZF022737 for perforce@freebsd.org; Sat, 4 Oct 2008 00:55:08 GMT (envelope-from nwhitehorn@freebsd.org) Date: Sat, 4 Oct 2008 00:55:08 GMT Message-Id: <200810040055.m940t8ZF022737@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 150916 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 00:55:08 -0000 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 -__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 @@ -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; }