openwrt/staging/blogic.git
15 years agoehea: Fix memory hotplug handling
Thomas Klein [Fri, 20 Feb 2009 08:42:01 +0000 (00:42 -0800)]
ehea: Fix memory hotplug handling

Added missing set_bit() to disable data transfer when a memchange
notification is handled

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: this patch addes the sr-iov enablement option via num_vfs parameter
Alexander Duyck [Fri, 20 Feb 2009 04:40:30 +0000 (20:40 -0800)]
igb: this patch addes the sr-iov enablement option via num_vfs parameter

This code adds a module parameter called num_vfs which defines if the
driver should attempt to use sr-iov and if so how many VFs should be
enabled.

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: Add support for enabling VFs to PF driver.
Alexander Duyck [Fri, 20 Feb 2009 04:40:07 +0000 (20:40 -0800)]
igb: Add support for enabling VFs to PF driver.

This patch adds the support to handle requests from the VF to perform
operations such as completing resets, setting/reading mac address, adding
vlans, adding multicast addresses, setting rlpml, and general
communications between the PF and all VFs.

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: add pf side of VMDq support
Alexander Duyck [Fri, 20 Feb 2009 04:39:44 +0000 (20:39 -0800)]
igb: add pf side of VMDq support

Add the pf portion of vmdq support.  This provides enough support so that
VMDq is enabled, and the pf is functional without enabling vfs.

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: add vfs_allocated_count as placeholder for number of vfs
Alexander Duyck [Fri, 20 Feb 2009 04:39:23 +0000 (20:39 -0800)]
igb: add vfs_allocated_count as placeholder for number of vfs

This is the first step in supporting sr-iov.  The vf_allocated_count value
will be 0 until we actually have vfs present.  In the meantime it
represents an offset value for the start of the queues.

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: update napi polling to consolidate function and return correct values
Alexander Duyck [Fri, 20 Feb 2009 04:39:04 +0000 (20:39 -0800)]
igb: update napi polling to consolidate function and return correct values

igb is currently not returning the correct values for napi.  In addition it
is doing more work than necessary since it will not exit polling until
work_done is equal to zero.

This patch makes the following changes:
1.  Consolidates msi-x and non-msi polling routines.
2.  Corrects return values for polling routines.

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 agoe1000: Removing the unused macro PAGE_USE_COUNT()
Breno Leitao [Thu, 19 Feb 2009 22:38:52 +0000 (14:38 -0800)]
e1000: Removing the unused macro PAGE_USE_COUNT()

Removing the unused macro PAGE_USE_COUNT(), since there is no more reference
to it. The last reference was removed by Jesse's commit number
630b25cdf4e3f8c0a11eb04fc8436cc36653cd58.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/igb: fix sparse warning: symbol shadows an earlier one
Hannes Eder [Thu, 19 Feb 2009 03:36:04 +0000 (19:36 -0800)]
drivers/net/igb: fix sparse warning: symbol shadows an earlier one

Impact: Move variable declaration as far inner as possible.

Fix this sparse warning:
  drivers/net/igb/igb_main.c:1895:21: warning: symbol 'j' shadows an earlier one
  drivers/net/igb/igb_main.c:1855:16: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: Add missing parentheses
Roel Kluin [Thu, 19 Feb 2009 03:35:17 +0000 (19:35 -0800)]
atm: Add missing parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: remove workaround for e1000 hardware
Jesse Brandeburg [Thu, 19 Feb 2009 03:33:54 +0000 (19:33 -0800)]
e1000e: remove workaround for e1000 hardware

During the move of support for PCIe devices from e1000 to e1000e, this
workaround necessary only for older non-PCIe devices was mistakenly
copied into e1000e.  Remove it.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@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 LRO Kconfig option
Jeff Kirsher [Thu, 19 Feb 2009 01:56:25 +0000 (17:56 -0800)]
igb: remove LRO Kconfig option

To match ixgbe GRO functionality, we remove the LRO (which is now GRO)
Kconfig option which enables GRO by default.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Optimize skb_tx_hash() by eliminating a comparison
Krishna Kumar [Thu, 19 Feb 2009 01:55:02 +0000 (17:55 -0800)]
net: Optimize skb_tx_hash() by eliminating a comparison

Optimize skb_tx_hash() by eliminating a comparison that executes for
every packet. skb_tx_hashrnd initialization is moved to a later part of
the startup sequence, namely after the "random" driver is initialized.

Rebooted the system three times and verified that the code generates
different random numbers each time.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: improve ethtool support for gigabit copper cards
Constantin Baranov [Thu, 19 Feb 2009 01:53:20 +0000 (17:53 -0800)]
niu: improve ethtool support for gigabit copper cards

Introduced support for link speed and duplex setting (ethtool -s),
link advertising parameters and autonegotiation (ethtool -r):
- struct niu_link_config: split advertising and autoneg
  fields into active and target values (similar to speed
  and duplex fields)
- mii_init_common(): rewrite function to actually apply
  requested niu_link_config parameters instead of providing
  default initialization
- link_status_1g(): move parsing of MII registers into
  new link_status_mii() function (link_status_1g_rgmii()
  could possibly use this new implementation too)
- introduce simple nway_reset method
- fix incorrect XMAC_CONFIG_MODE selection for 10Mbps case

Signed-off-by: Constantin Baranov <baranov@mercdev.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: fix PHY template choice for 10G copper
Constantin Baranov [Thu, 19 Feb 2009 01:52:41 +0000 (17:52 -0800)]
niu: fix PHY template choice for 10G copper

Fixed a typo in niu_determine_phy_disposition() which resulted in
phy_template_1g_copper being selected for 10G/copper configuration.

Signed-off-by: Constantin Baranov <baranov@mercdev.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/sfc: fix sparse warnings: Should it be static?
Hannes Eder [Thu, 19 Feb 2009 01:49:50 +0000 (17:49 -0800)]
drivers/net/sfc: fix sparse warnings: Should it be static?

Impact: Include the header file.  If CONFIG_SFC_MTD is not defined
then the functions 'efx_mtd_remove' and 'efx_mtd_rename' are defined
'static inline' with an empty function body in the header file, but
the the whole file mtd.c is not built in this case.

Fix this sparse warnings:
  drivers/net/sfc/mtd.c:204:6: warning: symbol 'efx_mtd_remove' was not declared. Should it be static?
  drivers/net/sfc/mtd.c:221:6: warning: symbol 'efx_mtd_rename' was not declared. Should it be static?
  drivers/net/sfc/mtd.c:230:5: warning: symbol 'efx_mtd_probe' 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 agonetxen: ratelimit error prints
Dhananjay Phadke [Wed, 18 Feb 2009 04:27:02 +0000 (20:27 -0800)]
netxen: ratelimit error prints

If for some reason, read from card memory fails the console
get flooded with failure prints. This patch confines print
under printk_ratelimit().

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: fix sparse warnings
Dhananjay Phadke [Wed, 18 Feb 2009 04:26:44 +0000 (20:26 -0800)]
netxen: fix sparse warnings

Fix following sparse warnings (multiple instances)

warning: restricted degrades to integer
warning: cast to restricted type
warning: incorrect type in argument 3 (different signedness)
warning: context imbalance in 'netxen_nic_hw_write_wx_2M' - different
lock contexts for basic block

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: remove superfluous doorbell map
Dhananjay Phadke [Wed, 18 Feb 2009 04:26:22 +0000 (20:26 -0800)]
netxen: remove superfluous doorbell map

For NX3031 pci doorbells are not used. If unnecessary mapping
of doorbell space fails, pci probe bails out.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.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>