From patchwork Thu Oct 13 20:03:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 119602 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 3C4A4B7150 for ; Fri, 14 Oct 2011 07:17:22 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612Ab1JMURU (ORCPT ); Thu, 13 Oct 2011 16:17:20 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:58632 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301Ab1JMURT (ORCPT ); Thu, 13 Oct 2011 16:17:19 -0400 Received: by eye27 with SMTP id 27so423999eye.19 for ; Thu, 13 Oct 2011 13:17:18 -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=XLYLRhFrQO/A5QJZcAArU+b5Jnva57M1nPRVSbD1tsM=; b=usDu2DtI1Ajd3xe3v7839XXekizcgIc/xD1qYBYPw0TJAMoEPoTBr9z5GCKcm0/HRZ F1sZ6Rv5W5B1z6SdQG6ue77QNQmQbxrUyxLXsG6wsTnkpc2V1f1vcWV9rK3kcxicgG0i QNKB3EJNPoRVBAD6gPJZQssWp6krvp6aiYQJk= Received: by 10.223.63.130 with SMTP id b2mr2164580fai.35.1318537038484; Thu, 13 Oct 2011 13:17:18 -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 m26sm1666612fac.6.2011.10.13.13.17.16 (version=SSLv3 cipher=OTHER); Thu, 13 Oct 2011 13:17:17 -0700 (PDT) From: Bartlomiej Zolnierkiewicz To: Jeff Garzik Subject: [PATCH] libata: fix for transport xfer attributes Date: Thu, 13 Oct 2011 22:03:45 +0200 User-Agent: KMail/1.13.6 (Linux/3.1.0-rc9-0.7-desktop-00073-g37cf951-dirty; KDE/4.6.0; x86_64; ; ) Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-Id: <201110132203.45394.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] libata: fix for transport xfer attributes Fix display of pio_mode, dma_mode and xfer_mode device attributes. before: $ cat /sys/class/ata_device/dev1.0/xfer_mode XFER_UDMA_7, XFER_UDMA_6, XFER_UDMA_5, XFER_UDMA_4, XFER_UDMA_3, XFER_UDMA_2, XF ER_UDMA_1, XFER_UDMA_0, XFER_MW_DMA_4, XFER_MW_DMA_3, XFER_MW_DMA_2, XFER_SW_DMA _2, XFER_PIO_6, XFER_PIO_5, XFER_PIO_4, XFER_PIO_3, XFER_PIO_2 after: $ cat /sys/class/ata_device/dev1.0/xfer_mode XFER_UDMA_6 Signed-off-by: Bartlomiej Zolnierkiewicz --- Documentation/ABI/testing/sysfs-ata | 4 ++-- drivers/ata/libata-transport.c | 2 +- 2 files changed, 3 insertions(+), 3 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/Documentation/ABI/testing/sysfs-ata =================================================================== --- a/Documentation/ABI/testing/sysfs-ata +++ b/Documentation/ABI/testing/sysfs-ata @@ -59,12 +59,12 @@ class dma_mode - Transfer modes supported by the device when in DMA mode. + Transfer mode currently used by the device when in DMA mode. Mostly used by PATA device. pio_mode - Transfer modes supported by the device when in PIO mode. + Transfer mode currently used by the device when in PIO mode. Mostly used by PATA device. xfer_mode Index: b/drivers/ata/libata-transport.c =================================================================== --- a/drivers/ata/libata-transport.c +++ b/drivers/ata/libata-transport.c @@ -194,7 +194,7 @@ static struct { { XFER_PIO_0, "XFER_PIO_0" }, { XFER_PIO_SLOW, "XFER_PIO_SLOW" } }; -ata_bitfield_name_match(xfer,ata_xfer_names) +ata_bitfield_name_search(xfer, ata_xfer_names) /* * ATA Port attributes