linux-2.6
15 years agonetfilter: change generic l4 protocol number
Christoph Paasch [Wed, 18 Feb 2009 15:28:35 +0000 (16:28 +0100)] 
netfilter: change generic l4 protocol number

0 is used by Hop-by-hop header and so this may cause confusion.
255 is stated as 'Reserved' by IANA.

Signed-off-by: Christoph Paasch <christoph.paasch@student.uclouvain.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
15 years agodrivers/net/tokenring: fix sparse warning: cast truncates bits from const value
Hannes Eder [Sun, 15 Feb 2009 02:13:01 +0000 (02:13 +0000)] 
drivers/net/tokenring: fix sparse warning: cast truncates bits from const value

Impact: Remove the write-only field 'current_ring_status' completely.

Fix this sparse warnings:
  drivers/net/tokenring/smctr.c:4410:52: warning: cast truncates bits from constant value (100 becomes 0)
  drivers/net/tokenring/smctr.c:4415:52: warning: cast truncates bits from constant value (400 becomes 0)
  drivers/net/tokenring/smctr.c:4420:52: warning: cast truncates bits from constant value (800 becomes 0)
  drivers/net/tokenring/smctr.c:4425:52: warning: cast truncates bits from constant value (1000 becomes 0)
  drivers/net/tokenring/smctr.c:4430:52: warning: cast truncates bits from constant value (2000 becomes 0)
  drivers/net/tokenring/smctr.c:4435:52: warning: cast truncates bits from constant value (4000 becomes 0)
  drivers/net/tokenring/smctr.c:4440:52: warning: cast truncates bits from constant value (8000 becomes 0)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless/prism54: fix sparse warning: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:50:45 +0000 (11:50 +0000)] 
drivers/net/wireless/prism54: fix sparse warning: fix signedness

Fix sparse warning:
  drivers/net/wireless/prism54/isl_ioctl.c:2997:32: warning: incorrect type in argument 2 (different signedness)
  drivers/net/wireless/prism54/oid_mgt.c:712:42: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless/ipw2x00: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:50:26 +0000 (11:50 +0000)] 
drivers/net/wireless/ipw2x00: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/wireless/ipw2x00/ipw2100.c:1930:43: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:1938:76: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:1946:67: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:1953:72: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:4071:73: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:4078:43: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:4084:67: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:7141:73: warning: incorrect type in argument 4 (different signedness)
  drivers/net/wireless/ipw2x00/ipw2100.c:8317:48: warning: incorrect type in argument 4 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless/b43: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:50:06 +0000 (11:50 +0000)] 
drivers/net/wireless/b43: fix warning: format not a string literal and no ...

Fix this compilation warning:
  drivers/net/wireless/b43/main.c: In function 'b43_print_fw_helptext':
  drivers/net/wireless/b43/main.c:1971: warning: format not a string literal and no format arguments
  drivers/net/wireless/b43/main.c:1973: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless/ath9k: fix sparse warnings: Should it be static?
Hannes Eder [Sat, 14 Feb 2009 11:49:48 +0000 (11:49 +0000)] 
drivers/net/wireless/ath9k: fix sparse warnings: Should it be static?

Impact: Make symbols static.

Fix this sparse warnings:
  drivers/net/wireless/ath9k/eeprom.c:1343:5: warning: symbol 'ath9k_hw_4k_get_spur_channel' was not declared. Should it be static?
  drivers/net/wireless/ath9k/eeprom.c:1372:19: warning: symbol 'eep_4k_ops' was not declared. Should it be static?
  drivers/net/wireless/ath9k/eeprom.c:2649:5: warning: symbol 'ath9k_hw_def_get_spur_channel' was not declared. Should it be static?
  drivers/net/wireless/ath9k/eeprom.c:2678:19: warning: symbol 'eep_def_ops' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:49:26 +0000 (11:49 +0000)] 
drivers/net/wireless: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/wireless/airo.c:2102:21: warning: incorrect type in initializer (different signedness)
  drivers/net/wireless/airo.c:2126:21: warning: incorrect type in initializer (different signedness)
  drivers/net/wireless/airo.c:2167:21: warning: incorrect type in initializer (different signedness)
  drivers/net/wireless/airo.c:2191:21: warning: incorrect type in initializer (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless: fix sparse warnings: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:49:09 +0000 (11:49 +0000)] 
drivers/net/wireless: fix sparse warnings: symbol shadows an earlier one

Impact:
  Move variable closer to usage resp.
  remove redundant variables resp.
  rename function scope variable.

Fix this sparse warnings:
  drivers/net/wireless/airo.c:3840:29: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/airo.c:3847:29: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/airo.c:3861:21: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/wavelan.c:43:13: warning: symbol 'irq' shadows an earlier one
  drivers/net/wireless/wavelan.p.h:692:17: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless: fix sparse warning: context imbalance
Hannes Eder [Sat, 14 Feb 2009 11:48:44 +0000 (11:48 +0000)] 
drivers/net/wireless: fix sparse warning: context imbalance

