* Re: [SCSI] allow sleeping in ->eh_device_reset_handler()
[not found] <200506181820.j5IIKLlm021250@hera.kernel.org>
@ 2005-06-20 21:30 ` Dave Jones
0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2005-06-20 21:30 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: jgarzik
On Sat, Jun 18, 2005 at 11:20:21AM -0700, Linux Kernel wrote:
> tree 1609752ea7a9adb28583147f0bea33a9f10877d7
> parent 8fa728a26886f56a9ee10a44fea0ddda301d21c3
> author Jeff Garzik <jgarzik@pobox.com> Sat, 28 May 2005 15:55:48 -0400
> committer Jeff Garzik <jgarzik@pobox.com> Fri, 17 Jun 2005 22:05:03 -0500
>
> [SCSI] allow sleeping in ->eh_device_reset_handler()
>
> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
.. deletia ...
> ===================================================================
> --- 105ead5c90057400abae0c8aa9e2b5ba1818c327/drivers/scsi/megaraid.c (mode:100644 sha1:8d707b29027da4dcab34942adcc7aac9f5e11a8e)
> +++ 1609752ea7a9adb28583147f0bea33a9f10877d7/drivers/scsi/megaraid.c (mode:100644 sha1:80b0c40c522b7023369c6498ad24165892b8ff55)
> @@ -1938,7 +1938,7 @@ megaraid_abort(Scsi_Cmnd *cmd)
>
>
> static int
> -megaraid_reset(Scsi_Cmnd *cmd)
> +__megaraid_reset(Scsi_Cmnd *cmd)
> {
> adapter_t *adapter;
> megacmd_t mc;
> @@ -1972,6 +1972,18 @@ megaraid_reset(Scsi_Cmnd *cmd)
> 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;
> +}
This doesn't compile.
drivers/scsi/megaraid.c:1978: error: 'adapter' undeclared (first use in this function)
drivers/scsi/megaraid.c:1978: error: (Each undeclared identifier is reported only once
drivers/scsi/megaraid.c:1978: error: for each function it appears in.)
drivers/scsi/megaraid.c:1979: warning: ISO C90 forbids mixed declarations and code
This should fix it.. (untested due to lack of hardware)
Signed-off-by: Dave Jones <davej@redhat.com>
--- linux-2.6.12/drivers/scsi/megaraid.c~ 2005-06-20 17:23:27.000000000 -0400
+++ linux-2.6.12/drivers/scsi/megaraid.c 2005-06-20 17:29:03.000000000 -0400
@@ -1975,9 +1975,11 @@ __megaraid_reset(Scsi_Cmnd *cmd)
static int
megaraid_reset(Scsi_Cmnd *cmd)
{
- adapter = (adapter_t *)cmd->device->host->hostdata;
+ adapter_t *adapter;
int rc;
+ adapter = cmd->device->host->hostdata;
+
spin_lock_irq(&adapter->lock);
rc = __megaraid_reset(cmd);
spin_unlock_irq(&adapter->lock);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-20 21:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200506181820.j5IIKLlm021250@hera.kernel.org>
2005-06-20 21:30 ` [SCSI] allow sleeping in ->eh_device_reset_handler() Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox