Patrick Ohly [Sat, 21 Feb 2009 10:42:18 +0000 (02:42 -0800)]
net: kernel panic in dev_hard_start_xmit: remove faulty software TX time stamping
The current implementation of the TX software time stamping fallback is
faulty because it accesses the skb after ndo_start_xmit() returns
successfully. This patch removes the fallback, which fixes kernel panics
seen during stress tests. Hardware time stamping is not affected by this
removal.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds NETLINK_BROADCAST_ERROR which is a netlink
socket option that the listener can set to make netlink_broadcast()
return errors in the delivery to the caller. This option is useful
if the caller of netlink_broadcast() do something with the result
of the message delivery, like in ctnetlink where it drops a network
packet if the event delivery failed, this is used to enable reliable
logging and state-synchronization. If this socket option is not set,
netlink_broadcast() only reports ESRCH errors and silently ignore
ENOBUFS errors, which is what most netlink_broadcast() callers
should do.
This socket option is based on a suggestion from Patrick McHardy.
Patrick McHardy can exchange this patch for a beer from me ;).
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>