You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[SCSI] NCR5380: Fix bugs and canonicalize irq handler usage
* Always pass the same value to free_irq() that we pass to request_irq(). This fixes several bugs. * Always call NCR5380_intr() with 'irq' and 'dev_id' arguments. Note, scsi_falcon_intr() is the only case now where dev_id is not the scsi_host. * Always pass Scsi_Host to request_irq(). For most cases, the drivers already did so, and I merely neated the source code line. In other cases, either NULL or a non-sensical value was passed, verified to be unused, then changed to be Scsi_Host in anticipation of the future. In addition to the bugs fixes, this change makes the interface usage consistent, which in turn enables the possibility of directly referencing Scsi_Host from all NCR5380_intr() invocations. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
committed by
James Bottomley
parent
86e8dfc560
commit
1e64166430
+3
-2
@@ -277,7 +277,8 @@ found:
|
||||
/* With interrupts enabled, it will sometimes hang when doing heavy
|
||||
* reads. So better not enable them until I finger it out. */
|
||||
if (instance->irq != SCSI_IRQ_NONE)
|
||||
if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) {
|
||||
if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED,
|
||||
"dtc", instance)) {
|
||||
printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
|
||||
instance->irq = SCSI_IRQ_NONE;
|
||||
}
|
||||
@@ -459,7 +460,7 @@ static int dtc_release(struct Scsi_Host *shost)
|
||||
NCR5380_local_declare();
|
||||
NCR5380_setup(shost);
|
||||
if (shost->irq)
|
||||
free_irq(shost->irq, NULL);
|
||||
free_irq(shost->irq, shost);
|
||||
NCR5380_exit(shost);
|
||||
if (shost->io_port && shost->n_io_port)
|
||||
release_region(shost->io_port, shost->n_io_port);
|
||||
|
||||
Reference in New Issue
Block a user