svn commit: r198582 - head/sys/dev/ata

Nathan Whitehorn nwhitehorn at FreeBSD.org
Thu Oct 29 13:27:15 UTC 2009


Author: nwhitehorn
Date: Thu Oct 29 13:27:14 2009
New Revision: 198582
URL: http://svn.freebsd.org/changeset/base/198582

Log:
  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.
  
  Reviewed by:	Alexander Motin <mav at freebsd.org>

Modified:
  head/sys/dev/ata/ata-all.h

Modified: head/sys/dev/ata/ata-all.h
==============================================================================
--- head/sys/dev/ata/ata-all.h	Thu Oct 29 12:19:10 2009	(r198581)
+++ head/sys/dev/ata/ata-all.h	Thu Oct 29 13:27:14 2009	(r198582)
@@ -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-head mailing list