* [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock
@ 2003-07-30 21:00 Bagalkote, Sreenivas
2003-07-31 9:05 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Bagalkote, Sreenivas @ 2003-07-30 21:00 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org',
'linux-scsi@vger.kernel.org'
Cc: 'linux-megaraid-devel@dell.com'
Please apply this patch to megaraid 2.00.6 driver for kernels that don't
support per host lock. This can be found at :
ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.6/
Sreenivas Bagalkote
LSI Logic
--- megaraid_2006/megaraid2.c 2003-07-30 14:43:36.000000000 -0400
+++ megaraid_2006_wo_hostlock/megaraid2.c 2003-07-30
15:05:35.000000000 -0400
@@ -394,7 +394,6 @@
adapter->flag = flag;
spin_lock_init(&adapter->lock);
- host->lock = &adapter->lock;
host->cmd_per_lun = max_cmd_per_lun;
host->max_sectors = max_sectors_per_io;
@@ -1775,7 +1774,7 @@
unsigned long flags;
- spin_lock_irqsave(&adapter->lock, flags);
+ spin_lock_irqsave(&io_request_lock, flags);
megaraid_iombox_ack_sequence(adapter);
@@ -1784,7 +1783,7 @@
mega_runpendq(adapter);
}
- spin_unlock_irqrestore(&adapter->lock, flags);
+ spin_unlock_irqrestore(&io_request_lock, flags);
return;
}
@@ -1857,7 +1856,7 @@
unsigned long flags;
- spin_lock_irqsave(&adapter->lock, flags);
+ spin_lock_irqsave(&io_request_lock, flags);
megaraid_memmbox_ack_sequence(adapter);
@@ -1866,7 +1865,7 @@
mega_runpendq(adapter);
}
- spin_unlock_irqrestore(&adapter->lock, flags);
+ spin_unlock_irqrestore(&io_request_lock, flags);
return;
}
@@ -2618,7 +2617,7 @@
adapter = (adapter_t *)scp->host->hostdata;
- ASSERT( spin_is_locked(&adapter->lock) );
+ ASSERT( spin_is_locked(&io_request_lock) );
printk("megaraid: aborting-%ld cmd=%x <c=%d t=%d l=%d>\n",
scp->serial_number, scp->cmnd[0], scp->channel, scp->target,
@@ -2715,7 +2714,7 @@
adapter = (adapter_t *)cmd->host->hostdata;
- ASSERT( spin_is_locked(&adapter->lock) );
+ ASSERT( spin_is_locked(&io_request_lock) );
printk("megaraid: reset-%ld cmd=%x <c=%d t=%d l=%d>\n",
cmd->serial_number, cmd->cmnd[0], cmd->channel, cmd->target,
@@ -2726,7 +2725,7 @@
mc.cmd = MEGA_CLUSTER_CMD;
mc.opcode = MEGA_RESET_RESERVATIONS;
- spin_unlock_irq(&adapter->lock);
+ spin_unlock_irq(&io_request_lock);
if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
printk(KERN_WARNING
"megaraid: reservation reset failed.\n");
@@ -2734,7 +2733,7 @@
else {
printk(KERN_INFO "megaraid: reservation reset.\n");
}
- spin_lock_irq(&adapter->lock);
+ spin_lock_irq(&io_request_lock);
#endif
/*
@@ -4958,7 +4957,7 @@
scb_t *scb;
int rval;
- ASSERT( !spin_is_locked(&adapter->lock) );
+ ASSERT( !spin_is_locked(&io_request_lock) );
/*
* Stop sending commands to the controller, queue them internally.
@@ -4978,7 +4977,7 @@
rval = mega_do_del_logdrv(adapter, logdrv);
- spin_lock_irqsave(&adapter->lock, flags);
+ spin_lock_irqsave(&io_request_lock, flags);
/*
* If delete operation was successful, add 0x80 to the logical drive
@@ -4997,7 +4996,7 @@
mega_runpendq(adapter);
- spin_unlock_irqrestore(&adapter->lock, flags);
+ spin_unlock_irqrestore(&io_request_lock, flags);
return rval;
}
@@ -5547,11 +5546,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(&io_request_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(&io_request_lock,
flags);
/*
* Wait till this command finishes. Do not use
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock
2003-07-30 21:00 [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock Bagalkote, Sreenivas
@ 2003-07-31 9:05 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2003-07-31 9:05 UTC (permalink / raw)
To: Bagalkote, Sreenivas
Cc: 'linux-kernel@vger.kernel.org',
'linux-scsi@vger.kernel.org',
'linux-megaraid-devel@dell.com'
On Wed, Jul 30 2003, Bagalkote, Sreenivas wrote:
> Please apply this patch to megaraid 2.00.6 driver for kernels that don't
> support per host lock. This can be found at :
>
> ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.6/
It's easily possible to keep the impact of maintaining a driver across
such kernels a lot smaller, by simply using the same lock in the
spin_lock calls and just assign that lock to adapter->lock or
io_request_lock depending on the kernel.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock
2003-07-31 21:10 Mukker, Atul
2003-07-31 23:14 ` Matthew Wilcox
@ 2003-08-01 5:49 ` Jens Axboe
1 sibling, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2003-08-01 5:49 UTC (permalink / raw)
To: Mukker, Atul
Cc: Bagalkote, Sreenivas, 'linux-kernel@vger.kernel.org',
'linux-scsi@vger.kernel.org',
'linux-megaraid-devel@dell.com'
On Thu, Jul 31 2003, Mukker, Atul wrote:
>
> Well, that's definitely a good idea. Expect a new driver with this change.
> BTW, is there a kernel version beyond which all versions would support per
> host lock, and I mean a 2.4.x kernel :-)
Unfortunately no, however it is trivial to just add host->lock pointer
and make it point to io_request_lock. Ditto for q->queue_lock. That wont
change how the code operates at all. I will probably do that once 2.4.23
opens, it would make maintaining 2.6/2.4 drivers much easier (and ditto
for vendor kernels).
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock
2003-07-31 21:10 Mukker, Atul
@ 2003-07-31 23:14 ` Matthew Wilcox
2003-08-01 5:49 ` Jens Axboe
1 sibling, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2003-07-31 23:14 UTC (permalink / raw)
To: Mukker, Atul
Cc: 'Jens Axboe',
Bagalkote, Sreenivas, 'linux-kernel@vger.kernel.org',
'linux-scsi@vger.kernel.org',
'linux-megaraid-devel@dell.com'
On Thu, Jul 31, 2003 at 05:10:50PM -0400, Mukker, Atul wrote:
>
> Well, that's definitely a good idea. Expect a new driver with this change.
> BTW, is there a kernel version beyond which all versions would support per
> host lock, and I mean a 2.4.x kernel :-)
that's a pretty dangerous change to make to a stable kernel. much better
to work on stabilising 2.6.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock
@ 2003-07-31 21:10 Mukker, Atul
2003-07-31 23:14 ` Matthew Wilcox
2003-08-01 5:49 ` Jens Axboe
0 siblings, 2 replies; 5+ messages in thread
From: Mukker, Atul @ 2003-07-31 21:10 UTC (permalink / raw)
To: 'Jens Axboe', Bagalkote, Sreenivas
Cc: 'linux-kernel@vger.kernel.org',
'linux-scsi@vger.kernel.org',
'linux-megaraid-devel@dell.com'
Well, that's definitely a good idea. Expect a new driver with this change.
BTW, is there a kernel version beyond which all versions would support per
host lock, and I mean a 2.4.x kernel :-)
Thanks
-Atul Mukker
> -----Original Message-----
> From: Jens Axboe [mailto:axboe@suse.de]
> Sent: Thursday, July 31, 2003 5:06 AM
> To: Bagalkote, Sreenivas
> Cc: 'linux-kernel@vger.kernel.org'; 'linux-scsi@vger.kernel.org';
> 'linux-megaraid-devel@dell.com'
> Subject: Re: [ANNOUNCE] megaraid 2.00.6 patch for kernels without
> hostlock
>
>
> On Wed, Jul 30 2003, Bagalkote, Sreenivas wrote:
> > Please apply this patch to megaraid 2.00.6 driver for
> kernels that don't
> > support per host lock. This can be found at :
> >
> > ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.6/
>
> It's easily possible to keep the impact of maintaining a driver across
> such kernels a lot smaller, by simply using the same lock in the
> spin_lock calls and just assign that lock to adapter->lock or
> io_request_lock depending on the kernel.
>
> --
> Jens Axboe
>
> _______________________________________________
> Linux-megaraid-devel mailing list
> Linux-megaraid-devel@dell.com
> http://lists.us.dell.com/mailman/listinfo/linux-megaraid-devel
> Please read the FAQ at http://lists.us.dell.com/faq or search
> the list archives at http://lists.us.dell.com/htdig/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-01 5:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 21:00 [ANNOUNCE] megaraid 2.00.6 patch for kernels without hostlock Bagalkote, Sreenivas
2003-07-31 9:05 ` Jens Axboe
2003-07-31 21:10 Mukker, Atul
2003-07-31 23:14 ` Matthew Wilcox
2003-08-01 5:49 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).