Linux ATA/IDE development
 help / color / mirror / Atom feed
From: tom.ty89@gmail.com
To: tj@kernel.org, linux-ide@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, Tom Yan <tom.ty89@gmail.com>
Subject: [PATCH 3/3] libata-scsi: Do not partially report ATA read look-ahead
Date: Tue,  3 May 2016 04:13:21 +0800	[thread overview]
Message-ID: <5727b4ef.c923620a.641f4.17b3@mx.google.com> (raw)
In-Reply-To: <1462220001-2566-1-git-send-email-me>

From: Tom Yan <tom.ty89@gmail.com>

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 <tom.ty89@gmail.com>

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);
 }
 
-- 
2.8.2


      parent reply	other threads:[~2016-05-02 20:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1462220001-2566-1-git-send-email-me>
2016-05-02 20:13 ` [PATCH 2/3] libata-scsi: Fix SCSI INQUIRY version descriptor tom.ty89
2016-05-03 18:19   ` Douglas Gilbert
2016-05-07  9:19     ` Tom Yan
2016-05-02 20:13 ` tom.ty89 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5727b4ef.c923620a.641f4.17b3@mx.google.com \
    --to=tom.ty89@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox