public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: jejb@steeleye.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] megaraid: fix compilation after eh locking changes
Date: Sun, 19 Jun 2005 13:38:14 +0200	[thread overview]
Message-ID: <20050619113814.GA18801@lst.de> (raw)


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

                 reply	other threads:[~2005-06-19 11:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050619113814.GA18801@lst.de \
    --to=hch@lst.de \
    --cc=jejb@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox