From owner-svn-src-head@FreeBSD.ORG Fri Oct 17 16:03:38 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C4F71065687; Fri, 17 Oct 2008 16:03:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 373428FC18; Fri, 17 Oct 2008 16:03:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9HG3c8g092297; Fri, 17 Oct 2008 16:03:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9HG3buK092293; Fri, 17 Oct 2008 16:03:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810171603.m9HG3buK092293@svn.freebsd.org> From: John Baldwin Date: Fri, 17 Oct 2008 16:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183981 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2008 16:03:38 -0000 Author: jhb Date: Fri Oct 17 16:03:37 2008 New Revision: 183981 URL: http://svn.freebsd.org/changeset/base/183981 Log: - For chipsets that can't do 64k transfers, fall back to 32k transfers (still a power of 2) rather than 63k transfers. Even with 63k transfers some machines (such as Dell SC1435's) were experiencing chronic data corruption. - Use the MIO method to talk to the Serverworks HT1000_S1 SATA controller like all the other SATA controllers rather than the compat PATA method. This lets the controller see all 4 SATA ports and also matches the behavior of the Linux driver. Silence from: sos MFC after: 3 days Modified: head/sys/dev/ata/chipsets/ata-cyrix.c head/sys/dev/ata/chipsets/ata-marvell.c head/sys/dev/ata/chipsets/ata-national.c head/sys/dev/ata/chipsets/ata-serverworks.c Modified: head/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cyrix.c Fri Oct 17 15:11:12 2008 (r183980) +++ head/sys/dev/ata/chipsets/ata-cyrix.c Fri Oct 17 16:03:37 2008 (r183981) @@ -109,7 +109,7 @@ ata_cyrix_setmode(device_t dev, int mode /* dont try to set the mode if we dont have the resource */ if (ctlr->r_res1) { ch->dma.alignment = 16; - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; if (mode >= ATA_UDMA0) { ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Fri Oct 17 15:11:12 2008 (r183980) +++ head/sys/dev/ata/chipsets/ata-marvell.c Fri Oct 17 16:03:37 2008 (r183981) @@ -536,7 +536,7 @@ ata_marvell_edma_dmainit(device_t dev) ch->dma.max_address = BUS_SPACE_MAXADDR; /* chip does not reliably do 64K DMA transfers */ - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; } ATA_DECLARE_DRIVER(ata_marvell); Modified: head/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-national.c Fri Oct 17 15:11:12 2008 (r183980) +++ head/sys/dev/ata/chipsets/ata-national.c Fri Oct 17 16:03:37 2008 (r183981) @@ -101,7 +101,7 @@ ata_national_setmode(device_t dev, int m int error; ch->dma.alignment = 16; - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; mode = ata_limit_mode(dev, mode, ATA_UDMA2); Modified: head/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-serverworks.c Fri Oct 17 15:11:12 2008 (r183980) +++ head/sys/dev/ata/chipsets/ata-serverworks.c Fri Oct 17 16:03:37 2008 (r183981) @@ -79,7 +79,7 @@ ata_serverworks_probe(device_t dev) { ATA_CSB6, 0x00, SWKS_100, 0, ATA_UDMA5, "CSB6" }, { ATA_CSB6_1, 0x00, SWKS_66, 0, ATA_UDMA4, "CSB6" }, { ATA_HT1000, 0x00, SWKS_100, 0, ATA_UDMA5, "HT1000" }, - { ATA_HT1000_S1, 0x00, SWKS_100, 4, ATA_SA150, "HT1000" }, + { ATA_HT1000_S1, 0x00, SWKS_MIO, 4, ATA_SA150, "HT1000" }, { ATA_HT1000_S2, 0x00, SWKS_MIO, 4, ATA_SA150, "HT1000" }, { ATA_K2, 0x00, SWKS_MIO, 4, ATA_SA150, "K2" }, { ATA_FRODO4, 0x00, SWKS_MIO, 4, ATA_SA150, "Frodo4" }, @@ -184,7 +184,7 @@ ata_serverworks_allocate(device_t dev) ch->hw.tf_write = ata_serverworks_tf_write; /* chip does not reliably do 64K DMA transfers */ - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; return 0; }