public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: 'Christoph Hellwig' <hch@infradead.org>
To: "Mukker, Atul" <atulm@lsil.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>,
	"'linux-megaraid-devel@dell.com'" <linux-megaraid-devel@dell.com>
Subject: Re: [ANNOUNCE] megaraid linux driver version 2.00.7
Date: Mon, 4 Aug 2003 21:47:06 +0100	[thread overview]
Message-ID: <20030804214706.A24448@infradead.org> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E570185F3E7@EXA-ATLANTA.se.lsil.com>; from atulm@lsil.com on Mon, Aug 04, 2003 at 02:18:59PM -0400

On Mon, Aug 04, 2003 at 02:18:59PM -0400, Mukker, Atul wrote:
> > and incorporating my patch to kill
> > the useless hostlock redefintion?
> > 
> ??, can you resend this patch


diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c	Mon Jun 23 11:03:07 2003
+++ b/drivers/scsi/megaraid.c	Mon Jun 23 11:03:07 2003
@@ -32,15 +32,16 @@
 
 #include <linux/mm.h>
 #include <linux/fs.h>
-#include <linux/blk.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
+#include <linux/blkdev.h>
+#include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/module.h>
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <scsi/scsicam.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
 
 #include "scsi.h"
 #include "hosts.h"
@@ -368,8 +369,6 @@
 		INIT_LIST_HEAD(&adapter->completed_list);
 
 		adapter->flag = flag;
-		spin_lock_init(&adapter->lock);
-		scsi_assign_lock(host, &adapter->lock);
 
 		host->cmd_per_lun = max_cmd_per_lun;
 		host->max_sectors = max_sectors_per_io;
@@ -1754,7 +1753,7 @@
 	/*
 	 * loop till F/W has more commands for us to complete.
 	 */
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	do {
 		/* Check if a valid interrupt is pending */
@@ -1800,7 +1799,7 @@
 
  out_unlock:
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return IRQ_RETVAL(handled);
 }
@@ -1831,7 +1830,7 @@
 	/*
 	 * loop till F/W has more commands for us to complete.
 	 */
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	do {
 		/* Check if a valid interrupt is pending */
@@ -1880,7 +1879,7 @@
 
  out_unlock:
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return IRQ_RETVAL(handled);
 }
@@ -2608,7 +2607,7 @@
 	mc.cmd = MEGA_CLUSTER_CMD;
 	mc.opcode = MEGA_RESET_RESERVATIONS;
 
-	spin_unlock_irq(&adapter->lock);
+	spin_unlock_irq(adapter->host->host_lock);
 	if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
 		printk(KERN_WARNING
 				"megaraid: reservation reset failed.\n");
@@ -2616,7 +2615,7 @@
 	else {
 		printk(KERN_INFO "megaraid: reservation reset.\n");
 	}
-	spin_lock_irq(&adapter->lock);
+	spin_lock_irq(adapter->host->host_lock);
 #endif
 
 	rval =  megaraid_abort_and_reset(adapter, cmd, SCB_RESET);
@@ -4860,7 +4859,7 @@
 
 	rval = mega_do_del_logdrv(adapter, logdrv);
 
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	/*
 	 * If delete operation was successful, add 0x80 to the logical drive
@@ -4879,7 +4878,7 @@
 
 	mega_runpendq(adapter);
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return rval;
 }
@@ -5258,11 +5257,11 @@
 	/*
 	 * Get the lock only if the caller has not acquired it already
 	 */
-	if( ls == LOCK_INT ) spin_lock_irqsave(&adapter->lock, flags);
-
+	if( ls == LOCK_INT )
+		spin_lock_irqsave(adapter->host->host_lock, flags);
 	megaraid_queue(scmd, mega_internal_done);
-
-	if( ls == LOCK_INT ) spin_unlock_irqrestore(&adapter->lock, flags);
+	if( ls == LOCK_INT )
+		spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	/*
 	 * Wait till this command finishes. Do not use
diff -Nru a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
--- a/drivers/scsi/megaraid.h	Mon Jun 23 11:03:07 2003
+++ b/drivers/scsi/megaraid.h	Mon Jun 23 11:03:07 2003
@@ -1,10 +1,6 @@
 #ifndef __MEGARAID_H__
 #define __MEGARAID_H__
 
-#include <linux/version.h>
-#include <linux/spinlock.h>
-
-
 #define MEGARAID_VERSION	\
 	"v2.00.3 (Release Date: Wed Feb 19 08:51:30 EST 2003)\n"
 
@@ -879,8 +875,6 @@
 					   drive needs to be done. Stop
 					   sending requests to the hba till
 					   delete operation is completed */
-	spinlock_t	lock;
-
 	u8	logdrv_chan[MAX_CHANNELS+NVIRT_CHAN]; /* logical drive are on
 							what channels. */
 	int	mega_ch_class;

  reply	other threads:[~2003-08-04 20:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 18:18 [ANNOUNCE] megaraid linux driver version 2.00.7 Mukker, Atul
2003-08-04 20:47 ` 'Christoph Hellwig' [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-06 13:05 Mukker, Atul
2003-08-05 22:09 Mukker, Atul
2003-08-06  5:43 ` 'Christoph Hellwig'
2003-08-02  4:59 haruo tomita
2003-08-01 21:56 Mukker, Atul
2003-08-02  9:16 ` Christoph Hellwig
2003-08-01 20:39 Mukker, Atul

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=20030804214706.A24448@infradead.org \
    --to=hch@infradead.org \
    --cc=atulm@lsil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-megaraid-devel@dell.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