]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/irda/smsc-ircc2.c
forcedeth: phy status fix
[linux-2.6-omap-h63xx.git] / drivers / net / irda / smsc-ircc2.c
index 9043bf4aa49ec9e5a477eff5347b49790f2160fa..1f26da761e9f0067ca49450f31d48cad23cf6317 100644 (file)
@@ -79,9 +79,9 @@ MODULE_AUTHOR("Daniele Peri <peri@csai.unipa.it>");
 MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
 MODULE_LICENSE("GPL");
 
-static int smsc_nopnp;
+static int smsc_nopnp = 1;
 module_param_named(nopnp, smsc_nopnp, bool, 0);
-MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
+MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings, defaults to true");
 
 #define DMA_INVAL 255
 static int ircc_dma = DMA_INVAL;
@@ -416,6 +416,13 @@ static int __init smsc_ircc_legacy_probe(void)
 {
        int ret = 0;
 
+#ifdef CONFIG_PCI
+       if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) {
+               /* Ignore errors from preconfiguration */
+               IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
+       }
+#endif
+
        if (ircc_fir > 0 && ircc_sir > 0) {
                IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir);
                IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir);
@@ -459,13 +466,6 @@ static int __init smsc_ircc_init(void)
                return ret;
        }
 
-#ifdef CONFIG_PCI
-       if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) {
-               /* Ignore errors from preconfiguration */
-               IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
-       }
-#endif
-
        dev_count = 0;
 
        if (smsc_nopnp || !pnp_platform_devices ||
@@ -519,8 +519,6 @@ static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u
                goto err_out1;
        }
 
-       SET_MODULE_OWNER(dev);
-
        dev->hard_start_xmit = smsc_ircc_hard_xmit_sir;
 #if SMSC_IRCC2_C_NET_TIMEOUT
        dev->tx_timeout      = smsc_ircc_timeout;
@@ -1507,22 +1505,13 @@ static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self)
  *    An interrupt from the chip has arrived. Time to do some work
  *
  */
-static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id)
+static irqreturn_t smsc_ircc_interrupt(int dummy, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
-       struct smsc_ircc_cb *self;
+       struct net_device *dev = dev_id;
+       struct smsc_ircc_cb *self = netdev_priv(dev);
        int iobase, iir, lcra, lsr;
        irqreturn_t ret = IRQ_NONE;
 
-       if (dev == NULL) {
-               printk(KERN_WARNING "%s: irq %d for unknown device.\n",
-                      driver_name, irq);
-               goto irq_ret;
-       }
-
-       self = netdev_priv(dev);
-       IRDA_ASSERT(self != NULL, return IRQ_NONE;);
-
        /* Serialise the interrupt handler in various CPUs, stop Tx path */
        spin_lock(&self->lock);
 
@@ -1567,7 +1556,7 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id)
 
  irq_ret_unlock:
        spin_unlock(&self->lock);
- irq_ret:
+
        return ret;
 }