aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-06-26 09:45:39 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-26 09:45:39 -0400
commitfa4c49669f0408557bc52cd7054c920a8790dec6 (patch)
tree78dadb45b6779538e907e13666bd59b81e0df1f8 /drivers/scsi/megaraid.c
parent849717383abc795b8f5efe7b9e0792b2e1f8916a (diff)
[SCSI] megaraid: fix compilation after eh locking changes
From: Christoph Hellwig <hch@lst.de> Patch fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r--drivers/scsi/megaraid.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index ec81532eb845..6ee88c59953e 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -1938,7 +1938,7 @@ megaraid_abort(Scsi_Cmnd *cmd)
1938 1938
1939 1939
1940static int 1940static int
1941__megaraid_reset(Scsi_Cmnd *cmd) 1941megaraid_reset(struct scsi_cmnd *cmd)
1942{ 1942{
1943 adapter_t *adapter; 1943 adapter_t *adapter;
1944 megacmd_t mc; 1944 megacmd_t mc;
@@ -1950,7 +1950,6 @@ __megaraid_reset(Scsi_Cmnd *cmd)
1950 mc.cmd = MEGA_CLUSTER_CMD; 1950 mc.cmd = MEGA_CLUSTER_CMD;
1951 mc.opcode = MEGA_RESET_RESERVATIONS; 1951 mc.opcode = MEGA_RESET_RESERVATIONS;
1952 1952
1953 spin_unlock_irq(&adapter->lock);
1954 if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) { 1953 if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
1955 printk(KERN_WARNING 1954 printk(KERN_WARNING
1956 "megaraid: reservation reset failed.\n"); 1955 "megaraid: reservation reset failed.\n");
@@ -1958,9 +1957,10 @@ __megaraid_reset(Scsi_Cmnd *cmd)
1958 else { 1957 else {
1959 printk(KERN_INFO "megaraid: reservation reset.\n"); 1958 printk(KERN_INFO "megaraid: reservation reset.\n");
1960 } 1959 }
1961 spin_lock_irq(&adapter->lock);
1962#endif 1960#endif
1963 1961
1962 spin_lock_irq(&adapter->lock);
1963
1964 rval = megaraid_abort_and_reset(adapter, cmd, SCB_RESET); 1964 rval = megaraid_abort_and_reset(adapter, cmd, SCB_RESET);
1965 1965
1966 /* 1966 /*
@@ -1968,24 +1968,11 @@ __megaraid_reset(Scsi_Cmnd *cmd)
1968 * to be communicated over to the mid layer. 1968 * to be communicated over to the mid layer.
1969 */ 1969 */
1970 mega_rundoneq(adapter); 1970 mega_rundoneq(adapter);
1971
1972 return rval;
1973}
1974
1975static int
1976megaraid_reset(Scsi_Cmnd *cmd)
1977{
1978 adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
1979 int rc;
1980
1981 spin_lock_irq(&adapter->lock);
1982 rc = __megaraid_reset(cmd);
1983 spin_unlock_irq(&adapter->lock); 1971 spin_unlock_irq(&adapter->lock);
1984 1972
1985 return rc; 1973 return rval;
1986} 1974}
1987 1975
1988
1989/** 1976/**
1990 * megaraid_abort_and_reset() 1977 * megaraid_abort_and_reset()
1991 * @adapter - megaraid soft state 1978 * @adapter - megaraid soft state