Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Wed, 15 Oct 2003 23:53:49 -0200 | Subject | [patch][2/3] qlogic: call request_irq() with private data | From | Aristeu Sergio Rozanski Filho <> |
| |
-- aris
--- linux/drivers/scsi/qlogicfas.c.orig 2003-10-15 23:42:15.000000000 -0200 +++ linux/drivers/scsi/qlogicfas.c 2003-10-15 23:44:11.000000000 -0200 @@ -667,9 +667,6 @@ qlirq = j; } else printk(KERN_INFO "Ql: Using preset IRQ %d\n", qlirq); - - if (qlirq >= 0 && !request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", NULL)) - host->can_queue = 1; #endif hreg = scsi_host_alloc(host, 0); /* no host data */ if (!hreg) @@ -677,17 +674,23 @@ hreg->io_port = qbase; hreg->n_io_port = 16; hreg->dma_channel = -1; - if (qlirq != -1) - hreg->irq = qlirq; + hreg->irq = qlirq; + hreg->can_queue = 1; INIT_LIST_HEAD(&hreg->sht_legacy_list); sprintf(qinfo, "Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d", qltyp, qbase, qlirq, QL_TURBO_PDMA); host->name = qinfo; +#ifdef QL_USE_IRQ + if (qlirq < 0 || request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", hreg)) + goto free_scsi_host; +#endif return hreg; +free_scsi_host: + kfree(hreg); err_release_mem: release_region(qbase, 0x10); if (host->can_queue) | ![\](/images/icornerr.gif) |