From patchwork Tue Feb 23 18:41:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardner X-Patchwork-Id: 46086 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 2C577B7CA6 for ; Wed, 24 Feb 2010 05:41:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753098Ab0BWSlY (ORCPT ); Tue, 23 Feb 2010 13:41:24 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]:61712 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021Ab0BWSlY (ORCPT ); Tue, 23 Feb 2010 13:41:24 -0500 Received: by wwf26 with SMTP id 26so881275wwf.19 for ; Tue, 23 Feb 2010 10:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=pak2WRnw/8EB/Ur5CUiJV5ZatlQWy8zcWwFhAJ31rME=; b=SarsJtqqS3DvABwZZMoAAuJdYfqpZTYxbWGkhI8xwlX9drpD9nBFMw6R+yH6L9/SvD 4+vU0FCOvUuzp/RuMSqHrTlxAUh7H04aKf8gCC6Ri5eUj9l8dQvWLXPiq/+E2N1ICBbn JkTmqx7S0Xe5ZolYY1nIo+kefl91ZWze24vtw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=VjFMWRsAmttcBF4c5jd9+2TQPk3Pa4AMA0COQxFCfa6c18Dz9f8M5Z+UjIXdrqiTYC KPZfpYU0cn9Pw5BfRy7Sob34iDKbKXYMzZ6FpQkVauQq3fPogsSJgT/ZWNlSyJUoCq3e nH5YQPfirjyc3BxtJvM4jeIAV4fVOh+txOu6c= MIME-Version: 1.0 Received: by 10.216.85.5 with SMTP id t5mr289406wee.176.1266950482713; Tue, 23 Feb 2010 10:41:22 -0800 (PST) Date: Tue, 23 Feb 2010 12:41:22 -0600 Message-ID: <808c8e9d1002231041la0d2cd9y35e9bce347d4d2db@mail.gmail.com> Subject: [PATCH] ata: Detect Delkin Devices compact flash From: Ben Gardner To: Jeff Garzik Cc: linux-ide@vger.kernel.org, Alan Cox Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org I have a Delkin Devices compact flash card that isn't being recognized using the SATA/PATA drivers. The card is recognized and works with the deprecated ATA drivers. The error I am seeing is: ata1.00: failed to IDENTIFY (device reports invalid type, err_mask=0x0) I tracked it down to ata_id_is_cfa() in include/linux/ata.h. The Delkin card has id[0] set to 0x844a and id[83] set to 0. This isn't what the kernel expects and is probably incorrect. The simplest work-around is to add a check for 0x844a to ata_id_is_cfa(). Signed-off-by: Ben Gardner --- -- 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.33-rc8.orig/include/linux/ata.h +++ linux-2.6.33-rc8/include/linux/ata.h @@ -841,7 +841,8 @@ static inline int ata_id_is_cfa(const u16 *id) { - if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ + if ((id[ATA_ID_CONFIG] == 0x848A) || /* Traditional CF */ + (id[ATA_ID_CONFIG] == 0x844A)) /* Delkin Devices CF */ return 1; /* * CF specs don't require specific value in the word 0 anymore and yet