aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 19:08:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 19:08:50 -0400
commit65a6ec0d72a07f16719e9b7a96e1c4bae044b591 (patch)
tree344e03a5039a44982c1b78d6113633b21b434820 /drivers/net/smc91x.c
parent541010e4b8921cd781ff02ae68028501457045b6 (diff)
parent0181b61a988424b5cc44fe09e6968142359c815e (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (95 commits) [ARM] 4578/1: CM-x270: PCMCIA support [ARM] 4577/1: ITE 8152 PCI bridge support [ARM] 4576/1: CM-X270 machine support [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put() [ARM] pxa: move pxa_set_mode() from pxa2xx_mainstone.c to mainstone.c [ARM] pxa: move pxa_set_mode() from pxa2xx_lubbock.c to lubbock.c [ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols [ARM] pxa: PXA3xx base support [NET] smc91x: fix PXA DMA support code [SERIAL] Fix console initialisation ordering [ARM] pxa: tidy up arch/arm/mach-pxa/Makefile [ARM] Update arch/arm/Kconfig for drivers/Kconfig changes [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23) [ARM] Rename consistent_sync() as dma_cache_maint() [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32 [ARM] 4594/1: ns9xxx: use the new gpio functions [ARM] 4593/1: ns9xxx: implement generic clockevents ...
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c55
1 files changed, 7 insertions, 48 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 24e610e711e8..7da7589d45dd 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -173,49 +173,6 @@ MODULE_LICENSE("GPL");
173 */ 173 */
174#define MII_DELAY 1 174#define MII_DELAY 1
175 175
176/* store this information for the driver.. */
177struct smc_local {
178 /*
179 * If I have to wait until memory is available to send a
180 * packet, I will store the skbuff here, until I get the
181 * desired memory. Then, I'll send it out and free it.
182 */
183 struct sk_buff *pending_tx_skb;
184 struct tasklet_struct tx_task;
185
186 /* version/revision of the SMC91x chip */
187 int version;
188
189 /* Contains the current active transmission mode */
190 int tcr_cur_mode;
191
192 /* Contains the current active receive mode */
193 int rcr_cur_mode;
194
195 /* Contains the current active receive/phy mode */
196 int rpc_cur_mode;
197 int ctl_rfduplx;
198 int ctl_rspeed;
199
200 u32 msg_enable;
201 u32 phy_type;
202 struct mii_if_info mii;
203
204 /* work queue */
205 struct work_struct phy_configure;
206 struct net_device *dev;
207 int work_pending;
208
209 spinlock_t lock;
210
211#ifdef SMC_USE_PXA_DMA
212 /* DMA needs the physical address of the chip */
213 u_long physaddr;
214#endif
215 void __iomem *base;
216 void __iomem *datacs;
217};
218
219#if SMC_DEBUG > 0 176#if SMC_DEBUG > 0
220#define DBG(n, args...) \ 177#define DBG(n, args...) \
221 do { \ 178 do { \
@@ -2215,17 +2172,19 @@ static int smc_drv_probe(struct platform_device *pdev)
2215 goto out_release_attrib; 2172 goto out_release_attrib;
2216 } 2173 }
2217 2174
2218 platform_set_drvdata(pdev, ndev);
2219 ret = smc_probe(ndev, addr);
2220 if (ret != 0)
2221 goto out_iounmap;
2222#ifdef SMC_USE_PXA_DMA 2175#ifdef SMC_USE_PXA_DMA
2223 else { 2176 {
2224 struct smc_local *lp = netdev_priv(ndev); 2177 struct smc_local *lp = netdev_priv(ndev);
2178 lp->device = &pdev->dev;
2225 lp->physaddr = res->start; 2179 lp->physaddr = res->start;
2226 } 2180 }
2227#endif 2181#endif
2228 2182
2183 platform_set_drvdata(pdev, ndev);
2184 ret = smc_probe(ndev, addr);
2185 if (ret != 0)
2186 goto out_iounmap;
2187
2229 smc_request_datacs(pdev, ndev); 2188 smc_request_datacs(pdev, ndev);
2230 2189
2231 return 0; 2190 return 0;