diff options
Diffstat (limited to 'drivers/scsi/in2000.c')
| -rw-r--r-- | drivers/scsi/in2000.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index 0bb0369efb2d..aed7e64865fa 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c | |||
| @@ -1644,14 +1644,16 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd) | |||
| 1644 | struct Scsi_Host *instance; | 1644 | struct Scsi_Host *instance; |
| 1645 | struct IN2000_hostdata *hostdata; | 1645 | struct IN2000_hostdata *hostdata; |
| 1646 | int x; | 1646 | int x; |
| 1647 | unsigned long flags; | ||
| 1647 | 1648 | ||
| 1648 | instance = cmd->device->host; | 1649 | instance = cmd->device->host; |
| 1649 | hostdata = (struct IN2000_hostdata *) instance->hostdata; | 1650 | hostdata = (struct IN2000_hostdata *) instance->hostdata; |
| 1650 | 1651 | ||
| 1651 | printk(KERN_WARNING "scsi%d: Reset. ", instance->host_no); | 1652 | printk(KERN_WARNING "scsi%d: Reset. ", instance->host_no); |
| 1652 | 1653 | ||
| 1653 | /* do scsi-reset here */ | 1654 | spin_lock_irqsave(instance->host_lock, flags); |
| 1654 | 1655 | ||
| 1656 | /* do scsi-reset here */ | ||
| 1655 | reset_hardware(instance, RESET_CARD_AND_BUS); | 1657 | reset_hardware(instance, RESET_CARD_AND_BUS); |
| 1656 | for (x = 0; x < 8; x++) { | 1658 | for (x = 0; x < 8; x++) { |
| 1657 | hostdata->busy[x] = 0; | 1659 | hostdata->busy[x] = 0; |
| @@ -1668,21 +1670,12 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd) | |||
| 1668 | hostdata->outgoing_len = 0; | 1670 | hostdata->outgoing_len = 0; |
| 1669 | 1671 | ||
| 1670 | cmd->result = DID_RESET << 16; | 1672 | cmd->result = DID_RESET << 16; |
| 1671 | return SUCCESS; | ||
| 1672 | } | ||
| 1673 | 1673 | ||
| 1674 | static int in2000_host_reset(Scsi_Cmnd * cmd) | 1674 | spin_unlock_irqrestore(instance->host_lock, flags); |
| 1675 | { | 1675 | return SUCCESS; |
| 1676 | return FAILED; | ||
| 1677 | } | ||
| 1678 | |||
| 1679 | static int in2000_device_reset(Scsi_Cmnd * cmd) | ||
| 1680 | { | ||
| 1681 | return FAILED; | ||
| 1682 | } | 1676 | } |
| 1683 | 1677 | ||
| 1684 | 1678 | static int __in2000_abort(Scsi_Cmnd * cmd) | |
| 1685 | static int in2000_abort(Scsi_Cmnd * cmd) | ||
| 1686 | { | 1679 | { |
| 1687 | struct Scsi_Host *instance; | 1680 | struct Scsi_Host *instance; |
| 1688 | struct IN2000_hostdata *hostdata; | 1681 | struct IN2000_hostdata *hostdata; |
| @@ -1803,6 +1796,16 @@ static int in2000_abort(Scsi_Cmnd * cmd) | |||
| 1803 | return SUCCESS; | 1796 | return SUCCESS; |
| 1804 | } | 1797 | } |
| 1805 | 1798 | ||
| 1799 | static int in2000_abort(Scsi_Cmnd * cmd) | ||
| 1800 | { | ||
| 1801 | int rc; | ||
| 1802 | |||
| 1803 | spin_lock_irq(cmd->device->host->host_lock); | ||
| 1804 | rc = __in2000_abort(cmd); | ||
| 1805 | spin_unlock_irq(cmd->device->host->host_lock); | ||
| 1806 | |||
| 1807 | return rc; | ||
| 1808 | } | ||
| 1806 | 1809 | ||
| 1807 | 1810 | ||
| 1808 | #define MAX_IN2000_HOSTS 3 | 1811 | #define MAX_IN2000_HOSTS 3 |
| @@ -2311,8 +2314,6 @@ static Scsi_Host_Template driver_template = { | |||
| 2311 | .queuecommand = in2000_queuecommand, | 2314 | .queuecommand = in2000_queuecommand, |
| 2312 | .eh_abort_handler = in2000_abort, | 2315 | .eh_abort_handler = in2000_abort, |
| 2313 | .eh_bus_reset_handler = in2000_bus_reset, | 2316 | .eh_bus_reset_handler = in2000_bus_reset, |
| 2314 | .eh_device_reset_handler = in2000_device_reset, | ||
| 2315 | .eh_host_reset_handler = in2000_host_reset, | ||
| 2316 | .bios_param = in2000_biosparam, | 2317 | .bios_param = in2000_biosparam, |
| 2317 | .can_queue = IN2000_CAN_Q, | 2318 | .can_queue = IN2000_CAN_Q, |
| 2318 | .this_id = IN2000_HOST_ID, | 2319 | .this_id = IN2000_HOST_ID, |
