Commit ab5ad357 authored by Scott Feldman's avatar Scott Feldman Committed by Jeff Garzik

[netdrvr e100] copyright + trailing blanks + misc

* Misc: 2004 copyright, remove trailing white space, remove some
  unused symbols.
parent 0b69e32d
/******************************************************************************* /*******************************************************************************
Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms of the GNU General Public License as published by the Free
...@@ -154,9 +154,9 @@ ...@@ -154,9 +154,9 @@
#define DRV_NAME "e100" #define DRV_NAME "e100"
#define DRV_VERSION "3.0.12_dev" #define DRV_VERSION "3.0.13_dev"
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2003 Intel Corporation" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation"
#define PFX DRV_NAME ": " #define PFX DRV_NAME ": "
#define E100_WATCHDOG_PERIOD 2 * HZ #define E100_WATCHDOG_PERIOD 2 * HZ
...@@ -260,15 +260,8 @@ struct csr { ...@@ -260,15 +260,8 @@ struct csr {
}; };
enum scb_status { enum scb_status {
rus_idle = 0x00,
rus_suspended = 0x04,
rus_no_resources = 0x08,
rus_ready = 0x10, rus_ready = 0x10,
rus_mask = 0x3C, rus_mask = 0x3C,
cus_idle = 0x00,
cus_suspended = 0x40,
cus_active = 0x80,
cus_mask = 0xC0,
}; };
enum scb_stat_ack { enum scb_stat_ack {
...@@ -1269,7 +1262,7 @@ static inline int e100_tx_clean(struct nic *nic) ...@@ -1269,7 +1262,7 @@ static inline int e100_tx_clean(struct nic *nic)
for(cb = nic->cb_to_clean; for(cb = nic->cb_to_clean;
cb->status & cpu_to_le16(cb_complete); cb->status & cpu_to_le16(cb_complete);
cb = nic->cb_to_clean = cb->next) { cb = nic->cb_to_clean = cb->next) {
if(likely(cb->skb != NULL)) { if(likely(cb->skb)) {
nic->net_stats.tx_packets++; nic->net_stats.tx_packets++;
nic->net_stats.tx_bytes += cb->skb->len; nic->net_stats.tx_bytes += cb->skb->len;
...@@ -1293,7 +1286,7 @@ static inline int e100_tx_clean(struct nic *nic) ...@@ -1293,7 +1286,7 @@ static inline int e100_tx_clean(struct nic *nic)
return tx_cleaned; return tx_cleaned;
} }
static void e100_clean_cbs(struct nic *nic, int free_mem) static void e100_clean_cbs(struct nic *nic)
{ {
if(nic->cbs) { if(nic->cbs) {
while(nic->cb_to_clean != nic->cb_to_use) { while(nic->cb_to_clean != nic->cb_to_use) {
...@@ -1308,14 +1301,12 @@ static void e100_clean_cbs(struct nic *nic, int free_mem) ...@@ -1308,14 +1301,12 @@ static void e100_clean_cbs(struct nic *nic, int free_mem)
nic->cb_to_clean = nic->cb_to_clean->next; nic->cb_to_clean = nic->cb_to_clean->next;
} }
nic->cbs_avail = nic->params.cbs.count; nic->cbs_avail = nic->params.cbs.count;
if(free_mem) {
pci_free_consistent(nic->pdev, pci_free_consistent(nic->pdev,
sizeof(struct cb) * nic->params.cbs.count, sizeof(struct cb) * nic->params.cbs.count,
nic->cbs, nic->cbs_dma_addr); nic->cbs, nic->cbs_dma_addr);
nic->cbs = NULL; nic->cbs = NULL;
nic->cbs_avail = 0; nic->cbs_avail = 0;
} }
}
nic->cuc_cmd = cuc_start; nic->cuc_cmd = cuc_start;
nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean =
nic->cbs; nic->cbs;
...@@ -1642,7 +1633,7 @@ static int e100_up(struct nic *nic) ...@@ -1642,7 +1633,7 @@ static int e100_up(struct nic *nic)
del_timer_sync(&nic->watchdog); del_timer_sync(&nic->watchdog);
netif_stop_queue(nic->netdev); netif_stop_queue(nic->netdev);
err_clean_cbs: err_clean_cbs:
e100_clean_cbs(nic, 1); e100_clean_cbs(nic);
err_rx_clean_list: err_rx_clean_list:
e100_rx_clean_list(nic); e100_rx_clean_list(nic);
return err; return err;
...@@ -1655,7 +1646,7 @@ static void e100_down(struct nic *nic) ...@@ -1655,7 +1646,7 @@ static void e100_down(struct nic *nic)
del_timer_sync(&nic->watchdog); del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev); netif_carrier_off(nic->netdev);
netif_stop_queue(nic->netdev); netif_stop_queue(nic->netdev);
e100_clean_cbs(nic, 1); e100_clean_cbs(nic);
e100_rx_clean_list(nic); e100_rx_clean_list(nic);
} }
...@@ -1717,7 +1708,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) ...@@ -1717,7 +1708,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0);
nic->loopback = lb_none; nic->loopback = lb_none;
e100_hw_init(nic); e100_hw_init(nic);
e100_clean_cbs(nic, 1); e100_clean_cbs(nic);
err_clean_rx: err_clean_rx:
e100_rx_clean_list(nic); e100_rx_clean_list(nic);
return err; return err;
...@@ -1915,7 +1906,7 @@ static int e100_set_ringparam(struct net_device *netdev, ...@@ -1915,7 +1906,7 @@ static int e100_set_ringparam(struct net_device *netdev,
return 0; return 0;
} }
static char e100_gstrings_test[][ETH_GSTRING_LEN] = { static const char e100_gstrings_test[][ETH_GSTRING_LEN] = {
"Link test (on/offline)", "Link test (on/offline)",
"Eeprom test (on/offline)", "Eeprom test (on/offline)",
"Self test (offline)", "Self test (offline)",
...@@ -1966,7 +1957,7 @@ static int e100_phys_id(struct net_device *netdev, u32 data) ...@@ -1966,7 +1957,7 @@ static int e100_phys_id(struct net_device *netdev, u32 data)
return 0; return 0;
} }
static char e100_gstrings_stats[][ETH_GSTRING_LEN] = { static const char e100_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_packets", "tx_packets", "rx_bytes", "tx_bytes", "rx_errors", "rx_packets", "tx_packets", "rx_bytes", "tx_bytes", "rx_errors",
"tx_errors", "rx_dropped", "tx_dropped", "multicast", "collisions", "tx_errors", "rx_dropped", "tx_dropped", "multicast", "collisions",
"rx_length_errors", "rx_over_errors", "rx_crc_errors", "rx_length_errors", "rx_over_errors", "rx_crc_errors",
......
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