From patchwork Fri Jan 29 16:04:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 43935 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 364FDB7D2A for ; Sat, 30 Jan 2010 03:06:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753635Ab0A2QEg (ORCPT ); Fri, 29 Jan 2010 11:04:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753575Ab0A2QEc (ORCPT ); Fri, 29 Jan 2010 11:04:32 -0500 Received: from mail-fx0-f220.google.com ([209.85.220.220]:53041 "EHLO mail-fx0-f220.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753057Ab0A2QE3 (ORCPT ); Fri, 29 Jan 2010 11:04:29 -0500 Received: by mail-fx0-f220.google.com with SMTP id 20so2015120fxm.21 for ; Fri, 29 Jan 2010 08:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=C4VVCOiO1LIE1t7XUSb1c7AgY57X8uLoKL1A9NhGpwk=; b=Ah9owXbr/PnsYz1udwATxzMimF+M4t16LVgHmRYTkXCfpGsJJ/C9eiA5Ef7kVDQ5VD E4ZeAue5n2KzhadMyllXuJqdFoH38PqtI0ZlNHaL0NrKTwpr0WCT62wDQbOUqeMDMZzE upFD5KknG2g5EPgmYs/nJtjHLKrpOKhBE8JSU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=AX7lyuVz0zHYOUQXnQfjhg7kZEyXuDz0J7DhvqeyWA9nekI9/jfYEQxset2gxNbfIP WKfQpDKgzTzRo8DRvTWhrbvcKT6ocrLnUEKwpVTqAw9Ei0/dNPtuqHR1pIeeT6KXtS8I bHy0xn2zr6A0gMLJKNCfN6nYK3AnNefWhDft8= Received: by 10.223.164.165 with SMTP id e37mr910370fay.43.1264781068026; Fri, 29 Jan 2010 08:04:28 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id 13sm551604fxm.5.2010.01.29.08.04.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 08:04:27 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Fri, 29 Jan 2010 17:04:21 +0100 Message-Id: <20100129160421.21495.4199.sendpatchset@localhost> In-Reply-To: <20100129160308.21495.14120.sendpatchset@localhost> References: <20100129160308.21495.14120.sendpatchset@localhost> Subject: [PATCH 11/68] piix: use ata_piix.h Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] piix: use ata_piix.h Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/piix.c | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) -- 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 Index: b/drivers/ide/piix.c =================================================================== --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c @@ -241,51 +241,16 @@ static void ich_clear_irq(ide_drive_t *d outb(dma_stat, hwif->dma_base + ATA_DMA_STATUS); } -struct ich_laptop { - u16 device; - u16 subvendor; - u16 subdevice; -}; - -/* - * List of laptops that use short cables rather than 80 wire - */ - -static const struct ich_laptop ich_laptop[] = { - /* devid, subvendor, subdev */ - { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ - { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ - { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ - { 0x27DF, 0x1028, 0x02b0 }, /* ICH7 on unknown Dell */ - { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ - { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ - { 0x27DF, 0x103C, 0x361a }, /* ICH7 on unkown HP */ - { 0x27DF, 0x1071, 0xD221 }, /* ICH7 on Hercules EC-900 */ - { 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */ - { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on Acer Aspire 2023WLMi */ - { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ - { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ - { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ - { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */ - /* end marker */ - { 0, } -}; +#include "../ata/ata_piix.h" static u8 piix_cable_detect(ide_hwif_t *hwif) { struct pci_dev *pdev = to_pci_dev(hwif->dev); - const struct ich_laptop *lap = &ich_laptop[0]; u8 reg54h = 0, mask = hwif->channel ? 0xc0 : 0x30; /* check for specials */ - while (lap->device) { - if (lap->device == pdev->device && - lap->subvendor == pdev->subsystem_vendor && - lap->subdevice == pdev->subsystem_device) { - return ATA_CBL_PATA40_SHORT; - } - lap++; - } + if (ich_short_ata40(pdev)) + return ATA_CBL_PATA40_SHORT; pci_read_config_byte(pdev, 0x54, ®54h);