linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>
Cc: Andy Whitcroft <apw@canonical.com>,
	Ben Howard <ben.howard@canonical.com>,
	linux-scsi@vger.kernel.org, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] scsi: add scsi device flag to request READ CAPACITY (16) be preferred
Date: Fri, 13 Sep 2013 13:58:27 +0100	[thread overview]
Message-ID: <1379077109-29606-3-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1379077109-29606-1-git-send-email-apw@canonical.com>

BugLink: http://bugs.launchpad.net/bugs/1223499
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/scsi/sd.c          | 2 ++
 include/scsi/scsi_device.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5a8a04d..eba4d6c 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2104,6 +2104,8 @@ static int sd_try_rc16_first(struct scsi_device *sdp)
 		return 1;
 	if (scsi_device_protection(sdp))
 		return 1;
+	if (sdp->try_rc_16_first)
+		return 1;
 	return 0;
 }
 
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9b7fdb6..df3ed43 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -165,6 +165,7 @@ struct scsi_device {
 	unsigned no_read_disc_info:1;	/* Avoid READ_DISC_INFO cmds */
 	unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
 	unsigned try_rc_10_first:1;	/* Try READ_CAPACACITY_10 first */
+	unsigned try_rc_16_first:1;	/* Try READ_CAPACACITY_16 first */
 	unsigned is_visible:1;	/* is the device visible in sysfs */
 	unsigned wce_default_on:1;	/* Cache is ON by default */
 	unsigned no_dif:1;	/* T10 PI (DIF) should be disabled */
-- 
1.8.1.2


  parent reply	other threads:[~2013-09-13 12:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 12:58 [PATCH 0/4] Hyper-V TRIM support Andy Whitcroft
2013-09-13 12:58 ` [PATCH 1/4] scsi: add scsi device flag to request VPD pages be used at SPC-2 Andy Whitcroft
2013-09-13 12:58 ` Andy Whitcroft [this message]
2013-09-13 12:58 ` [PATCH 3/4] scsi: hyper-v storage -- mark as VPD capable " Andy Whitcroft
2013-09-13 12:58 ` [PATCH 4/4] scsi: hyper-v storage -- mark as preferring READ CAPACITY (16) " Andy Whitcroft
2013-09-13 14:57 ` [PATCH 0/4] Hyper-V TRIM support James Bottomley
2013-09-13 15:40   ` Andy Whitcroft
2013-09-13 15:40 ` Douglas Gilbert

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=1379077109-29606-3-git-send-email-apw@canonical.com \
    --to=apw@canonical.com \
    --cc=JBottomley@parallels.com \
    --cc=ben.howard@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.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;
as well as URLs for NNTP newsgroup(s).