Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 13:07:25 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r202617 - stable/8/sys/dev/ata/chipsets
Message-ID:  <201001191307.o0JD7PUm097352@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jan 19 13:07:25 2010
New Revision: 202617
URL: http://svn.freebsd.org/changeset/base/202617

Log:
  MFC r200655:
  Serverworks OSB4 has no 0x4a (piomode) register, do not touch it.
  Also OSB4 has some problems with UDMA transfers, limit it to WDMA2.

Modified:
  stable/8/sys/dev/ata/chipsets/ata-serverworks.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Tue Jan 19 13:00:33 2010	(r202616)
+++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c	Tue Jan 19 13:07:25 2010	(r202617)
@@ -80,7 +80,7 @@ ata_serverworks_probe(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
     static struct ata_chip_id ids[] =
-    {{ ATA_ROSB4,     0x00, SWKS_33,  0, ATA_UDMA2, "ROSB4" },
+    {{ ATA_ROSB4,     0x00, SWKS_33,  0, ATA_WDMA2, "ROSB4" },
      { ATA_CSB5,      0x92, SWKS_100, 0, ATA_UDMA5, "CSB5" },
      { ATA_CSB5,      0x00, SWKS_66,  0, ATA_UDMA4, "CSB5" },
      { ATA_CSB6,      0x00, SWKS_100, 0, ATA_UDMA5, "CSB6" },
@@ -388,10 +388,12 @@ ata_serverworks_setmode(device_t dev, in
 	    piomode = mode;
 	}
 	/* Set PIO mode and timings, calculated above. */
-	pci_write_config(parent, 0x4a,
+	if (ctlr->chip->cfg1 != SWKS_33) {
+		pci_write_config(parent, 0x4a,
 			 (pci_read_config(parent, 0x4a, 2) &
 			  ~(0xf << (devno << 2))) |
 			 ((piomode - ATA_PIO0) << (devno<<2)),2);
+	}
 	pci_write_config(parent, 0x40, 
 			 (pci_read_config(parent, 0x40, 4) &
 			  ~(0xff << offset)) |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001191307.o0JD7PUm097352>