linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-scsi@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH] firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES
Date: Sun, 25 Nov 2012 18:45:25 +0100	[thread overview]
Message-ID: <20121125184525.0b7967c4@stein> (raw)

The commits
    3c6bdaeab4fd "[SCSI] Add a report opcode helper"
    5db44863b6eb "[SCSI] sd: Implement support for WRITE SAME"
introduced in-kernel uses of the mentioned commands but cautiously
blacklisted for any IEEE 1394 (SBP-2/3) targets and some other
transports.

I looked through a range of SBP devices and found that the blacklist
flags can be removed:

The kernel never attempts these commands if the device's INQUIRY
data claim a SCSI revision of less than 0x05.  This is the case with
all SBP devices that I checked, except for two devices (both based on
the OXUF936QSE chip but having different firmwares) which claimed
a revision of 0x05 i.e. conformance with SPC-3.

I tried "sg_opcodes" from sg3_utils on these two devices and several
of the other ones and did not encounter any apparent firmware bug
with it.  (All of them returned Illegal Request/ Invalid command
operation code and carried on.)

I did not try "sg_write_same" on any of the devices; but since the
two SPC-3 devices are correctly identified as "fully provisioned",
won't issue WRITE SAME to them either.

Hence let's remove the no_report_opcodes and no_write_same blacklist
flags so that these commands can be used on respectively capable
targets.  I guess the Linux sbp-target could be such a target.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/firewire/sbp2.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index bb1b392..1162d6b 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1546,8 +1546,6 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
 	struct sbp2_logical_unit *lu = sdev->hostdata;
 
 	sdev->use_10_for_rw = 1;
-	sdev->no_report_opcodes = 1;
-	sdev->no_write_same = 1;
 
 	if (sbp2_param_exclusive_login)
 		sdev->manage_start_stop = 1;
-- 
1.7.12



-- 
Stefan Richter
-=====-===-- =-== ==--=
http://arcgraph.de/sr/

             reply	other threads:[~2012-11-25 17:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-25 17:45 Stefan Richter [this message]
2012-11-26 23:50 ` [PATCH] firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES Martin K. Petersen
2012-12-02 18:16   ` Stefan Richter
2013-12-15 14:52     ` Stefan Richter
2013-12-15 15:40       ` [PATCH v3.13-rc3] firewire: sbp2: bring back WRITE SAME support Stefan Richter
2013-12-17 22:18         ` Martin K. Petersen
2013-12-16 14:42       ` [PATCH] firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES Douglas Gilbert
2013-12-22 11:26         ` Stefan Richter

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=20121125184525.0b7967c4@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=martin.petersen@oracle.com \
    /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).