From patchwork Tue Oct 11 18:07:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 119052 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 B2624B6EE8 for ; Wed, 12 Oct 2011 05:27:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463Ab1JKSZm (ORCPT ); Tue, 11 Oct 2011 14:25:42 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:65369 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755356Ab1JKSZk (ORCPT ); Tue, 11 Oct 2011 14:25:40 -0400 Received: by mail-bw0-f46.google.com with SMTP id zt4so10123490bkb.19 for ; Tue, 11 Oct 2011 11:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:message-id; bh=4JMiNG03NH/HCrIj3pTAPTXY1TKDwgzGV7FqxrBAV58=; b=xi8e+SA7FsVrr995q6fqM4SAhwVDiuwKgNQTpYXy7T9f+YyerBEPaRVugOQvWtD5vQ RLN55I+P4NO/IVsxshoXoWevftVKAahdP1FHZp3AK58myQoDS/8dsjQXli07DX/cjk2c NZHk2bgF4inYgaabuWKeXbBCnY1pU0zavLZqU= Received: by 10.204.10.81 with SMTP id o17mr7455086bko.78.1318357539881; Tue, 11 Oct 2011 11:25:39 -0700 (PDT) Received: from linux-mhg7.site (89-74-122-41.dynamic.chello.pl. [89.74.122.41]) by mx.google.com with ESMTPS id t13sm14351364fae.0.2011.10.11.11.25.37 (version=SSLv3 cipher=OTHER); Tue, 11 Oct 2011 11:25:38 -0700 (PDT) From: Bartlomiej Zolnierkiewicz To: Jeff Garzik Subject: [PATCH] pata_scc: add proper cable detection method Date: Tue, 11 Oct 2011 20:07:24 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.37.6-0.7-desktop-dirty; KDE/4.6.0; x86_64; ; ) Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-Id: <201110112007.24530.bzolnier@gmail.com> 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_scc: add proper cable detection method Use standard ata_cable_80wire() method for the cable detection, as a bonus this allows us to use the default ->prereset method. Signed-off-by: Bartlomiej Zolnierkiewicz --- earlier references: https://lkml.org/lkml/2009/11/25/373 drivers/ata/pata_scc.c | 14 +------------- 1 file changed, 1 insertion(+), 13 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_scc.c =================================================================== --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c @@ -827,18 +827,6 @@ static unsigned int scc_data_xfer (struc } /** - * scc_pata_prereset - prepare for reset - * @ap: ATA port to be reset - * @deadline: deadline jiffies for the operation - */ - -static int scc_pata_prereset(struct ata_link *link, unsigned long deadline) -{ - link->ap->cbl = ATA_CBL_PATA80; - return ata_sff_prereset(link, deadline); -} - -/** * scc_postreset - standard postreset callback * @ap: the target ata_port * @classes: classes of attached devices @@ -947,7 +935,7 @@ static struct ata_port_operations scc_pa .bmdma_status = scc_bmdma_status, .sff_data_xfer = scc_data_xfer, - .prereset = scc_pata_prereset, + .cable_detect = ata_cable_80wire, .softreset = scc_softreset, .postreset = scc_postreset,