diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-02-12 03:38:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 02:31:58 -0500 |
commit | 356e23850b5ed4471470a918623021765fcaf125 (patch) | |
tree | 35de737e86c377773db50abf4a90a631541eb601 /drivers | |
parent | f53722514242da8346cbed2223bcea9eed744ebd (diff) |
bnx2x: Clean-up
Whitespaces, empty lines, 80 columns, indentations and removing redundant
parenthesis
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x.h | 2 | ||||
-rw-r--r-- | drivers/net/bnx2x_fw_defs.h | 54 | ||||
-rw-r--r-- | drivers/net/bnx2x_hsi.h | 4 | ||||
-rw-r--r-- | drivers/net/bnx2x_link.c | 7 | ||||
-rw-r--r-- | drivers/net/bnx2x_link.h | 3 | ||||
-rw-r--r-- | drivers/net/bnx2x_main.c | 35 |
6 files changed, 52 insertions, 53 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 5eb35a66f23e..408eae7d6cc6 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -906,7 +906,7 @@ struct bnx2x { | |||
906 | u32 lin_cnt; | 906 | u32 lin_cnt; |
907 | 907 | ||
908 | int state; | 908 | int state; |
909 | #define BNX2X_STATE_CLOSED 0x0 | 909 | #define BNX2X_STATE_CLOSED 0 |
910 | #define BNX2X_STATE_OPENING_WAIT4_LOAD 0x1000 | 910 | #define BNX2X_STATE_OPENING_WAIT4_LOAD 0x1000 |
911 | #define BNX2X_STATE_OPENING_WAIT4_PORT 0x2000 | 911 | #define BNX2X_STATE_OPENING_WAIT4_PORT 0x2000 |
912 | #define BNX2X_STATE_OPEN 0x3000 | 912 | #define BNX2X_STATE_OPEN 0x3000 |
diff --git a/drivers/net/bnx2x_fw_defs.h b/drivers/net/bnx2x_fw_defs.h index 0683e542e942..05d695dea61c 100644 --- a/drivers/net/bnx2x_fw_defs.h +++ b/drivers/net/bnx2x_fw_defs.h | |||
@@ -217,14 +217,13 @@ | |||
217 | #define X_ETH_LOCAL_RING_SIZE 13 | 217 | #define X_ETH_LOCAL_RING_SIZE 13 |
218 | #define FIRST_BD_IN_PKT 0 | 218 | #define FIRST_BD_IN_PKT 0 |
219 | #define PARSE_BD_INDEX 1 | 219 | #define PARSE_BD_INDEX 1 |
220 | #define NUM_OF_ETH_BDS_IN_PAGE \ | 220 | #define NUM_OF_ETH_BDS_IN_PAGE ((PAGE_SIZE)/(STRUCT_SIZE(eth_tx_bd)/8)) |
221 | ((PAGE_SIZE) / (STRUCT_SIZE(eth_tx_bd)/8)) | ||
222 | 221 | ||
223 | 222 | ||
224 | /* Rx ring params */ | 223 | /* Rx ring params */ |
225 | #define U_ETH_LOCAL_BD_RING_SIZE (16) | 224 | #define U_ETH_LOCAL_BD_RING_SIZE 16 |
226 | #define U_ETH_LOCAL_SGE_RING_SIZE (12) | 225 | #define U_ETH_LOCAL_SGE_RING_SIZE 12 |
227 | #define U_ETH_SGL_SIZE (8) | 226 | #define U_ETH_SGL_SIZE 8 |
228 | 227 | ||
229 | 228 | ||
230 | #define U_ETH_BDS_PER_PAGE_MASK \ | 229 | #define U_ETH_BDS_PER_PAGE_MASK \ |
@@ -246,15 +245,15 @@ | |||
246 | #define U_ETH_UNDEFINED_Q 0xFF | 245 | #define U_ETH_UNDEFINED_Q 0xFF |
247 | 246 | ||
248 | /* values of command IDs in the ramrod message */ | 247 | /* values of command IDs in the ramrod message */ |
249 | #define RAMROD_CMD_ID_ETH_PORT_SETUP (80) | 248 | #define RAMROD_CMD_ID_ETH_PORT_SETUP 80 |
250 | #define RAMROD_CMD_ID_ETH_CLIENT_SETUP (85) | 249 | #define RAMROD_CMD_ID_ETH_CLIENT_SETUP 85 |
251 | #define RAMROD_CMD_ID_ETH_STAT_QUERY (90) | 250 | #define RAMROD_CMD_ID_ETH_STAT_QUERY 90 |
252 | #define RAMROD_CMD_ID_ETH_UPDATE (100) | 251 | #define RAMROD_CMD_ID_ETH_UPDATE 100 |
253 | #define RAMROD_CMD_ID_ETH_HALT (105) | 252 | #define RAMROD_CMD_ID_ETH_HALT 105 |
254 | #define RAMROD_CMD_ID_ETH_SET_MAC (110) | 253 | #define RAMROD_CMD_ID_ETH_SET_MAC 110 |
255 | #define RAMROD_CMD_ID_ETH_CFC_DEL (115) | 254 | #define RAMROD_CMD_ID_ETH_CFC_DEL 115 |
256 | #define RAMROD_CMD_ID_ETH_PORT_DEL (120) | 255 | #define RAMROD_CMD_ID_ETH_PORT_DEL 120 |
257 | #define RAMROD_CMD_ID_ETH_FORWARD_SETUP (125) | 256 | #define RAMROD_CMD_ID_ETH_FORWARD_SETUP 125 |
258 | 257 | ||
259 | 258 | ||
260 | /* command values for set mac command */ | 259 | /* command values for set mac command */ |
@@ -271,8 +270,8 @@ | |||
271 | #define ETH_MAX_RX_CLIENTS_E1H 25 | 270 | #define ETH_MAX_RX_CLIENTS_E1H 25 |
272 | 271 | ||
273 | /* Maximal aggregation queues supported */ | 272 | /* Maximal aggregation queues supported */ |
274 | #define ETH_MAX_AGGREGATION_QUEUES_E1 (32) | 273 | #define ETH_MAX_AGGREGATION_QUEUES_E1 32 |
275 | #define ETH_MAX_AGGREGATION_QUEUES_E1H (64) | 274 | #define ETH_MAX_AGGREGATION_QUEUES_E1H 64 |
276 | 275 | ||
277 | /* ETH RSS modes */ | 276 | /* ETH RSS modes */ |
278 | #define ETH_RSS_MODE_DISABLED 0 | 277 | #define ETH_RSS_MODE_DISABLED 0 |
@@ -301,7 +300,7 @@ | |||
301 | #define RDMA_STATE (RDMA_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) | 300 | #define RDMA_STATE (RDMA_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) |
302 | 301 | ||
303 | /* microcode fixed page page size 4K (chains and ring segments) */ | 302 | /* microcode fixed page page size 4K (chains and ring segments) */ |
304 | #define MC_PAGE_SIZE (4096) | 303 | #define MC_PAGE_SIZE 4096 |
305 | 304 | ||
306 | 305 | ||
307 | /* Host coalescing constants */ | 306 | /* Host coalescing constants */ |
@@ -348,16 +347,16 @@ | |||
348 | #define ATTENTION_ID 4 | 347 | #define ATTENTION_ID 4 |
349 | 348 | ||
350 | /* max number of slow path commands per port */ | 349 | /* max number of slow path commands per port */ |
351 | #define MAX_RAMRODS_PER_PORT (8) | 350 | #define MAX_RAMRODS_PER_PORT 8 |
352 | 351 | ||
353 | /* values for RX ETH CQE type field */ | 352 | /* values for RX ETH CQE type field */ |
354 | #define RX_ETH_CQE_TYPE_ETH_FASTPATH (0) | 353 | #define RX_ETH_CQE_TYPE_ETH_FASTPATH 0 |
355 | #define RX_ETH_CQE_TYPE_ETH_RAMROD (1) | 354 | #define RX_ETH_CQE_TYPE_ETH_RAMROD 1 |
356 | 355 | ||
357 | 356 | ||
358 | /**** DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ | 357 | /**** DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ |
359 | #define EMULATION_FREQUENCY_FACTOR (1600) | 358 | #define EMULATION_FREQUENCY_FACTOR 1600 |
360 | #define FPGA_FREQUENCY_FACTOR (100) | 359 | #define FPGA_FREQUENCY_FACTOR 100 |
361 | 360 | ||
362 | #define TIMERS_TICK_SIZE_CHIP (1e-3) | 361 | #define TIMERS_TICK_SIZE_CHIP (1e-3) |
363 | #define TIMERS_TICK_SIZE_EMUL \ | 362 | #define TIMERS_TICK_SIZE_EMUL \ |
@@ -371,12 +370,9 @@ | |||
371 | #define TSEMI_CLK1_RESUL_FPGA \ | 370 | #define TSEMI_CLK1_RESUL_FPGA \ |
372 | ((TSEMI_CLK1_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) | 371 | ((TSEMI_CLK1_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) |
373 | 372 | ||
374 | #define USEMI_CLK1_RESUL_CHIP \ | 373 | #define USEMI_CLK1_RESUL_CHIP (TIMERS_TICK_SIZE_CHIP) |
375 | (TIMERS_TICK_SIZE_CHIP) | 374 | #define USEMI_CLK1_RESUL_EMUL (TIMERS_TICK_SIZE_EMUL) |
376 | #define USEMI_CLK1_RESUL_EMUL \ | 375 | #define USEMI_CLK1_RESUL_FPGA (TIMERS_TICK_SIZE_FPGA) |
377 | (TIMERS_TICK_SIZE_EMUL) | ||
378 | #define USEMI_CLK1_RESUL_FPGA \ | ||
379 | (TIMERS_TICK_SIZE_FPGA) | ||
380 | 376 | ||
381 | #define XSEMI_CLK1_RESUL_CHIP (1e-3) | 377 | #define XSEMI_CLK1_RESUL_CHIP (1e-3) |
382 | #define XSEMI_CLK1_RESUL_EMUL \ | 378 | #define XSEMI_CLK1_RESUL_EMUL \ |
@@ -401,7 +397,7 @@ | |||
401 | #define XSTORM_IP_ID_ROLL_HALF 0x8000 | 397 | #define XSTORM_IP_ID_ROLL_HALF 0x8000 |
402 | #define XSTORM_IP_ID_ROLL_ALL 0 | 398 | #define XSTORM_IP_ID_ROLL_ALL 0 |
403 | 399 | ||
404 | #define FW_LOG_LIST_SIZE (50) | 400 | #define FW_LOG_LIST_SIZE 50 |
405 | 401 | ||
406 | #define NUM_OF_PROTOCOLS 4 | 402 | #define NUM_OF_PROTOCOLS 4 |
407 | #define NUM_OF_SAFC_BITS 16 | 403 | #define NUM_OF_SAFC_BITS 16 |
diff --git a/drivers/net/bnx2x_hsi.h b/drivers/net/bnx2x_hsi.h index 966b4a2de962..c1ba05cbb33c 100644 --- a/drivers/net/bnx2x_hsi.h +++ b/drivers/net/bnx2x_hsi.h | |||
@@ -806,11 +806,7 @@ struct mf_cfg { | |||
806 | 806 | ||
807 | struct shared_mf_cfg shared_mf_config; | 807 | struct shared_mf_cfg shared_mf_config; |
808 | struct port_mf_cfg port_mf_config[PORT_MAX]; | 808 | struct port_mf_cfg port_mf_config[PORT_MAX]; |
809 | #if defined(b710) | ||
810 | struct func_mf_cfg func_mf_config[E1_FUNC_MAX]; | ||
811 | #else | ||
812 | struct func_mf_cfg func_mf_config[E1H_FUNC_MAX]; | 809 | struct func_mf_cfg func_mf_config[E1H_FUNC_MAX]; |
813 | #endif | ||
814 | 810 | ||
815 | }; | 811 | }; |
816 | 812 | ||
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index e1a4e39fc0e3..73b52f17ea84 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c | |||
@@ -1923,9 +1923,6 @@ static void bnx2x_ext_phy_reset(struct link_params *params, | |||
1923 | break; | 1923 | break; |
1924 | case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073: | 1924 | case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073: |
1925 | { | 1925 | { |
1926 | u16 emac_base; | ||
1927 | emac_base = (params->port) ? GRCBASE_EMAC0 : | ||
1928 | GRCBASE_EMAC1; | ||
1929 | 1926 | ||
1930 | /* Restore normal power mode*/ | 1927 | /* Restore normal power mode*/ |
1931 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, | 1928 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, |
@@ -3806,7 +3803,7 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, | |||
3806 | "an_link_status=0x%x\n", | 3803 | "an_link_status=0x%x\n", |
3807 | val2, val1, an1000_status); | 3804 | val2, val1, an1000_status); |
3808 | 3805 | ||
3809 | ext_phy_link_up = (((val1 & 4) == 4) || | 3806 | ext_phy_link_up = (((val1 & 4) == 4) || |
3810 | (an1000_status & (1<<1))); | 3807 | (an1000_status & (1<<1))); |
3811 | if (ext_phy_link_up && | 3808 | if (ext_phy_link_up && |
3812 | bnx2x_8073_is_snr_needed(params)) { | 3809 | bnx2x_8073_is_snr_needed(params)) { |
@@ -4188,7 +4185,7 @@ static void bnx2x_turn_on_ef(struct bnx2x *bp, u8 port, u8 ext_phy_addr, | |||
4188 | ext_phy_addr, | 4185 | ext_phy_addr, |
4189 | MDIO_PMA_DEVAD, | 4186 | MDIO_PMA_DEVAD, |
4190 | MDIO_PMA_REG_CTRL, | 4187 | MDIO_PMA_REG_CTRL, |
4191 | &ctrl); | 4188 | &ctrl); |
4192 | if (!(ctrl & (1<<15))) { | 4189 | if (!(ctrl & (1<<15))) { |
4193 | DP(NETIF_MSG_LINK, "Reset completed\n\n"); | 4190 | DP(NETIF_MSG_LINK, "Reset completed\n\n"); |
4194 | break; | 4191 | break; |
diff --git a/drivers/net/bnx2x_link.h b/drivers/net/bnx2x_link.h index 38254d084b67..027116a73849 100644 --- a/drivers/net/bnx2x_link.h +++ b/drivers/net/bnx2x_link.h | |||
@@ -66,8 +66,6 @@ struct link_params { | |||
66 | /* Device parameters */ | 66 | /* Device parameters */ |
67 | u8 mac_addr[6]; | 67 | u8 mac_addr[6]; |
68 | 68 | ||
69 | |||
70 | |||
71 | /* shmem parameters */ | 69 | /* shmem parameters */ |
72 | u32 shmem_base; | 70 | u32 shmem_base; |
73 | u32 speed_cap_mask; | 71 | u32 speed_cap_mask; |
@@ -182,4 +180,5 @@ u8 bnx2x_test_link(struct link_params *input, struct link_vars *vars); | |||
182 | /* One-time initialization for external phy after power up */ | 180 | /* One-time initialization for external phy after power up */ |
183 | u8 bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base); | 181 | u8 bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base); |
184 | 182 | ||
183 | |||
185 | #endif /* BNX2X_LINK_H */ | 184 | #endif /* BNX2X_LINK_H */ |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index ae36bc7b0276..4b0476c50859 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -679,6 +679,7 @@ static void bnx2x_int_disable(struct bnx2x *bp) | |||
679 | REG_WR(bp, addr, val); | 679 | REG_WR(bp, addr, val); |
680 | if (REG_RD(bp, addr) != val) | 680 | if (REG_RD(bp, addr) != val) |
681 | BNX2X_ERR("BUG! proper val not read from IGU!\n"); | 681 | BNX2X_ERR("BUG! proper val not read from IGU!\n"); |
682 | |||
682 | } | 683 | } |
683 | 684 | ||
684 | static void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw) | 685 | static void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw) |
@@ -780,7 +781,6 @@ static inline int bnx2x_has_tx_work_unload(struct bnx2x_fastpath *fp) | |||
780 | /* Tell compiler that consumer and producer can change */ | 781 | /* Tell compiler that consumer and producer can change */ |
781 | barrier(); | 782 | barrier(); |
782 | return (fp->tx_pkt_prod != fp->tx_pkt_cons); | 783 | return (fp->tx_pkt_prod != fp->tx_pkt_cons); |
783 | |||
784 | } | 784 | } |
785 | 785 | ||
786 | /* free skb in the packet ring at pos idx | 786 | /* free skb in the packet ring at pos idx |
@@ -2036,13 +2036,16 @@ static void bnx2x_calc_fc_adv(struct bnx2x *bp) | |||
2036 | bp->port.advertising &= ~(ADVERTISED_Asym_Pause | | 2036 | bp->port.advertising &= ~(ADVERTISED_Asym_Pause | |
2037 | ADVERTISED_Pause); | 2037 | ADVERTISED_Pause); |
2038 | break; | 2038 | break; |
2039 | |||
2039 | case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH: | 2040 | case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_BOTH: |
2040 | bp->port.advertising |= (ADVERTISED_Asym_Pause | | 2041 | bp->port.advertising |= (ADVERTISED_Asym_Pause | |
2041 | ADVERTISED_Pause); | 2042 | ADVERTISED_Pause); |
2042 | break; | 2043 | break; |
2044 | |||
2043 | case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC: | 2045 | case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_ASYMMETRIC: |
2044 | bp->port.advertising |= ADVERTISED_Asym_Pause; | 2046 | bp->port.advertising |= ADVERTISED_Asym_Pause; |
2045 | break; | 2047 | break; |
2048 | |||
2046 | default: | 2049 | default: |
2047 | bp->port.advertising &= ~(ADVERTISED_Asym_Pause | | 2050 | bp->port.advertising &= ~(ADVERTISED_Asym_Pause | |
2048 | ADVERTISED_Pause); | 2051 | ADVERTISED_Pause); |
@@ -2067,7 +2070,8 @@ static void bnx2x_link_report(struct bnx2x *bp) | |||
2067 | if (bp->link_vars.flow_ctrl != BNX2X_FLOW_CTRL_NONE) { | 2070 | if (bp->link_vars.flow_ctrl != BNX2X_FLOW_CTRL_NONE) { |
2068 | if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) { | 2071 | if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) { |
2069 | printk(", receive "); | 2072 | printk(", receive "); |
2070 | if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) | 2073 | if (bp->link_vars.flow_ctrl & |
2074 | BNX2X_FLOW_CTRL_TX) | ||
2071 | printk("& transmit "); | 2075 | printk("& transmit "); |
2072 | } else { | 2076 | } else { |
2073 | printk(", transmit "); | 2077 | printk(", transmit "); |
@@ -4454,8 +4458,7 @@ static inline void bnx2x_free_tpa_pool(struct bnx2x *bp, | |||
4454 | if (fp->tpa_state[i] == BNX2X_TPA_START) | 4458 | if (fp->tpa_state[i] == BNX2X_TPA_START) |
4455 | pci_unmap_single(bp->pdev, | 4459 | pci_unmap_single(bp->pdev, |
4456 | pci_unmap_addr(rx_buf, mapping), | 4460 | pci_unmap_addr(rx_buf, mapping), |
4457 | bp->rx_buf_size, | 4461 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
4458 | PCI_DMA_FROMDEVICE); | ||
4459 | 4462 | ||
4460 | dev_kfree_skb(skb); | 4463 | dev_kfree_skb(skb); |
4461 | rx_buf->skb = NULL; | 4464 | rx_buf->skb = NULL; |
@@ -4800,18 +4803,22 @@ static void bnx2x_set_storm_rx_mode(struct bnx2x *bp) | |||
4800 | tstorm_mac_filter.mcast_drop_all = mask; | 4803 | tstorm_mac_filter.mcast_drop_all = mask; |
4801 | tstorm_mac_filter.bcast_drop_all = mask; | 4804 | tstorm_mac_filter.bcast_drop_all = mask; |
4802 | break; | 4805 | break; |
4806 | |||
4803 | case BNX2X_RX_MODE_NORMAL: | 4807 | case BNX2X_RX_MODE_NORMAL: |
4804 | tstorm_mac_filter.bcast_accept_all = mask; | 4808 | tstorm_mac_filter.bcast_accept_all = mask; |
4805 | break; | 4809 | break; |
4810 | |||
4806 | case BNX2X_RX_MODE_ALLMULTI: | 4811 | case BNX2X_RX_MODE_ALLMULTI: |
4807 | tstorm_mac_filter.mcast_accept_all = mask; | 4812 | tstorm_mac_filter.mcast_accept_all = mask; |
4808 | tstorm_mac_filter.bcast_accept_all = mask; | 4813 | tstorm_mac_filter.bcast_accept_all = mask; |
4809 | break; | 4814 | break; |
4815 | |||
4810 | case BNX2X_RX_MODE_PROMISC: | 4816 | case BNX2X_RX_MODE_PROMISC: |
4811 | tstorm_mac_filter.ucast_accept_all = mask; | 4817 | tstorm_mac_filter.ucast_accept_all = mask; |
4812 | tstorm_mac_filter.mcast_accept_all = mask; | 4818 | tstorm_mac_filter.mcast_accept_all = mask; |
4813 | tstorm_mac_filter.bcast_accept_all = mask; | 4819 | tstorm_mac_filter.bcast_accept_all = mask; |
4814 | break; | 4820 | break; |
4821 | |||
4815 | default: | 4822 | default: |
4816 | BNX2X_ERR("BAD rx mode (%d)\n", mode); | 4823 | BNX2X_ERR("BAD rx mode (%d)\n", mode); |
4817 | break; | 4824 | break; |
@@ -5857,6 +5864,7 @@ static int bnx2x_init_port(struct bnx2x *bp) | |||
5857 | /* Port CSDM comes here */ | 5864 | /* Port CSDM comes here */ |
5858 | /* Port USDM comes here */ | 5865 | /* Port USDM comes here */ |
5859 | /* Port XSDM comes here */ | 5866 | /* Port XSDM comes here */ |
5867 | |||
5860 | bnx2x_init_block(bp, port ? TSEM_PORT1_START : TSEM_PORT0_START, | 5868 | bnx2x_init_block(bp, port ? TSEM_PORT1_START : TSEM_PORT0_START, |
5861 | port ? TSEM_PORT1_END : TSEM_PORT0_END); | 5869 | port ? TSEM_PORT1_END : TSEM_PORT0_END); |
5862 | bnx2x_init_block(bp, port ? USEM_PORT1_START : USEM_PORT0_START, | 5870 | bnx2x_init_block(bp, port ? USEM_PORT1_START : USEM_PORT0_START, |
@@ -5865,6 +5873,7 @@ static int bnx2x_init_port(struct bnx2x *bp) | |||
5865 | port ? CSEM_PORT1_END : CSEM_PORT0_END); | 5873 | port ? CSEM_PORT1_END : CSEM_PORT0_END); |
5866 | bnx2x_init_block(bp, port ? XSEM_PORT1_START : XSEM_PORT0_START, | 5874 | bnx2x_init_block(bp, port ? XSEM_PORT1_START : XSEM_PORT0_START, |
5867 | port ? XSEM_PORT1_END : XSEM_PORT0_END); | 5875 | port ? XSEM_PORT1_END : XSEM_PORT0_END); |
5876 | |||
5868 | /* Port UPB comes here */ | 5877 | /* Port UPB comes here */ |
5869 | /* Port XPB comes here */ | 5878 | /* Port XPB comes here */ |
5870 | 5879 | ||
@@ -5923,6 +5932,7 @@ static int bnx2x_init_port(struct bnx2x *bp) | |||
5923 | /* Port EMAC1 comes here */ | 5932 | /* Port EMAC1 comes here */ |
5924 | /* Port DBU comes here */ | 5933 | /* Port DBU comes here */ |
5925 | /* Port DBG comes here */ | 5934 | /* Port DBG comes here */ |
5935 | |||
5926 | bnx2x_init_block(bp, port ? NIG_PORT1_START : NIG_PORT0_START, | 5936 | bnx2x_init_block(bp, port ? NIG_PORT1_START : NIG_PORT0_START, |
5927 | port ? NIG_PORT1_END : NIG_PORT0_END); | 5937 | port ? NIG_PORT1_END : NIG_PORT0_END); |
5928 | 5938 | ||
@@ -6404,8 +6414,7 @@ static void bnx2x_free_rx_skbs(struct bnx2x *bp) | |||
6404 | 6414 | ||
6405 | pci_unmap_single(bp->pdev, | 6415 | pci_unmap_single(bp->pdev, |
6406 | pci_unmap_addr(rx_buf, mapping), | 6416 | pci_unmap_addr(rx_buf, mapping), |
6407 | bp->rx_buf_size, | 6417 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
6408 | PCI_DMA_FROMDEVICE); | ||
6409 | 6418 | ||
6410 | rx_buf->skb = NULL; | 6419 | rx_buf->skb = NULL; |
6411 | dev_kfree_skb(skb); | 6420 | dev_kfree_skb(skb); |
@@ -7325,6 +7334,7 @@ unload_error: | |||
7325 | /* Report UNLOAD_DONE to MCP */ | 7334 | /* Report UNLOAD_DONE to MCP */ |
7326 | if (!BP_NOMCP(bp)) | 7335 | if (!BP_NOMCP(bp)) |
7327 | bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE); | 7336 | bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE); |
7337 | |||
7328 | bp->port.pmf = 0; | 7338 | bp->port.pmf = 0; |
7329 | 7339 | ||
7330 | /* Free SKBs, SGEs, TPA pool and driver internals */ | 7340 | /* Free SKBs, SGEs, TPA pool and driver internals */ |
@@ -9035,7 +9045,8 @@ static void bnx2x_get_pauseparam(struct net_device *dev, | |||
9035 | { | 9045 | { |
9036 | struct bnx2x *bp = netdev_priv(dev); | 9046 | struct bnx2x *bp = netdev_priv(dev); |
9037 | 9047 | ||
9038 | epause->autoneg = (bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && | 9048 | epause->autoneg = (bp->link_params.req_flow_ctrl == |
9049 | BNX2X_FLOW_CTRL_AUTO) && | ||
9039 | (bp->link_params.req_line_speed == SPEED_AUTO_NEG); | 9050 | (bp->link_params.req_line_speed == SPEED_AUTO_NEG); |
9040 | 9051 | ||
9041 | epause->rx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) == | 9052 | epause->rx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) == |
@@ -10059,6 +10070,7 @@ static int bnx2x_poll(struct napi_struct *napi, int budget) | |||
10059 | 10070 | ||
10060 | if (bnx2x_has_rx_work(fp)) | 10071 | if (bnx2x_has_rx_work(fp)) |
10061 | work_done = bnx2x_rx_int(fp, budget); | 10072 | work_done = bnx2x_rx_int(fp, budget); |
10073 | |||
10062 | rmb(); /* BNX2X_HAS_WORK() reads the status block */ | 10074 | rmb(); /* BNX2X_HAS_WORK() reads the status block */ |
10063 | 10075 | ||
10064 | /* must not complete if we consumed full budget */ | 10076 | /* must not complete if we consumed full budget */ |
@@ -10074,6 +10086,7 @@ poll_panic: | |||
10074 | bnx2x_ack_sb(bp, fp->sb_id, CSTORM_ID, | 10086 | bnx2x_ack_sb(bp, fp->sb_id, CSTORM_ID, |
10075 | le16_to_cpu(fp->fp_c_idx), IGU_INT_ENABLE, 1); | 10087 | le16_to_cpu(fp->fp_c_idx), IGU_INT_ENABLE, 1); |
10076 | } | 10088 | } |
10089 | |||
10077 | return work_done; | 10090 | return work_done; |
10078 | } | 10091 | } |
10079 | 10092 | ||
@@ -10232,7 +10245,6 @@ static int bnx2x_pkt_req_lin(struct bnx2x *bp, struct sk_buff *skb, | |||
10232 | wnd_sum -= | 10245 | wnd_sum -= |
10233 | skb_shinfo(skb)->frags[wnd_idx].size; | 10246 | skb_shinfo(skb)->frags[wnd_idx].size; |
10234 | } | 10247 | } |
10235 | |||
10236 | } else { | 10248 | } else { |
10237 | /* in non-LSO too fragmented packet should always | 10249 | /* in non-LSO too fragmented packet should always |
10238 | be linearized */ | 10250 | be linearized */ |
@@ -10824,7 +10836,7 @@ static const struct net_device_ops bnx2x_netdev_ops = { | |||
10824 | .ndo_open = bnx2x_open, | 10836 | .ndo_open = bnx2x_open, |
10825 | .ndo_stop = bnx2x_close, | 10837 | .ndo_stop = bnx2x_close, |
10826 | .ndo_start_xmit = bnx2x_start_xmit, | 10838 | .ndo_start_xmit = bnx2x_start_xmit, |
10827 | .ndo_set_multicast_list = bnx2x_set_rx_mode, | 10839 | .ndo_set_multicast_list = bnx2x_set_rx_mode, |
10828 | .ndo_set_mac_address = bnx2x_change_mac_addr, | 10840 | .ndo_set_mac_address = bnx2x_change_mac_addr, |
10829 | .ndo_validate_addr = eth_validate_addr, | 10841 | .ndo_validate_addr = eth_validate_addr, |
10830 | .ndo_do_ioctl = bnx2x_ioctl, | 10842 | .ndo_do_ioctl = bnx2x_ioctl, |
@@ -10838,7 +10850,6 @@ static const struct net_device_ops bnx2x_netdev_ops = { | |||
10838 | #endif | 10850 | #endif |
10839 | }; | 10851 | }; |
10840 | 10852 | ||
10841 | |||
10842 | static int __devinit bnx2x_init_dev(struct pci_dev *pdev, | 10853 | static int __devinit bnx2x_init_dev(struct pci_dev *pdev, |
10843 | struct net_device *dev) | 10854 | struct net_device *dev) |
10844 | { | 10855 | { |
@@ -11317,8 +11328,8 @@ static void bnx2x_io_resume(struct pci_dev *pdev) | |||
11317 | 11328 | ||
11318 | static struct pci_error_handlers bnx2x_err_handler = { | 11329 | static struct pci_error_handlers bnx2x_err_handler = { |
11319 | .error_detected = bnx2x_io_error_detected, | 11330 | .error_detected = bnx2x_io_error_detected, |
11320 | .slot_reset = bnx2x_io_slot_reset, | 11331 | .slot_reset = bnx2x_io_slot_reset, |
11321 | .resume = bnx2x_io_resume, | 11332 | .resume = bnx2x_io_resume, |
11322 | }; | 11333 | }; |
11323 | 11334 | ||
11324 | static struct pci_driver bnx2x_pci_driver = { | 11335 | static struct pci_driver bnx2x_pci_driver = { |