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.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index c0f3574b470b..5c8b9dc5dbf1 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -99,7 +99,7 @@
99#endif 99#endif
100 100
101#ifndef PCI_VENDOR_ID_ALTEON 101#ifndef PCI_VENDOR_ID_ALTEON
102#define PCI_VENDOR_ID_ALTEON 0x12ae 102#define PCI_VENDOR_ID_ALTEON 0x12ae
103#endif 103#endif
104#ifndef PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE 104#ifndef PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE
105#define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE 0x0001 105#define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE 0x0001
@@ -443,7 +443,7 @@ MODULE_PARM_DESC(max_rx_desc, "AceNIC/3C985/GA620 max number of receive descript
443MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)"); 443MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)");
444 444
445 445
446static char version[] __devinitdata = 446static char version[] __devinitdata =
447 "acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk\n" 447 "acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk\n"
448 " http://home.cern.ch/~jes/gige/acenic.html\n"; 448 " http://home.cern.ch/~jes/gige/acenic.html\n";
449 449
@@ -516,7 +516,7 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev,
516 516
517 pci_read_config_word(pdev, PCI_COMMAND, &ap->pci_command); 517 pci_read_config_word(pdev, PCI_COMMAND, &ap->pci_command);
518 518
519 /* OpenFirmware on Mac's does not set this - DOH.. */ 519 /* OpenFirmware on Mac's does not set this - DOH.. */
520 if (!(ap->pci_command & PCI_COMMAND_MEMORY)) { 520 if (!(ap->pci_command & PCI_COMMAND_MEMORY)) {
521 printk(KERN_INFO "%s: Enabling PCI Memory Mapped " 521 printk(KERN_INFO "%s: Enabling PCI Memory Mapped "
522 "access - was not enabled by BIOS/Firmware\n", 522 "access - was not enabled by BIOS/Firmware\n",
@@ -636,7 +636,7 @@ static void __devexit acenic_remove_one(struct pci_dev *pdev)
636 writel(readl(&regs->CpuCtrl) | CPU_HALT, &regs->CpuCtrl); 636 writel(readl(&regs->CpuCtrl) | CPU_HALT, &regs->CpuCtrl);
637 if (ap->version >= 2) 637 if (ap->version >= 2)
638 writel(readl(&regs->CpuBCtrl) | CPU_HALT, &regs->CpuBCtrl); 638 writel(readl(&regs->CpuBCtrl) | CPU_HALT, &regs->CpuBCtrl);
639 639
640 /* 640 /*
641 * This clears any pending interrupts 641 * This clears any pending interrupts
642 */ 642 */
@@ -1059,7 +1059,7 @@ static int __devinit ace_init(struct net_device *dev)
1059 printk(KERN_INFO " PCI bus width: %i bits, speed: %iMHz, " 1059 printk(KERN_INFO " PCI bus width: %i bits, speed: %iMHz, "
1060 "latency: %i clks\n", 1060 "latency: %i clks\n",
1061 (pci_state & PCI_32BIT) ? 32 : 64, 1061 (pci_state & PCI_32BIT) ? 32 : 64,
1062 (pci_state & PCI_66MHZ) ? 66 : 33, 1062 (pci_state & PCI_66MHZ) ? 66 : 33,
1063 ap->pci_latency); 1063 ap->pci_latency);
1064 1064
1065 /* 1065 /*
@@ -1161,7 +1161,7 @@ static int __devinit ace_init(struct net_device *dev)
1161 pci_write_config_word(pdev, PCI_COMMAND, ap->pci_command); 1161 pci_write_config_word(pdev, PCI_COMMAND, ap->pci_command);
1162 } 1162 }
1163#endif 1163#endif
1164 1164
1165 /* 1165 /*
1166 * Configure DMA attributes. 1166 * Configure DMA attributes.
1167 */ 1167 */
@@ -1284,7 +1284,7 @@ static int __devinit ace_init(struct net_device *dev)
1284 (RX_STD_RING_ENTRIES + 1284 (RX_STD_RING_ENTRIES +
1285 RX_JUMBO_RING_ENTRIES)))); 1285 RX_JUMBO_RING_ENTRIES))));
1286 info->rx_mini_ctrl.max_len = ACE_MINI_SIZE; 1286 info->rx_mini_ctrl.max_len = ACE_MINI_SIZE;
1287 info->rx_mini_ctrl.flags = 1287 info->rx_mini_ctrl.flags =
1288 RCB_FLG_TCP_UDP_SUM|RCB_FLG_NO_PSEUDO_HDR|ACE_RCB_VLAN_FLAG; 1288 RCB_FLG_TCP_UDP_SUM|RCB_FLG_NO_PSEUDO_HDR|ACE_RCB_VLAN_FLAG;
1289 1289
1290 for (i = 0; i < RX_MINI_RING_ENTRIES; i++) 1290 for (i = 0; i < RX_MINI_RING_ENTRIES; i++)
@@ -1318,7 +1318,7 @@ static int __devinit ace_init(struct net_device *dev)
1318 1318
1319 if (ACE_IS_TIGON_I(ap)) { 1319 if (ACE_IS_TIGON_I(ap)) {
1320 ap->tx_ring = (struct tx_desc *) regs->Window; 1320 ap->tx_ring = (struct tx_desc *) regs->Window;
1321 for (i = 0; i < (TIGON_I_TX_RING_ENTRIES 1321 for (i = 0; i < (TIGON_I_TX_RING_ENTRIES
1322 * sizeof(struct tx_desc)) / sizeof(u32); i++) 1322 * sizeof(struct tx_desc)) / sizeof(u32); i++)
1323 writel(0, (void __iomem *)ap->tx_ring + i * 4); 1323 writel(0, (void __iomem *)ap->tx_ring + i * 4);
1324 1324
@@ -1670,7 +1670,7 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
1670{ 1670{
1671 struct ace_regs __iomem *regs = ap->regs; 1671 struct ace_regs __iomem *regs = ap->regs;
1672 short i, idx; 1672 short i, idx;
1673 1673
1674 1674
1675 prefetchw(&ap->cur_rx_bufs); 1675 prefetchw(&ap->cur_rx_bufs);
1676 1676
@@ -1966,7 +1966,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
1966 1966
1967 prefetchw(&ap->cur_rx_bufs); 1967 prefetchw(&ap->cur_rx_bufs);
1968 prefetchw(&ap->cur_mini_bufs); 1968 prefetchw(&ap->cur_mini_bufs);
1969 1969
1970 while (idx != rxretprd) { 1970 while (idx != rxretprd) {
1971 struct ring_info *rip; 1971 struct ring_info *rip;
1972 struct sk_buff *skb; 1972 struct sk_buff *skb;
@@ -1977,7 +1977,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
1977 1977
1978 1978
1979 /* make sure the rx descriptor isn't read before rxretprd */ 1979 /* make sure the rx descriptor isn't read before rxretprd */
1980 if (idx == rxretcsm) 1980 if (idx == rxretcsm)
1981 rmb(); 1981 rmb();
1982 1982
1983 retdesc = &ap->rx_return_ring[idx]; 1983 retdesc = &ap->rx_return_ring[idx];
@@ -2009,7 +2009,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
2009 rip = &ap->skb->rx_mini_skbuff[skbidx]; 2009 rip = &ap->skb->rx_mini_skbuff[skbidx];
2010 mapsize = ACE_MINI_BUFSIZE; 2010 mapsize = ACE_MINI_BUFSIZE;
2011 rxdesc = &ap->rx_mini_ring[skbidx]; 2011 rxdesc = &ap->rx_mini_ring[skbidx];
2012 mini_count++; 2012 mini_count++;
2013 break; 2013 break;
2014 default: 2014 default:
2015 printk(KERN_INFO "%s: unknown frame type (0x%02x) " 2015 printk(KERN_INFO "%s: unknown frame type (0x%02x) "
@@ -2377,7 +2377,7 @@ static int ace_close(struct net_device *dev)
2377 */ 2377 */
2378 netif_stop_queue(dev); 2378 netif_stop_queue(dev);
2379 2379
2380 2380
2381 if (ap->promisc) { 2381 if (ap->promisc) {
2382 cmd.evt = C_SET_PROMISC_MODE; 2382 cmd.evt = C_SET_PROMISC_MODE;
2383 cmd.code = C_C_PROMISC_DISABLE; 2383 cmd.code = C_C_PROMISC_DISABLE;
@@ -2412,7 +2412,7 @@ static int ace_close(struct net_device *dev)
2412 2412
2413 if (mapping) { 2413 if (mapping) {
2414 if (ACE_IS_TIGON_I(ap)) { 2414 if (ACE_IS_TIGON_I(ap)) {
2415 struct tx_desc __iomem *tx 2415 struct tx_desc __iomem *tx
2416 = (struct tx_desc __iomem *) &ap->tx_ring[i]; 2416 = (struct tx_desc __iomem *) &ap->tx_ring[i];
2417 writel(0, &tx->addr.addrhi); 2417 writel(0, &tx->addr.addrhi);
2418 writel(0, &tx->addr.addrlo); 2418 writel(0, &tx->addr.addrlo);
@@ -2625,7 +2625,7 @@ overflow:
2625 cpu_relax(); 2625 cpu_relax();
2626 goto restart; 2626 goto restart;
2627 } 2627 }
2628 2628
2629 /* The ring is stuck full. */ 2629 /* The ring is stuck full. */
2630 printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name); 2630 printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name);
2631 return NETDEV_TX_BUSY; 2631 return NETDEV_TX_BUSY;
@@ -2784,18 +2784,18 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
2784 return 0; 2784 return 0;
2785} 2785}
2786 2786
2787static void ace_get_drvinfo(struct net_device *dev, 2787static void ace_get_drvinfo(struct net_device *dev,
2788 struct ethtool_drvinfo *info) 2788 struct ethtool_drvinfo *info)
2789{ 2789{
2790 struct ace_private *ap = netdev_priv(dev); 2790 struct ace_private *ap = netdev_priv(dev);
2791 2791
2792 strlcpy(info->driver, "acenic", sizeof(info->driver)); 2792 strlcpy(info->driver, "acenic", sizeof(info->driver));
2793 snprintf(info->version, sizeof(info->version), "%i.%i.%i", 2793 snprintf(info->version, sizeof(info->version), "%i.%i.%i",
2794 tigonFwReleaseMajor, tigonFwReleaseMinor, 2794 tigonFwReleaseMajor, tigonFwReleaseMinor,
2795 tigonFwReleaseFix); 2795 tigonFwReleaseFix);
2796 2796
2797 if (ap->pdev) 2797 if (ap->pdev)
2798 strlcpy(info->bus_info, pci_name(ap->pdev), 2798 strlcpy(info->bus_info, pci_name(ap->pdev),
2799 sizeof(info->bus_info)); 2799 sizeof(info->bus_info));
2800 2800
2801} 2801}
@@ -2912,7 +2912,7 @@ static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src,
2912 while (size > 0) { 2912 while (size > 0) {
2913 tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), 2913 tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1),
2914 min_t(u32, size, ACE_WINDOW_SIZE)); 2914 min_t(u32, size, ACE_WINDOW_SIZE));
2915 tdest = (void __iomem *) &regs->Window + 2915 tdest = (void __iomem *) &regs->Window +
2916 (dest & (ACE_WINDOW_SIZE - 1)); 2916 (dest & (ACE_WINDOW_SIZE - 1));
2917 writel(dest & ~(ACE_WINDOW_SIZE - 1), &regs->WinBase); 2917 writel(dest & ~(ACE_WINDOW_SIZE - 1), &regs->WinBase);
2918 /* 2918 /*
@@ -2943,7 +2943,7 @@ static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int siz
2943 while (size > 0) { 2943 while (size > 0) {
2944 tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), 2944 tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1),
2945 min_t(u32, size, ACE_WINDOW_SIZE)); 2945 min_t(u32, size, ACE_WINDOW_SIZE));
2946 tdest = (void __iomem *) &regs->Window + 2946 tdest = (void __iomem *) &regs->Window +
2947 (dest & (ACE_WINDOW_SIZE - 1)); 2947 (dest & (ACE_WINDOW_SIZE - 1));
2948 writel(dest & ~(ACE_WINDOW_SIZE - 1), &regs->WinBase); 2948 writel(dest & ~(ACE_WINDOW_SIZE - 1), &regs->WinBase);
2949 2949
@@ -3060,7 +3060,7 @@ static void __devinit eeprom_prep(struct ace_regs __iomem *regs, u8 magic)
3060 3060
3061 for (i = 0; i < 8; i++, magic <<= 1) { 3061 for (i = 0; i < 8; i++, magic <<= 1) {
3062 udelay(ACE_SHORT_DELAY); 3062 udelay(ACE_SHORT_DELAY);
3063 if (magic & 0x80) 3063 if (magic & 0x80)
3064 local |= EEPROM_DATA_OUT; 3064 local |= EEPROM_DATA_OUT;
3065 else 3065 else
3066 local &= ~EEPROM_DATA_OUT; 3066 local &= ~EEPROM_DATA_OUT;