[PATCH] megaraid: fix compilation after eh locking changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Index: linux-2.6/drivers/scsi/megaraid.c
===================================================================
--- linux-2.6.orig/drivers/scsi/megaraid.c	2005-06-19 12:29:53.000000000 +0200
+++ linux-2.6/drivers/scsi/megaraid.c	2005-06-19 12:31:24.000000000 +0200
@@ -1939,7 +1939,7 @@
 
 
 static int
-__megaraid_reset(Scsi_Cmnd *cmd)
+megaraid_reset(struct scsi_cmnd *cmd)
 {
 	adapter_t	*adapter;
 	megacmd_t	mc;
@@ -1951,7 +1951,6 @@
 	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");
@@ -1959,9 +1958,10 @@
 	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);
 
 	/*
@@ -1970,23 +1970,10 @@
 	 */
 	mega_rundoneq(adapter);
 
-	return rval;
-}
-
-static int
-megaraid_reset(Scsi_Cmnd *cmd)
-{
-	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
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux