Date: Thu, 29 Oct 2009 13:27:14 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198582 - head/sys/dev/ata Message-ID: <200910291327.n9TDREeJ097506@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910291327.n9TDREeJ097506>