Impact: Attribute function with __acquires(...) resp. __releases(...).

Fix this sparse warnings:
  drivers/net/wireless/strip.c:955:21: warning: context imbalance in 'strip_seq_start' - wrong count at exit
  drivers/net/wireless/strip.c:975:13: warning: context imbalance in 'strip_seq_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wan: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:48:25 +0000 (11:48 +0000)] 
drivers/net/wan: fix sparse warning: symbol shadows an earlier one

Impact: Rename function scope variable and while being at it fix some
coding style issues.

Fix this sparse warning:
  drivers/net/wan/sbni.c:1526:14: warning: symbol 'num' shadows an earlier one
  drivers/net/wan/sbni.c:160:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wan: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:48:07 +0000 (11:48 +0000)] 
drivers/net/wan: fix warning: format not a string literal and no ...

Impact: Use 'static const char[]' instead of 'static char[]'.

Fix this compilation warnings:
  drivers/net/wan/lapbether.c: In function 'lapbeth_init_driver':
  drivers/net/wan/lapbether.c:441: warning: format not a string literal and no format arguments
  drivers/net/wan/z85230.c: In function 'z85230_init_driver':
  drivers/net/wan/z85230.c:1782: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/usb: fix sparse warnings: Should it be static?
Hannes Eder [Sat, 14 Feb 2009 11:47:47 +0000 (11:47 +0000)] 
drivers/net/usb: fix sparse warnings: Should it be static?

Impact: Make symbols static.

Fix this sparse warnings:
  drivers/net/usb/hso.c:1249:6: warning: symbol 'hso_unthrottle_tasklet' was not declared. Should it be static?
  drivers/net/usb/hso.c:1268:6: warning: symbol 'hso_unthrottle_workfunc' was not declared. Should it be static?
  drivers/net/usb/hso.c:1466:5: warning: symbol 'tiocmget_submit_urb' was not declared. Should it be static?
  drivers/net/usb/smsc95xx.c:62:5: warning: symbol 'turbo_mode' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/tulip: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:47:30 +0000 (11:47 +0000)] 
drivers/net/tulip: fix sparse warning: symbol shadows an earlier one

Impact: Rename a local variable resp. remove a redundant variable and
while being at it use more unform loop constructs.

Fix this sparse warning:
  drivers/net/tulip/de4x5.c:3944:13: warning: symbol 'i' shadows an earlier one
  drivers/net/tulip/de4x5.c:3938:9: originally declared here
  drivers/net/tulip/media.c:72:21: warning: symbol 'i' shadows an earlier one
  drivers/net/tulip/media.c:54:13: originally declared here
  drivers/net/tulip/media.c:134:21: warning: symbol 'i' shadows an earlier one
  drivers/net/tulip/media.c:117:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/tulip: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:46:59 +0000 (11:46 +0000)] 
drivers/net/tulip: fix warning: format not a string literal and no ...

Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it add a KERN_INFO prefix.

Fix this warning:
  drivers/net/tulip/de4x5.c: In function 'de4x5_hw_init':
  drivers/net/tulip/de4x5.c:1268: warning: format not a string literal and no format arguments
  drivers/net/tulip/winbond-840.c: In function 'w840_init':
  drivers/net/tulip/winbond-840.c:1666: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/tokenring: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:44:44 +0000 (11:44 +0000)] 
drivers/net/tokenring: fix sparse warning: symbol shadows an earlier one

Impact: Remove redundant variables.

Fix this sparse warnings:
  drivers/net/tokenring/lanstreamer.c:619:21: warning: symbol 'i' shadows an earlier one
  drivers/net/tokenring/lanstreamer.c:589:13: originally declared here
  drivers/net/tokenring/madgemc.c:695:34: warning: symbol 'tp' shadows an earlier one
  drivers/net/tokenring/madgemc.c:689:26: originally declared here
  drivers/net/tokenring/olympic.c:702:21: warning: symbol 'i' shadows an earlier one
  drivers/net/tokenring/olympic.c:440:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/tokenring: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:44:19 +0000 (11:44 +0000)] 
drivers/net/tokenring: fix warning: format not a string literal and no ...

Impact: Use 'static const char[]' instead of 'static char[]'.

Fix this warnings:
  drivers/net/tokenring/smctr.c:3644: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/skfp: fix sparse warning: Should it be static?
Hannes Eder [Sat, 14 Feb 2009 11:43:15 +0000 (11:43 +0000)] 
drivers/net/skfp: fix sparse warning: Should it be static?

Impact: Move function declarations to header file.

Fix this sparse warnings:
  drivers/net/skfp/cfm.c:146:6: warning: symbol 'all_selection_criteria' was not declared. Should it be static?
  drivers/net/skfp/drvfbi.c:186:6: warning: symbol 'mac1_irq' was not declared. Should it be static?
  drivers/net/skfp/drvfbi.c:284:6: warning: symbol 'read_address' was not declared. Should it be static?
  drivers/net/skfp/drvfbi.c:323:6: warning: symbol 'init_board' was not declared. Should it be static?
  drivers/net/skfp/fplustm.c:72:24: warning: symbol 'fddi_broadcast' was not declared. Should it be static?
  drivers/net/skfp/fplustm.c:679:6: warning: symbol 'mac2_irq' was not declared. Should it be static?
  drivers/net/skfp/fplustm.c:805:6: warning: symbol 'mac3_irq' was not declared. Should it be static?
  drivers/net/skfp/fplustm.c:856:5: warning: symbol 'init_fplus' was not declared. Should it be static?
  drivers/net/skfp/pcmplc.c:404:6: warning: symbol 'init_plc' was not declared. Should it be static?
  drivers/net/skfp/pcmplc.c:1592:5: warning: symbol 'pcm_status_twisted' was not declared. Should it be static?
  drivers/net/skfp/smtinit.c:68:5: warning: symbol 'init_smt' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/sfc: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:41:03 +0000 (11:41 +0000)] 
drivers/net/sfc: fix sparse warning: symbol shadows an earlier one

Impact: Move variable declaration as close to their usage as possible.

Fix this sparse warning:
  drivers/net/sfc/tenxpress.c:589:22: warning: symbol 'link_ok' shadows an earlier one
  drivers/net/sfc/tenxpress.c:575:30: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/pcmcia: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:39:23 +0000 (11:39 +0000)] 
drivers/net/pcmcia: fix warning: format not a string literal and no ...

Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it prefix the message with KERN_INFO.

Fix this warnings:
  drivers/net/pcmcia/axnet_cs.c:1716: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ixgbe: fix sparse warning: Should it be static?
Hannes Eder [Sat, 14 Feb 2009 11:38:36 +0000 (11:38 +0000)] 
drivers/net/ixgbe: fix sparse warning: Should it be static?

Impact: Make symbol static.

Fix this sparse warning:
  drivers/net/ixgbe/ixgbe_82598.c:59:5: warning: symbol 'ixgbe_get_pcie_msix_count_82598' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/hamradio: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:36:20 +0000 (11:36 +0000)] 
drivers/net/hamradio: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/hamradio/hdlcdrv.c:274:34: warning: incorrect type in argument 2 (different signedness)
  drivers/net/hamradio/hdlcdrv.c:279:47: warning: incorrect type in argument 2 (different signedness)
  drivers/net/hamradio/hdlcdrv.c:288:39: warning: incorrect type in argument 2 (different signedness)
  drivers/net/hamradio/hdlcdrv.c:300:47: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/hamradio: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:35:35 +0000 (11:35 +0000)] 
drivers/net/hamradio: fix sparse warning: symbol shadows an earlier one

Impact: Rename inner scrope variable.

Fix this sparse warning:
  drivers/net/hamradio/yam.c:856:35: warning: symbol 'dev' shadows an earlier one

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/hamradio: fix sparse warning: context imbalance
Hannes Eder [Sat, 14 Feb 2009 11:34:52 +0000 (11:34 +0000)] 
drivers/net/hamradio: fix sparse warning: context imbalance

Impact: Attribute functions with __acquires(...) resp. __releases(...).

Fix this sparse warnings:
  drivers/net/hamradio/bpqether.c:387:13: warning: context imbalance in 'bpq_seq_start' - wrong count at exit
  drivers/net/hamradio/bpqether.c:419:13: warning: context imbalance in 'bpq_seq_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/hamradio: fix warning: format not a string literal and no ...
Hannes Eder [Sat, 14 Feb 2009 11:33:21 +0000 (11:33 +0000)] 
drivers/net/hamradio: fix warning: format not a string literal and no ...

Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it fix an issue in 'mkiss_init_driver', where in case of an
error the status code was not passed to printk.

Fix this warnings:
  drivers/net/hamradio/6pack.c: In function 'sixpack_init_driver':
  drivers/net/hamradio/6pack.c:802: warning: format not a string literal and no format arguments
  drivers/net/hamradio/bpqether.c: In function 'bpq_init_driver':
  drivers/net/hamradio/bpqether.c:609: warning: format not a string literal and no format arguments
  drivers/net/hamradio/mkiss.c: In function 'mkiss_init_driver':
  drivers/net/hamradio/mkiss.c:988: warning: format not a string literal and no format arguments
  drivers/net/hamradio/mkiss.c:991: warning: format not a string literal and no format arguments
  drivers/net/hamradio/scc.c: In function 'scc_init_driver':
  drivers/net/hamradio/scc.c:2109: warning: format not a string literal and no format arguments
  drivers/net/hamradio/yam.c: In function 'yam_init_driver':
  drivers/net/hamradio/yam.c:1094: warning: format not a string literal and no format arguments

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/e1000e: fix sparse warning: Should it be static?
Hannes Eder [Sat, 14 Feb 2009 11:32:25 +0000 (11:32 +0000)] 
drivers/net/e1000e: fix sparse warning: Should it be static?

Impact: Make symbol static.

Fix this sparse warning:
  drivers/net/e1000e/82571.c:1229:5: warning: symbol 'e1000_check_for_serdes_link_82571' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/cxgb3: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:16:19 +0000 (11:16 +0000)] 
drivers/net/cxgb3: fix sparse warnings: fix signedness

Fix this sparse warning:
  drivers/net/cxgb3/ael1002.c:1010:60: warning: incorrect type in argument 4 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/cxgb3: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:16:04 +0000 (11:16 +0000)] 
drivers/net/cxgb3: fix sparse warning: symbol shadows an earlier one

Impact: Move variable declaration as close to usage as possible.

Fix this sparse warning:
  drivers/net/cxgb3/cxgb3_main.c:1586:21: warning: symbol 'cap' shadows an earlier one

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/bonding: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:15:49 +0000 (11:15 +0000)] 
drivers/net/bonding: fix sparse warning: symbol shadows an earlier one

Impact: Rename function scope variable.

Fix this sparse warning:
  drivers/net/bonding/bond_main.c:4704:13: warning: symbol 'mode' shadows an earlier one
  drivers/net/bonding/bond_main.c:95:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/bonding: fix sparse warnings: context imbalance
Hannes Eder [Sat, 14 Feb 2009 11:15:33 +0000 (11:15 +0000)] 
drivers/net/bonding: fix sparse warnings: context imbalance

Impact: Attribute functions with __acquires(...) and/or __releases(...).

Fix this sparse warnings:
  drivers/net/bonding/bond_alb.c:1675:9: warning: context imbalance in 'bond_alb_handle_active_change' - unexpected unlock
  drivers/net/bonding/bond_alb.c:1742:9: warning: context imbalance in 'bond_alb_set_mac_address' - unexpected unlock
  drivers/net/bonding/bond_main.c:1025:17: warning: context imbalance in 'bond_do_fail_over_mac' - unexpected unlock
  drivers/net/bonding/bond_main.c:3195:13: warning: context imbalance in 'bond_info_seq_start' - wrong count at exit
  drivers/net/bonding/bond_main.c:3234:13: warning: context imbalance in 'bond_info_seq_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/atlx: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:15:17 +0000 (11:15 +0000)] 
drivers/net/atlx: fix sparse warnings: fix signedness

Impact: While being at it: statics do not need to be initialized with 0.

Fix this sparse warnings:
  drivers/net/atlx/atl1.c:109:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2870:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2880:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2894:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2904:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atlx/atl2.c:2913:1: warning: incorrect type in initializer (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/atl1e: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:14:58 +0000 (11:14 +0000)] 
drivers/net/atl1e: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/atl1e/atl1e_main.c:716:39: warning: incorrect type in argument 2 (different signedness)
  drivers/net/atl1e/atl1e_param.c:57:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:68:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:81:1: warning: incorrect type in initializer (different signedness)
  drivers/net/atl1e/atl1e_param.c:92:1: warning: incorrect type in initializer (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/arcnet: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:14:45 +0000 (11:14 +0000)] 
drivers/net/arcnet: fix sparse warning: symbol shadows an earlier one

Impact: Remove redundant inner scope variable.

Fix this sparse warning:
  drivers/net/arcnet/arcnet.c:383:21: warning: symbol 'count' shadows an earlier one
  drivers/net/arcnet/arcnet.c:375:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/s2io.c: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:14:31 +0000 (11:14 +0000)] 
drivers/net/s2io.c: fix sparse warning: symbol shadows an earlier one

Impact: Remove redundant inner scope variable.

Fix this sparse warning:
  drivers/net/s2io.c:7223:21: warning: symbol 'i' shadows an earlier one
  drivers/net/s2io.c:7184:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer
Hannes Eder [Sat, 14 Feb 2009 11:14:04 +0000 (11:14 +0000)] 
drivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer

Fix this sparse warnings:
  drivers/net/r6040.c:487:31: warning: Using plain integer as NULL pointer
  drivers/net/r6040.c:492:31: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ppp*.c: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:13:52 +0000 (11:13 +0000)] 
drivers/net/ppp*.c: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/ppp_generic.c:919:43: warning: incorrect type in argument 1 (different signedness)
  drivers/net/pppoe.c:1195:43: warning: incorrect type in argument 1 (different signedness)
  drivers/net/pppol2tp.c:2666:43: warning: incorrect type in argument 1 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ni65.c: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:13:39 +0000 (11:13 +0000)] 
drivers/net/ni65.c: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/ni65.c:488:36: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/lance.c: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:13:24 +0000 (11:13 +0000)] 
drivers/net/lance.c: fix sparse warnings: fix signedness

Impact: Besides from fixing the signedness issue remove some
whitespace to obey to the 80 character limit.

Fix this sparse warnings:
  drivers/net/lance.c:399:19: warning: incorrect type in assignment (different signedness)
  drivers/net/lance.c:654:29: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/niu.c: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:12:48 +0000 (11:12 +0000)] 
