Commit 153dec02 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix IRQ_NONE clash

Several scsi drivers are already using an IRQ_NONE.  Rename that to
SCSI_IRQ_NONE.
parent 72e471e7
...@@ -6056,7 +6056,7 @@ NCR53c7x0_release(struct Scsi_Host *host) { ...@@ -6056,7 +6056,7 @@ NCR53c7x0_release(struct Scsi_Host *host) {
(struct NCR53c7x0_hostdata *) host->hostdata[0]; (struct NCR53c7x0_hostdata *) host->hostdata[0];
struct NCR53c7x0_cmd *cmd, *tmp; struct NCR53c7x0_cmd *cmd, *tmp;
shutdown (host); shutdown (host);
if (host->irq != IRQ_NONE) if (host->irq != SCSI_IRQ_NONE)
{ {
int irq_count; int irq_count;
struct Scsi_Host *tmp; struct Scsi_Host *tmp;
......
...@@ -1450,7 +1450,7 @@ struct NCR53c7x0_hostdata { ...@@ -1450,7 +1450,7 @@ struct NCR53c7x0_hostdata {
}; };
#define IRQ_NONE 255 #define SCSI_IRQ_NONE 255
#define DMA_NONE 255 #define DMA_NONE 255
#define IRQ_AUTO 254 #define IRQ_AUTO 254
#define DMA_AUTO 254 #define DMA_AUTO 254
......
...@@ -706,7 +706,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) ...@@ -706,7 +706,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible)
trying_irqs |= mask; trying_irqs |= mask;
timeout = jiffies + (250 * HZ / 1000); timeout = jiffies + (250 * HZ / 1000);
probe_irq = IRQ_NONE; probe_irq = SCSI_IRQ_NONE;
/* /*
* A interrupt is triggered whenever BSY = false, SEL = true * A interrupt is triggered whenever BSY = false, SEL = true
...@@ -723,7 +723,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) ...@@ -723,7 +723,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible)
NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask);
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_DATA | ICR_ASSERT_SEL); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_DATA | ICR_ASSERT_SEL);
while (probe_irq == IRQ_NONE && time_before(jiffies, timeout)) while (probe_irq == SCSI_IRQ_NONE && time_before(jiffies, timeout))
{ {
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1); schedule_timeout(1);
...@@ -892,7 +892,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset, int length, int ...@@ -892,7 +892,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset, int length, int
SPRINTF("\nBase Addr: 0x%05lX ", (long) instance->base); SPRINTF("\nBase Addr: 0x%05lX ", (long) instance->base);
SPRINTF("io_port: %04x ", (int) instance->io_port); SPRINTF("io_port: %04x ", (int) instance->io_port);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
SPRINTF("IRQ: None.\n"); SPRINTF("IRQ: None.\n");
else else
SPRINTF("IRQ: %d.\n", instance->irq); SPRINTF("IRQ: %d.\n", instance->irq);
...@@ -1207,7 +1207,7 @@ static void NCR5380_main(void *p) ...@@ -1207,7 +1207,7 @@ static void NCR5380_main(void *p)
instance = hostdata->host; instance = hostdata->host;
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irqsave(instance->host_lock, flags); spin_lock_irqsave(instance->host_lock, flags);
do { do {
...@@ -1308,7 +1308,7 @@ static void NCR5380_main(void *p) ...@@ -1308,7 +1308,7 @@ static void NCR5380_main(void *p)
break; break;
} while (!done); } while (!done);
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_unlock_irqrestore(instance->host_lock, flags); spin_unlock_irqrestore(instance->host_lock, flags);
} }
...@@ -1481,7 +1481,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1481,7 +1481,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
NCR5380_setup(instance); NCR5380_setup(instance);
if (hostdata->selecting) { if (hostdata->selecting) {
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_unlock_irq(instance->host_lock); spin_unlock_irq(instance->host_lock);
goto part2; /* RvC: sorry prof. Dijkstra, but it keeps the goto part2; /* RvC: sorry prof. Dijkstra, but it keeps the
rest of the code nearly the same */ rest of the code nearly the same */
...@@ -1506,14 +1506,14 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1506,14 +1506,14 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask);
NCR5380_write(MODE_REG, MR_ARBITRATE); NCR5380_write(MODE_REG, MR_ARBITRATE);
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_unlock_irq(instance->host_lock); spin_unlock_irq(instance->host_lock);
/* We can be relaxed here, interrupts are on, we are /* We can be relaxed here, interrupts are on, we are
in workqueue context, the birds are singing in the trees */ in workqueue context, the birds are singing in the trees */
err = NCR5380_poll_politely(instance, INITIATOR_COMMAND_REG, ICR_ARBITRATION_PROGRESS, ICR_ARBITRATION_PROGRESS, 5*HZ); err = NCR5380_poll_politely(instance, INITIATOR_COMMAND_REG, ICR_ARBITRATION_PROGRESS, ICR_ARBITRATION_PROGRESS, 5*HZ);
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irq(instance->host_lock); spin_lock_irq(instance->host_lock);
if (err < 0) { if (err < 0) {
...@@ -1649,7 +1649,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1649,7 +1649,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
waiting period */ waiting period */
if ((NCR5380_read(STATUS_REG) & (SR_SEL | SR_IO)) == (SR_SEL | SR_IO)) { if ((NCR5380_read(STATUS_REG) & (SR_SEL | SR_IO)) == (SR_SEL | SR_IO)) {
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irq(instance->host_lock); spin_lock_irq(instance->host_lock);
NCR5380_reselect(instance); NCR5380_reselect(instance);
printk("scsi%d : reselection after won arbitration?\n", instance->host_no); printk("scsi%d : reselection after won arbitration?\n", instance->host_no);
...@@ -1676,7 +1676,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1676,7 +1676,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
return -1; return -1;
} }
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irq(instance->host_lock); spin_lock_irq(instance->host_lock);
cmd->result = DID_BAD_TARGET << 16; cmd->result = DID_BAD_TARGET << 16;
collect_stats(hostdata, cmd); collect_stats(hostdata, cmd);
...@@ -1714,9 +1714,9 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1714,9 +1714,9 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
} }
dprintk(NDEBUG_SELECTION, ("scsi%d : target %d selected, going into MESSAGE OUT phase.\n", instance->host_no, cmd->device->id)); dprintk(NDEBUG_SELECTION, ("scsi%d : target %d selected, going into MESSAGE OUT phase.\n", instance->host_no, cmd->device->id));
tmp[0] = IDENTIFY(((instance->irq == IRQ_NONE) ? 0 : 1), cmd->device->lun); tmp[0] = IDENTIFY(((instance->irq == SCSI_IRQ_NONE) ? 0 : 1), cmd->device->lun);
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irq(instance->host_lock); spin_lock_irq(instance->host_lock);
len = 1; len = 1;
...@@ -1738,7 +1738,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag) ...@@ -1738,7 +1738,7 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd * cmd, int tag)
/* Selection failed */ /* Selection failed */
failed: failed:
if(instance->irq != IRQ_NONE) if(instance->irq != SCSI_IRQ_NONE)
spin_lock_irq(instance->host_lock); spin_lock_irq(instance->host_lock);
return -1; return -1;
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
* Scsi_Host structure * Scsi_Host structure
*/ */
#define IRQ_NONE 255 #define SCSI_IRQ_NONE 255
#define DMA_NONE 255 #define DMA_NONE 255
#define IRQ_AUTO 254 #define IRQ_AUTO 254
#define DMA_AUTO 254 #define DMA_AUTO 254
......
...@@ -96,7 +96,7 @@ static int __init dmx3191d_detect(Scsi_Host_Template *tmpl) { ...@@ -96,7 +96,7 @@ static int __init dmx3191d_detect(Scsi_Host_Template *tmpl) {
printk(KERN_WARNING "dmx3191: IRQ %d not available - switching to polled mode.\n", pdev->irq); printk(KERN_WARNING "dmx3191: IRQ %d not available - switching to polled mode.\n", pdev->irq);
/* Steam powered scsi controllers run without an IRQ /* Steam powered scsi controllers run without an IRQ
anyway */ anyway */
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
boards++; boards++;
...@@ -113,7 +113,7 @@ static const char * dmx3191d_info(struct Scsi_Host *host) { ...@@ -113,7 +113,7 @@ static const char * dmx3191d_info(struct Scsi_Host *host) {
static int dmx3191d_release_resources(struct Scsi_Host *instance) static int dmx3191d_release_resources(struct Scsi_Host *instance)
{ {
release_region(instance->io_port, DMX3191D_REGION); release_region(instance->io_port, DMX3191D_REGION);
if(instance->irq!=IRQ_NONE) if(instance->irq!=SCSI_IRQ_NONE)
free_irq(instance->irq, instance); free_irq(instance->irq, instance);
return 0; return 0;
......
...@@ -269,27 +269,27 @@ static int __init dtc_detect(Scsi_Host_Template * tpnt) ...@@ -269,27 +269,27 @@ static int __init dtc_detect(Scsi_Host_Template * tpnt)
#ifndef DONT_USE_INTR #ifndef DONT_USE_INTR
/* With interrupts enabled, it will sometimes hang when doing heavy /* With interrupts enabled, it will sometimes hang when doing heavy
* reads. So better not enable them until I finger it out. */ * reads. So better not enable them until I finger it out. */
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) { if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) {
printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
if (instance->irq == IRQ_NONE) { if (instance->irq == SCSI_IRQ_NONE) {
printk(KERN_WARNING "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no); printk(KERN_WARNING "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
printk(KERN_WARNING "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); printk(KERN_WARNING "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
} }
#else #else
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no); printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
#endif #endif
#if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT) #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT)
printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
#endif #endif
printk(KERN_INFO "scsi%d : at 0x%05X", instance->host_no, (int) instance->base); printk(KERN_INFO "scsi%d : at 0x%05X", instance->host_no, (int) instance->base);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk(" interrupts disabled"); printk(" interrupts disabled");
else else
printk(" irq %d", instance->irq); printk(" irq %d", instance->irq);
...@@ -361,7 +361,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, ...@@ -361,7 +361,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst,
i = 0; i = 0;
NCR5380_read(RESET_PARITY_INTERRUPT_REG); NCR5380_read(RESET_PARITY_INTERRUPT_REG);
NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE); NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ); NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ);
else else
NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE); NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE);
...@@ -412,7 +412,7 @@ static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, ...@@ -412,7 +412,7 @@ static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src,
NCR5380_read(RESET_PARITY_INTERRUPT_REG); NCR5380_read(RESET_PARITY_INTERRUPT_REG);
NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE); NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
/* set direction (write) */ /* set direction (write) */
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
NCR5380_write(DTC_CONTROL_REG, 0); NCR5380_write(DTC_CONTROL_REG, 0);
else else
NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR); NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);
......
...@@ -336,7 +336,7 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt) ...@@ -336,7 +336,7 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt)
if (pnp_irq_valid(dev, 0)) if (pnp_irq_valid(dev, 0))
overrides[count].irq = pnp_irq(dev, 0); overrides[count].irq = pnp_irq(dev, 0);
else else
overrides[count].irq = IRQ_NONE; overrides[count].irq = SCSI_IRQ_NONE;
if (pnp_dma_valid(dev, 0)) if (pnp_dma_valid(dev, 0))
overrides[count].dma = pnp_dma(dev, 0); overrides[count].dma = pnp_dma(dev, 0);
else else
...@@ -433,19 +433,19 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt) ...@@ -433,19 +433,19 @@ int __init generic_NCR5380_detect(Scsi_Host_Template * tpnt)
else else
instance->irq = NCR5380_probe_irq(instance, 0xffff); instance->irq = NCR5380_probe_irq(instance, 0xffff);
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", NULL)) { if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", NULL)) {
printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
if (instance->irq == IRQ_NONE) { if (instance->irq == SCSI_IRQ_NONE) {
printk(KERN_INFO "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no); printk(KERN_INFO "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
printk(KERN_INFO "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); printk(KERN_INFO "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
} }
printk(KERN_INFO "scsi%d : at " STRVAL(NCR5380_map_name) " 0x%x", instance->host_no, (unsigned int) instance->NCR5380_instance_name); printk(KERN_INFO "scsi%d : at " STRVAL(NCR5380_map_name) " 0x%x", instance->host_no, (unsigned int) instance->NCR5380_instance_name);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk(" interrupts disabled"); printk(" interrupts disabled");
else else
printk(" irq %d", instance->irq); printk(" irq %d", instance->irq);
...@@ -492,7 +492,7 @@ int generic_NCR5380_release_resources(struct Scsi_Host *instance) ...@@ -492,7 +492,7 @@ int generic_NCR5380_release_resources(struct Scsi_Host *instance)
release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size); release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size);
#endif #endif
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
free_irq(instance->irq, NULL); free_irq(instance->irq, NULL);
return 0; return 0;
...@@ -804,7 +804,7 @@ int generic_NCR5380_proc_info(char *buffer, char **start, off_t offset, int leng ...@@ -804,7 +804,7 @@ int generic_NCR5380_proc_info(char *buffer, char **start, off_t offset, int leng
PRINTP("NO NCR53C400 driver extensions\n"); PRINTP("NO NCR53C400 driver extensions\n");
#endif #endif
PRINTP("Using %s mapping at %s 0x%lx, " ANDP STRVAL(NCR5380_map_config) ANDP STRVAL(NCR5380_map_name) ANDP scsi_ptr->NCR5380_instance_name); PRINTP("Using %s mapping at %s 0x%lx, " ANDP STRVAL(NCR5380_map_config) ANDP STRVAL(NCR5380_map_name) ANDP scsi_ptr->NCR5380_instance_name);
if (scsi_ptr->irq == IRQ_NONE) if (scsi_ptr->irq == SCSI_IRQ_NONE)
PRINTP("no interrupt\n"); PRINTP("no interrupt\n");
else else
PRINTP("on interrupt %d\n" ANDP scsi_ptr->irq); PRINTP("on interrupt %d\n" ANDP scsi_ptr->irq);
......
...@@ -253,16 +253,16 @@ int macscsi_detect(Scsi_Host_Template * tpnt) ...@@ -253,16 +253,16 @@ int macscsi_detect(Scsi_Host_Template * tpnt)
((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0; ((struct NCR5380_hostdata *)instance->hostdata)->ctrl = 0;
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, NCR5380_intr, IRQ_FLG_SLOW, if (request_irq(instance->irq, NCR5380_intr, IRQ_FLG_SLOW,
"ncr5380", NCR5380_intr)) { "ncr5380", NCR5380_intr)) {
printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n", printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
printk(KERN_INFO "scsi%d: generic 5380 at port %lX irq", instance->host_no, instance->io_port); printk(KERN_INFO "scsi%d: generic 5380 at port %lX irq", instance->host_no, instance->io_port);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk (KERN_INFO "s disabled"); printk (KERN_INFO "s disabled");
else else
printk (KERN_INFO " %d", instance->irq); printk (KERN_INFO " %d", instance->irq);
...@@ -277,7 +277,7 @@ int macscsi_detect(Scsi_Host_Template * tpnt) ...@@ -277,7 +277,7 @@ int macscsi_detect(Scsi_Host_Template * tpnt)
int macscsi_release (struct Scsi_Host *shpnt) int macscsi_release (struct Scsi_Host *shpnt)
{ {
if (shpnt->irq != IRQ_NONE) if (shpnt->irq != SCSI_IRQ_NONE)
free_irq (shpnt->irq, NCR5380_intr); free_irq (shpnt->irq, NCR5380_intr);
return 0; return 0;
......
...@@ -103,11 +103,11 @@ ...@@ -103,11 +103,11 @@
* interrupts. Ie, for a board at the default 0x388 base port, * interrupts. Ie, for a board at the default 0x388 base port,
* boot: linux pas16=0x388,255 * boot: linux pas16=0x388,255
* *
* IRQ_NONE (255) should be specified for no interrupt, * SCSI_IRQ_NONE (255) should be specified for no interrupt,
* IRQ_AUTO (254) to autoprobe for an IRQ line if overridden * IRQ_AUTO (254) to autoprobe for an IRQ line if overridden
* on the command line. * on the command line.
* *
* (IRQ_AUTO == 254, IRQ_NONE == 255 in NCR5380.h) * (IRQ_AUTO == 254, SCSI_IRQ_NONE == 255 in NCR5380.h)
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -451,14 +451,14 @@ int __init pas16_detect(Scsi_Host_Template * tpnt) ...@@ -451,14 +451,14 @@ int __init pas16_detect(Scsi_Host_Template * tpnt)
else else
instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) { if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) {
printk("scsi%d : IRQ%d not free, interrupts disabled\n", printk("scsi%d : IRQ%d not free, interrupts disabled\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
if (instance->irq == IRQ_NONE) { if (instance->irq == SCSI_IRQ_NONE) {
printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no); printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
/* Disable 5380 interrupts, leave drive params the same */ /* Disable 5380 interrupts, leave drive params the same */
...@@ -472,7 +472,7 @@ int __init pas16_detect(Scsi_Host_Template * tpnt) ...@@ -472,7 +472,7 @@ int __init pas16_detect(Scsi_Host_Template * tpnt)
printk("scsi%d : at 0x%04x", instance->host_no, (int) printk("scsi%d : at 0x%04x", instance->host_no, (int)
instance->io_port); instance->io_port);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk (" interrupts disabled"); printk (" interrupts disabled");
else else
printk (" irq %d", instance->irq); printk (" irq %d", instance->irq);
......
...@@ -273,7 +273,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -273,7 +273,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt)
#ifndef REAL_DMA #ifndef REAL_DMA
printk("scsi%d: IRQ%d not free, interrupts disabled\n", printk("scsi%d: IRQ%d not free, interrupts disabled\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
#else #else
printk("scsi%d: IRQ%d not free, bailing out\n", printk("scsi%d: IRQ%d not free, bailing out\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
...@@ -282,7 +282,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -282,7 +282,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt)
} }
printk("scsi%d: Sun3 5380 at port %lX irq", instance->host_no, instance->io_port); printk("scsi%d: Sun3 5380 at port %lX irq", instance->host_no, instance->io_port);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk ("s disabled"); printk ("s disabled");
else else
printk (" %d", instance->irq); printk (" %d", instance->irq);
...@@ -311,7 +311,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -311,7 +311,7 @@ int sun3scsi_detect(Scsi_Host_Template * tpnt)
#ifdef MODULE #ifdef MODULE
int sun3scsi_release (struct Scsi_Host *shpnt) int sun3scsi_release (struct Scsi_Host *shpnt)
{ {
if (shpnt->irq != IRQ_NONE) if (shpnt->irq != SCSI_IRQ_NONE)
free_irq (shpnt->irq, NULL); free_irq (shpnt->irq, NULL);
iounmap((void *)sun3_scsi_regp); iounmap((void *)sun3_scsi_regp);
......
...@@ -235,7 +235,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -235,7 +235,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt)
#ifndef REAL_DMA #ifndef REAL_DMA
printk("scsi%d: IRQ%d not free, interrupts disabled\n", printk("scsi%d: IRQ%d not free, interrupts disabled\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
#else #else
printk("scsi%d: IRQ%d not free, bailing out\n", printk("scsi%d: IRQ%d not free, bailing out\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
...@@ -244,7 +244,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -244,7 +244,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt)
} }
printk("scsi%d: Sun3 5380 VME at port %lX irq", instance->host_no, instance->io_port); printk("scsi%d: Sun3 5380 VME at port %lX irq", instance->host_no, instance->io_port);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk ("s disabled"); printk ("s disabled");
else else
printk (" %d", instance->irq); printk (" %d", instance->irq);
...@@ -280,7 +280,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt) ...@@ -280,7 +280,7 @@ static int sun3scsi_detect(Scsi_Host_Template * tpnt)
#ifdef MODULE #ifdef MODULE
int sun3scsi_release (struct Scsi_Host *shpnt) int sun3scsi_release (struct Scsi_Host *shpnt)
{ {
if (shpnt->irq != IRQ_NONE) if (shpnt->irq != SCSI_IRQ_NONE)
free_irq (shpnt->irq, NULL); free_irq (shpnt->irq, NULL);
iounmap(sun3_scsi_regp); iounmap(sun3_scsi_regp);
......
...@@ -248,14 +248,14 @@ int __init t128_detect(Scsi_Host_Template * tpnt){ ...@@ -248,14 +248,14 @@ int __init t128_detect(Scsi_Host_Template * tpnt){
else else
instance->irq = NCR5380_probe_irq(instance, T128_IRQS); instance->irq = NCR5380_probe_irq(instance, T128_IRQS);
if (instance->irq != IRQ_NONE) if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) { if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) {
printk("scsi%d : IRQ%d not free, interrupts disabled\n", printk("scsi%d : IRQ%d not free, interrupts disabled\n",
instance->host_no, instance->irq); instance->host_no, instance->irq);
instance->irq = IRQ_NONE; instance->irq = SCSI_IRQ_NONE;
} }
if (instance->irq == IRQ_NONE) { if (instance->irq == SCSI_IRQ_NONE) {
printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no); printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
} }
...@@ -265,7 +265,7 @@ int __init t128_detect(Scsi_Host_Template * tpnt){ ...@@ -265,7 +265,7 @@ int __init t128_detect(Scsi_Host_Template * tpnt){
#endif #endif
printk("scsi%d : at 0x%08lx", instance->host_no, instance->base); printk("scsi%d : at 0x%08lx", instance->host_no, instance->base);
if (instance->irq == IRQ_NONE) if (instance->irq == SCSI_IRQ_NONE)
printk (" interrupts disabled"); printk (" interrupts disabled");
else else
printk (" irq %d", instance->irq); printk (" irq %d", instance->irq);
......
...@@ -3045,7 +3045,7 @@ int DC390_release (struct Scsi_Host *host) ...@@ -3045,7 +3045,7 @@ int DC390_release (struct Scsi_Host *host)
/* TO DO: We should check for outstanding commands first. */ /* TO DO: We should check for outstanding commands first. */
dc390_shutdown (host); dc390_shutdown (host);
if (host->irq != IRQ_NONE) if (host->irq != SCSI_IRQ_NONE)
{ {
DEBUG0(printk(KERN_INFO "DC390: Free IRQ %i\n",host->irq);) DEBUG0(printk(KERN_INFO "DC390: Free IRQ %i\n",host->irq);)
free_irq (host->irq, pACB); free_irq (host->irq, pACB);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/config.h> #include <linux/config.h>
#define IRQ_NONE 255 #define SCSI_IRQ_NONE 255
#define MAX_ADAPTER_NUM 4 #define MAX_ADAPTER_NUM 4
#define MAX_SG_LIST_BUF 16 /* Not used */ #define MAX_SG_LIST_BUF 16 /* Not used */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment