From owner-svn-src-all@FreeBSD.ORG Thu Oct 29 13:27:15 2009 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 2C9A1106566C; Thu, 29 Oct 2009 13:27:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B4D08FC13; Thu, 29 Oct 2009 13:27:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9TDRESR097508; Thu, 29 Oct 2009 13:27:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TDREeJ097506; Thu, 29 Oct 2009 13:27:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910291327.n9TDREeJ097506@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 29 Oct 2009 13:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198582 - head/sys/dev/ata 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: Thu, 29 Oct 2009 13:27:15 -0000 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 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 */