aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/acenic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/acenic.c')
-rw-r--r--drivers/net/acenic.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 2c2ed6dc98bc..6c192650d349 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -406,7 +406,7 @@ MODULE_DEVICE_TABLE(pci, acenic_pci_tbl);
406#define DEF_STAT (2 * TICKS_PER_SEC) 406#define DEF_STAT (2 * TICKS_PER_SEC)
407 407
408 408
409static int link[ACE_MAX_MOD_PARMS]; 409static int link_state[ACE_MAX_MOD_PARMS];
410static int trace[ACE_MAX_MOD_PARMS]; 410static int trace[ACE_MAX_MOD_PARMS];
411static int tx_coal_tick[ACE_MAX_MOD_PARMS]; 411static int tx_coal_tick[ACE_MAX_MOD_PARMS];
412static int rx_coal_tick[ACE_MAX_MOD_PARMS]; 412static int rx_coal_tick[ACE_MAX_MOD_PARMS];
@@ -419,7 +419,7 @@ MODULE_AUTHOR("Jes Sorensen <jes@trained-monkey.org>");
419MODULE_LICENSE("GPL"); 419MODULE_LICENSE("GPL");
420MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver"); 420MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver");
421 421
422module_param_array(link, int, NULL, 0); 422module_param_array_named(link, link_state, int, NULL, 0);
423module_param_array(trace, int, NULL, 0); 423module_param_array(trace, int, NULL, 0);
424module_param_array(tx_coal_tick, int, NULL, 0); 424module_param_array(tx_coal_tick, int, NULL, 0);
425module_param_array(max_tx_desc, int, NULL, 0); 425module_param_array(max_tx_desc, int, NULL, 0);
@@ -987,27 +987,27 @@ static int __devinit ace_init(struct net_device *dev)
987 987
988 mac1 = 0; 988 mac1 = 0;
989 for(i = 0; i < 4; i++) { 989 for(i = 0; i < 4; i++) {
990 int tmp; 990 int t;
991 991
992 mac1 = mac1 << 8; 992 mac1 = mac1 << 8;
993 tmp = read_eeprom_byte(dev, 0x8c+i); 993 t = read_eeprom_byte(dev, 0x8c+i);
994 if (tmp < 0) { 994 if (t < 0) {
995 ecode = -EIO; 995 ecode = -EIO;
996 goto init_error; 996 goto init_error;
997 } else 997 } else
998 mac1 |= (tmp & 0xff); 998 mac1 |= (t & 0xff);
999 } 999 }
1000 mac2 = 0; 1000 mac2 = 0;
1001 for(i = 4; i < 8; i++) { 1001 for(i = 4; i < 8; i++) {
1002 int tmp; 1002 int t;
1003 1003
1004 mac2 = mac2 << 8; 1004 mac2 = mac2 << 8;
1005 tmp = read_eeprom_byte(dev, 0x8c+i); 1005 t = read_eeprom_byte(dev, 0x8c+i);
1006 if (tmp < 0) { 1006 if (t < 0) {
1007 ecode = -EIO; 1007 ecode = -EIO;
1008 goto init_error; 1008 goto init_error;
1009 } else 1009 } else
1010 mac2 |= (tmp & 0xff); 1010 mac2 |= (t & 0xff);
1011 } 1011 }
1012 1012
1013 writel(mac1, &regs->MacAddrHi); 1013 writel(mac1, &regs->MacAddrHi);
@@ -1305,10 +1305,10 @@ static int __devinit ace_init(struct net_device *dev)
1305 writel(TX_RING_BASE, &regs->WinBase); 1305 writel(TX_RING_BASE, &regs->WinBase);
1306 1306
1307 if (ACE_IS_TIGON_I(ap)) { 1307 if (ACE_IS_TIGON_I(ap)) {
1308 ap->tx_ring = (struct tx_desc *) regs->Window; 1308 ap->tx_ring = (__force struct tx_desc *) regs->Window;
1309 for (i = 0; i < (TIGON_I_TX_RING_ENTRIES 1309 for (i = 0; i < (TIGON_I_TX_RING_ENTRIES
1310 * sizeof(struct tx_desc)) / sizeof(u32); i++) 1310 * sizeof(struct tx_desc)) / sizeof(u32); i++)
1311 writel(0, (void __iomem *)ap->tx_ring + i * 4); 1311 writel(0, (__force void __iomem *)ap->tx_ring + i * 4);
1312 1312
1313 set_aceaddr(&info->tx_ctrl.rngptr, TX_RING_BASE); 1313 set_aceaddr(&info->tx_ctrl.rngptr, TX_RING_BASE);
1314 } else { 1314 } else {
@@ -1394,8 +1394,8 @@ static int __devinit ace_init(struct net_device *dev)
1394 /* 1394 /*
1395 * Override link default parameters 1395 * Override link default parameters
1396 */ 1396 */
1397 if ((board_idx >= 0) && link[board_idx]) { 1397 if ((board_idx >= 0) && link_state[board_idx]) {
1398 int option = link[board_idx]; 1398 int option = link_state[board_idx];
1399 1399
1400 tmp = LNK_ENABLE; 1400 tmp = LNK_ENABLE;
1401 1401
@@ -2383,8 +2383,9 @@ static int ace_close(struct net_device *dev)
2383 2383
2384 if (mapping) { 2384 if (mapping) {
2385 if (ACE_IS_TIGON_I(ap)) { 2385 if (ACE_IS_TIGON_I(ap)) {
2386 struct tx_desc __iomem *tx 2386 /* NB: TIGON_1 is special, tx_ring is in io space */
2387 = (struct tx_desc __iomem *) &ap->tx_ring[i]; 2387 struct tx_desc __iomem *tx;
2388 tx = (__force struct tx_desc __iomem *) &ap->tx_ring[i];
2388 writel(0, &tx->addr.addrhi); 2389 writel(0, &tx->addr.addrhi);
2389 writel(0, &tx->addr.addrlo); 2390 writel(0, &tx->addr.addrlo);
2390 writel(0, &tx->flagsize); 2391 writel(0, &tx->flagsize);
@@ -2444,7 +2445,7 @@ ace_load_tx_bd(struct ace_private *ap, struct tx_desc *desc, u64 addr,
2444#endif 2445#endif
2445 2446
2446 if (ACE_IS_TIGON_I(ap)) { 2447 if (ACE_IS_TIGON_I(ap)) {
2447 struct tx_desc __iomem *io = (struct tx_desc __iomem *) desc; 2448 struct tx_desc __iomem *io = (__force struct tx_desc __iomem *) desc;
2448 writel(addr >> 32, &io->addr.addrhi); 2449 writel(addr >> 32, &io->addr.addrhi);
2449 writel(addr & 0xffffffff, &io->addr.addrlo); 2450 writel(addr & 0xffffffff, &io->addr.addrlo);
2450 writel(flagsize, &io->flagsize); 2451 writel(flagsize, &io->flagsize);
@@ -2936,7 +2937,7 @@ static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int siz
2936 * This operation requires the NIC to be halted and is performed with 2937 * This operation requires the NIC to be halted and is performed with
2937 * interrupts disabled and with the spinlock hold. 2938 * interrupts disabled and with the spinlock hold.
2938 */ 2939 */
2939int __devinit ace_load_firmware(struct net_device *dev) 2940static int __devinit ace_load_firmware(struct net_device *dev)
2940{ 2941{
2941 struct ace_private *ap = netdev_priv(dev); 2942 struct ace_private *ap = netdev_priv(dev);
2942 struct ace_regs __iomem *regs = ap->regs; 2943 struct ace_regs __iomem *regs = ap->regs;