Commit graph

375637 commits

Author SHA1 Message Date
Wei Liu
e1f00a69ec xen-netback: split event channels support for Xen backend driver
Netback and netfront only use one event channel to do TX / RX notification,
which may cause unnecessary wake-up of processing routines. This patch adds a
new feature called feature-split-event-channels to netback, enabling it to
handle TX and RX events separately.

Netback will use tx_irq to notify guest for TX completion, rx_irq for RX
notification.

If frontend doesn't support this feature, tx_irq equals to rx_irq.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 18:40:37 -07:00
Cong Wang
8892475386 ipv6: use ipv6_addr_scope() helper
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK could be replaced
by ipv6_addr_scope(), which is slightly faster.

Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 01:17:47 -07:00
Cong Wang
7996c799ae ipv6: use ipv6_addr_any() helper
ipv6_addr_any() is a faster way to determine if an addr
is ipv6 any addr, no need to compute the addr type.

Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 01:17:47 -07:00
Eric Dumazet
e43ac79a4b sch_tbf: segment too big GSO packets
If a GSO packet has a length above tbf burst limit, the packet
is currently silently dropped.

Current way to handle this is to set the device in non GSO/TSO mode, or
setting high bursts, and its sub optimal.

We can actually segment too big GSO packets, and send individual
segments as tbf parameters allow, allowing for better interoperability.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 00:06:40 -07:00
Fabio Estevam
ffed61e6fd fec: Use DIV_ROUND_UP macro
Use the standard DIV_ROUND_UP macro in order to provide better readability.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 00:05:34 -07:00
Santosh Rastapur
f83331bab1 cxgb3: Check and handle the dma mapping errors
This patch adds checks at approprate places whether *dma_map*() call has
succeeded or not.

Signed-off-by: Santosh Rastapur <santosh@chelsio.com>
Reviewed-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 00:03:54 -07:00
Jay Fenlason
9313eb4be3 cxgb3: Fix warning about using rcu_dereference when not in a rcu-locked section
It is about using rcu_dereference() when not in a rcu-locked section. It only
happens on initialization hence fix the initialization to not rcu_dereference()

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-23 00:03:54 -07:00
Mark Rutland
f123826189 net: smsc911x: don't artificially limit build
Currently the SMSC911X driver may only be built for a specific set of
architectures, being limited to do so by a Kconfig depends line. This
means that if a platform wishes to use the driver, its architecture must
be added to the list explicitly, introducing pointless churn.

This may have been due to the driver's use of the {read,write}s{b,w,l}
functions, which have since been replaced with the more standard
io{read,write}{8,16,32}_rep. We can instead depend on HAS_IOMEM, which
should prevent build issues while allowing the driver to be built for
currently unlisted architectures, including x86 and arm64.

This patch removes the explicit list of architectures from the driver's
depend line, and replaces it with a dependency on HAS_IOMEM.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 23:58:34 -07:00
Simon Horman
1cdbcb7957 net: Loosen constraints for recalculating checksum in skb_segment()
This is a generic solution to resolve a specific problem that I have observed.

If the encapsulation of an skb changes then ability to offload checksums
may also change. In particular it may be necessary to perform checksumming
in software.

An example of such a case is where a non-GRE packet is received but
is to be encapsulated and transmitted as GRE.

Another example relates to my proposed support for for packets
that are non-MPLS when received but MPLS when transmitted.

The cost of this change is that the value of the csum variable may be
checked when it previously was not. In the case where the csum variable is
true this is pure overhead. In the case where the csum variable is false it
leads to software checksumming, which I believe also leads to correct
checksums in transmitted packets for the cases described above.

Further analysis:

This patch relies on the return value of can_checksum_protocol()
being correct and in turn the return value of skb_network_protocol(),
used to provide the protocol parameter of can_checksum_protocol(),
being correct. It also relies on the features passed to skb_segment()
and in turn to can_checksum_protocol() being correct.

I believe that this problem has not been observed for VLANs because it
appears that almost all drivers, the exception being xgbe, set
vlan_features such that that the checksum offload support for VLAN packets
is greater than or equal to that of non-VLAN packets.

I wonder if the code in xgbe may be an oversight and the hardware does
support checksumming of VLAN packets.  If so it may be worth updating the
vlan_features of the driver as this patch will force such checksums to be
performed in software rather than hardware.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 15:06:13 -07:00
Cong Wang
6b7df111ec bridge: send query as soon as leave is received
Continue sending queries when leave is received if the user marks
it as a querier.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:54:37 -07:00
Cong Wang
9f00b2e7cf bridge: only expire the mdb entry when query is received
Currently we arm the expire timer when the mdb entry is added,
however, this causes problem when there is no querier sent
out after that.

So we should only arm the timer when a corresponding query is
received, as suggested by Herbert.

