aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-05 15:39:21 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:26 -0400
commit43b7c451a03fe5f615710e26e8e2a3dd70eaa5b1 (patch)
treef7bfaca457abdf648f8e01580998d4552d4a6261 /drivers/net
parent309af40b5f4c2065c9a5f74a360ad3d3b0c9c9cd (diff)
s2io: sparse warnings fix (rev2)
Fix warnings from sparse checker about shadowed definition and improperly formatted ethtool_strings. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/s2io.c97
1 files changed, 50 insertions, 47 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 203cc1e87de0..22e4054d4fcb 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -38,7 +38,7 @@
38 * Tx descriptors that can be associated with each corresponding FIFO. 38 * Tx descriptors that can be associated with each corresponding FIFO.
39 * intr_type: This defines the type of interrupt. The values can be 0(INTA), 39 * intr_type: This defines the type of interrupt. The values can be 0(INTA),
40 * 2(MSI_X). Default value is '2(MSI_X)' 40 * 2(MSI_X). Default value is '2(MSI_X)'
41 * lro: Specifies whether to enable Large Receive Offload (LRO) or not. 41 * lro_enable: Specifies whether to enable Large Receive Offload (LRO) or not.
42 * Possible values '1' for enable '0' for disable. Default is '0' 42 * Possible values '1' for enable '0' for disable. Default is '0'
43 * lro_max_pkts: This parameter defines maximum number of packets can be 43 * lro_max_pkts: This parameter defines maximum number of packets can be
44 * aggregated as a single large packet 44 * aggregated as a single large packet
@@ -276,46 +276,46 @@ static char ethtool_driver_stats_keys[][ETH_GSTRING_LEN] = {
276 {"ring_5_full_cnt"}, 276 {"ring_5_full_cnt"},
277 {"ring_6_full_cnt"}, 277 {"ring_6_full_cnt"},
278 {"ring_7_full_cnt"}, 278 {"ring_7_full_cnt"},
279 ("alarm_transceiver_temp_high"), 279 {"alarm_transceiver_temp_high"},
280 ("alarm_transceiver_temp_low"), 280 {"alarm_transceiver_temp_low"},
281 ("alarm_laser_bias_current_high"), 281 {"alarm_laser_bias_current_high"},
282 ("alarm_laser_bias_current_low"), 282 {"alarm_laser_bias_current_low"},
283 ("alarm_laser_output_power_high"), 283 {"alarm_laser_output_power_high"},
284 ("alarm_laser_output_power_low"), 284 {"alarm_laser_output_power_low"},
285 ("warn_transceiver_temp_high"), 285 {"warn_transceiver_temp_high"},
286 ("warn_transceiver_temp_low"), 286 {"warn_transceiver_temp_low"},
287 ("warn_laser_bias_current_high"), 287 {"warn_laser_bias_current_high"},
288 ("warn_laser_bias_current_low"), 288 {"warn_laser_bias_current_low"},
289 ("warn_laser_output_power_high"), 289 {"warn_laser_output_power_high"},
290 ("warn_laser_output_power_low"), 290 {"warn_laser_output_power_low"},
291 ("lro_aggregated_pkts"), 291 {"lro_aggregated_pkts"},
292 ("lro_flush_both_count"), 292 {"lro_flush_both_count"},
293 ("lro_out_of_sequence_pkts"), 293 {"lro_out_of_sequence_pkts"},
294 ("lro_flush_due_to_max_pkts"), 294 {"lro_flush_due_to_max_pkts"},
295 ("lro_avg_aggr_pkts"), 295 {"lro_avg_aggr_pkts"},
296 ("mem_alloc_fail_cnt"), 296 {"mem_alloc_fail_cnt"},
297 ("pci_map_fail_cnt"), 297 {"pci_map_fail_cnt"},
298 ("watchdog_timer_cnt"), 298 {"watchdog_timer_cnt"},
299 ("mem_allocated"), 299 {"mem_allocated"},
300 ("mem_freed"), 300 {"mem_freed"},
301 ("link_up_cnt"), 301 {"link_up_cnt"},
302 ("link_down_cnt"), 302 {"link_down_cnt"},
303 ("link_up_time"), 303 {"link_up_time"},
304 ("link_down_time"), 304 {"link_down_time"},
305 ("tx_tcode_buf_abort_cnt"), 305 {"tx_tcode_buf_abort_cnt"},
306 ("tx_tcode_desc_abort_cnt"), 306 {"tx_tcode_desc_abort_cnt"},
307 ("tx_tcode_parity_err_cnt"), 307 {"tx_tcode_parity_err_cnt"},
308 ("tx_tcode_link_loss_cnt"), 308 {"tx_tcode_link_loss_cnt"},
309 ("tx_tcode_list_proc_err_cnt"), 309 {"tx_tcode_list_proc_err_cnt"},
310 ("rx_tcode_parity_err_cnt"), 310 {"rx_tcode_parity_err_cnt"},
311 ("rx_tcode_abort_cnt"), 311 {"rx_tcode_abort_cnt"},
312 ("rx_tcode_parity_abort_cnt"), 312 {"rx_tcode_parity_abort_cnt"},
313 ("rx_tcode_rda_fail_cnt"), 313 {"rx_tcode_rda_fail_cnt"},
314 ("rx_tcode_unkn_prot_cnt"), 314 {"rx_tcode_unkn_prot_cnt"},
315 ("rx_tcode_fcs_err_cnt"), 315 {"rx_tcode_fcs_err_cnt"},
316 ("rx_tcode_buf_size_err_cnt"), 316 {"rx_tcode_buf_size_err_cnt"},
317 ("rx_tcode_rxd_corrupt_cnt"), 317 {"rx_tcode_rxd_corrupt_cnt"},
318 ("rx_tcode_unkn_err_cnt"), 318 {"rx_tcode_unkn_err_cnt"},
319 {"tda_err_cnt"}, 319 {"tda_err_cnt"},
320 {"pfc_err_cnt"}, 320 {"pfc_err_cnt"},
321 {"pcc_err_cnt"}, 321 {"pcc_err_cnt"},
@@ -468,7 +468,9 @@ S2IO_PARM_INT(rxsync_frequency, 3);
468/* Interrupt type. Values can be 0(INTA), 2(MSI_X) */ 468/* Interrupt type. Values can be 0(INTA), 2(MSI_X) */
469S2IO_PARM_INT(intr_type, 2); 469S2IO_PARM_INT(intr_type, 2);
470/* Large receive offload feature */ 470/* Large receive offload feature */
471S2IO_PARM_INT(lro, 0); 471static unsigned int lro_enable;
472module_param_named(lro, lro_enable, uint, 0);
473
472/* Max pkts to be aggregated by LRO at one time. If not specified, 474/* Max pkts to be aggregated by LRO at one time. If not specified,
473 * aggregation happens until we hit max IP pkt size(64K) 475 * aggregation happens until we hit max IP pkt size(64K)
474 */ 476 */
@@ -1759,7 +1761,7 @@ static void do_s2io_write_bits(u64 value, int flag, void __iomem *addr)
1759 writeq(temp64, addr); 1761 writeq(temp64, addr);
1760} 1762}
1761 1763
1762void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag) 1764static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)
1763{ 1765{
1764 struct XENA_dev_config __iomem *bar0 = nic->bar0; 1766 struct XENA_dev_config __iomem *bar0 = nic->bar0;
1765 register u64 gen_int_mask = 0; 1767 register u64 gen_int_mask = 0;
@@ -4228,7 +4230,7 @@ static void s2io_txpic_intr_handle(struct s2io_nic *sp)
4228 * 1 - if alarm bit set 4230 * 1 - if alarm bit set
4229 * 0 - if alarm bit is not set 4231 * 0 - if alarm bit is not set
4230 */ 4232 */
4231int do_s2io_chk_alarm_bit(u64 value, void __iomem * addr, 4233static int do_s2io_chk_alarm_bit(u64 value, void __iomem * addr,
4232 unsigned long long *cnt) 4234 unsigned long long *cnt)
4233{ 4235{
4234 u64 val64; 4236 u64 val64;
@@ -7135,7 +7137,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
7135 int ret = 0; 7137 int ret = 0;
7136 7138
7137 ret = s2io_club_tcp_session(skb->data, &tcp, 7139 ret = s2io_club_tcp_session(skb->data, &tcp,
7138 &tcp_len, &lro, rxdp, sp); 7140 &tcp_len, &lro,
7141 rxdp, sp);
7139 switch (ret) { 7142 switch (ret) {
7140 case 3: /* Begin anew */ 7143 case 3: /* Begin anew */
7141 lro->parent = skb; 7144 lro->parent = skb;
@@ -7451,7 +7454,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7451 else 7454 else
7452 sp->device_type = XFRAME_I_DEVICE; 7455 sp->device_type = XFRAME_I_DEVICE;
7453 7456
7454 sp->lro = lro; 7457 sp->lro = lro_enable;
7455 7458
7456 /* Initialize some PCI/PCI-X fields of the NIC. */ 7459 /* Initialize some PCI/PCI-X fields of the NIC. */
7457 s2io_init_pci(sp); 7460 s2io_init_pci(sp);
@@ -7798,7 +7801,7 @@ static void __devexit s2io_rem_nic(struct pci_dev *pdev)
7798 * the module loadable parameters and initializes PCI configuration space. 7801 * the module loadable parameters and initializes PCI configuration space.
7799 */ 7802 */
7800 7803
7801int __init s2io_starter(void) 7804static int __init s2io_starter(void)
7802{ 7805{
7803 return pci_register_driver(&s2io_driver); 7806 return pci_register_driver(&s2io_driver);
7804} 7807}