aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-01-23 15:20:08 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:02:44 -0500
commitcfb01381f4ffcd05aefe76c74911ba6bc996e8ba (patch)
tree52fa2302bd3fb3584772cf252d10b18d2fe5744e /drivers/firewire/fw-sbp2.c
parent907293d78872ee492ce6a114258dd853ec5082ae (diff)
firewire: fw-sbp2: set command set related device flags
Copied from sbp2: - enable spin-up by START STOP UNIT for all devices - enable INQUIRY (36) workaround on demand - prefer READ/ WRITE (10) over (6) for all devices - prefer MODE SENSE (10) for MMC devices Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 4e42b73f1e3e..54cad3a5dfb8 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -968,11 +968,27 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
968 return 0; 968 return 0;
969} 969}
970 970
971static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
972{
973 struct fw_unit *unit = (struct fw_unit *)sdev->host->hostdata[0];
974 struct sbp2_device *sd = unit->device.driver_data;
975
976 sdev->allow_restart = 1;
977
978 if (sd->workarounds & SBP2_WORKAROUND_INQUIRY_36)
979 sdev->inquiry_len = 36;
980 return 0;
981}
982
971static int sbp2_scsi_slave_configure(struct scsi_device *sdev) 983static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
972{ 984{
973 struct fw_unit *unit = (struct fw_unit *)sdev->host->hostdata[0]; 985 struct fw_unit *unit = (struct fw_unit *)sdev->host->hostdata[0];
974 struct sbp2_device *sd = unit->device.driver_data; 986 struct sbp2_device *sd = unit->device.driver_data;
975 987
988 sdev->use_10_for_rw = 1;
989
990 if (sdev->type == TYPE_ROM)
991 sdev->use_10_for_ms = 1;
976 if (sdev->type == TYPE_DISK && 992 if (sdev->type == TYPE_DISK &&
977 sd->workarounds & SBP2_WORKAROUND_MODE_SENSE_8) 993 sd->workarounds & SBP2_WORKAROUND_MODE_SENSE_8)
978 sdev->skip_ms_page_8 = 1; 994 sdev->skip_ms_page_8 = 1;
@@ -1004,6 +1020,7 @@ static struct scsi_host_template scsi_driver_template = {
1004 .name = "SBP-2 IEEE-1394", 1020 .name = "SBP-2 IEEE-1394",
1005 .proc_name = (char *)sbp2_driver_name, 1021 .proc_name = (char *)sbp2_driver_name,
1006 .queuecommand = sbp2_scsi_queuecommand, 1022 .queuecommand = sbp2_scsi_queuecommand,
1023 .slave_alloc = sbp2_scsi_slave_alloc,
1007 .slave_configure = sbp2_scsi_slave_configure, 1024 .slave_configure = sbp2_scsi_slave_configure,
1008 .eh_abort_handler = sbp2_scsi_abort, 1025 .eh_abort_handler = sbp2_scsi_abort,
1009 .this_id = -1, 1026 .this_id = -1,