diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-30 15:04:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-30 15:04:29 -0400 |
commit | 71d00feca2598c68186ca5b83247746d6a7fed7e (patch) | |
tree | fe129bfc6a69ea00a43ceffdd04ad91898a0411e /drivers/net | |
parent | 8c1ee54cb3ff750dc39a5e1db8075e2352bbd1b8 (diff) | |
parent | 19abe86d60eeb34c5deeb3ab2d14229fa9f59157 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
ixgb: fix TX hangs under heavy load
e1000e: Fix typo ! &
ixgbe: minor sparse fixes
e1000: sparse warnings fixes
ixgb: fix sparse warnings
e1000e: fix sparse warnings
mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2
Blackfin EMAC driver: Fix Ethernet communication bug (dupliated and lost packets)
DM9601: Support for ADMtek ADM8515 NIC
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bfin_mac.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000.h | 8 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 29 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 7 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_param.c | 23 | ||||
-rw-r--r-- | drivers/net/e1000e/82571.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000e/param.c | 35 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb.h | 7 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 7 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 15 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_param.c | 43 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82598.c | 3 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 9 | ||||
-rw-r--r-- | drivers/net/usb/dm9601.c | 4 |
18 files changed, 107 insertions, 101 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 53fe7ded5d50..084acfd6fc5f 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -371,7 +371,6 @@ static void bf537_adjust_link(struct net_device *dev) | |||
371 | if (phydev->speed != lp->old_speed) { | 371 | if (phydev->speed != lp->old_speed) { |
372 | #if defined(CONFIG_BFIN_MAC_RMII) | 372 | #if defined(CONFIG_BFIN_MAC_RMII) |
373 | u32 opmode = bfin_read_EMAC_OPMODE(); | 373 | u32 opmode = bfin_read_EMAC_OPMODE(); |
374 | bf537mac_disable(); | ||
375 | switch (phydev->speed) { | 374 | switch (phydev->speed) { |
376 | case 10: | 375 | case 10: |
377 | opmode |= RMII_10; | 376 | opmode |= RMII_10; |
@@ -386,7 +385,6 @@ static void bf537_adjust_link(struct net_device *dev) | |||
386 | break; | 385 | break; |
387 | } | 386 | } |
388 | bfin_write_EMAC_OPMODE(opmode); | 387 | bfin_write_EMAC_OPMODE(opmode); |
389 | bf537mac_enable(); | ||
390 | #endif | 388 | #endif |
391 | 389 | ||
392 | new_state = 1; | 390 | new_state = 1; |
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 781ed9968489..3b840283a9c3 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -351,4 +351,12 @@ enum e1000_state_t { | |||
351 | __E1000_DOWN | 351 | __E1000_DOWN |
352 | }; | 352 | }; |
353 | 353 | ||
354 | extern char e1000_driver_name[]; | ||
355 | extern const char e1000_driver_version[]; | ||
356 | |||
357 | extern void e1000_power_up_phy(struct e1000_adapter *); | ||
358 | extern void e1000_set_ethtool_ops(struct net_device *netdev); | ||
359 | extern void e1000_check_options(struct e1000_adapter *adapter); | ||
360 | |||
361 | |||
354 | #endif /* _E1000_H_ */ | 362 | #endif /* _E1000_H_ */ |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 6c9a643426f5..667f18bcc172 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -32,9 +32,6 @@ | |||
32 | 32 | ||
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | 34 | ||
35 | extern char e1000_driver_name[]; | ||
36 | extern char e1000_driver_version[]; | ||
37 | |||
38 | extern int e1000_up(struct e1000_adapter *adapter); | 35 | extern int e1000_up(struct e1000_adapter *adapter); |
39 | extern void e1000_down(struct e1000_adapter *adapter); | 36 | extern void e1000_down(struct e1000_adapter *adapter); |
40 | extern void e1000_reinit_locked(struct e1000_adapter *adapter); | 37 | extern void e1000_reinit_locked(struct e1000_adapter *adapter); |
@@ -733,16 +730,16 @@ err_setup: | |||
733 | 730 | ||
734 | #define REG_PATTERN_TEST(R, M, W) \ | 731 | #define REG_PATTERN_TEST(R, M, W) \ |
735 | { \ | 732 | { \ |
736 | uint32_t pat, value; \ | 733 | uint32_t pat, val; \ |
737 | uint32_t test[] = \ | 734 | const uint32_t test[] = \ |
738 | {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; \ | 735 | {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; \ |
739 | for (pat = 0; pat < ARRAY_SIZE(test); pat++) { \ | 736 | for (pat = 0; pat < ARRAY_SIZE(test); pat++) { \ |
740 | E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W)); \ | 737 | E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W)); \ |
741 | value = E1000_READ_REG(&adapter->hw, R); \ | 738 | val = E1000_READ_REG(&adapter->hw, R); \ |
742 | if (value != (test[pat] & W & M)) { \ | 739 | if (val != (test[pat] & W & M)) { \ |
743 | DPRINTK(DRV, ERR, "pattern test reg %04X failed: got " \ | 740 | DPRINTK(DRV, ERR, "pattern test reg %04X failed: got " \ |
744 | "0x%08X expected 0x%08X\n", \ | 741 | "0x%08X expected 0x%08X\n", \ |
745 | E1000_##R, value, (test[pat] & W & M)); \ | 742 | E1000_##R, val, (test[pat] & W & M)); \ |
746 | *data = (adapter->hw.mac_type < e1000_82543) ? \ | 743 | *data = (adapter->hw.mac_type < e1000_82543) ? \ |
747 | E1000_82542_##R : E1000_##R; \ | 744 | E1000_82542_##R : E1000_##R; \ |
748 | return 1; \ | 745 | return 1; \ |
@@ -752,12 +749,12 @@ err_setup: | |||
752 | 749 | ||
753 | #define REG_SET_AND_CHECK(R, M, W) \ | 750 | #define REG_SET_AND_CHECK(R, M, W) \ |
754 | { \ | 751 | { \ |
755 | uint32_t value; \ | 752 | uint32_t val; \ |
756 | E1000_WRITE_REG(&adapter->hw, R, W & M); \ | 753 | E1000_WRITE_REG(&adapter->hw, R, W & M); \ |
757 | value = E1000_READ_REG(&adapter->hw, R); \ | 754 | val = E1000_READ_REG(&adapter->hw, R); \ |
758 | if ((W & M) != (value & M)) { \ | 755 | if ((W & M) != (val & M)) { \ |
759 | DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\ | 756 | DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\ |
760 | "expected 0x%08X\n", E1000_##R, (value & M), (W & M)); \ | 757 | "expected 0x%08X\n", E1000_##R, (val & M), (W & M)); \ |
761 | *data = (adapter->hw.mac_type < e1000_82543) ? \ | 758 | *data = (adapter->hw.mac_type < e1000_82543) ? \ |
762 | E1000_82542_##R : E1000_##R; \ | 759 | E1000_82542_##R : E1000_##R; \ |
763 | return 1; \ | 760 | return 1; \ |
@@ -1621,8 +1618,6 @@ e1000_get_sset_count(struct net_device *netdev, int sset) | |||
1621 | } | 1618 | } |
1622 | } | 1619 | } |
1623 | 1620 | ||
1624 | extern void e1000_power_up_phy(struct e1000_adapter *); | ||
1625 | |||
1626 | static void | 1621 | static void |
1627 | e1000_diag_test(struct net_device *netdev, | 1622 | e1000_diag_test(struct net_device *netdev, |
1628 | struct ethtool_test *eth_test, uint64_t *data) | 1623 | struct ethtool_test *eth_test, uint64_t *data) |
@@ -1859,8 +1854,8 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) | |||
1859 | { | 1854 | { |
1860 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1855 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1861 | 1856 | ||
1862 | if (!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) | 1857 | if (!data) |
1863 | data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); | 1858 | data = INT_MAX; |
1864 | 1859 | ||
1865 | if (adapter->hw.mac_type < e1000_82571) { | 1860 | if (adapter->hw.mac_type < e1000_82571) { |
1866 | if (!adapter->blink_timer.function) { | 1861 | if (!adapter->blink_timer.function) { |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 8fa0fe4009d5..7c6888c58c21 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -8607,7 +8607,7 @@ e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, | |||
8607 | 8607 | ||
8608 | DEBUGFUNC("e1000_read_ich8_data"); | 8608 | DEBUGFUNC("e1000_read_ich8_data"); |
8609 | 8609 | ||
8610 | if (size < 1 || size > 2 || data == 0x0 || | 8610 | if (size < 1 || size > 2 || data == NULL || |
8611 | index > ICH_FLASH_LINEAR_ADDR_MASK) | 8611 | index > ICH_FLASH_LINEAR_ADDR_MASK) |
8612 | return error; | 8612 | return error; |
8613 | 8613 | ||
@@ -8841,7 +8841,7 @@ e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data) | |||
8841 | * amount of NVM used in each bank is a *minimum* of 4 KBytes, but in fact the | 8841 | * amount of NVM used in each bank is a *minimum* of 4 KBytes, but in fact the |
8842 | * bank size may be 4, 8 or 64 KBytes | 8842 | * bank size may be 4, 8 or 64 KBytes |
8843 | *****************************************************************************/ | 8843 | *****************************************************************************/ |
8844 | int32_t | 8844 | static int32_t |
8845 | e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank) | 8845 | e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank) |
8846 | { | 8846 | { |
8847 | union ich8_hws_flash_status hsfsts; | 8847 | union ich8_hws_flash_status hsfsts; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index f1ce348470cc..72deff0d4d90 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -37,8 +37,8 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | |||
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "7.3.20-k2"DRIVERNAPI | 39 | #define DRV_VERSION "7.3.20-k2"DRIVERNAPI |
40 | char e1000_driver_version[] = DRV_VERSION; | 40 | const char e1000_driver_version[] = DRV_VERSION; |
41 | static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
43 | /* e1000_pci_tbl - PCI Device ID Table | 43 | /* e1000_pci_tbl - PCI Device ID Table |
44 | * | 44 | * |
@@ -188,7 +188,6 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, | |||
188 | static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); | 188 | static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); |
189 | static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, | 189 | static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, |
190 | int cmd); | 190 | int cmd); |
191 | void e1000_set_ethtool_ops(struct net_device *netdev); | ||
192 | static void e1000_enter_82542_rst(struct e1000_adapter *adapter); | 191 | static void e1000_enter_82542_rst(struct e1000_adapter *adapter); |
193 | static void e1000_leave_82542_rst(struct e1000_adapter *adapter); | 192 | static void e1000_leave_82542_rst(struct e1000_adapter *adapter); |
194 | static void e1000_tx_timeout(struct net_device *dev); | 193 | static void e1000_tx_timeout(struct net_device *dev); |
@@ -213,8 +212,6 @@ static void e1000_shutdown(struct pci_dev *pdev); | |||
213 | static void e1000_netpoll (struct net_device *netdev); | 212 | static void e1000_netpoll (struct net_device *netdev); |
214 | #endif | 213 | #endif |
215 | 214 | ||
216 | extern void e1000_check_options(struct e1000_adapter *adapter); | ||
217 | |||
218 | #define COPYBREAK_DEFAULT 256 | 215 | #define COPYBREAK_DEFAULT 256 |
219 | static unsigned int copybreak __read_mostly = COPYBREAK_DEFAULT; | 216 | static unsigned int copybreak __read_mostly = COPYBREAK_DEFAULT; |
220 | module_param(copybreak, uint, 0644); | 217 | module_param(copybreak, uint, 0644); |
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c index f485874a63f5..e6565ce686bc 100644 --- a/drivers/net/e1000/e1000_param.c +++ b/drivers/net/e1000/e1000_param.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } | 46 | #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } |
47 | #define E1000_PARAM(X, desc) \ | 47 | #define E1000_PARAM(X, desc) \ |
48 | static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ | 48 | static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ |
49 | static int num_##X = 0; \ | 49 | static unsigned int num_##X; \ |
50 | module_param_array_named(X, X, int, &num_##X, 0); \ | 50 | module_param_array_named(X, X, int, &num_##X, 0); \ |
51 | MODULE_PARM_DESC(X, desc); | 51 | MODULE_PARM_DESC(X, desc); |
52 | 52 | ||
@@ -198,9 +198,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); | |||
198 | 198 | ||
199 | struct e1000_option { | 199 | struct e1000_option { |
200 | enum { enable_option, range_option, list_option } type; | 200 | enum { enable_option, range_option, list_option } type; |
201 | char *name; | 201 | const char *name; |
202 | char *err; | 202 | const char *err; |
203 | int def; | 203 | int def; |
204 | union { | 204 | union { |
205 | struct { /* range_option info */ | 205 | struct { /* range_option info */ |
206 | int min; | 206 | int min; |
@@ -214,8 +214,9 @@ struct e1000_option { | |||
214 | }; | 214 | }; |
215 | 215 | ||
216 | static int __devinit | 216 | static int __devinit |
217 | e1000_validate_option(int *value, struct e1000_option *opt, | 217 | e1000_validate_option(unsigned int *value, |
218 | struct e1000_adapter *adapter) | 218 | const struct e1000_option *opt, |
219 | struct e1000_adapter *adapter) | ||
219 | { | 220 | { |
220 | if (*value == OPTION_UNSET) { | 221 | if (*value == OPTION_UNSET) { |
221 | *value = opt->def; | 222 | *value = opt->def; |
@@ -348,7 +349,7 @@ e1000_check_options(struct e1000_adapter *adapter) | |||
348 | }; | 349 | }; |
349 | 350 | ||
350 | if (num_XsumRX > bd) { | 351 | if (num_XsumRX > bd) { |
351 | int rx_csum = XsumRX[bd]; | 352 | unsigned int rx_csum = XsumRX[bd]; |
352 | e1000_validate_option(&rx_csum, &opt, adapter); | 353 | e1000_validate_option(&rx_csum, &opt, adapter); |
353 | adapter->rx_csum = rx_csum; | 354 | adapter->rx_csum = rx_csum; |
354 | } else { | 355 | } else { |
@@ -374,7 +375,7 @@ e1000_check_options(struct e1000_adapter *adapter) | |||
374 | }; | 375 | }; |
375 | 376 | ||
376 | if (num_FlowControl > bd) { | 377 | if (num_FlowControl > bd) { |
377 | int fc = FlowControl[bd]; | 378 | unsigned int fc = FlowControl[bd]; |
378 | e1000_validate_option(&fc, &opt, adapter); | 379 | e1000_validate_option(&fc, &opt, adapter); |
379 | adapter->hw.fc = adapter->hw.original_fc = fc; | 380 | adapter->hw.fc = adapter->hw.original_fc = fc; |
380 | } else { | 381 | } else { |
@@ -506,7 +507,7 @@ e1000_check_options(struct e1000_adapter *adapter) | |||
506 | }; | 507 | }; |
507 | 508 | ||
508 | if (num_SmartPowerDownEnable > bd) { | 509 | if (num_SmartPowerDownEnable > bd) { |
509 | int spd = SmartPowerDownEnable[bd]; | 510 | unsigned int spd = SmartPowerDownEnable[bd]; |
510 | e1000_validate_option(&spd, &opt, adapter); | 511 | e1000_validate_option(&spd, &opt, adapter); |
511 | adapter->smart_power_down = spd; | 512 | adapter->smart_power_down = spd; |
512 | } else { | 513 | } else { |
@@ -522,7 +523,7 @@ e1000_check_options(struct e1000_adapter *adapter) | |||
522 | }; | 523 | }; |
523 | 524 | ||
524 | if (num_KumeranLockLoss > bd) { | 525 | if (num_KumeranLockLoss > bd) { |
525 | int kmrn_lock_loss = KumeranLockLoss[bd]; | 526 | unsigned int kmrn_lock_loss = KumeranLockLoss[bd]; |
526 | e1000_validate_option(&kmrn_lock_loss, &opt, adapter); | 527 | e1000_validate_option(&kmrn_lock_loss, &opt, adapter); |
527 | adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss; | 528 | adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss; |
528 | } else { | 529 | } else { |
@@ -581,7 +582,7 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) | |||
581 | static void __devinit | 582 | static void __devinit |
582 | e1000_check_copper_options(struct e1000_adapter *adapter) | 583 | e1000_check_copper_options(struct e1000_adapter *adapter) |
583 | { | 584 | { |
584 | int speed, dplx, an; | 585 | unsigned int speed, dplx, an; |
585 | int bd = adapter->bd_number; | 586 | int bd = adapter->bd_number; |
586 | 587 | ||
587 | { /* Speed */ | 588 | { /* Speed */ |
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index cf70522fc851..14141a55eaa6 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -283,7 +283,7 @@ static s32 e1000_get_invariants_82571(struct e1000_adapter *adapter) | |||
283 | adapter->flags &= ~FLAG_HAS_WOL; | 283 | adapter->flags &= ~FLAG_HAS_WOL; |
284 | /* quad ports only support WoL on port A */ | 284 | /* quad ports only support WoL on port A */ |
285 | if (adapter->flags & FLAG_IS_QUAD_PORT && | 285 | if (adapter->flags & FLAG_IS_QUAD_PORT && |
286 | (!adapter->flags & FLAG_IS_QUAD_PORT_A)) | 286 | (!(adapter->flags & FLAG_IS_QUAD_PORT_A))) |
287 | adapter->flags &= ~FLAG_HAS_WOL; | 287 | adapter->flags &= ~FLAG_HAS_WOL; |
288 | break; | 288 | break; |
289 | 289 | ||
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 0666e62e9ad2..6a39784e7ee2 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -1680,8 +1680,8 @@ static int e1000_phys_id(struct net_device *netdev, u32 data) | |||
1680 | { | 1680 | { |
1681 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1681 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1682 | 1682 | ||
1683 | if (!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)) | 1683 | if (!data) |
1684 | data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ); | 1684 | data = INT_MAX; |
1685 | 1685 | ||
1686 | if (adapter->hw.phy.type == e1000_phy_ife) { | 1686 | if (adapter->hw.phy.type == e1000_phy_ife) { |
1687 | if (!adapter->blink_timer.function) { | 1687 | if (!adapter->blink_timer.function) { |
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c index e4e655efb23c..332789238b9c 100644 --- a/drivers/net/e1000e/param.c +++ b/drivers/net/e1000e/param.c | |||
@@ -52,10 +52,11 @@ MODULE_PARM_DESC(copybreak, | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } | 54 | #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } |
55 | #define E1000_PARAM(X, desc) \ | 55 | #define E1000_PARAM(X, desc) \ |
56 | static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ | 56 | static int __devinitdata X[E1000_MAX_NIC+1] \ |
57 | static int num_##X; \ | 57 | = E1000_PARAM_INIT; \ |
58 | module_param_array_named(X, X, int, &num_##X, 0); \ | 58 | static unsigned int num_##X; \ |
59 | module_param_array_named(X, X, int, &num_##X, 0); \ | ||
59 | MODULE_PARM_DESC(X, desc); | 60 | MODULE_PARM_DESC(X, desc); |
60 | 61 | ||
61 | 62 | ||
@@ -124,9 +125,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); | |||
124 | 125 | ||
125 | struct e1000_option { | 126 | struct e1000_option { |
126 | enum { enable_option, range_option, list_option } type; | 127 | enum { enable_option, range_option, list_option } type; |
127 | char *name; | 128 | const char *name; |
128 | char *err; | 129 | const char *err; |
129 | int def; | 130 | int def; |
130 | union { | 131 | union { |
131 | struct { /* range_option info */ | 132 | struct { /* range_option info */ |
132 | int min; | 133 | int min; |
@@ -139,8 +140,8 @@ struct e1000_option { | |||
139 | } arg; | 140 | } arg; |
140 | }; | 141 | }; |
141 | 142 | ||
142 | static int __devinit e1000_validate_option(int *value, | 143 | static int __devinit e1000_validate_option(unsigned int *value, |
143 | struct e1000_option *opt, | 144 | const struct e1000_option *opt, |
144 | struct e1000_adapter *adapter) | 145 | struct e1000_adapter *adapter) |
145 | { | 146 | { |
146 | if (*value == OPTION_UNSET) { | 147 | if (*value == OPTION_UNSET) { |
@@ -213,7 +214,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
213 | } | 214 | } |
214 | 215 | ||
215 | { /* Transmit Interrupt Delay */ | 216 | { /* Transmit Interrupt Delay */ |
216 | struct e1000_option opt = { | 217 | const struct e1000_option opt = { |
217 | .type = range_option, | 218 | .type = range_option, |
218 | .name = "Transmit Interrupt Delay", | 219 | .name = "Transmit Interrupt Delay", |
219 | .err = "using default of " | 220 | .err = "using default of " |
@@ -232,7 +233,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
232 | } | 233 | } |
233 | } | 234 | } |
234 | { /* Transmit Absolute Interrupt Delay */ | 235 | { /* Transmit Absolute Interrupt Delay */ |
235 | struct e1000_option opt = { | 236 | const struct e1000_option opt = { |
236 | .type = range_option, | 237 | .type = range_option, |
237 | .name = "Transmit Absolute Interrupt Delay", | 238 | .name = "Transmit Absolute Interrupt Delay", |
238 | .err = "using default of " | 239 | .err = "using default of " |
@@ -277,7 +278,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
277 | } | 278 | } |
278 | } | 279 | } |
279 | { /* Receive Absolute Interrupt Delay */ | 280 | { /* Receive Absolute Interrupt Delay */ |
280 | struct e1000_option opt = { | 281 | const struct e1000_option opt = { |
281 | .type = range_option, | 282 | .type = range_option, |
282 | .name = "Receive Absolute Interrupt Delay", | 283 | .name = "Receive Absolute Interrupt Delay", |
283 | .err = "using default of " | 284 | .err = "using default of " |
@@ -296,7 +297,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
296 | } | 297 | } |
297 | } | 298 | } |
298 | { /* Interrupt Throttling Rate */ | 299 | { /* Interrupt Throttling Rate */ |
299 | struct e1000_option opt = { | 300 | const struct e1000_option opt = { |
300 | .type = range_option, | 301 | .type = range_option, |
301 | .name = "Interrupt Throttling Rate (ints/sec)", | 302 | .name = "Interrupt Throttling Rate (ints/sec)", |
302 | .err = "using default of " | 303 | .err = "using default of " |
@@ -344,7 +345,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
344 | } | 345 | } |
345 | } | 346 | } |
346 | { /* Smart Power Down */ | 347 | { /* Smart Power Down */ |
347 | struct e1000_option opt = { | 348 | const struct e1000_option opt = { |
348 | .type = enable_option, | 349 | .type = enable_option, |
349 | .name = "PHY Smart Power Down", | 350 | .name = "PHY Smart Power Down", |
350 | .err = "defaulting to Disabled", | 351 | .err = "defaulting to Disabled", |
@@ -352,7 +353,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
352 | }; | 353 | }; |
353 | 354 | ||
354 | if (num_SmartPowerDownEnable > bd) { | 355 | if (num_SmartPowerDownEnable > bd) { |
355 | int spd = SmartPowerDownEnable[bd]; | 356 | unsigned int spd = SmartPowerDownEnable[bd]; |
356 | e1000_validate_option(&spd, &opt, adapter); | 357 | e1000_validate_option(&spd, &opt, adapter); |
357 | if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) | 358 | if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) |
358 | && spd) | 359 | && spd) |
@@ -360,7 +361,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
360 | } | 361 | } |
361 | } | 362 | } |
362 | { /* Kumeran Lock Loss Workaround */ | 363 | { /* Kumeran Lock Loss Workaround */ |
363 | struct e1000_option opt = { | 364 | const struct e1000_option opt = { |
364 | .type = enable_option, | 365 | .type = enable_option, |
365 | .name = "Kumeran Lock Loss Workaround", | 366 | .name = "Kumeran Lock Loss Workaround", |
366 | .err = "defaulting to Enabled", | 367 | .err = "defaulting to Enabled", |
@@ -368,7 +369,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
368 | }; | 369 | }; |
369 | 370 | ||
370 | if (num_KumeranLockLoss > bd) { | 371 | if (num_KumeranLockLoss > bd) { |
371 | int kmrn_lock_loss = KumeranLockLoss[bd]; | 372 | unsigned int kmrn_lock_loss = KumeranLockLoss[bd]; |
372 | e1000_validate_option(&kmrn_lock_loss, &opt, adapter); | 373 | e1000_validate_option(&kmrn_lock_loss, &opt, adapter); |
373 | if (hw->mac.type == e1000_ich8lan) | 374 | if (hw->mac.type == e1000_ich8lan) |
374 | e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, | 375 | e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, |
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index 1eee8894c732..3d2e7217e9af 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h | |||
@@ -196,4 +196,11 @@ struct ixgb_adapter { | |||
196 | uint32_t alloc_rx_buff_failed; | 196 | uint32_t alloc_rx_buff_failed; |
197 | boolean_t have_msi; | 197 | boolean_t have_msi; |
198 | }; | 198 | }; |
199 | |||
200 | /* Exported from other modules */ | ||
201 | extern void ixgb_check_options(struct ixgb_adapter *adapter); | ||
202 | extern void ixgb_set_ethtool_ops(struct net_device *netdev); | ||
203 | extern char ixgb_driver_name[]; | ||
204 | extern const char ixgb_driver_version[]; | ||
205 | |||
199 | #endif /* _IXGB_H_ */ | 206 | #endif /* _IXGB_H_ */ |
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index fddd5844168d..a267dd862520 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -32,9 +32,6 @@ | |||
32 | 32 | ||
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | 34 | ||
35 | extern char ixgb_driver_name[]; | ||
36 | extern char ixgb_driver_version[]; | ||
37 | |||
38 | extern int ixgb_up(struct ixgb_adapter *adapter); | 35 | extern int ixgb_up(struct ixgb_adapter *adapter); |
39 | extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); | 36 | extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); |
40 | extern void ixgb_reset(struct ixgb_adapter *adapter); | 37 | extern void ixgb_reset(struct ixgb_adapter *adapter); |
@@ -639,8 +636,8 @@ ixgb_phys_id(struct net_device *netdev, uint32_t data) | |||
639 | { | 636 | { |
640 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 637 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
641 | 638 | ||
642 | if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) | 639 | if (!data) |
643 | data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); | 640 | data = INT_MAX; |
644 | 641 | ||
645 | if(!adapter->blink_timer.function) { | 642 | if(!adapter->blink_timer.function) { |
646 | init_timer(&adapter->blink_timer); | 643 | init_timer(&adapter->blink_timer); |
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index ecbf45861c68..2c6367ace3cd 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c | |||
@@ -1174,7 +1174,7 @@ mac_addr_valid(uint8_t *mac_addr) | |||
1174 | * | 1174 | * |
1175 | * hw - Struct containing variables accessed by shared code | 1175 | * hw - Struct containing variables accessed by shared code |
1176 | *****************************************************************************/ | 1176 | *****************************************************************************/ |
1177 | boolean_t | 1177 | static boolean_t |
1178 | ixgb_link_reset(struct ixgb_hw *hw) | 1178 | ixgb_link_reset(struct ixgb_hw *hw) |
1179 | { | 1179 | { |
1180 | boolean_t link_status = FALSE; | 1180 | boolean_t link_status = FALSE; |
@@ -1205,7 +1205,7 @@ ixgb_link_reset(struct ixgb_hw *hw) | |||
1205 | * | 1205 | * |
1206 | * hw - Struct containing variables accessed by shared code | 1206 | * hw - Struct containing variables accessed by shared code |
1207 | *****************************************************************************/ | 1207 | *****************************************************************************/ |
1208 | void | 1208 | static void |
1209 | ixgb_optics_reset(struct ixgb_hw *hw) | 1209 | ixgb_optics_reset(struct ixgb_hw *hw) |
1210 | { | 1210 | { |
1211 | if (hw->phy_type == ixgb_phy_type_txn17401) { | 1211 | if (hw->phy_type == ixgb_phy_type_txn17401) { |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index d444de58ba34..3021234b1e17 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -37,8 +37,8 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; | |||
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI | 39 | #define DRV_VERSION "1.0.126-k2"DRIVERNAPI |
40 | char ixgb_driver_version[] = DRV_VERSION; | 40 | const char ixgb_driver_version[] = DRV_VERSION; |
41 | static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
43 | /* ixgb_pci_tbl - PCI Device ID Table | 43 | /* ixgb_pci_tbl - PCI Device ID Table |
44 | * | 44 | * |
@@ -104,7 +104,6 @@ static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter, | |||
104 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); | 104 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); |
105 | #endif | 105 | #endif |
106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); | 106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); |
107 | void ixgb_set_ethtool_ops(struct net_device *netdev); | ||
108 | static void ixgb_tx_timeout(struct net_device *dev); | 107 | static void ixgb_tx_timeout(struct net_device *dev); |
109 | static void ixgb_tx_timeout_task(struct work_struct *work); | 108 | static void ixgb_tx_timeout_task(struct work_struct *work); |
110 | static void ixgb_vlan_rx_register(struct net_device *netdev, | 109 | static void ixgb_vlan_rx_register(struct net_device *netdev, |
@@ -123,9 +122,6 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, | |||
123 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); | 122 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); |
124 | static void ixgb_io_resume (struct pci_dev *pdev); | 123 | static void ixgb_io_resume (struct pci_dev *pdev); |
125 | 124 | ||
126 | /* Exported from other modules */ | ||
127 | extern void ixgb_check_options(struct ixgb_adapter *adapter); | ||
128 | |||
129 | static struct pci_error_handlers ixgb_err_handler = { | 125 | static struct pci_error_handlers ixgb_err_handler = { |
130 | .error_detected = ixgb_io_error_detected, | 126 | .error_detected = ixgb_io_error_detected, |
131 | .slot_reset = ixgb_io_slot_reset, | 127 | .slot_reset = ixgb_io_slot_reset, |
@@ -1085,7 +1081,8 @@ ixgb_set_multi(struct net_device *netdev) | |||
1085 | rctl |= IXGB_RCTL_MPE; | 1081 | rctl |= IXGB_RCTL_MPE; |
1086 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1082 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1087 | } else { | 1083 | } else { |
1088 | uint8_t mta[netdev->mc_count * IXGB_ETH_LENGTH_OF_ADDRESS]; | 1084 | uint8_t mta[IXGB_MAX_NUM_MULTICAST_ADDRESSES * |
1085 | IXGB_ETH_LENGTH_OF_ADDRESS]; | ||
1089 | 1086 | ||
1090 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1087 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1091 | 1088 | ||
@@ -1324,8 +1321,8 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, | |||
1324 | 1321 | ||
1325 | /* Workaround for premature desc write-backs | 1322 | /* Workaround for premature desc write-backs |
1326 | * in TSO mode. Append 4-byte sentinel desc */ | 1323 | * in TSO mode. Append 4-byte sentinel desc */ |
1327 | if (unlikely(mss && !nr_frags && size == len | 1324 | if (unlikely(mss && (f == (nr_frags - 1)) |
1328 | && size > 8)) | 1325 | && size == len && size > 8)) |
1329 | size -= 4; | 1326 | size -= 4; |
1330 | 1327 | ||
1331 | buffer_info->length = size; | 1328 | buffer_info->length = size; |
diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c index 5d5ddabf4360..865d14d6e5a7 100644 --- a/drivers/net/ixgb/ixgb_param.c +++ b/drivers/net/ixgb/ixgb_param.c | |||
@@ -44,10 +44,11 @@ | |||
44 | */ | 44 | */ |
45 | 45 | ||
46 | #define IXGB_PARAM_INIT { [0 ... IXGB_MAX_NIC] = OPTION_UNSET } | 46 | #define IXGB_PARAM_INIT { [0 ... IXGB_MAX_NIC] = OPTION_UNSET } |
47 | #define IXGB_PARAM(X, desc) \ | 47 | #define IXGB_PARAM(X, desc) \ |
48 | static int __devinitdata X[IXGB_MAX_NIC+1] = IXGB_PARAM_INIT; \ | 48 | static int __devinitdata X[IXGB_MAX_NIC+1] \ |
49 | static int num_##X = 0; \ | 49 | = IXGB_PARAM_INIT; \ |
50 | module_param_array_named(X, X, int, &num_##X, 0); \ | 50 | static unsigned int num_##X = 0; \ |
51 | module_param_array_named(X, X, int, &num_##X, 0); \ | ||
51 | MODULE_PARM_DESC(X, desc); | 52 | MODULE_PARM_DESC(X, desc); |
52 | 53 | ||
53 | /* Transmit Descriptor Count | 54 | /* Transmit Descriptor Count |
@@ -178,8 +179,8 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); | |||
178 | 179 | ||
179 | struct ixgb_option { | 180 | struct ixgb_option { |
180 | enum { enable_option, range_option, list_option } type; | 181 | enum { enable_option, range_option, list_option } type; |
181 | char *name; | 182 | const char *name; |
182 | char *err; | 183 | const char *err; |
183 | int def; | 184 | int def; |
184 | union { | 185 | union { |
185 | struct { /* range_option info */ | 186 | struct { /* range_option info */ |
@@ -197,7 +198,7 @@ struct ixgb_option { | |||
197 | }; | 198 | }; |
198 | 199 | ||
199 | static int __devinit | 200 | static int __devinit |
200 | ixgb_validate_option(int *value, struct ixgb_option *opt) | 201 | ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt) |
201 | { | 202 | { |
202 | if(*value == OPTION_UNSET) { | 203 | if(*value == OPTION_UNSET) { |
203 | *value = opt->def; | 204 | *value = opt->def; |
@@ -266,7 +267,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
266 | } | 267 | } |
267 | 268 | ||
268 | { /* Transmit Descriptor Count */ | 269 | { /* Transmit Descriptor Count */ |
269 | struct ixgb_option opt = { | 270 | const struct ixgb_option opt = { |
270 | .type = range_option, | 271 | .type = range_option, |
271 | .name = "Transmit Descriptors", | 272 | .name = "Transmit Descriptors", |
272 | .err = "using default of " __MODULE_STRING(DEFAULT_TXD), | 273 | .err = "using default of " __MODULE_STRING(DEFAULT_TXD), |
@@ -285,7 +286,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
285 | tx_ring->count = ALIGN(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); | 286 | tx_ring->count = ALIGN(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); |
286 | } | 287 | } |
287 | { /* Receive Descriptor Count */ | 288 | { /* Receive Descriptor Count */ |
288 | struct ixgb_option opt = { | 289 | const struct ixgb_option opt = { |
289 | .type = range_option, | 290 | .type = range_option, |
290 | .name = "Receive Descriptors", | 291 | .name = "Receive Descriptors", |
291 | .err = "using default of " __MODULE_STRING(DEFAULT_RXD), | 292 | .err = "using default of " __MODULE_STRING(DEFAULT_RXD), |
@@ -304,7 +305,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
304 | rx_ring->count = ALIGN(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); | 305 | rx_ring->count = ALIGN(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); |
305 | } | 306 | } |
306 | { /* Receive Checksum Offload Enable */ | 307 | { /* Receive Checksum Offload Enable */ |
307 | struct ixgb_option opt = { | 308 | const struct ixgb_option opt = { |
308 | .type = enable_option, | 309 | .type = enable_option, |
309 | .name = "Receive Checksum Offload", | 310 | .name = "Receive Checksum Offload", |
310 | .err = "defaulting to Enabled", | 311 | .err = "defaulting to Enabled", |
@@ -312,7 +313,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
312 | }; | 313 | }; |
313 | 314 | ||
314 | if(num_XsumRX > bd) { | 315 | if(num_XsumRX > bd) { |
315 | int rx_csum = XsumRX[bd]; | 316 | unsigned int rx_csum = XsumRX[bd]; |
316 | ixgb_validate_option(&rx_csum, &opt); | 317 | ixgb_validate_option(&rx_csum, &opt); |
317 | adapter->rx_csum = rx_csum; | 318 | adapter->rx_csum = rx_csum; |
318 | } else { | 319 | } else { |
@@ -328,7 +329,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
328 | { ixgb_fc_full, "Flow Control Enabled" }, | 329 | { ixgb_fc_full, "Flow Control Enabled" }, |
329 | { ixgb_fc_default, "Flow Control Hardware Default" }}; | 330 | { ixgb_fc_default, "Flow Control Hardware Default" }}; |
330 | 331 | ||
331 | struct ixgb_option opt = { | 332 | const struct ixgb_option opt = { |
332 | .type = list_option, | 333 | .type = list_option, |
333 | .name = "Flow Control", | 334 | .name = "Flow Control", |
334 | .err = "reading default settings from EEPROM", | 335 | .err = "reading default settings from EEPROM", |
@@ -338,7 +339,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
338 | }; | 339 | }; |
339 | 340 | ||
340 | if(num_FlowControl > bd) { | 341 | if(num_FlowControl > bd) { |
341 | int fc = FlowControl[bd]; | 342 | unsigned int fc = FlowControl[bd]; |
342 | ixgb_validate_option(&fc, &opt); | 343 | ixgb_validate_option(&fc, &opt); |
343 | adapter->hw.fc.type = fc; | 344 | adapter->hw.fc.type = fc; |
344 | } else { | 345 | } else { |
@@ -346,7 +347,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
346 | } | 347 | } |
347 | } | 348 | } |
348 | { /* Receive Flow Control High Threshold */ | 349 | { /* Receive Flow Control High Threshold */ |
349 | struct ixgb_option opt = { | 350 | const struct ixgb_option opt = { |
350 | .type = range_option, | 351 | .type = range_option, |
351 | .name = "Rx Flow Control High Threshold", | 352 | .name = "Rx Flow Control High Threshold", |
352 | .err = "using default of " __MODULE_STRING(DEFAULT_FCRTH), | 353 | .err = "using default of " __MODULE_STRING(DEFAULT_FCRTH), |
@@ -366,7 +367,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
366 | "Ignoring RxFCHighThresh when no RxFC\n"); | 367 | "Ignoring RxFCHighThresh when no RxFC\n"); |
367 | } | 368 | } |
368 | { /* Receive Flow Control Low Threshold */ | 369 | { /* Receive Flow Control Low Threshold */ |
369 | struct ixgb_option opt = { | 370 | const struct ixgb_option opt = { |
370 | .type = range_option, | 371 | .type = range_option, |
371 | .name = "Rx Flow Control Low Threshold", | 372 | .name = "Rx Flow Control Low Threshold", |
372 | .err = "using default of " __MODULE_STRING(DEFAULT_FCRTL), | 373 | .err = "using default of " __MODULE_STRING(DEFAULT_FCRTL), |
@@ -386,7 +387,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
386 | "Ignoring RxFCLowThresh when no RxFC\n"); | 387 | "Ignoring RxFCLowThresh when no RxFC\n"); |
387 | } | 388 | } |
388 | { /* Flow Control Pause Time Request*/ | 389 | { /* Flow Control Pause Time Request*/ |
389 | struct ixgb_option opt = { | 390 | const struct ixgb_option opt = { |
390 | .type = range_option, | 391 | .type = range_option, |
391 | .name = "Flow Control Pause Time Request", | 392 | .name = "Flow Control Pause Time Request", |
392 | .err = "using default of "__MODULE_STRING(DEFAULT_FCPAUSE), | 393 | .err = "using default of "__MODULE_STRING(DEFAULT_FCPAUSE), |
@@ -396,7 +397,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
396 | }; | 397 | }; |
397 | 398 | ||
398 | if(num_FCReqTimeout > bd) { | 399 | if(num_FCReqTimeout > bd) { |
399 | int pause_time = FCReqTimeout[bd]; | 400 | unsigned int pause_time = FCReqTimeout[bd]; |
400 | ixgb_validate_option(&pause_time, &opt); | 401 | ixgb_validate_option(&pause_time, &opt); |
401 | adapter->hw.fc.pause_time = pause_time; | 402 | adapter->hw.fc.pause_time = pause_time; |
402 | } else { | 403 | } else { |
@@ -419,7 +420,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
419 | } | 420 | } |
420 | } | 421 | } |
421 | { /* Receive Interrupt Delay */ | 422 | { /* Receive Interrupt Delay */ |
422 | struct ixgb_option opt = { | 423 | const struct ixgb_option opt = { |
423 | .type = range_option, | 424 | .type = range_option, |
424 | .name = "Receive Interrupt Delay", | 425 | .name = "Receive Interrupt Delay", |
425 | .err = "using default of " __MODULE_STRING(DEFAULT_RDTR), | 426 | .err = "using default of " __MODULE_STRING(DEFAULT_RDTR), |
@@ -436,7 +437,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
436 | } | 437 | } |
437 | } | 438 | } |
438 | { /* Transmit Interrupt Delay */ | 439 | { /* Transmit Interrupt Delay */ |
439 | struct ixgb_option opt = { | 440 | const struct ixgb_option opt = { |
440 | .type = range_option, | 441 | .type = range_option, |
441 | .name = "Transmit Interrupt Delay", | 442 | .name = "Transmit Interrupt Delay", |
442 | .err = "using default of " __MODULE_STRING(DEFAULT_TIDV), | 443 | .err = "using default of " __MODULE_STRING(DEFAULT_TIDV), |
@@ -454,7 +455,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
454 | } | 455 | } |
455 | 456 | ||
456 | { /* Transmit Interrupt Delay Enable */ | 457 | { /* Transmit Interrupt Delay Enable */ |
457 | struct ixgb_option opt = { | 458 | const struct ixgb_option opt = { |
458 | .type = enable_option, | 459 | .type = enable_option, |
459 | .name = "Tx Interrupt Delay Enable", | 460 | .name = "Tx Interrupt Delay Enable", |
460 | .err = "defaulting to Enabled", | 461 | .err = "defaulting to Enabled", |
@@ -462,7 +463,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
462 | }; | 463 | }; |
463 | 464 | ||
464 | if(num_IntDelayEnable > bd) { | 465 | if(num_IntDelayEnable > bd) { |
465 | int ide = IntDelayEnable[bd]; | 466 | unsigned int ide = IntDelayEnable[bd]; |
466 | ixgb_validate_option(&ide, &opt); | 467 | ixgb_validate_option(&ide, &opt); |
467 | adapter->tx_int_delay_enable = ide; | 468 | adapter->tx_int_delay_enable = ide; |
468 | } else { | 469 | } else { |
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index c160a7d91e21..bc51432b8d26 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -244,7 +244,7 @@ extern struct ixgbe_info ixgbe_82598EB_info; | |||
244 | extern struct ixgbe_info ixgbe_82598AT_info; | 244 | extern struct ixgbe_info ixgbe_82598AT_info; |
245 | 245 | ||
246 | extern char ixgbe_driver_name[]; | 246 | extern char ixgbe_driver_name[]; |
247 | extern char ixgbe_driver_version[]; | 247 | extern const char ixgbe_driver_version[]; |
248 | 248 | ||
249 | extern int ixgbe_up(struct ixgbe_adapter *adapter); | 249 | extern int ixgbe_up(struct ixgbe_adapter *adapter); |
250 | extern void ixgbe_down(struct ixgbe_adapter *adapter); | 250 | extern void ixgbe_down(struct ixgbe_adapter *adapter); |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 00ee20125ca9..4d64673164ca 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -30,8 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | 32 | ||
33 | #include "ixgbe_type.h" | 33 | #include "ixgbe.h" |
34 | #include "ixgbe_common.h" | ||
35 | #include "ixgbe_phy.h" | 34 | #include "ixgbe_phy.h" |
36 | 35 | ||
37 | #define IXGBE_82598_MAX_TX_QUEUES 32 | 36 | #define IXGBE_82598_MAX_TX_QUEUES 32 |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b75f1c6efc42..00bc525c6560 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -45,12 +45,13 @@ | |||
45 | #include "ixgbe_common.h" | 45 | #include "ixgbe_common.h" |
46 | 46 | ||
47 | char ixgbe_driver_name[] = "ixgbe"; | 47 | char ixgbe_driver_name[] = "ixgbe"; |
48 | static char ixgbe_driver_string[] = | 48 | static const char ixgbe_driver_string[] = |
49 | "Intel(R) 10 Gigabit PCI Express Network Driver"; | 49 | "Intel(R) 10 Gigabit PCI Express Network Driver"; |
50 | 50 | ||
51 | #define DRV_VERSION "1.1.18" | 51 | #define DRV_VERSION "1.1.18" |
52 | char ixgbe_driver_version[] = DRV_VERSION; | 52 | const char ixgbe_driver_version[] = DRV_VERSION; |
53 | static char ixgbe_copyright[] = "Copyright (c) 1999-2007 Intel Corporation."; | 53 | static const char ixgbe_copyright[] = |
54 | "Copyright (c) 1999-2007 Intel Corporation."; | ||
54 | 55 | ||
55 | static const struct ixgbe_info *ixgbe_info_tbl[] = { | 56 | static const struct ixgbe_info *ixgbe_info_tbl[] = { |
56 | [board_82598AF] = &ixgbe_82598AF_info, | 57 | [board_82598AF] = &ixgbe_82598AF_info, |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index a2de32fabc17..2c685734b7a4 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -586,6 +586,10 @@ static const struct usb_device_id products[] = { | |||
586 | USB_DEVICE(0x0a46, 0x0268), /* ShanTou ST268 USB NIC */ | 586 | USB_DEVICE(0x0a46, 0x0268), /* ShanTou ST268 USB NIC */ |
587 | .driver_info = (unsigned long)&dm9601_info, | 587 | .driver_info = (unsigned long)&dm9601_info, |
588 | }, | 588 | }, |
589 | { | ||
590 | USB_DEVICE(0x0a46, 0x8515), /* ADMtek ADM8515 USB NIC */ | ||
591 | .driver_info = (unsigned long)&dm9601_info, | ||
592 | }, | ||
589 | {}, // END | 593 | {}, // END |
590 | }; | 594 | }; |
591 | 595 | ||