From owner-svn-src-all@FreeBSD.ORG Wed Oct 22 16:08:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D8810656A2; Wed, 22 Oct 2008 16:08:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 598568FC16; Wed, 22 Oct 2008 16:08:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m9MG7dq7017965; Wed, 22 Oct 2008 12:07:53 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: =?iso-8859-1?q?S=F8ren_Schmidt?= Date: Wed, 22 Oct 2008 11:22:28 -0400 User-Agent: KMail/1.9.7 References: <200810171603.m9HG3buK092293@svn.freebsd.org> <19AE8B2B-1C78-49EB-96D4-029FBFB9552E@freebsd.org> In-Reply-To: <19AE8B2B-1C78-49EB-96D4-029FBFB9552E@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200810221122.28481.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 22 Oct 2008 12:07:54 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8468/Wed Oct 22 08:35:20 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r183981 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 16:08:02 -0000 On Wednesday 22 October 2008 03:47:21 am S=F8ren Schmidt wrote: > Well, it has been busy around here.. >=20 > Anyhow, I think this is an overly pessimistic change, I've not seen =20 > nor heard about problems with the 63K transfer size on anything but =20 > the HT1000 based machines. It seems that all serverworks chips are =20 > bugridden in some way or another, just avoid :) Unfortunately I have to support existing machines, so I'm stuck with them. = =20 Given Scott's comments, it seems that the 1k runt transfers are probably=20 non-optimal anyway. > On the MIO change, the original docs I got from serverworks states =20 > that PCI id to not support MIO mode and be for compat/legacy setups, =20 > so this might produce some hickups if thats true. > However their docs are often as flawed as their silicon so, guess this =20 > is up to the board/BIOS producer to decide. Note that the Linux driver does use MIO, and w/o MIO it can't see 4 SATA=20 ports. This has been in use on ${BIGNUM} Dell 1435 machines for over a yea= r=20 btw. > -S=F8ren >=20 > On 17Oct, 2008, at 18:03 , John Baldwin wrote: >=20 > > 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 =20 > > transfers > > (still a power of 2) rather than 63k transfers. Even with 63k =20 > > transfers > > some machines (such as Dell SC1435's) were experiencing chronic =20 > > data > > corruption. > > - Use the MIO method to talk to the Serverworks HT1000_S1 SATA =20 > > 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 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- head/sys/dev/ata/chipsets/ata-cyrix.c Fri Oct 17 15:11:12 2008 =20 > > (r183980) > > +++ head/sys/dev/ata/chipsets/ata-cyrix.c Fri Oct 17 16:03:37 2008 =20 > > (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 =3D 16; > > - ch->dma.max_iosize =3D 126 * DEV_BSIZE; > > + ch->dma.max_iosize =3D 64 * DEV_BSIZE; > > > > if (mode >=3D ATA_UDMA0) { > > ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, > > > > Modified: head/sys/dev/ata/chipsets/ata-marvell.c > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- head/sys/dev/ata/chipsets/ata-marvell.c Fri Oct 17 15:11:12 2008 =20 > > (r183980) > > +++ head/sys/dev/ata/chipsets/ata-marvell.c Fri Oct 17 16:03:37 2008 =20 > > (r183981) > > @@ -536,7 +536,7 @@ ata_marvell_edma_dmainit(device_t dev) > > ch->dma.max_address =3D BUS_SPACE_MAXADDR; > > > > /* chip does not reliably do 64K DMA transfers */ > > - ch->dma.max_iosize =3D 126 * DEV_BSIZE; > > + ch->dma.max_iosize =3D 64 * DEV_BSIZE; > > } > > > > ATA_DECLARE_DRIVER(ata_marvell); > > > > Modified: head/sys/dev/ata/chipsets/ata-national.c > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- head/sys/dev/ata/chipsets/ata-national.c Fri Oct 17 15:11:12 =20 > > 2008 (r183980) > > +++ head/sys/dev/ata/chipsets/ata-national.c Fri Oct 17 16:03:37 =20 > > 2008 (r183981) > > @@ -101,7 +101,7 @@ ata_national_setmode(device_t dev, int m > > int error; > > > > ch->dma.alignment =3D 16; > > - ch->dma.max_iosize =3D 126 * DEV_BSIZE; > > + ch->dma.max_iosize =3D 64 * DEV_BSIZE; > > > > mode =3D ata_limit_mode(dev, mode, ATA_UDMA2); > > > > > > Modified: head/sys/dev/ata/chipsets/ata-serverworks.c > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=20 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- head/sys/dev/ata/chipsets/ata-serverworks.c Fri Oct 17 15:11:12 =20 > > 2008 (r183980) > > +++ head/sys/dev/ata/chipsets/ata-serverworks.c Fri Oct 17 16:03:37 =20 > > 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 =3D ata_serverworks_tf_write; > > > > /* chip does not reliably do 64K DMA transfers */ > > - ch->dma.max_iosize =3D 126 * DEV_BSIZE; > > + ch->dma.max_iosize =3D 64 * DEV_BSIZE; > > > > return 0; > > } > > >=20 > -S=F8ren >=20 >=20 >=20 >=20 >=20 >=20 >=20 =2D-=20 John Baldwin