drivers/net/niu.c: fix sparse warning: symbol shadows an earlier one

Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/niu.c:2399:21: warning: symbol 'err' shadows an earlier one
  drivers/net/niu.c:2287:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ns83820.c: fix sparse warnings: fix signedness
Hannes Eder [Sat, 14 Feb 2009 11:12:36 +0000 (11:12 +0000)] 
drivers/net/ns83820.c: fix sparse warnings: fix signedness

Fix this sparse warnings:
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
  drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/ni65.c: fix sparse warnings: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:12:23 +0000 (11:12 +0000)] 
drivers/net/ni65.c: fix sparse warnings: symbol shadows an earlier one

Impact: Remove redundant variable declaration or move them to a more
inner scope.

Fix this sparse warnings:
  drivers/net/ni65.c:900:37: warning: symbol 'p' shadows an earlier one
  drivers/net/ni65.c:874:21: originally declared here
  drivers/net/ni65.c:925:21: warning: symbol 'p' shadows an earlier one
  drivers/net/ni65.c:874:21: originally declared here
  drivers/net/ni65.c:945:29: warning: symbol 'k' shadows an earlier one
  drivers/net/ni65.c:926:15: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/e2100.c: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:12:10 +0000 (11:12 +0000)] 
drivers/net/e2100.c: fix sparse warning: symbol shadows an earlier one

Impact: Remove redundant inner scope variable and while being at it
make use of ARRAY_SIZE instead of a hardcoded number.

Fix this sparse warning:
  drivers/net/e2100.c:219:56: warning: symbol 'i' shadows an earlier one
  drivers/net/e2100.c:181:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Sat, 14 Feb 2009 11:11:55 +0000 (11:11 +0000)] 
drivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one

Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/at1700.c:846:21: warning: symbol 'i' shadows an earlier one
  drivers/net/at1700.c:831:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: replace commatas with semicolons
Thomas Gleixner [Mon, 16 Feb 2009 08:08:56 +0000 (00:08 -0800)] 
net: replace commatas with semicolons

Impact: syntax fix

Interestingly enough this compiles w/o any complaints:

orphans = percpu_counter_sum_positive(&tcp_orphan_count),
sockets = percpu_counter_sum_positive(&tcp_sockets_allocated),

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Inherit all socket options from parent correctly.
Vlad Yasevich [Fri, 13 Feb 2009 08:33:44 +0000 (08:33 +0000)] 
sctp: Inherit all socket options from parent correctly.

During peeloff/accept() sctp needs to save the parent socket state
into the new socket so that any options set on the parent are
inherited by the child socket.  This was found when the
parent/listener socket issues SO_BINDTODEVICE, but the
data was misrouted after a route cache flush.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix the RTO-doubling on idle-link heartbeats
Vlad Yasevich [Fri, 13 Feb 2009 08:33:43 +0000 (08:33 +0000)] 
sctp: Fix the RTO-doubling on idle-link heartbeats

SCTP incorrectly doubles rto ever time a Hearbeat chunk
is generated.   However RFC 4960 states:

   On an idle destination address that is allowed to heartbeat, it is
   recommended that a HEARTBEAT chunk is sent once per RTO of that
   destination address plus the protocol parameter 'HB.interval', with
   jittering of +/- 50% of the RTO value, and exponential backoff of the
   RTO if the previous HEARTBEAT is unanswered.

Essentially, of if the heartbean is unacknowledged, do we double the RTO.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Clean up sctp checksumming code
Vlad Yasevich [Fri, 13 Feb 2009 08:33:42 +0000 (08:33 +0000)] 
sctp: Clean up sctp checksumming code

The sctp crc32c checksum is always generated in little endian.
So, we clean up the code to treat it as little endian and remove
all the __force casts.

Suggested by Herbert Xu.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Allow to disable SCTP checksums via module parameter
Lucas Nussbaum [Fri, 13 Feb 2009 08:33:41 +0000 (08:33 +0000)] 
sctp: Allow to disable SCTP checksums via module parameter

This is a new version of my patch, now using a module parameter instead
of a sysctl, so that the option is harder to find. Please note that,
once the module is loaded, it is still possible to change the value of
the parameter in /sys/module/sctp/parameters/, which is useful if you
want to do performance comparisons without rebooting.

Computation of SCTP checksums significantly affects the performance of
SCTP. For example, using two dual-Opteron 246 connected using a Gbe
network, it was not possible to achieve more than ~730 Mbps, compared to
941 Mbps after disabling SCTP checksums.
Unfortunately, SCTP checksum offloading in NICs is not commonly
available (yet).

By default, checksums are still enabled, of course.

Signed-off-by: Lucas Nussbaum <lucas.nussbaum@ens-lyon.fr>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: transition driver to only using advanced descriptors
Alexander Duyck [Mon, 16 Feb 2009 08:00:20 +0000 (00:00 -0800)] 
igb: transition driver to only using advanced descriptors

