linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES
@ 2012-11-25 17:45 Stefan Richter
  2012-11-26 23:50 ` Martin K. Petersen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Richter @ 2012-11-25 17:45 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-scsi, Martin K. Petersen

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/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-22 11:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-25 17:45 [PATCH] firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES Stefan Richter
2012-11-26 23:50 ` 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

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).