From patchwork Mon May 2 20:13:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Yan X-Patchwork-Id: 8995541 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A9C19F30C for ; Mon, 2 May 2016 20:13:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97EB420225 for ; Mon, 2 May 2016 20:13:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3CEB20253 for ; Mon, 2 May 2016 20:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755149AbcEBUNj (ORCPT ); Mon, 2 May 2016 16:13:39 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34278 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755146AbcEBUNi (ORCPT ); Mon, 2 May 2016 16:13:38 -0400 Received: by mail-pf0-f195.google.com with SMTP id 145so18439814pfz.1; Mon, 02 May 2016 13:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:subject:date:in-reply-to:references; bh=iC8Oo+m8J4XsZwjEHIMwA4HEI6FUNa6ve0PZR8BGOQA=; b=ZvjQCmHxkakLkeQXioPLNbb+qx5/crFEWwNYpHSLrVCIl4khQygMvlsZKRoZQoIYJN m11jnxRLdbVZsdcyNenxAk7Mv5nNWn21JAfHf4fcAwvgOOv30/iuJVqR/aDqaMPXFfaI E3jWrqoN5bJODzIvabPwy+iTIi1wBJQ+ok5eLnvLRkvDxytUZyFQmXieVQntWEZyB2xJ mugIzI0qyLnU1GHEyVUmJzW5g6GRYico/LAYhofhPf23SdKBSuSKELyYlNqoIzTRY31J DeQtsGTIcTkutI7iXPFh1ZKblNo1PlOTcqCGTIU9p2cF7cqbZ9x1x7qv/nDKy4kWNTmI w7Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:subject:date:in-reply-to :references; bh=iC8Oo+m8J4XsZwjEHIMwA4HEI6FUNa6ve0PZR8BGOQA=; b=cqEu9rhOqsH6Uc+0ctTTdCpDpM5bvSGJVPCtEjbBS8nEbJ4dBwE+8OSTKixyV0YFrQ FfCM6GElyk5ffkDUHXs/e3MpndYujktNcsJmsZWxoIt5kQldZKR/4yGM8LUv+QtLyilZ RZJCf6pVNlqVTUczf27FtoDcq52FcQdx62Vq0r/8xnVtTlfqQa0byaOosDBu0LAoPV4g bgpEwhcap0tGv5+ViDwI8NFQX3YltGlgvK7krpNq3QhL7aSsCwllapF/lGSaoyQhtLq9 JElSfNDB2vgcNHlSkTbMHo9EvuE5Vv7QiLSOg3pZrbbpQHjP4CF/5p+tH7vCcYldPAez kdEA== X-Gm-Message-State: AOPr4FVgITn7L730UjwH3Q+SVaNbc9vck/oBC6R+Sk+kG8wuzM19ajm0FZksgr3USOJhSg== X-Received: by 10.98.69.213 with SMTP id n82mr54777040pfi.48.1462220016175; Mon, 02 May 2016 13:13:36 -0700 (PDT) Received: from localhost.localdomain (n11211848121.netvigator.com. [112.118.48.121]) by smtp.gmail.com with ESMTPSA id q70sm47469656pfj.81.2016.05.02.13.13.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 May 2016 13:13:35 -0700 (PDT) Message-ID: <5727b4ef.c923620a.641f4.17b3@mx.google.com> X-Google-Original-Message-ID: <1462220001-2566-3-git-send-email-me> From: tom.ty89@gmail.com X-Google-Original-From: me To: tj@kernel.org, linux-ide@vger.kernel.org Cc: linux-scsi@vger.kernel.org, Tom Yan Subject: [PATCH 3/3] libata-scsi: Do not partially report ATA read look-ahead Date: Tue, 3 May 2016 04:13:21 +0800 X-Mailer: git-send-email 2.8.2 In-Reply-To: <1462220001-2566-1-git-send-email-me> References: <1462220001-2566-1-git-send-email-me> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tom Yan Nothing in the kernel actually makes use of the DRA bit in SCSI MODE SENSE. Neither is there a sysfs file (like 'cache_type' for WCE) that allows users to change the bit nor SCSI-ATA Translation that can toggle the ATA feature. Hence removing the MODE SENSE SCSI-ATA Translation that is only triggered by the change of WCE to avoid silliness like this: https://bugzilla.kernel.org/show_bug.cgi?id=105861#c2 Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 0295c38..8c07db8 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2316,8 +2316,6 @@ static unsigned int ata_msense_caching(u16 *id, u8 *buf, bool changeable) modecpy(buf, def_cache_mpage, sizeof(def_cache_mpage), changeable); if (changeable || ata_id_wcache_enabled(id)) buf[2] |= (1 << 2); /* write cache enable */ - if (!changeable && !ata_id_rahead_enabled(id)) - buf[12] |= (1 << 5); /* disable read ahead */ return sizeof(def_cache_mpage); }