aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-19 17:39:03 +0800
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-12 21:52:40 +0100
commitc4f0e76747e80578a8f7fddd82fd0ce8127bd2f8 (patch)
tree48dfd3c9b7204f1096410b6f4ee7f7640705c67d /drivers/net/smc91x.c
parentfa6d3be08538bb80274d20c7e59f9beca48fa44a (diff)
[NET] smc91x: add SMC91X_NOWAIT flag to platform data
And also favors the usage of SMC91X_NOWAIT over the hardcoded SMC_NOWAIT by converting "nowait" (module parameter overridable) to platform flag. There are several possibilities: 1. platform data present - preferred and use as is 2. platform data absent - use "nowait", it can be: a. SMC_NOWAIT if defined b. default to 0 if SMC_NOWAIT isn't defined c. overriden by module parameter Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 1b19022b6c7..de7a913c487 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -308,7 +308,7 @@ static void smc_reset(struct net_device *dev)
* can't handle it then there will be no recovery except for
* a hard reset or power cycle
*/
- if (nowait)
+ if (lp->cfg.flags & SMC91X_NOWAIT)
cfg |= CONFIG_NO_WAIT;
/*
@@ -2160,6 +2160,7 @@ static int smc_drv_probe(struct platform_device *pdev)
lp->cfg.flags |= (SMC_CAN_USE_8BIT) ? SMC91X_USE_8BIT : 0;
lp->cfg.flags |= (SMC_CAN_USE_16BIT) ? SMC91X_USE_16BIT : 0;
lp->cfg.flags |= (SMC_CAN_USE_32BIT) ? SMC91X_USE_32BIT : 0;
+ lp->cfg.flags |= (nowait) ? SMC91X_NOWAIT : 0;
}
ndev->dma = (unsigned char)-1;