sbp2: slimmer interface to scsi_mod
- sbp2scsi_reset does not need to take host_lock - sbp2scsi_reset, as our device reset handler, does not need to stand in as bus reset or host reset handler - let scsi_mod use scsi_host_template.name instead of .info (sbp2 is not an emulation anway) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
This commit is contained in:
parent
e4cda1654e
commit
977545e352
1 changed files with 0 additions and 13 deletions
|
@ -2609,27 +2609,17 @@ static int sbp2scsi_reset(struct scsi_cmnd *SCpnt)
|
||||||
{
|
{
|
||||||
struct scsi_id_instance_data *scsi_id =
|
struct scsi_id_instance_data *scsi_id =
|
||||||
(struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0];
|
(struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0];
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
SBP2_ERR("reset requested");
|
SBP2_ERR("reset requested");
|
||||||
|
|
||||||
spin_lock_irqsave(SCpnt->device->host->host_lock, flags);
|
|
||||||
|
|
||||||
if (sbp2util_node_is_available(scsi_id)) {
|
if (sbp2util_node_is_available(scsi_id)) {
|
||||||
SBP2_ERR("Generating sbp2 fetch agent reset");
|
SBP2_ERR("Generating sbp2 fetch agent reset");
|
||||||
sbp2_agent_reset(scsi_id, 0);
|
sbp2_agent_reset(scsi_id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(SCpnt->device->host->host_lock, flags);
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *sbp2scsi_info(struct Scsi_Host *host)
|
|
||||||
{
|
|
||||||
return "SCSI emulation for IEEE-1394 SBP-2 Devices";
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev,
|
static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev,
|
||||||
struct device_attribute *attr,
|
struct device_attribute *attr,
|
||||||
char *buf)
|
char *buf)
|
||||||
|
@ -2666,12 +2656,9 @@ static struct scsi_host_template scsi_driver_template = {
|
||||||
.module = THIS_MODULE,
|
.module = THIS_MODULE,
|
||||||
.name = "SBP-2 IEEE-1394",
|
.name = "SBP-2 IEEE-1394",
|
||||||
.proc_name = SBP2_DEVICE_NAME,
|
.proc_name = SBP2_DEVICE_NAME,
|
||||||
.info = sbp2scsi_info,
|
|
||||||
.queuecommand = sbp2scsi_queuecommand,
|
.queuecommand = sbp2scsi_queuecommand,
|
||||||
.eh_abort_handler = sbp2scsi_abort,
|
.eh_abort_handler = sbp2scsi_abort,
|
||||||
.eh_device_reset_handler = sbp2scsi_reset,
|
.eh_device_reset_handler = sbp2scsi_reset,
|
||||||
.eh_bus_reset_handler = sbp2scsi_reset,
|
|
||||||
.eh_host_reset_handler = sbp2scsi_reset,
|
|
||||||
.slave_alloc = sbp2scsi_slave_alloc,
|
.slave_alloc = sbp2scsi_slave_alloc,
|
||||||
.slave_configure = sbp2scsi_slave_configure,
|
.slave_configure = sbp2scsi_slave_configure,
|
||||||
.slave_destroy = sbp2scsi_slave_destroy,
|
.slave_destroy = sbp2scsi_slave_destroy,
|
||||||
|
|
Loading…
Add table
Reference in a new issue