Michał Mirosław [Tue, 19 Apr 2011 03:35:06 +0000 (03:35 +0000)]
net: xen-netback: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
sctp: Release all routes when processing acks ADD_IP or DEL_IP
When processing an ACK for ADD_IP parameter, we only release
the routes on non-active transports. This can cause a wrong
source address to be used. We can release the routes and
cause new route lookups and source address selection so that
new addresses can be used as source. Additionally, we don't need
to lookup routes for all transports at the same time. We can let
the transmit code path update the cached route when the transport
actually sends something.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
We allow 0 port when adding new addresses. It only
makes sence to allow 0 port when removing addresses.
When removing the currently bound port will be used
when the port in the address is set to 0.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
sctp: teach CACC algorithm about removed transports
When we have have to remove a transport due to ASCONF, we move
the data to a new active path. This can trigger CACC algorithm
to not mark that data as missing when SACKs arrive. This is
because the transport passed to the CACC algorithm is the one
this data is sitting on, not the one it was sent on (that one
may be gone). So, by sending the original transport (even if
it's NULL), we may start marking data as missing.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michał Mirosław [Mon, 18 Apr 2011 13:31:20 +0000 (13:31 +0000)]
net: fix section mismatches
Fix build warnings like the following:
WARNING: drivers/net/built-in.o(.data+0x12434): Section mismatch in reference from the variable madgemc_driver to the variable .init.data:madgemc_adapter_ids
And add some consts to EISA device ID tables along the way.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
- the MSS value is actually contained in a 11 bits wide (0x7ff) field.
The extra bit in the former MSSMask did encompass the TSO command
bit ("LargeSend") as well (0xfff). Oops.
- the Tx descriptor layout is not the same through the whole chipset
family. The 8169 documentation, the 8168c documentation and Realtek's
drivers (8.020.00, 1.019.00, 6.014.00) highlight two layouts:
1. 8169, 8168 up to 8168b (included) and 8101
2. {8102e, 8168c} and beyond
- notwithstanding the "first descriptor" and "last descriptor" bits, the
same Tx descriptor content is enforced when a packet consists of several
descriptors. The chipsets are documented to require it.
Credits go to David Dillow <dave@thedillows.org> for the original patch.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Realtek <nic_swsd@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mark Brown [Mon, 18 Apr 2011 01:04:37 +0000 (01:04 +0000)]
net: dm9000: Fix build
Commit c88fcb (net: dm9000: convert to hw_features) broke the build of
the dm9000 driver since it merged functions which use different names
for the board info structure used for I/O operations without updating
all the references to use the same name. Fix that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Fri, 15 Apr 2011 13:47:51 +0000 (13:47 +0000)]
bonding, ipv4, ipv6, vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS
It is undesirable for the bonding driver to be poking into higher
level protocols, and notifiers provide a way to avoid that. This does
mean removing the ability to configure reptitition of gratuitous ARPs
and unsolicited NAs.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Fri, 15 Apr 2011 13:46:02 +0000 (13:46 +0000)]
ipv6: Send unsolicited neighbour advertismements when notified
The NETDEV_NOTIFY_PEERS notifier is a request to send such
advertisements following migration to a different physical link,
e.g. virtual machine migration.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David Decotigny [Thu, 14 Apr 2011 16:11:34 +0000 (16:11 +0000)]
bnx2x: cosmetics: Using ethtool_cmd_speed() API
This updates bnx2x to use the ethtool_cmd_speed() family of functions
(see b11f8d8c in 2.6.27-rc3 aka. "ethtool: Expand ethtool_cmd.speed to
32 bits") to get and set the link speed via ethtool. This allows to
avoid manually accessing ethtool_cmd's speed_hi field.
Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ip6_pol_route panic: Do not allow VLAN on loopback
Several tests in the ipv6 routing code check IFF_LOOPBACK, and
allowing stacking such as VLAN'ing on top of loopback results in a
netdevice which reports IFF_LOOPBACK but really isn't the loopback
device.
Instead of spamming the ipv6 routing code with even more special tests,
simply disallow VLAN over loopback.
The result of this patch is:
# modprobe 8021q
# vconfig add lo 43
ERROR: trying to add VLAN #43 to IF -:lo:- error: Operation not supported
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sat, 16 Apr 2011 14:15:26 +0000 (14:15 +0000)]
via-rhine: Assign random MAC address if necessary
Roger Luethi has had several reports of Rhine NICs providing
an invalid MAC address. If so, assign a random MAC address so
the hardware can still be used.
Tested as a standalone interface, as carrier for ppp, and as a
bonding slave.
Original-patch-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bridge: fix accidental creation of sysfs directory
Commit bb900b27a2f49b37bc38c08e656ea13048fee13b ("bridge: allow
creating bridge devices with netlink") introduced a bug in net-next
because of a typo in notifier. Every device would have the sysfs
bridge directory (and files).
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michał Mirosław [Sat, 16 Apr 2011 13:05:08 +0000 (13:05 +0000)]
net: cxgb4{,vf}: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch fixes port identification on optic devices when there's no link on the port.
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>
Michał Mirosław [Sun, 17 Apr 2011 00:15:47 +0000 (00:15 +0000)]
net: greth: convert to hw_features
Note: Driver modifies its struct net_device_ops. This will break if used for
multiple devices that are not all the same (if that HW config is possible).
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Michał Mirosław [Sun, 17 Apr 2011 00:15:47 +0000 (00:15 +0000)]
net: benet: convert to hw_features - fixup
Remove be_set_flags() as it's already covered by hw_features.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Ajit Khaparde ajit.khaparde@emulex.com Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 17 Apr 2011 23:51:36 +0000 (16:51 -0700)]
bna: Fix set-but-unused variables.
The variable 'pgoff' is set but unused in bfa_nw_ioc_fwver_get()
and bfa_ioc_download_fw().
Similarly for 'cmd_h' in bna_mbox_flush_q and the entirety of
bna_rit_mod_uninit() is unused since variables are purely set but no
action is made using them.
Same for 'bna' in bna_rit_create() and 'ret' in bna_rx_create().
Just kill them off.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 17 Apr 2011 23:23:22 +0000 (16:23 -0700)]
isdn: eicon: Fix set-but-unused variables.
The variable 'best_id' is set but unused in
diva_mnt_add_xdi_adapter(). Just kill it off.
Similarly for the variable 'CIP' in connect_req(), 'Number' in
sig_ind(), 'Info' in dtmf_confirmation() mixer_command()
fax_connect_ack_command() fax_edata_ack_command()
rtp_connect_b3_res_command() and rtp_connect_b3_res_command(), and 'a'
in mixer_indication_coefs_set(),
Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew Lunn [Sun, 17 Apr 2011 18:39:07 +0000 (20:39 +0200)]
batman-adv: Set the txqueuelen to zero when creating soft interface
Like other virtual interfaces, e.g. br0, we don't need a transmit
queue. Packets should only be queued on real interfaces which are
underneath. In practice this patch makes little difference since the
virtual interfaces can accept packets as fast as they come, but the
patch will avoid bufferbloat questions to the mailling lists in the
future.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Simon Wunderlich [Sun, 17 Apr 2011 18:34:27 +0000 (20:34 +0200)]
batman-adv: protect softif_neigh by rcu
Add get/set wrapper functions for softif_neigh and
use rcu functions to manipulate the pointers.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Linus Lüssing [Mon, 14 Mar 2011 22:43:37 +0000 (22:43 +0000)]
batman-adv: Make orig_node->router an rcu protected pointer
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the orig_node->router need to be used, as well as spin/rcu locking.
Otherwise we might end up using a router pointer pointing to already
freed memory.
Therefore this commit introduces the safe getter method
orig_node_get_router().
Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Linus Lüssing [Mon, 14 Mar 2011 22:43:27 +0000 (22:43 +0000)]
batman-adv: Move bonding / iface alternating router search to own functions
This decreases the size of find_router() by outsourcing the router
search for the bonding and interface alternating modes to their own sub
functions. This shall make it easier to keep track of the correct
refcounting later.
Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>