Currently the driver uses advanced descriptors for its main functionality,
but then uses legacy when testing.  This patch changes this so that
advanced descriptors are used throughout and all mentions of legacy
descriptors are removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: remove unused defines
Alexander Duyck [Mon, 16 Feb 2009 07:59:44 +0000 (23:59 -0800)] 
igb: remove unused defines

This patch removes all of the unused defines from the .h files contained in
igb.  For some defines there was a use and so I plugged them into the correct
locations.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: misc cleanup to combine one if statement
Alexander Duyck [Fri, 13 Feb 2009 14:45:17 +0000 (14:45 +0000)] 
igb: misc cleanup to combine one if statement

This patch combines a pair of if statements into one.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: cleanup incorrect comment and set IP Checksum Enable
Alexander Duyck [Thu, 12 Feb 2009 18:17:42 +0000 (18:17 +0000)] 
igb: cleanup incorrect comment and set IP Checksum Enable

IP Checksum enable doesn't need packet split in order to function.  It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: reduce size required to trigger low latency
Alexander Duyck [Thu, 12 Feb 2009 18:17:21 +0000 (18:17 +0000)] 
igb: reduce size required to trigger low latency

Update the Adaptive Interrupt Moderation algorithm so that the low latency
state is triggered less easily to prevent high interrupt loads.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: misc whitespace/formatting cleanups
Alexander Duyck [Thu, 12 Feb 2009 18:16:59 +0000 (18:16 +0000)] 
igb: misc whitespace/formatting cleanups

This patch is intended to hold several whitespace, formatting, and
comment cleanups that have been found while cleaning up the igb driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: implement Large Receive Offload
Lennert Buytenhek [Thu, 12 Feb 2009 14:08:39 +0000 (14:08 +0000)] 
mv643xx_eth: implement Large Receive Offload

Controlled by a compile-time (Kconfig) option for now, since it
isn't a win in all cases.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: allow enabling/disabling tx checksumming via ethtool
Lennert Buytenhek [Thu, 12 Feb 2009 14:08:07 +0000 (14:08 +0000)] 
mv643xx_eth: allow enabling/disabling tx checksumming via ethtool

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: export rx csum get/set methods via ethtool
Lennert Buytenhek [Thu, 12 Feb 2009 14:07:56 +0000 (14:07 +0000)] 
mv643xx_eth: export rx csum get/set methods via ethtool

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: implement ethtool rx/tx ring size query and resizing
Lennert Buytenhek [Thu, 12 Feb 2009 14:07:37 +0000 (14:07 +0000)] 
mv643xx_eth: implement ethtool rx/tx ring size query and resizing

Rename the mp->default_[rt]x_ring_size variables to ->[rt]x_ring_size,
allow them to be read via the standard ethtool ->get_ringparam() op,
and add a ->set_ringparam() op to allow resizing them at run time.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: rework interrupt coalescing, and export via ethtool
Lennert Buytenhek [Thu, 12 Feb 2009 14:07:09 +0000 (14:07 +0000)] 
mv643xx_eth: rework interrupt coalescing, and export via ethtool

This patch:
- increases the precision of the receive/transmit interrupt
  coalescing register value computations by using 64bit temporaries;
- adds functions to read the current hardware coalescing register
  values and convert them back to usecs;
- exports the {get,set} {rx,tx} coal methods via the standard
  ethtool coalescing interface.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: unify ethtool ops for phy'd and phy-less interfaces
Lennert Buytenhek [Thu, 12 Feb 2009 14:06:46 +0000 (14:06 +0000)] 
mv643xx_eth: unify ethtool ops for phy'd and phy-less interfaces

It's a waste having two different versions of this structure around
when the differences between ethtool ops for phy'd and phy-less
interfaces are so minor.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/isdn/hardware/mISDN: change type of hfc_jiffies to unsigned long
Hannes Eder [Sat, 14 Feb 2009 13:10:33 +0000 (13:10 +0000)] 
drivers/isdn/hardware/mISDN: change type of hfc_jiffies to unsigned long

Jiffies are unsigned long, make sure we fit in jiffies store variable
on archs with bits per long > 32.

Patch suggested by Jiri Slaby.

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/isdn/mISDN: fix sparse warnings: make symbols static
Hannes Eder [Thu, 12 Feb 2009 09:32:41 +0000 (09:32 +0000)] 
drivers/isdn/mISDN: fix sparse warnings: make symbols static

Fix this sparse warnings:
  drivers/isdn/mISDN/clock.c:44:1: warning: symbol 'iclock_lock' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:45:9: warning: symbol 'iclock_count' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:46:17: warning: symbol 'iclock_tv' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:47:9: warning: symbol 'iclock_tv_valid' was not declared. Should it be static?
  drivers/isdn/mISDN/clock.c:48:20: warning: symbol 'iclock_current' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/isdn/hardware/mISDN: fix sparse warnings: make symbols static
