From patchwork Sat Nov 14 02:36:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 59996 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAE2bSqO020640 for ; Sat, 14 Nov 2009 02:37:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312AbZKNChP (ORCPT ); Fri, 13 Nov 2009 21:37:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753507AbZKNChP (ORCPT ); Fri, 13 Nov 2009 21:37:15 -0500 Received: from out4.smtp.messagingengine.com ([66.111.4.28]:55919 "EHLO out4.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbZKNChN (ORCPT ); Fri, 13 Nov 2009 21:37:13 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id DA5D7BF8AB; Fri, 13 Nov 2009 21:37:18 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 13 Nov 2009 21:37:18 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id; s=smtpout; bh=1ZSfKl1VSXmPgLbO7ipdfx0olo8=; b=RICrDiSozfcwumOD98geoSBvY486Nx9hdLY+9flam208+bimcqH33xc7y1xaNg0xX5hfRTPgd1WJWQjTe4qrSzhi5XxiA1xNNQpOvdyyQCBPV5yZoN830fD2n2hizvWuTxKG2ZqQ/KyGtIgquEcXeEhXT2B7fZoC3lDc6dk2l9k= X-Sasl-enc: xWX/rLdphii/02zfXsL3/RvfAz7d29L3uw3zZp/fc7Pi 1258166238 Received: from khazad-dum.debian.net (unknown [201.82.172.222]) by mail.messagingengine.com (Postfix) with ESMTPSA id 5A6CA84CF; Fri, 13 Nov 2009 21:37:18 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 0F2F5281F9; Sat, 14 Nov 2009 00:37:16 -0200 (BRST) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id u5JfOoVhDxuf; Sat, 14 Nov 2009 00:37:15 -0200 (BRST) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 4F2E1281FB; Sat, 14 Nov 2009 00:37:15 -0200 (BRST) From: Henrique de Moraes Holschuh To: Len Brown Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh , Andrew Morton Subject: [PATCH] thinkpad-acpi: fix detection of old ThinkPads Date: Sat, 14 Nov 2009 00:36:51 -0200 Message-Id: <1258166211-14203-1-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.5.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index d93108d..8973af1 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1680,36 +1680,48 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv) | (__bv1) << 8 | (__bv2) } #define TPV_Q_X(__v, __bid1, __bid2, __bv1, __bv2, \ - __eid1, __eid2, __ev1, __ev2) \ + __eid, __ev1, __ev2) \ { .vendor = (__v), \ .bios = TPID(__bid1, __bid2), \ - .ec = TPID(__eid1, __eid2), \ + .ec = __eid, \ .quirks = (__ev1) << 24 | (__ev2) << 16 \ | (__bv1) << 8 | (__bv2) } #define TPV_QI0(__id1, __id2, __bv1, __bv2) \ TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2) +/* Outdated IBM BIOSes often lack the EC id string */ #define TPV_QI1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \ - __bv1, __bv2, __id1, __id2, __ev1, __ev2) + __bv1, __bv2, TPID(__id1, __id2), \ + __ev1, __ev2), \ + TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, \ + __bv1, __bv2, TPACPI_MATCH_UNKNOWN, \ + __ev1, __ev2) +/* Outdated IBM BIOSes often lack the EC id string */ #define TPV_QI2(__bid1, __bid2, __bv1, __bv2, \ __eid1, __eid2, __ev1, __ev2) \ TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \ - __bv1, __bv2, __eid1, __eid2, __ev1, __ev2) + __bv1, __bv2, TPID(__eid1, __eid2), \ + __ev1, __ev2), \ + TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, \ + __bv1, __bv2, TPACPI_MATCH_UNKNOWN, \ + __ev1, __ev2) #define TPV_QL0(__id1, __id2, __bv1, __bv2) \ TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2) #define TPV_QL1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \ TPV_Q_X(PCI_VENDOR_ID_LENOVO, __id1, __id2, \ - __bv1, __bv2, __id1, __id2, __ev1, __ev2) + __bv1, __bv2, TPID(__id1, __id2), \ + __ev1, __ev2) #define TPV_QL2(__bid1, __bid2, __bv1, __bv2, \ __eid1, __eid2, __ev1, __ev2) \ TPV_Q_X(PCI_VENDOR_ID_LENOVO, __bid1, __bid2, \ - __bv1, __bv2, __eid1, __eid2, __ev1, __ev2) + __bv1, __bv2, TPID(__eid1, __eid2), \ + __ev1, __ev2) static const struct tpacpi_quirk tpacpi_bios_version_qtable[] __initconst = { /* Numeric models ------------------ */