static int
-__megaraid_reset(Scsi_Cmnd *cmd)
+megaraid_reset(struct scsi_cmnd *cmd)
{
adapter_t *adapter;
megacmd_t mc;
mc.cmd = MEGA_CLUSTER_CMD;
mc.opcode = MEGA_RESET_RESERVATIONS;
- spin_unlock_irq(&adapter->lock);
if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
printk(KERN_WARNING
"megaraid: reservation reset failed.\n");
else {
printk(KERN_INFO "megaraid: reservation reset.\n");
}
- spin_lock_irq(&adapter->lock);
#endif
+ spin_lock_irq(&adapter->lock);
+
rval = megaraid_abort_and_reset(adapter, cmd, SCB_RESET);
/*
* to be communicated over to the mid layer.
*/
mega_rundoneq(adapter);
-
- return rval;
-}
-
-static int
-megaraid_reset(Scsi_Cmnd *cmd)
-{
- adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
- int rc;
-
- spin_lock_irq(&adapter->lock);
- rc = __megaraid_reset(cmd);
spin_unlock_irq(&adapter->lock);
- return rc;
+ return rval;
}
-
/**
* megaraid_abort_and_reset()
* @adapter - megaraid soft state