svn commit: r199361 - stable/8/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Tue Nov 17 12:23:14 UTC 2009


Author: mav
Date: Tue Nov 17 12:23:14 2009
New Revision: 199361
URL: http://svn.freebsd.org/changeset/base/199361

Log:
  MFC r198582:
  Turn off use of ATA_A_4BIT on modern hardware. This flag was already
  obsoleted in 1996 by ATA-2, and crashes some modern hardware like some
  revisions of the Serverworks K2 SATA controller. Even very ancient
  hardware seems not to require it. In the unlikely event this causes
  problems, the previous behavior can be re-enabled by defining
  ATA_LEGACY_SUPPORT at the top of this file.

Modified:
  stable/8/sys/dev/ata/ata-all.h
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)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.h
==============================================================================
--- stable/8/sys/dev/ata/ata-all.h	Tue Nov 17 12:18:14 2009	(r199360)
+++ stable/8/sys/dev/ata/ata-all.h	Tue Nov 17 12:23:14 2009	(r199361)
@@ -26,6 +26,11 @@
  * $FreeBSD$
  */
 
+#if 0
+#define	ATA_LEGACY_SUPPORT		/* Enable obsolete features that break
+					 * some modern devices */
+#endif
+
 /* ATA register defines */
 #define ATA_DATA                        0       /* (RW) data */
 
@@ -81,7 +86,11 @@
 #define ATA_PC98_CTLOFFSET              0x10c   /* do for PC98 devices */
 #define         ATA_A_IDS               0x02    /* disable interrupts */
 #define         ATA_A_RESET             0x04    /* RESET controller */
-#define         ATA_A_4BIT              0x08    /* 4 head bits */
+#ifdef	ATA_LEGACY_SUPPORT			
+#define         ATA_A_4BIT              0x08    /* 4 head bits: obsolete 1996 */
+#else
+#define         ATA_A_4BIT              0x00 
+#endif
 #define         ATA_A_HOB               0x80    /* High Order Byte enable */
 
 /* SATA register defines */


More information about the svn-src-all mailing list