And he also mentioned "if there is no querier then group
subscriptions shouldn't expire. There has to be at least one querier
in the network for this thing to work.  Otherwise it just degenerates
into a non-snooping switch, which is OK."

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:54:37 -07:00
Cong Wang
1c8ad5bfa2 bridge: use the bridge IP addr as source addr for querier
Quote from Adam:
"If it is believed that the use of 0.0.0.0
as the IP address is what is causing strange behaviour on other devices
then is there a good reason that a bridge rather than a router shouldn't
be the active querier? If not then using the bridge IP address and
having the querier enabled by default may be a reasonable solution
(provided that our querier obeys the election rules and shuts up if it
sees a query from a lower IP address that isn't 0.0.0.0). Just because a
device is the elected querier for IGMP doesn't appear to mean it is
required to perform any other routing functions."

And introduce a new troggle for it, as suggested by Herbert.

Suggested-by: Adam Baker <linux@baker-net.org.uk>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:54:37 -07:00
Peter Hüwe
4f45c40f2c net/ethernet/nvidia/forcedeth: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

The name of the pci_driver struct had to be changed in order to prevent
a build failure.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
65c21912b5 net/ethernet/chelsio/cxgb/cxgb2: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

The name of the pci_driver struct had to be changed in order to prevent
a build failure.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
30d05f9ef7 net/fddi/skfp/skfddi: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
ff7150550d net/hippi/rrunner: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
a46e6ccdd1 net/ethernet/amd/amd8111e: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
5119ad0b73 net/ethernet/sun/sungem: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:05 -07:00
Peter Hüwe
70a611debe net/ethernet/qlogic/qlge/qlge_main: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
e0fc4441f9 net/ethernet/sgi/ioc3-eth: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
8dbb0dc2cb net/ethernet/broadcom/tg3: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
5a4123f39e net/ethernet/broadcom/bnx2: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
e6d20fca76 net/ethernet/alteon/acenic: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
43d426c3f9 net/ethernet/icplus/ipg: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
b6f5721087 net/ethernet/toshiba/tc35815: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:04 -07:00
Peter Hüwe
31d60ebfbe net/ethernet/dec/tulip/xircom_cb: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
Peter Hüwe
52a58f9df1 net/ethernet/sis/sis190: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
Peter Hüwe
c996f4e8f0 net/ethernet/atheros/atlx/atl1: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
Peter Hüwe
687df5d489 net/ethernet/atheros/atl1e/atl1e_main: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
Peter Hüwe
2c21d6c988 net/ethernet/atheros/atl1c/atl1c_main: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
Peter Hüwe
61c951503b net/ethernet/silan/sc92031: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 14:35:03 -07:00
David S. Miller
31400fe3ce Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:

====================
This series contains updates to e1000e, igb and ixgbe.

Bruce Allan provide 2 minor cleanups for e1000e to resolve whitespace
issues and build warnings about unused parameters.

Carolyn provides a couple of fixes for igb, one being a fix for a
possible panic when the interface is down and receive traffic
arrives.  The second fix resolves an issue on newer parts which have
multiple checksum fields and set_ethtool was only checking to update
the first checksum of the NVM image.

Akeem provides majority of the changes in this patch set.  Akeem
provides a fix for e1000e on an issue reported from the community to
resolve the issue of unlocking swflag_mutex for 82574 and 82583
devices even if the hardware semaphore was successfully acquired.
The other patches from Akeem are against igb, where he adds support
SFP module discovery, LED blink mechanism for devices using cathodes,
LED support for i210/i211 parts and cleanup of a i2c function which
was not being used.

Matthew provides an update for igb to support a more accurate check
for a PTP RX hang.

Amir provides a patch for ixgbe to set the software prio_tc values at
initialization to the hardware setting to remove the need to reset the
device at the first time we call ixgbe_dcbnl_ieee_setets.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-22 13:56:56 -07:00
Amir Hanania
e8915bebb4 IXGBE: Set the SW prio_tc values at initialization to the HW setting.
Set the SW prio_tc values at initialization to the HW setting.
Setting the SW prio_tc default values to be the HW setting by reading the
rtrup2tc register. For any TC change we need to reset the device.
This will remove the need to reset the device at the first
time we call ixgbe_dcbnl_ieee_setets.

Signed-off-by: Amir Hanania <amir.hanania@intel.com>
Tested-by: Jack Morgan<jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 03:14:21 -07:00
Akeem G. Abodunrin
f7727c5309 igb: Removed unused i2c function
This patch removes unused i2c function definition.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 03:08:15 -07:00
Akeem G. Abodunrin
6f8b916065 igb: Implementation of i210/i211 LED support
This patch fixes LED issues with i210 and i211 devices, due to changes in the
device registers.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 03:01:58 -07:00
Carolyn Wyborny
41f149a285 igb: Fix possible panic caused by Rx traffic arrival while interface is down
This patch reorders disabling napi and irqs during igb_down.
This is done to avoid possible panic's found in other Intel drivers
when Rx traffic arrives while interface is going down.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:55:38 -07:00
Carolyn Wyborny
2a0a0f1ea2 igb: Fix set_ethtool function to call update nvm for entire image
This patch fixes a problem where we were only checking to update checksum
on first part of nvm image.  Newer parts have multiple checksum fields and
checksum function will accommodate that as long as we call it in the first
place for any changes made.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:49:34 -07:00
Akeem G. Abodunrin
373e6978f9 igb: SerDes flow control setting
This path allows users to get appropriate flow control setting on SerDes
devices, based on original implementation for Copper devices.
Also, since 100baseFX does not support setting flow control, so exclude
it from the setting mechanism.

Signed-off-by: Akeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:43:39 -07:00
Akeem G. Abodunrin
641ac5c0cd igb: Support for SFP modules discovery
This patch adds support for SFP modules media type discovery for
SGMII, which will enable driver to detect supported external PHYs,
including 100baseFXSFP module.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:37:36 -07:00
Matthew Vick
20a4841228 igb: Add update to last_rx_timestamp in Rx rings
In order to support a more accurate check for a PTP Rx hang where the
device can no longer timestamp received packets, we need to update, per
ring, when the last Rx timestamp was. Because of how the PTP Rx hang logic
works, the current logic is valid, but properly updating the ring variable
increases the accuracy of the check.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:31:43 -07:00
Akeem G. Abodunrin
cf7ed22171 igb: Changed LEDs blink mechanism to include designs using cathode
This patch addresses the changes needed to make LEDs work properly with
negative logic. This implementation uses LED Invert bit to reverse the
logic issue that occurred when LEDs are driven by cathode. Keep LEDs
blinking for SerDes devices. Also made changes to magic number and the
for loop to reduce number of shifts.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:25:25 -07:00
Akeem G. Abodunrin
6c1d8b96d0 e1000e: Release mutex lock only if it has been initially acquired
This patch fixes the issue of unlocking swflag_mutex for 82574 and 82583
devices regardless of if the hw semaphore has been successfully acquired via
e1000_get_hw_semaphore_82574(). With this patch, unlocking mutex now depends
on if the hw semaphore was successfully acquired before. And 82574/82583
devices are reset regardless of whether e1000_get_hw_semaphore_82574()
returns success or failure.

Reported-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:19:03 -07:00
Bruce Allan
603cdca980 e1000e: prevent warning from -Wunused-parameter
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:13:07 -07:00
Bruce Allan
e80bd1d181 e1000e: cleanup whitespace
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-05-21 02:07:01 -07:00
Florian Fainelli
5ea94e7686 phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT
There is currently no way for an Ethernet MAC driver servicing PHY link
interrupts to notify this to the PHY state machine without defining its
own state machine. Since most drivers are not so special, introduce a
helper: phy_mac_interrupt() which can be called from a link up/down
interrupt routine to update the PHY state machine. To avoid code
duplication some refactoring has been done to expose the workqueue and
its corresponding callback internally.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:13:08 -07:00
Florian Fainelli
2c7b49212a phy: fix the use of PHY_IGNORE_INTERRUPT
When a PHY device is registered with the special IRQ value
PHY_IGNORE_INTERRUPT (-2) it will not properly be handled by the PHY
library:

- it continues to poll its register, while we do not want this
  because such PHY link events or register changes are serviced by an
  Ethernet MAC
- it will still try to configure PHY interrupts at the PHY level, such
  interrupts do not exist at the PHY but at the MAC level
- the state machine only handles PHY_POLL, but should also handle
  PHY_IGNORE_INTERRUPT similarly

This patch updates the PHY state machine and initialization paths to
account for the specific PHY_IGNORE_INTERRUPT. Based on an earlier patch
by Thomas Petazzoni, and reworked to add the missing bits. Add a helper
phy_interrupt_is_valid() which specifically tests for a PHY interrupt
not to be PHY_POLL or PHY_IGNORE_INTERRUPT and use it throughout the
code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:13:08 -07:00
Rasesh Mody
45e9834143 bna: Driver and Firmware Updated
Driver and Firmware versions updated to 3.2.21.1.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:07:59 -07:00
Rasesh Mody
43c07adaeb bna: Enahncement to Identify Default IOC Function
User should not be allowed to delete base function of eth port. Add a new field
to the bfa ioc attributes structure to indicate if the given ioc is default
function on the port or not.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:07:59 -07:00
Rasesh Mody
f489a4ba76 bna: Fix Ucast Failure Handling
Failure of the UCAST set for base mac address fails when user configures a
duplicate mac address that matches that of another vNIC on the same port.
The bna does not handle the ucast failure and keeps this address in cache.
On disable of the vNIC, bna tries to delete the failed base mac address and the
fw asserts.

On failure of ucast address, mark ucast address set to false.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:07:59 -07:00
Rasesh Mody
4b2305826c bna: Clear Driver Config Flags When HW Resets
Driver configuration flags are retained across open/stop operations preventing
configurations to be set in next open/stop. Setting MTU on a 1020 causes
network to fail until a reboot is performed on the host.

Clear the flags when configuration resets in hardware.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20 14:07:59 -07:00