diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/eepro.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/eepro.c')
-rw-r--r-- | drivers/net/eepro.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 8d97f168f018..dfeb006035df 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -302,7 +302,7 @@ struct eepro_local { | |||
302 | #define ee_id_eepro10p0 0x10 /* ID for eepro/10+ */ | 302 | #define ee_id_eepro10p0 0x10 /* ID for eepro/10+ */ |
303 | #define ee_id_eepro10p1 0x31 | 303 | #define ee_id_eepro10p1 0x31 |
304 | 304 | ||
305 | #define TX_TIMEOUT 40 | 305 | #define TX_TIMEOUT ((4*HZ)/10) |
306 | 306 | ||
307 | /* Index to functions, as function prototypes. */ | 307 | /* Index to functions, as function prototypes. */ |
308 | 308 | ||
@@ -891,12 +891,13 @@ err: | |||
891 | there is non-reboot way to recover if something goes wrong. | 891 | there is non-reboot way to recover if something goes wrong. |
892 | */ | 892 | */ |
893 | 893 | ||
894 | static char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1}; | 894 | static const char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1}; |
895 | static char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1}; | 895 | static const char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1}; |
896 | static int eepro_grab_irq(struct net_device *dev) | 896 | static int eepro_grab_irq(struct net_device *dev) |
897 | { | 897 | { |
898 | int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12, 0 }; | 898 | static const int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12, 0 }; |
899 | int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr; | 899 | const int *irqp = irqlist; |
900 | int temp_reg, ioaddr = dev->base_addr; | ||
900 | 901 | ||
901 | eepro_sw2bank1(ioaddr); /* be CAREFUL, BANK 1 now */ | 902 | eepro_sw2bank1(ioaddr); /* be CAREFUL, BANK 1 now */ |
902 | 903 | ||
@@ -1457,11 +1458,11 @@ hardware_send_packet(struct net_device *dev, void *buf, short length) | |||
1457 | if (net_debug > 5) | 1458 | if (net_debug > 5) |
1458 | printk(KERN_DEBUG "%s: entering hardware_send_packet routine.\n", dev->name); | 1459 | printk(KERN_DEBUG "%s: entering hardware_send_packet routine.\n", dev->name); |
1459 | 1460 | ||
1460 | /* determine how much of the transmit buffer space is available */ | 1461 | /* determine how much of the transmit buffer space is available */ |
1461 | if (lp->tx_end > lp->tx_start) | 1462 | if (lp->tx_end > lp->tx_start) |
1462 | tx_available = lp->xmt_ram - (lp->tx_end - lp->tx_start); | 1463 | tx_available = lp->xmt_ram - (lp->tx_end - lp->tx_start); |
1463 | else if (lp->tx_end < lp->tx_start) | 1464 | else if (lp->tx_end < lp->tx_start) |
1464 | tx_available = lp->tx_start - lp->tx_end; | 1465 | tx_available = lp->tx_start - lp->tx_end; |
1465 | else tx_available = lp->xmt_ram; | 1466 | else tx_available = lp->xmt_ram; |
1466 | 1467 | ||
1467 | if (((((length + 3) >> 1) << 1) + 2*XMT_HEADER) >= tx_available) { | 1468 | if (((((length + 3) >> 1) << 1) + 2*XMT_HEADER) >= tx_available) { |
@@ -1702,7 +1703,7 @@ static int eepro_ethtool_get_settings(struct net_device *dev, | |||
1702 | cmd->advertising |= ADVERTISED_AUI; | 1703 | cmd->advertising |= ADVERTISED_AUI; |
1703 | } | 1704 | } |
1704 | 1705 | ||
1705 | cmd->speed = SPEED_10; | 1706 | ethtool_cmd_speed_set(cmd, SPEED_10); |
1706 | 1707 | ||
1707 | if (dev->if_port == TPE && lp->word[1] & ee_Duplex) { | 1708 | if (dev->if_port == TPE && lp->word[1] & ee_Duplex) { |
1708 | cmd->duplex = DUPLEX_FULL; | 1709 | cmd->duplex = DUPLEX_FULL; |
@@ -1760,7 +1761,7 @@ module_param_array(io, int, NULL, 0); | |||
1760 | module_param_array(irq, int, NULL, 0); | 1761 | module_param_array(irq, int, NULL, 0); |
1761 | module_param_array(mem, int, NULL, 0); | 1762 | module_param_array(mem, int, NULL, 0); |
1762 | module_param(autodetect, int, 0); | 1763 | module_param(autodetect, int, 0); |
1763 | MODULE_PARM_DESC(io, "EtherExpress Pro/10 I/O base addres(es)"); | 1764 | MODULE_PARM_DESC(io, "EtherExpress Pro/10 I/O base address(es)"); |
1764 | MODULE_PARM_DESC(irq, "EtherExpress Pro/10 IRQ number(s)"); | 1765 | MODULE_PARM_DESC(irq, "EtherExpress Pro/10 IRQ number(s)"); |
1765 | MODULE_PARM_DESC(mem, "EtherExpress Pro/10 Rx buffer size(es) in kB (3-29)"); | 1766 | MODULE_PARM_DESC(mem, "EtherExpress Pro/10 Rx buffer size(es) in kB (3-29)"); |
1766 | MODULE_PARM_DESC(autodetect, "EtherExpress Pro/10 force board(s) detection (0-1)"); | 1767 | MODULE_PARM_DESC(autodetect, "EtherExpress Pro/10 force board(s) detection (0-1)"); |