AIC94XX: call tasklet_kill while unloading the module
PATCH 1/1 AIC94XX: call tasklet_kill while unloading the module
drivers/scsi/aic94xx/aic94xx_init.c +5 -0
@@ -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);
Quoted 6 lines · On Wed, 2006-10-18 at 20:25 -0700, [email protected] wrote:
Signed-off-by Malahal Naineni <[email protected]>diff -r
d134b26a8da8drivers/scsi/aic94xx/aic94xx_init.c
drivers/scsi/aic94xx/aic94xx_init.c static void __devexit asd_pci_remove(str · line 744
Quoted 8 lines
drivers/scsi/aic94xx/aic94xx_init.c +5
-0@@ -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
Quoted 20 lines · James Bottomley [[email protected]] wrote:
Quoted 6 lines · On Wed, 2006-10-18 at 20:25 -0700, [email protected] wrote:
Signed-off-by Malahal Naineni <[email protected]>diff -r
d134b26a8da8drivers/scsi/aic94xx/aic94xx_init.cdrivers/scsi/aic94xx/aic94xx_init.c static void __devexit asd_pci_remove(str · line 744
Quoted 8 lines
drivers/scsi/aic94xx/aic94xx_init.c +5
-0@@ -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 theasd_init_hw()teardown path is ... not that I'm very happy with this; the teardown should be inaic94xx_hwi.cwhere the init path is ...
Quoted 1 line
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.
Quoted 4 lines · On Thu, 2006-10-19 at 15:02 -0700, [email protected] wrote:
James, I think we should stop processing the done list before we call
asd_free_queues()which frees all pending SCB's. Soasd_destroy_ha_caches()is too late for it. I can put it inasd_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