aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/de2104x.c18
-rw-r--r--drivers/net/tulip/pnic.c3
-rw-r--r--drivers/net/tulip/winbond-840.c2
-rw-r--r--drivers/net/tulip/xircom_cb.c6
4 files changed, 11 insertions, 18 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index d7fb3ffe06ac..d6c3d52d2e86 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -402,8 +402,7 @@ static void de_rx (struct de_private *de)
402 unsigned copying_skb, buflen; 402 unsigned copying_skb, buflen;
403 403
404 skb = de->rx_skb[rx_tail].skb; 404 skb = de->rx_skb[rx_tail].skb;
405 if (!skb) 405 BUG_ON(!skb);
406 BUG();
407 rmb(); 406 rmb();
408 status = le32_to_cpu(de->rx_ring[rx_tail].opts1); 407 status = le32_to_cpu(de->rx_ring[rx_tail].opts1);
409 if (status & DescOwn) 408 if (status & DescOwn)
@@ -545,8 +544,7 @@ static void de_tx (struct de_private *de)
545 break; 544 break;
546 545
547 skb = de->tx_skb[tx_tail].skb; 546 skb = de->tx_skb[tx_tail].skb;
548 if (!skb) 547 BUG_ON(!skb);
549 BUG();
550 if (unlikely(skb == DE_DUMMY_SKB)) 548 if (unlikely(skb == DE_DUMMY_SKB))
551 goto next; 549 goto next;
552 550
@@ -789,8 +787,7 @@ static void __de_set_rx_mode (struct net_device *dev)
789 787
790 de->tx_head = NEXT_TX(entry); 788 de->tx_head = NEXT_TX(entry);
791 789
792 if (TX_BUFFS_AVAIL(de) < 0) 790 BUG_ON(TX_BUFFS_AVAIL(de) < 0);
793 BUG();
794 if (TX_BUFFS_AVAIL(de) == 0) 791 if (TX_BUFFS_AVAIL(de) == 0)
795 netif_stop_queue(dev); 792 netif_stop_queue(dev);
796 793
@@ -916,8 +913,7 @@ static void de_set_media (struct de_private *de)
916 unsigned media = de->media_type; 913 unsigned media = de->media_type;
917 u32 macmode = dr32(MacMode); 914 u32 macmode = dr32(MacMode);
918 915
919 if (de_is_running(de)) 916 BUG_ON(de_is_running(de));
920 BUG();
921 917
922 if (de->de21040) 918 if (de->de21040)
923 dw32(CSR11, FULL_DUPLEX_MAGIC); 919 dw32(CSR11, FULL_DUPLEX_MAGIC);
@@ -1153,8 +1149,7 @@ static void de_media_interrupt (struct de_private *de, u32 status)
1153 return; 1149 return;
1154 } 1150 }
1155 1151
1156 if (!(status & LinkFail)) 1152 BUG_ON(!(status & LinkFail));
1157 BUG();
1158 1153
1159 if (netif_carrier_ok(de->dev)) { 1154 if (netif_carrier_ok(de->dev)) {
1160 de_link_down(de); 1155 de_link_down(de);
@@ -2092,8 +2087,7 @@ static void __exit de_remove_one (struct pci_dev *pdev)
2092 struct net_device *dev = pci_get_drvdata(pdev); 2087 struct net_device *dev = pci_get_drvdata(pdev);
2093 struct de_private *de = dev->priv; 2088 struct de_private *de = dev->priv;
2094 2089
2095 if (!dev) 2090 BUG_ON(!dev);
2096 BUG();
2097 unregister_netdev(dev); 2091 unregister_netdev(dev);
2098 kfree(de->ee_data); 2092 kfree(de->ee_data);
2099 iounmap(de->regs); 2093 iounmap(de->regs);
diff --git a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c
index d9980bde7508..ca7e53246adb 100644
--- a/drivers/net/tulip/pnic.c
+++ b/drivers/net/tulip/pnic.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/jiffies.h>
19#include "tulip.h" 20#include "tulip.h"
20 21
21 22
@@ -68,7 +69,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5)
68 */ 69 */
69 if (tulip_media_cap[dev->if_port] & MediaIsMII) 70 if (tulip_media_cap[dev->if_port] & MediaIsMII)
70 return; 71 return;
71 if (! tp->nwayset || jiffies - dev->trans_start > 1*HZ) { 72 if (! tp->nwayset || time_after(jiffies, dev->trans_start + 1*HZ)) {
72 tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); 73 tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff);
73 iowrite32(tp->csr6, ioaddr + CSR6); 74 iowrite32(tp->csr6, ioaddr + CSR6);
74 iowrite32(0x30, ioaddr + CSR12); 75 iowrite32(0x30, ioaddr + CSR12);
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 5b1af3986abf..ba05dedf29d3 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -1645,7 +1645,7 @@ static int w840_suspend (struct pci_dev *pdev, pm_message_t state)
1645 1645
1646 /* no more hardware accesses behind this line. */ 1646 /* no more hardware accesses behind this line. */
1647 1647
1648 if (np->csr6) BUG(); 1648 BUG_ON(np->csr6);
1649 if (ioread32(ioaddr + IntrEnable)) BUG(); 1649 if (ioread32(ioaddr + IntrEnable)) BUG();
1650 1650
1651 /* pci_power_off(pdev, -1); */ 1651 /* pci_power_off(pdev, -1); */
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index 42e9ffb07af4..56344103ac23 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -601,10 +601,8 @@ static void setup_descriptors(struct xircom_private *card)
601 enter("setup_descriptors"); 601 enter("setup_descriptors");
602 602
603 603
604 if (card->rx_buffer == NULL) 604 BUG_ON(card->rx_buffer == NULL);
605 BUG(); 605 BUG_ON(card->tx_buffer == NULL);
606 if (card->tx_buffer == NULL)
607 BUG();
608 606
609 /* Receive descriptors */ 607 /* Receive descriptors */
610 memset(card->rx_buffer, 0, 128); /* clear the descriptors */ 608 memset(card->rx_buffer, 0, 128); /* clear the descriptors */