From e28b96ef8ab4193997fa3f0677bae0a879ae38dd Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 20 Oct 2008 18:15:30 +0100 Subject: [PATCH] --- yaml --- r: 117787 b: refs/heads/master c: 319edafef64406c971035c56bd68480e5a82b581 h: refs/heads/master i: 117785: 65c52daec23c39aae331d47bfa45a88c2e0d0472 117783: d8377a6711c169fe1f7daac643a98cfd5c894ed0 v: v3 --- [refs] | 2 +- trunk/drivers/net/smc911x.c | 11 ++++++++--- trunk/include/linux/smc911x.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 5deb8e7ae391..33684e5cae7c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bd2c4972fff2d621383bc2c3389a7b1ac7eca8f1 +refs/heads/master: 319edafef64406c971035c56bd68480e5a82b581 diff --git a/trunk/drivers/net/smc911x.c b/trunk/drivers/net/smc911x.c index ec32b5d89c92..2c78229ad04b 100644 --- a/trunk/drivers/net/smc911x.c +++ b/trunk/drivers/net/smc911x.c @@ -180,7 +180,7 @@ static void PRINT_PKT(u_char *buf, int length) static void smc911x_reset(struct net_device *dev) { struct smc911x_local *lp = netdev_priv(dev); - unsigned int reg, timeout=0, resets=1; + unsigned int reg, timeout=0, resets=1, irq_cfg; unsigned long flags; DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __func__); @@ -252,7 +252,12 @@ static void smc911x_reset(struct net_device *dev) * Deassert IRQ for 1*10us for edge type interrupts * and drive IRQ pin push-pull */ - SMC_SET_IRQ_CFG(lp, (1 << 24) | INT_CFG_IRQ_EN_ | INT_CFG_IRQ_TYPE_); + irq_cfg = (1 << 24) | INT_CFG_IRQ_EN_ | INT_CFG_IRQ_TYPE_; +#ifdef SMC_DYNAMIC_BUS_CONFIG + if (lp->cfg.irq_polarity) + irq_cfg |= INT_CFG_IRQ_POL_; +#endif + SMC_SET_IRQ_CFG(lp, irq_cfg); /* clear anything saved */ if (lp->pending_tx_skb != NULL) { @@ -2054,7 +2059,7 @@ static int __init smc911x_probe(struct net_device *dev) */ static int smc911x_drv_probe(struct platform_device *pdev) { - struct smc91x_platdata *pd = pdev->dev.platform_data; + struct smc911x_platdata *pd = pdev->dev.platform_data; struct net_device *ndev; struct resource *res; struct smc911x_local *lp; diff --git a/trunk/include/linux/smc911x.h b/trunk/include/linux/smc911x.h index b58f54c24183..521f37143fae 100644 --- a/trunk/include/linux/smc911x.h +++ b/trunk/include/linux/smc911x.h @@ -7,6 +7,7 @@ struct smc911x_platdata { unsigned long flags; unsigned long irq_flags; /* IRQF_... */ + int irq_polarity; }; #endif /* __SMC911X_H__ */