From patchwork Tue May 15 04:57:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Hedrick (anhedric)" X-Patchwork-Id: 159228 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 10961B6F9D for ; Tue, 15 May 2012 15:07:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557Ab2EOFHG (ORCPT ); Tue, 15 May 2012 01:07:06 -0400 Received: from mtv-iport-1.cisco.com ([173.36.130.12]:57609 "EHLO mtv-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210Ab2EOFHF convert rfc822-to-8bit (ORCPT ); Tue, 15 May 2012 01:07:05 -0400 X-Greylist: delayed 566 seconds by postgrey-1.27 at vger.kernel.org; Tue, 15 May 2012 01:07:05 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=anhedric@cisco.com; l=2075; q=dns/txt; s=iport; t=1337058425; x=1338268025; h=mime-version:content-transfer-encoding:subject:date: message-id:from:to; bh=zmc9+NrXu4oc604TZ+krKDSjFvS5Um8QdIhGBaK+C2c=; b=V02qIF1u6EYvH5nwGxsZeq42AK0DmLLNHlwc2LnoEzn/B3uTvBRUzuhS CDiv5RfJEo3niqAnaiDjRHrISH4h7OGCTiUYkZy+f9ygV7C/9rjf3+IZZ jx/u03qDshbYBZDRtYce0CsbEeosw2YMm0UzrXxJTY3QdC1d1BfzQbBW1 4=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EANfhsU+rRDoH/2dsb2JhbAA6CrAog1SBB4IXAQQSAR0KUQEqBhgHVwEEARoah2ubC6AMixIPEoR8YwSIZJtwgWmDCYE3 X-IronPort-AV: E=Sophos;i="4.75,591,1330905600"; d="scan'208";a="41705324" Received: from mtv-core-2.cisco.com ([171.68.58.7]) by mtv-iport-1.cisco.com with ESMTP; 15 May 2012 04:57:39 +0000 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by mtv-core-2.cisco.com (8.14.3/8.14.3) with ESMTP id q4F4vdnu019560; Tue, 15 May 2012 04:57:39 GMT Received: from xmb-sjc-21e.amer.cisco.com ([171.70.151.156]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 May 2012 21:57:39 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: CFA 4.0 patch Date: Mon, 14 May 2012 21:57:37 -0700 Message-ID: <4E75C4FECC27A44E9F7E0737D71946900F686C5B@xmb-sjc-21e.amer.cisco.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: CFA 4.0 patch Thread-Index: Ac0yVjghRQI/rP3bSCOVdgaBzmSzXwAAAr5g From: "Andre Hedrick (anhedric)" To: , , X-OriginalArrivalTime: 15 May 2012 04:57:39.0116 (UTC) FILETIME=[409C96C0:01CD3257] Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org This is a missing part of the CFA 4.0 and above support. 6.2.1.6.1 Word 0: General Configuration This field indicates the general characteristics of the device. When Word 0 of the Identify drive information is 848Ah then the device is a CompactFlash Storage Card and complies with the CFA specification and CFA command set. It is recommended that PC Card modes of operation report only the 848Ah value as they are always intended as removable devices. Bits 15-0: CF Standard Configuration Value Word 0 is 848Ah. This is the recommended value of Word 0. Some operating systems require Bit 6 of Word 0 to be set to 1 (Non-removable device) to use the card as the root storage device. The Card must be the root storage device when a host completely replaces conventional disk storage with a CompactFlash Card in True IDE mode. To support this requirement and provide capability for any future removable media Cards, alternate handling of Word 0 is permitted. Bits 15-0: CF Preferred Alternate Configuration Values 044Ah: This is the alternate value of Word 0 turns on ATA device and turns off Removable Media and Removable Device while preserving all Retired bits in the word. 0040h: This is the alternate value of Word 0 turns on ATA device and turns off Removable Media and Removable Device while zeroing all Retired bits in the word Cheers, Andre -------------------- The Linux X-ATA/SATA guy * CF specs don't require specific value in the word 0 anymore and yet * they forbid to report the ATA version in the word 80 and require the --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-2.6.32.orig/include/linux/ata.h Mon May 14 15:48:24 2012 +++ linux-2.6.32/include/linux/ata.h Mon May 14 15:51:42 2012 @@ -819,6 +819,10 @@ { if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ return 1; + if (id[ATA_ID_CONFIG] == 0x044A) /* Alternative CF w/ removable turned off, preserving retired bits */ + return 1; + if (id[ATA_ID_CONFIG] == 0x0040) /* Alternative CF w/ removable turned off, zeroing retired bits*/ + return 1; /*