Hannes Eder [Thu, 12 Feb 2009 09:28:40 +0000 (09:28 +0000)] 
drivers/isdn/hardware/mISDN: fix sparse warnings: make symbols static

Fix this sparse warnings:
  drivers/isdn/hardware/mISDN/hfcpci.c:59:19: warning: symbol 'hfc_tl' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcpci.c:60:9: warning: symbol 'hfc_jiffies' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:201:6: warning: symbol 'conf_str' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:319:12: warning: symbol 'HFC_TE_LAYER1_STATES' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.h:331:12: warning: symbol 'HFC_NT_LAYER1_STATES' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:38:12: warning: symbol 'hfcsusb_rev' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:978:1: warning: symbol 'fill_isoc_urb' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcsusb.c:1724:1: warning: symbol 'setup_hfcsusb' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Version
Eilon Greenstein [Thu, 12 Feb 2009 08:38:35 +0000 (08:38 +0000)] 
bnx2x: Version

And updating the year

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Clean-up
Eilon Greenstein [Thu, 12 Feb 2009 08:38:32 +0000 (08:38 +0000)] 
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>
15 years agobnx2x: Comments and prints
Eilon Greenstein [Thu, 12 Feb 2009 08:38:30 +0000 (08:38 +0000)] 
bnx2x: Comments and prints

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Re-arrange module parameters
Eilon Greenstein [Thu, 12 Feb 2009 08:38:27 +0000 (08:38 +0000)] 
bnx2x: Re-arrange module parameters

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Moving includes
Eilon Greenstein [Thu, 12 Feb 2009 08:38:25 +0000 (08:38 +0000)] 
bnx2x: Moving includes

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Driver dump
Eilon Greenstein [Thu, 12 Feb 2009 08:38:22 +0000 (08:38 +0000)] 
bnx2x: Driver dump

Re-arrange the driver debug print to support the Tx multi-queue and add support
for debug prints at the end of the ring (when start<end)

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing unused struct
Eilon Greenstein [Thu, 12 Feb 2009 08:38:20 +0000 (08:38 +0000)] 
bnx2x: Removing unused struct

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Sparse endianity annotation
Eilon Greenstein [Thu, 12 Feb 2009 08:38:17 +0000 (08:38 +0000)] 
bnx2x: Sparse endianity annotation

Resolving the majority of the issues, but there are still some left for future
patches.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing redundant macros
Eilon Greenstein [Thu, 12 Feb 2009 08:38:14 +0000 (08:38 +0000)] 
bnx2x: Removing redundant macros

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Better struct naming
Eilon Greenstein [Thu, 12 Feb 2009 08:38:11 +0000 (08:38 +0000)] 
bnx2x: Better struct naming

This is the device info from the chip shared memory - rename to avoid confusion

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Loopback in diag mode
Eilon Greenstein [Thu, 12 Feb 2009 08:38:08 +0000 (08:38 +0000)] 
bnx2x: Loopback in diag mode

When loading in diag mode, set the device to loopback instead of normal link and
then changing it to loopback mode

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Optimize chip MPS configuration
Eilon Greenstein [Thu, 12 Feb 2009 08:38:01 +0000 (08:38 +0000)] 
bnx2x: Optimize chip MPS configuration

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Memory clean up on failure
Eilon Greenstein [Thu, 12 Feb 2009 08:37:57 +0000 (08:37 +0000)] 
bnx2x: Memory clean up on failure

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Using nvram default WoL config
Eilon Greenstein [Thu, 12 Feb 2009 08:37:52 +0000 (08:37 +0000)] 
bnx2x: Using nvram default WoL config

The driver default WoL setting is set to the nvram default value

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: smp_mb and not just smp_rmb
Eilon Greenstein [Thu, 12 Feb 2009 08:37:25 +0000 (08:37 +0000)] 
bnx2x: smp_mb and not just smp_rmb

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Increasing FW timeout
Eilon Greenstein [Thu, 12 Feb 2009 08:37:23 +0000 (08:37 +0000)] 
bnx2x: Increasing FW timeout

When enabling many debug prints, it can take a while before processing an event.
To ease the debug process, allow bigger timeout before giving up

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Returning EBUSY in debug mode as well
Eilon Greenstein [Thu, 12 Feb 2009 08:37:21 +0000 (08:37 +0000)] 
bnx2x: Returning EBUSY in debug mode as well

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Manual setting for MRRS
Eilon Greenstein [Thu, 12 Feb 2009 08:37:19 +0000 (08:37 +0000)] 
bnx2x: Manual setting for MRRS

Allows better debug capabilities if the user wants to force an MRRS value

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Using registers name
Eilon Greenstein [Thu, 12 Feb 2009 08:37:16 +0000 (08:37 +0000)] 
bnx2x: Using registers name

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Pre emphasis configuration
Eilon Greenstein [Thu, 12 Feb 2009 08:37:14 +0000 (08:37 +0000)] 
bnx2x: Pre emphasis configuration

