]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/scsi/NCR5380.c
Merge tag 'powerpc-4.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / NCR5380.c
index d849ffa378b1ef19f80af760d53ae29774007e7c..4f5ca794bb71507a90879af23f0f4ea998fea9ec 100644 (file)
@@ -97,9 +97,6 @@
  * and macros and include this file in your driver.
  *
  * These macros control options :
- * AUTOPROBE_IRQ - if defined, the NCR5380_probe_irq() function will be
- * defined.
- *
  * AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  * for commands that return with a CHECK CONDITION status.
  *
  * NCR5380_dma_residual   - residual byte count
  *
  * The generic driver is initialized by calling NCR5380_init(instance),
- * after setting the appropriate host specific fields and ID.  If the
- * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance,
- * possible) function may be used.
+ * after setting the appropriate host specific fields and ID.
  */
 
 #ifndef NCR5380_io_delay
@@ -351,76 +346,6 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
 }
 #endif
 
-
-static int probe_irq;
-
-/**
- * probe_intr  -       helper for IRQ autoprobe
- * @irq: interrupt number
- * @dev_id: unused
- * @regs: unused
- *
- * Set a flag to indicate the IRQ in question was received. This is
- * used by the IRQ probe code.
- */
-
-static irqreturn_t probe_intr(int irq, void *dev_id)
-{
-       probe_irq = irq;
-       return IRQ_HANDLED;
-}
-
-/**
- * NCR5380_probe_irq   -       find the IRQ of an NCR5380
- * @instance: NCR5380 controller
- * @possible: bitmask of ISA IRQ lines
- *
- * Autoprobe for the IRQ line used by the NCR5380 by triggering an IRQ
- * and then looking to see what interrupt actually turned up.
- */
-
-static int __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance,
-                                               int possible)
-{
-       struct NCR5380_hostdata *hostdata = shost_priv(instance);
-       unsigned long timeout;
-       int trying_irqs, i, mask;
-
-       for (trying_irqs = 0, i = 1, mask = 2; i < 16; ++i, mask <<= 1)
-               if ((mask & possible) && (request_irq(i, &probe_intr, 0, "NCR-probe", NULL) == 0))
-                       trying_irqs |= mask;
-
-       timeout = jiffies + msecs_to_jiffies(250);
-       probe_irq = NO_IRQ;
-
-       /*
-        * A interrupt is triggered whenever BSY = false, SEL = true
-        * and a bit set in the SELECT_ENABLE_REG is asserted on the
-        * SCSI bus.
-        *
-        * Note that the bus is only driven when the phase control signals
-        * (I/O, C/D, and MSG) match those in the TCR, so we must reset that
-        * to zero.
-        */
-
-       NCR5380_write(TARGET_COMMAND_REG, 0);
-       NCR5380_write(SELECT_ENABLE_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);
-
-       while (probe_irq == NO_IRQ && time_before(jiffies, timeout))
-               schedule_timeout_uninterruptible(1);
-
-       NCR5380_write(SELECT_ENABLE_REG, 0);
-       NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
-
-       for (i = 1, mask = 2; i < 16; ++i, mask <<= 1)
-               if (trying_irqs & mask)
-                       free_irq(i, NULL);
-
-       return probe_irq;
-}
-
 /**
  * NCR58380_info - report driver and host information
  * @instance: relevant scsi host instance