From patchwork Wed Nov 25 17:11:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 39366 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.176.167]) by ozlabs.org (Postfix) with ESMTP id EF10AB7067 for ; Thu, 26 Nov 2009 04:22:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759369AbZKYRL4 (ORCPT ); Wed, 25 Nov 2009 12:11:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758938AbZKYRLz (ORCPT ); Wed, 25 Nov 2009 12:11:55 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:39574 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933582AbZKYRLq (ORCPT ); Wed, 25 Nov 2009 12:11:46 -0500 Received: by mail-ew0-f219.google.com with SMTP id 19so601003ewy.21 for ; Wed, 25 Nov 2009 09:11:52 -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=MyFn3kUWKyaVJu08oAeLe4uih1wLdlwLu8mArcUDb2s=; b=LzhzUee80jjyQ29qbRr7HuZMUg6+x8Gl7/cOgfXUbn75qidKLWQ622b/6F6efuNUPE 31yeMzvJUsdn2tlAhV2gr4onUaebSxtE+1GrQPRSxBgtXP40yUq1GSSmBIZyNd14Toee U67DilVQKvQpcjV8r3vkN+AdaEiYaJ/nU9M4s= 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=JGDLbWiEWBf6kF5APsUqZ4KpbtrDUwBmueh1WEIgpDurD34aVPzilr7JhAlt0pDjL4 oQnv1/oKusWKqOEKsLddpeZSpoqtElHPVBrxvMa5dDvXF4PwW2VKnW8JmwoTODPJjkhO NqKp6sOxSUdfglRgwyQP9a45vey4ybv0/mFFw= Received: by 10.216.89.12 with SMTP id b12mr701607wef.93.1259169111942; Wed, 25 Nov 2009 09:11:51 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id p10sm13618825gvf.28.2009.11.25.09.11.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 09:11:51 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Wed, 25 Nov 2009 18:11:07 +0100 Message-Id: <20091125171107.5446.66796.sendpatchset@localhost> In-Reply-To: <20091125170218.5446.13513.sendpatchset@localhost> References: <20091125170218.5446.13513.sendpatchset@localhost> Subject: [PATCH 73/86] pata_serverworks: use standard cable detection methods Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] pata_serverworks: use standard cable detection methods Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_serverworks.c | 45 ++++++++++------------------------------- 1 file changed, 12 insertions(+), 33 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/ata/pata_serverworks.c =================================================================== --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c @@ -64,7 +64,8 @@ static const char *csb_bad_ata100[] = { * bits of the subsystem ID. */ -static int dell_cable(struct ata_port *ap) { +static int dell_cable(struct ata_port *ap) +{ struct pci_dev *pdev = to_pci_dev(ap->host->dev); if (pdev->subsystem_device & (1 << (ap->port_no + 14))) @@ -81,7 +82,8 @@ static int dell_cable(struct ata_port *a * need to extend the Dell one in future */ -static int sun_cable(struct ata_port *ap) { +static int sun_cable(struct ata_port *ap) +{ struct pci_dev *pdev = to_pci_dev(ap->host->dev); if (pdev->subsystem_device & (1 << (ap->port_no + 14))) @@ -89,29 +91,6 @@ static int sun_cable(struct ata_port *ap return ATA_CBL_PATA40; } -/** - * osb4_cable - OSB4 cable detect - * @ap: ATA port to check - * - * The OSB4 isn't UDMA66 capable so this is easy - */ - -static int osb4_cable(struct ata_port *ap) { - return ATA_CBL_PATA40; -} - -/** - * csb_cable - CSB5/6 cable detect - * @ap: ATA port to check - * - * Serverworks default arrangement is to use the drive side detection - * only. - */ - -static int csb_cable(struct ata_port *ap) { - return ATA_CBL_PATA_UNK; -} - struct sv_cable_table { int device; int subvendor; @@ -124,14 +103,14 @@ struct sv_cable_table { */ static struct sv_cable_table cable_detect[] = { - { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_DELL, dell_cable }, - { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_VENDOR_ID_DELL, dell_cable }, - { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_SUN, sun_cable }, - { PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, osb4_cable }, - { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, csb_cable }, - { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, csb_cable }, - { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, csb_cable }, - { PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, csb_cable }, + { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_DELL, dell_cable }, + { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_VENDOR_ID_DELL, dell_cable }, + { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_SUN, sun_cable }, + { PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, ata_cable_40wire }, + { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, ata_cable_unknown }, + { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, ata_cable_unknown }, + { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, ata_cable_unknown }, + { PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, ata_cable_unknown }, { } };