Supporting non-default pre-emphasis settings for the internal and some external
PHYs

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: GMII not SGMII
Eilon Greenstein [Thu, 12 Feb 2009 08:37:12 +0000 (08:37 +0000)] 
bnx2x: GMII not SGMII

Fixing the function name

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing CL73 code
Eilon Greenstein [Thu, 12 Feb 2009 08:37:09 +0000 (08:37 +0000)] 
bnx2x: Removing CL73 code

This code is disabled, so removing it to avoid confusion

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Using the HW 5th lane
Eilon Greenstein [Thu, 12 Feb 2009 08:37:07 +0000 (08:37 +0000)] 
bnx2x: Using the HW 5th lane

This 1G interface (on top of the 4 lanes 10G interface) requires additional
setting to work in CL45

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: EMAC reset
Eilon Greenstein [Thu, 12 Feb 2009 08:37:04 +0000 (08:37 +0000)] 
bnx2x: EMAC reset

The NIG_ENABLE does not reset the emac. Replace it with explicit reset

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Saving PHY FW version
Eilon Greenstein [Thu, 12 Feb 2009 08:37:02 +0000 (08:37 +0000)] 
bnx2x: Saving PHY FW version

Some PHYs (like the BCM8726) FW version cannot be read after activating the
PHY, so we need to save this information

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Supporting BCM8481 PHY
Eilon Greenstein [Thu, 12 Feb 2009 08:37:00 +0000 (08:37 +0000)] 
bnx2x: Supporting BCM8481 PHY

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: PHY lock list
Eilon Greenstein [Thu, 12 Feb 2009 08:36:58 +0000 (08:36 +0000)] 
bnx2x: PHY lock list

Some dual port PHY require HW lock since they are used by both interfaces
(different driver instances). Since this list is getting longer, update a
parameter at load time instead of calculating it on runtime

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Supporting BCM8726 PHY
Eilon Greenstein [Thu, 12 Feb 2009 08:36:55 +0000 (08:36 +0000)] 
bnx2x: Supporting BCM8726 PHY

Also adding the ability to recognize the optic module and disable it if it is
not authorized for safety reasons - since this feature might upset some users
which are willing to take the risk, it is optional and can be disabled by
setting an nvram bit (or a trivial driver patch to set this bit).
This dual port PHY requires special handling if the ports are swapped.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: GPIO accessories
Eilon Greenstein [Thu, 12 Feb 2009 08:36:52 +0000 (08:36 +0000)] 
bnx2x: GPIO accessories

A GPIO is used with the 8726 PHY. Adding the GPIO related functions in this

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing redundant device parameters
Eilon Greenstein [Thu, 12 Feb 2009 08:36:49 +0000 (08:36 +0000)] 
bnx2x: Removing redundant device parameters

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing the board type
Eilon Greenstein [Thu, 12 Feb 2009 08:36:47 +0000 (08:36 +0000)] 
bnx2x: Removing the board type

There are too many different board types and this field is not scalable.
Removing it and making decisions according to other fields

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Flow control enhancement
Eilon Greenstein [Thu, 12 Feb 2009 08:36:43 +0000 (08:36 +0000)] 
bnx2x: Flow control enhancement

Setting better HW thresholds and enabling FW capabilities for better
enforcement. Also set the HW to more efficiently use the internal buffers if
this is a single port design

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: BW shaper enhancements
Eilon Greenstein [Thu, 12 Feb 2009 08:36:40 +0000 (08:36 +0000)] 
bnx2x: BW shaper enhancements

Some of the configuration can be set when loading the device and shouldn't be
re-calculated after each link up indication since it is not dependent on the
link speed

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Moving skb_record_rx_queue
Eilon Greenstein [Thu, 12 Feb 2009 08:36:37 +0000 (08:36 +0000)] 
bnx2x: Moving skb_record_rx_queue

Should be called for all incoming packets and not just for GRO packets

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Per queue statistics
Eilon Greenstein [Thu, 12 Feb 2009 08:36:33 +0000 (08:36 +0000)] 
bnx2x: Per queue statistics

Re-ordering the statistics to enhance readability and adding per queue
statistics (available via ethtool -S)

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Removing microcode assertion check
Eilon Greenstein [Thu, 12 Feb 2009 08:36:27 +0000 (08:36 +0000)] 
bnx2x: Removing microcode assertion check

This check is unreliable since latest MC can issue warnings on rare occasions
which are not fatal errors

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Disabling interrupts after iSCSI-boot
Eilon Greenstein [Thu, 12 Feb 2009 08:36:23 +0000 (08:36 +0000)] 
bnx2x: Disabling interrupts after iSCSI-boot

Before initializing the chip after iSCSI boot, the interrupts of the function
that was used to boot must be disabled. That means that the driver needs to set
the chip as if it is the iSCSI PCI function - this bug is exposed only with MSI

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: System-page alignment
Eilon Greenstein [Thu, 12 Feb 2009 08:36:18 +0000 (08:36 +0000)] 
bnx2x: System-page alignment

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>