public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] AIC94XX: call tasklet_kill while unloading the module
@ 2006-10-19  3:25 malahal
  2006-10-19 18:57 ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: malahal @ 2006-10-19  3:25 UTC (permalink / raw)
  To: linux-scsi

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>

diff -r d134b26a8da8 drivers/scsi/aic94xx/aic94xx_init.c
--- a/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 16:34:30 2006 -0700
+++ b/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 18:21:40 2006 -0700
@@ -737,6 +737,11 @@ static void __devexit asd_pci_remove(str
 	/* XXX more here as needed */
 
 	free_irq(dev->irq, asd_ha);
+
+	/* We already disabled interrupts and freed the IRQ. Now, it is
+	 * safe to kill the tasklet that processes done list */
+	tasklet_kill(&asd_ha->seq.dl_tasklet);
+
 	if (use_msi)
 		pci_disable_msi(asd_ha->pcidev);
 	asd_turn_off_leds(asd_ha);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AIC94XX: call tasklet_kill while unloading the module
  2006-10-19  3:25 [PATCH] AIC94XX: call tasklet_kill while unloading the module malahal
@ 2006-10-19 18:57 ` James Bottomley
  2006-10-19 22:02   ` malahal
  0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2006-10-19 18:57 UTC (permalink / raw)
  To: malahal; +Cc: linux-scsi

On Wed, 2006-10-18 at 20:25 -0700, malahal@us.ibm.com wrote:
> Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> 
> diff -r d134b26a8da8 drivers/scsi/aic94xx/aic94xx_init.c
> --- a/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 16:34:30 2006 -0700
> +++ b/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 18:21:40 2006 -0700
> @@ -737,6 +737,11 @@ static void __devexit asd_pci_remove(str
>  	/* XXX more here as needed */
>  
>  	free_irq(dev->irq, asd_ha);
> +
> +	/* We already disabled interrupts and freed the IRQ. Now, it is
> +	 * safe to kill the tasklet that processes done list */
> +	tasklet_kill(&asd_ha->seq.dl_tasklet);
> +

Actually, this should be in asd_destroy_ha_caches() which is where the
asd_init_hw() teardown path is ... not that I'm very happy with this;
the teardown should be in aic94xx_hwi.c where the init path is ...

James



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AIC94XX: call tasklet_kill while unloading the module
  2006-10-19 18:57 ` James Bottomley
@ 2006-10-19 22:02   ` malahal
  2006-10-19 22:10     ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: malahal @ 2006-10-19 22:02 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

James Bottomley [James.Bottomley@SteelEye.com] wrote:
> On Wed, 2006-10-18 at 20:25 -0700, malahal@us.ibm.com wrote:
> > Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> > 
> > diff -r d134b26a8da8 drivers/scsi/aic94xx/aic94xx_init.c
> > --- a/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 16:34:30 2006 -0700
> > +++ b/drivers/scsi/aic94xx/aic94xx_init.c	Wed Oct 18 18:21:40 2006 -0700
> > @@ -737,6 +737,11 @@ static void __devexit asd_pci_remove(str
> >  	/* XXX more here as needed */
> >  
> >  	free_irq(dev->irq, asd_ha);
> > +
> > +	/* We already disabled interrupts and freed the IRQ. Now, it is
> > +	 * safe to kill the tasklet that processes done list */
> > +	tasklet_kill(&asd_ha->seq.dl_tasklet);
> > +
> 
> Actually, this should be in asd_destroy_ha_caches() which is where the
> asd_init_hw() teardown path is ... not that I'm very happy with this;
> the teardown should be in aic94xx_hwi.c where the init path is ...
> 
> James

James, I think we should stop processing the done list before
we call asd_free_queues() which frees all pending SCB's. So
asd_destroy_ha_caches() is too late for it. I can put it in
asd_free_queues() if you agree.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AIC94XX: call tasklet_kill while unloading the module
  2006-10-19 22:02   ` malahal
@ 2006-10-19 22:10     ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2006-10-19 22:10 UTC (permalink / raw)
  To: malahal; +Cc: linux-scsi

On Thu, 2006-10-19 at 15:02 -0700, malahal@us.ibm.com wrote:
> James, I think we should stop processing the done list before
> we call asd_free_queues() which frees all pending SCB's. So
> asd_destroy_ha_caches() is too late for it. I can put it in
> asd_free_queues() if you agree.

Not really; that won't get it called correctly on the error path of
asd_pci_probe().

On the teardown path, free_irq is called long before asd_free_queues, so
nothing is going to be scheduling the tasklet, so I don't think it
matters where it's called after that.

James



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-19 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-19  3:25 [PATCH] AIC94XX: call tasklet_kill while unloading the module malahal
2006-10-19 18:57 ` James Bottomley
2006-10-19 22:02   ` malahal
2006-10-19 22:10     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox