* [PATCH 0/2] ieee1394: sbp2: switch flavor of MODE SENSE
@ 2006-09-07 23:38 Stefan Richter
2006-09-07 23:40 ` [PATCH 1/2] ieee1394: sbp2: don't prefer MODE SENSE 10 Stefan Richter
2006-09-07 23:44 ` [PATCH 2/2 update] ieee1394: sbp2: enable auto spin-up for all SBP-2 devices Stefan Richter
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Richter @ 2006-09-07 23:38 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Ben Collins, Andrew Morton
It became apparent lately that MODE SENSE (6) is more palatable to some
SBP-2 devices and is more popular among other OSs than MODE SENSE (10).
The RBC spec disagrees with sbp2 too.
- ieee1394: sbp2: don't prefer MODE SENSE 10
(supercedes recent workaround for write protect bit of Initio firmware)
- ieee1394: sbp2: enable auto spin-up for all SBP-2 devices
(old patch, reposted in refreshed form to be reapplied smoothly without
the Initio workaround underneath)
--
Stefan Richter
-=====-=-==- =--= -=---
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] ieee1394: sbp2: don't prefer MODE SENSE 10
2006-09-07 23:38 [PATCH 0/2] ieee1394: sbp2: switch flavor of MODE SENSE Stefan Richter
@ 2006-09-07 23:40 ` Stefan Richter
2006-09-07 23:44 ` [PATCH 2/2 update] ieee1394: sbp2: enable auto spin-up for all SBP-2 devices Stefan Richter
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Richter @ 2006-09-07 23:40 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Ben Collins, Andrew Morton
In the old days, sbp2 used to coerce all MODE SENSE commands into the
10 bytes version. When all command set conversions were removed from
sbp2 several months ago, sdev->use_10_for_ms = 1 was added. Meaning,
higher SCSI layers preferred the 10 bytes version but would try the 6
bytes version if the former failed.
Recently, a problem with the 10 bytes version was discovered. An Initio
INIC-1530 firmware accepted the 10 bytes version but replied with bogus
data, showing the HDD incorrectly as write-protected. Since RBC
actually mandates MODE SENSE (6), I checked which version was sent by
Windows XP and Mac OS X 10.3 to an SBP-2 target hosted by Linux --- it
was the 6 bytes version. (Exception: OS X sent the 10 bytes version to
an MMC target. RBC and SBC got MODE SENSE (6).)
Therefore, drop the use_10_for_ms flag from sbp2. Now the upper layers
will try MODE SENSE (6) before MODE SENSE (10) on all SBP-2 devices.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Long story, short patch. This supercedes patch "ieee1394: sbp2:
workaround for write protect bit of Initio firmware".
Index: linux/drivers/ieee1394/sbp2.c
===================================================================
--- linux.orig/drivers/ieee1394/sbp2.c 2006-09-06 23:51:42.000000000 +0200
+++ linux/drivers/ieee1394/sbp2.c 2006-09-07 00:35:09.000000000 +0200
@@ -2529,7 +2529,6 @@ static int sbp2scsi_slave_configure(stru
blk_queue_dma_alignment(sdev->request_queue, (512 - 1));
sdev->use_10_for_rw = 1;
- sdev->use_10_for_ms = 1;
if (sdev->type == TYPE_DISK &&
scsi_id->workarounds & SBP2_WORKAROUND_MODE_SENSE_8)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2 update] ieee1394: sbp2: enable auto spin-up for all SBP-2 devices
2006-09-07 23:38 [PATCH 0/2] ieee1394: sbp2: switch flavor of MODE SENSE Stefan Richter
2006-09-07 23:40 ` [PATCH 1/2] ieee1394: sbp2: don't prefer MODE SENSE 10 Stefan Richter
@ 2006-09-07 23:44 ` Stefan Richter
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Richter @ 2006-09-07 23:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Ben Collins, Andrew Morton
This is a follow-up to patch "ieee1394: sbp2: enable auto spin-up for
Maxtor disks". When I 'ejected' an OXUF922 based HDD from a Mac OS X
box, it was spun down by the Mac and did not spin up by itself when
attached to a Linux box right after that. The first SCSI command that
required the bridge to access the drive ended in
sda:<6>sd 18:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
Additional sense: Logical unit not ready, initializing cmd. required
Therefore the flag which instructs scsi_mod to send START STOP UNIT with
START=1 ("make medium ready") after such a condition is now enabled
unconditionally for all FireWire storage devices.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Patch updated (refreshed) to be applicable without the obsolete patch
"ieee1394: sbp2: workaround for write protect bit of Initio firmware".
Intendend to be dropped into the same place in -mm's order of patches as
before. It's not hard to resolve it manually though.
Index: linux/drivers/ieee1394/sbp2.c
===================================================================
--- linux.orig/drivers/ieee1394/sbp2.c 2006-09-06 23:43:34.000000000 +0200
+++ linux/drivers/ieee1394/sbp2.c 2006-09-06 23:46:47.000000000 +0200
@@ -2441,6 +2441,7 @@ static int sbp2scsi_slave_alloc(struct s
(struct scsi_id_instance_data *)sdev->host->hostdata[0];
scsi_id->sdev = sdev;
+ sdev->allow_restart = 1;
if (scsi_id->workarounds & SBP2_WORKAROUND_INQUIRY_36)
sdev->inquiry_len = 36;
@@ -2461,9 +2462,6 @@ static int sbp2scsi_slave_configure(stru
sdev->skip_ms_page_8 = 1;
if (scsi_id->workarounds & SBP2_WORKAROUND_FIX_CAPACITY)
sdev->fix_capacity = 1;
- if (scsi_id->ne->guid_vendor_id == 0x0010b9 && /* Maxtor's OUI */
- (sdev->type == TYPE_DISK || sdev->type == TYPE_RBC))
- sdev->allow_restart = 1;
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-07 23:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 23:38 [PATCH 0/2] ieee1394: sbp2: switch flavor of MODE SENSE Stefan Richter
2006-09-07 23:40 ` [PATCH 1/2] ieee1394: sbp2: don't prefer MODE SENSE 10 Stefan Richter
2006-09-07 23:44 ` [PATCH 2/2 update] ieee1394: sbp2: enable auto spin-up for all SBP-2 devices Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®