Commit 163ef0b5 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

tulip: Convert printks to netdev_<level>

Use the current more descriptive logging styles.

Add pr_fmt and remove PFX where appropriate.
Use netif_<level>, netdev_<level>
Indent a few blocks in xircom_cb where appropriate.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 54668b84
This diff is collapsed.
...@@ -406,7 +406,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, ...@@ -406,7 +406,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
pr_warning("32-bit PCI DMA not available\n"); pr_warn("32-bit PCI DMA not available\n");
err = -ENODEV; err = -ENODEV;
goto err_out_free; goto err_out_free;
} }
......
...@@ -222,7 +222,7 @@ void __devinit tulip_parse_eeprom(struct net_device *dev) ...@@ -222,7 +222,7 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
/* there is no phy information, don't even try to build mtable */ /* there is no phy information, don't even try to build mtable */
if (count == 0) { if (count == 0) {
if (tulip_debug > 0) if (tulip_debug > 0)
pr_warning("%s: no phy info, aborting mtable build\n", pr_warn("%s: no phy info, aborting mtable build\n",
dev->name); dev->name);
return; return;
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
Please submit bugs to http://bugzilla.kernel.org/ . Please submit bugs to http://bugzilla.kernel.org/ .
*/ */
#define pr_fmt(fmt) "tulip: " fmt
#define DRV_NAME "tulip" #define DRV_NAME "tulip"
#ifdef CONFIG_TULIP_NAPI #ifdef CONFIG_TULIP_NAPI
...@@ -119,8 +120,6 @@ module_param(csr0, int, 0); ...@@ -119,8 +120,6 @@ module_param(csr0, int, 0);
module_param_array(options, int, NULL, 0); module_param_array(options, int, NULL, 0);
module_param_array(full_duplex, int, NULL, 0); module_param_array(full_duplex, int, NULL, 0);
#define PFX DRV_NAME ": "
#ifdef TULIP_DEBUG #ifdef TULIP_DEBUG
int tulip_debug = TULIP_DEBUG; int tulip_debug = TULIP_DEBUG;
#else #else
...@@ -1340,13 +1339,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1340,13 +1339,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
*/ */
if (pdev->subsystem_vendor == PCI_VENDOR_ID_LMC) { if (pdev->subsystem_vendor == PCI_VENDOR_ID_LMC) {
pr_err(PFX "skipping LMC card\n"); pr_err("skipping LMC card\n");
return -ENODEV; return -ENODEV;
} else if (pdev->subsystem_vendor == PCI_VENDOR_ID_SBE && } else if (pdev->subsystem_vendor == PCI_VENDOR_ID_SBE &&
(pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_T3E3 || (pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_T3E3 ||
pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P0 || pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P0 ||
pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P1)) { pdev->subsystem_device == PCI_SUBDEVICE_ID_SBE_2T3E3_P1)) {
pr_err(PFX "skipping SBE T3E3 port\n"); pr_err("skipping SBE T3E3 port\n");
return -ENODEV; return -ENODEV;
} }
...@@ -1362,13 +1361,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1362,13 +1361,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
if (pdev->vendor == 0x1282 && pdev->device == 0x9100 && if (pdev->vendor == 0x1282 && pdev->device == 0x9100 &&
pdev->revision < 0x30) { pdev->revision < 0x30) {
pr_info(PFX "skipping early DM9100 with Crc bug (use dmfe)\n"); pr_info("skipping early DM9100 with Crc bug (use dmfe)\n");
return -ENODEV; return -ENODEV;
} }
dp = pci_device_to_OF_node(pdev); dp = pci_device_to_OF_node(pdev);
if (!(dp && of_get_property(dp, "local-mac-address", NULL))) { if (!(dp && of_get_property(dp, "local-mac-address", NULL))) {
pr_info(PFX "skipping DM910x expansion card (use dmfe)\n"); pr_info("skipping DM910x expansion card (use dmfe)\n");
return -ENODEV; return -ENODEV;
} }
} }
...@@ -1415,16 +1414,14 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1415,16 +1414,14 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
i = pci_enable_device(pdev); i = pci_enable_device(pdev);
if (i) { if (i) {
pr_err(PFX "Cannot enable tulip board #%d, aborting\n", pr_err("Cannot enable tulip board #%d, aborting\n", board_idx);
board_idx);
return i; return i;
} }
/* The chip will fail to enter a low-power state later unless /* The chip will fail to enter a low-power state later unless
* first explicitly commanded into D0 */ * first explicitly commanded into D0 */
if (pci_set_power_state(pdev, PCI_D0)) { if (pci_set_power_state(pdev, PCI_D0)) {
printk (KERN_NOTICE PFX pr_notice("Failed to set power state to D0\n");
"Failed to set power state to D0\n");
} }
irq = pdev->irq; irq = pdev->irq;
...@@ -1432,13 +1429,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, ...@@ -1432,13 +1429,13 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
/* alloc_etherdev ensures aligned and zeroed private structures */ /* alloc_etherdev ensures aligned and zeroed private structures */
dev = alloc_etherdev (sizeof (*tp)); dev = alloc_etherdev (sizeof (*tp));
if (!dev) { if (!dev) {
pr_err(PFX "ether device alloc failed, aborting\n"); pr_err("ether device alloc failed, aborting\n");
return -ENOMEM; return -ENOMEM;
} }
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) {
pr_err(PFX "%s: I/O region (0x%llx@0x%llx) too small, aborting\n", pr_err("%s: I/O region (0x%llx@0x%llx) too small, aborting\n",
pci_name(pdev), pci_name(pdev),
(unsigned long long)pci_resource_len (pdev, 0), (unsigned long long)pci_resource_len (pdev, 0),
(unsigned long long)pci_resource_start (pdev, 0)); (unsigned long long)pci_resource_start (pdev, 0));
...@@ -1905,12 +1902,12 @@ static int tulip_resume(struct pci_dev *pdev) ...@@ -1905,12 +1902,12 @@ static int tulip_resume(struct pci_dev *pdev)
return 0; return 0;
if ((retval = pci_enable_device(pdev))) { if ((retval = pci_enable_device(pdev))) {
pr_err(PFX "pci_enable_device failed in resume\n"); pr_err("pci_enable_device failed in resume\n");
return retval; return retval;
} }
if ((retval = request_irq(dev->irq, tulip_interrupt, IRQF_SHARED, dev->name, dev))) { if ((retval = request_irq(dev->irq, tulip_interrupt, IRQF_SHARED, dev->name, dev))) {
pr_err(PFX "request_irq failed in resume\n"); pr_err("request_irq failed in resume\n");
return retval; return retval;
} }
......
...@@ -292,7 +292,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, ...@@ -292,7 +292,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
pr_warning("32-bit PCI DMA not available\n"); pr_warn("32-bit PCI DMA not available\n");
err = -ENODEV; err = -ENODEV;
goto err_out_free; goto err_out_free;
} }
...@@ -390,7 +390,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, ...@@ -390,7 +390,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
if (err) if (err)
goto err_out_res; goto err_out_res;
dev_info(&dev->dev, "ULi M%04lx at pci%s, %pM, irq %d\n", netdev_info(dev, "ULi M%04lx at pci%s, %pM, irq %d\n",
ent->driver_data >> 16, pci_name(pdev), ent->driver_data >> 16, pci_name(pdev),
dev->dev_addr, dev->irq); dev->dev_addr, dev->irq);
...@@ -524,7 +524,7 @@ static void uli526x_init(struct net_device *dev) ...@@ -524,7 +524,7 @@ static void uli526x_init(struct net_device *dev)
} }
} }
if(phy_tmp == 32) if(phy_tmp == 32)
pr_warning("Can not find the phy address!!!"); pr_warn("Can not find the phy address!!!\n");
/* Parser SROM and media mode */ /* Parser SROM and media mode */
db->media_mode = uli526x_media_mode; db->media_mode = uli526x_media_mode;
...@@ -590,7 +590,7 @@ static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb, ...@@ -590,7 +590,7 @@ static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb,
/* Too large packet check */ /* Too large packet check */
if (skb->len > MAX_PACKET_SIZE) { if (skb->len > MAX_PACKET_SIZE) {
pr_err("big packet = %d\n", (u16)skb->len); netdev_err(dev, "big packet = %d\n", (u16)skb->len);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -600,7 +600,7 @@ static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb, ...@@ -600,7 +600,7 @@ static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb,
/* No Tx resource check, it never happen nromally */ /* No Tx resource check, it never happen nromally */
if (db->tx_packet_cnt >= TX_FREE_DESC_CNT) { if (db->tx_packet_cnt >= TX_FREE_DESC_CNT) {
spin_unlock_irqrestore(&db->lock, flags); spin_unlock_irqrestore(&db->lock, flags);
pr_err("No Tx resource %ld\n", db->tx_packet_cnt); netdev_err(dev, "No Tx resource %ld\n", db->tx_packet_cnt);
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
...@@ -1024,7 +1024,6 @@ static void uli526x_timer(unsigned long data) ...@@ -1024,7 +1024,6 @@ static void uli526x_timer(unsigned long data)
struct net_device *dev = (struct net_device *) data; struct net_device *dev = (struct net_device *) data;
struct uli526x_board_info *db = netdev_priv(dev); struct uli526x_board_info *db = netdev_priv(dev);
unsigned long flags; unsigned long flags;
u8 TmpSpeed=10;
//ULI526X_DBUG(0, "uli526x_timer()", 0); //ULI526X_DBUG(0, "uli526x_timer()", 0);
spin_lock_irqsave(&db->lock, flags); spin_lock_irqsave(&db->lock, flags);
...@@ -1070,7 +1069,7 @@ static void uli526x_timer(unsigned long data) ...@@ -1070,7 +1069,7 @@ static void uli526x_timer(unsigned long data)
/* Link Failed */ /* Link Failed */
ULI526X_DBUG(0, "Link Failed", tmp_cr12); ULI526X_DBUG(0, "Link Failed", tmp_cr12);
netif_carrier_off(dev); netif_carrier_off(dev);
pr_info("%s NIC Link is Down\n",dev->name); netdev_info(dev, "NIC Link is Down\n");
db->link_failed = 1; db->link_failed = 1;
/* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */ /* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
...@@ -1096,18 +1095,13 @@ static void uli526x_timer(unsigned long data) ...@@ -1096,18 +1095,13 @@ static void uli526x_timer(unsigned long data)
if(db->link_failed==0) if(db->link_failed==0)
{ {
if(db->op_mode==ULI526X_100MHF || db->op_mode==ULI526X_100MFD) netdev_info(dev, "NIC Link is Up %d Mbps %s duplex\n",
{ (db->op_mode == ULI526X_100MHF ||
TmpSpeed = 100; db->op_mode == ULI526X_100MFD)
} ? 100 : 10,
if(db->op_mode==ULI526X_10MFD || db->op_mode==ULI526X_100MFD) (db->op_mode == ULI526X_10MFD ||
{ db->op_mode == ULI526X_100MFD)
pr_info("%s NIC Link is Up %d Mbps Full duplex\n",dev->name,TmpSpeed); ? "Full" : "Half");
}
else
{
pr_info("%s NIC Link is Up %d Mbps Half duplex\n",dev->name,TmpSpeed);
}
netif_carrier_on(dev); netif_carrier_on(dev);
} }
/* SHOW_MEDIA_TYPE(db->op_mode); */ /* SHOW_MEDIA_TYPE(db->op_mode); */
...@@ -1116,7 +1110,7 @@ static void uli526x_timer(unsigned long data) ...@@ -1116,7 +1110,7 @@ static void uli526x_timer(unsigned long data)
{ {
if(db->init==1) if(db->init==1)
{ {
pr_info("%s NIC Link is Down\n",dev->name); netdev_info(dev, "NIC Link is Down\n");
netif_carrier_off(dev); netif_carrier_off(dev);
} }
} }
...@@ -1242,7 +1236,7 @@ static int uli526x_resume(struct pci_dev *pdev) ...@@ -1242,7 +1236,7 @@ static int uli526x_resume(struct pci_dev *pdev)
err = pci_set_power_state(pdev, PCI_D0); err = pci_set_power_state(pdev, PCI_D0);
if (err) { if (err) {
dev_warn(&dev->dev, "Could not put device into D0\n"); netdev_warn(dev, "Could not put device into D0\n");
return err; return err;
} }
...@@ -1443,7 +1437,7 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) ...@@ -1443,7 +1437,7 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt)
update_cr6(db->cr6_data, dev->base_addr); update_cr6(db->cr6_data, dev->base_addr);
dev->trans_start = jiffies; dev->trans_start = jiffies;
} else } else
pr_err("No Tx resource - Send_filter_frame!\n"); netdev_err(dev, "No Tx resource - Send_filter_frame!\n");
} }
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
* Wake-On-LAN * Wake-On-LAN
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define DRV_NAME "winbond-840" #define DRV_NAME "winbond-840"
#define DRV_VERSION "1.01-e" #define DRV_VERSION "1.01-e"
#define DRV_RELDATE "Sep-11-2006" #define DRV_RELDATE "Sep-11-2006"
...@@ -375,7 +377,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, ...@@ -375,7 +377,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
irq = pdev->irq; irq = pdev->irq;
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
pr_warning("Winbond-840: Device %s disabled due to DMA limitations\n", pr_warn("Device %s disabled due to DMA limitations\n",
pci_name(pdev)); pci_name(pdev));
return -EIO; return -EIO;
} }
......
...@@ -262,7 +262,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ ...@@ -262,7 +262,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
goto reg_fail; goto reg_fail;
} }
dev_info(&dev->dev, "Xircom cardbus revision %i at irq %i\n", netdev_info(dev, "Xircom cardbus revision %i at irq %i\n",
pdev->revision, pdev->irq); pdev->revision, pdev->irq);
/* start the transmitter to get a heartbeat */ /* start the transmitter to get a heartbeat */
/* TODO: send 2 dummy packets here */ /* TODO: send 2 dummy packets here */
...@@ -335,7 +335,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance) ...@@ -335,7 +335,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance)
int newlink; int newlink;
printk(KERN_DEBUG "xircom_cb: Link status has changed\n"); printk(KERN_DEBUG "xircom_cb: Link status has changed\n");
newlink = link_status(card); newlink = link_status(card);
dev_info(&dev->dev, "Link is %i mbit\n", newlink); netdev_info(dev, "Link is %d mbit\n", newlink);
if (newlink) if (newlink)
netif_carrier_on(dev); netif_carrier_on(dev);
else else
...@@ -426,8 +426,8 @@ static int xircom_open(struct net_device *dev) ...@@ -426,8 +426,8 @@ static int xircom_open(struct net_device *dev)
struct xircom_private *xp = netdev_priv(dev); struct xircom_private *xp = netdev_priv(dev);
int retval; int retval;
pr_info("xircom cardbus adaptor found, registering as %s, using irq %i\n", netdev_info(dev, "xircom cardbus adaptor found, using irq %i\n",
dev->name, dev->irq); dev->irq);
retval = request_irq(dev->irq, xircom_interrupt, IRQF_SHARED, dev->name, dev); retval = request_irq(dev->irq, xircom_interrupt, IRQF_SHARED, dev->name, dev);
if (retval) if (retval)
return retval; return retval;
...@@ -703,7 +703,7 @@ static void activate_receiver(struct xircom_private *card) ...@@ -703,7 +703,7 @@ static void activate_receiver(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Receiver failed to deactivate\n"); netdev_err(card->dev, "Receiver failed to deactivate\n");
} }
/* enable the receiver */ /* enable the receiver */
...@@ -720,7 +720,8 @@ static void activate_receiver(struct xircom_private *card) ...@@ -720,7 +720,8 @@ static void activate_receiver(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Receiver failed to re-activate\n"); netdev_err(card->dev,
"Receiver failed to re-activate\n");
} }
} }
...@@ -748,7 +749,7 @@ static void deactivate_receiver(struct xircom_private *card) ...@@ -748,7 +749,7 @@ static void deactivate_receiver(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Receiver failed to deactivate\n"); netdev_err(card->dev, "Receiver failed to deactivate\n");
} }
} }
...@@ -786,7 +787,8 @@ static void activate_transmitter(struct xircom_private *card) ...@@ -786,7 +787,8 @@ static void activate_transmitter(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Transmitter failed to deactivate\n"); netdev_err(card->dev,
"Transmitter failed to deactivate\n");
} }
/* enable the transmitter */ /* enable the transmitter */
...@@ -803,7 +805,8 @@ static void activate_transmitter(struct xircom_private *card) ...@@ -803,7 +805,8 @@ static void activate_transmitter(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Transmitter failed to re-activate\n"); netdev_err(card->dev,
"Transmitter failed to re-activate\n");
} }
} }
...@@ -831,7 +834,8 @@ static void deactivate_transmitter(struct xircom_private *card) ...@@ -831,7 +834,8 @@ static void deactivate_transmitter(struct xircom_private *card)
udelay(50); udelay(50);
counter--; counter--;
if (counter <= 0) if (counter <= 0)
pr_err("Transmitter failed to deactivate\n"); netdev_err(card->dev,
"Transmitter failed to deactivate\n");
} }
} }
...@@ -1060,21 +1064,24 @@ static void xircom_up(struct xircom_private *card) ...@@ -1060,21 +1064,24 @@ static void xircom_up(struct xircom_private *card)
} }
/* Bufferoffset is in BYTES */ /* Bufferoffset is in BYTES */
static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset) static void
investigate_read_descriptor(struct net_device *dev, struct xircom_private *card,
int descnr, unsigned int bufferoffset)
{ {
int status; int status;
status = le32_to_cpu(card->rx_buffer[4*descnr]); status = le32_to_cpu(card->rx_buffer[4*descnr]);
if ((status > 0)) { /* packet received */ if (status > 0) { /* packet received */
/* TODO: discard error packets */ /* TODO: discard error packets */
short pkt_len = ((status >> 16) & 0x7ff) - 4; /* minus 4, we don't want the CRC */ short pkt_len = ((status >> 16) & 0x7ff) - 4;
/* minus 4, we don't want the CRC */
struct sk_buff *skb; struct sk_buff *skb;
if (pkt_len > 1518) { if (pkt_len > 1518) {
pr_err("Packet length %i is bogus\n", pkt_len); netdev_err(dev, "Packet length %i is bogus\n", pkt_len);
pkt_len = 1518; pkt_len = 1518;
} }
...@@ -1084,14 +1091,16 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri ...@@ -1084,14 +1091,16 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri
goto out; goto out;
} }
skb_reserve(skb, 2); skb_reserve(skb, 2);
skb_copy_to_linear_data(skb, (unsigned char*)&card->rx_buffer[bufferoffset / 4], pkt_len); skb_copy_to_linear_data(skb,
&card->rx_buffer[bufferoffset / 4],
pkt_len);
skb_put(skb, pkt_len); skb_put(skb, pkt_len);
skb->protocol = eth_type_trans(skb, dev); skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb); netif_rx(skb);
dev->stats.rx_packets++; dev->stats.rx_packets++;
dev->stats.rx_bytes += pkt_len; dev->stats.rx_bytes += pkt_len;
out: out:
/* give the buffer back to the card */ /* give the buffer back to the card */
card->rx_buffer[4*descnr] = cpu_to_le32(0x80000000); card->rx_buffer[4*descnr] = cpu_to_le32(0x80000000);
trigger_receive(card); trigger_receive(card);
...@@ -1100,7 +1109,10 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri ...@@ -1100,7 +1109,10 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri
/* Bufferoffset is in BYTES */ /* Bufferoffset is in BYTES */
static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset) static void
investigate_write_descriptor(struct net_device *dev,
struct xircom_private *card,
int descnr, unsigned int bufferoffset)
{ {
int status; int status;
...@@ -1119,16 +1131,14 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p ...@@ -1119,16 +1131,14 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p
} }
card->tx_skb[descnr] = NULL; card->tx_skb[descnr] = NULL;
/* Bit 8 in the status field is 1 if there was a collision */ /* Bit 8 in the status field is 1 if there was a collision */
if (status&(1<<8)) if (status & (1 << 8))
dev->stats.collisions++; dev->stats.collisions++;
card->tx_buffer[4*descnr] = 0; /* descriptor is free again */ card->tx_buffer[4*descnr] = 0; /* descriptor is free again */
netif_wake_queue (dev); netif_wake_queue (dev);
dev->stats.tx_packets++; dev->stats.tx_packets++;
} }
} }
static int __init xircom_init(void) static int __init xircom_init(void)
{ {
return pci_register_driver(&xircom_ops); return pci_register_driver(&xircom_ops);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment