summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2014-06-06net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-06amd-xgbe: Remove unnecessary includeTom Lendacky
The include of asm/cputype.h breaks the powerpc build. This include was accidentally left in from driver debugging and can be removed. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>, Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-06i40e/i40evf: Bump build versionCatherine Sullivan
Bump i40e to 0.4.3 and i40evf to 0.9.27. Change-ID: I4141e9f8615bdcfa3b1b5ecbc2ac62603a03b7ad Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: remove irqs only when they are set upShannon Nelson
Use an extra state variable to keep track of when the IRQs are fully set up. This keeps us from trying to unhook IRQs that already were left unhooked in a failed reset recovery, e.g. when firmware is broken. Change-ID: I073eb081e4ef8aedcbdf1ee0717c0ed64fa172f2 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: don't remove HMC that doesn't existShannon Nelson
If a reset recovery failed (e.g. firmware is broken), the HMC space won't get set up. We don't need to try to delete it if it didn't get set up. This stops some needless error messages when we already know we need to just tear things down. Change-ID: Iac600481765e20b136052b43a544e55d7870268b Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: print full link messageJesse Brandeburg
The i40e driver should print link messages like all the other Intel Ethernet drivers. Change-ID: Ia88bdb96794e17a3962fcea94db176de01f921f7 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: add xcast stats for portShannon Nelson
Add the missing unicast, multicast, and broadcast stats for the port. Change-ID: Ifc366d7b7745f70eaac9d00eeb0694eb9ec076a9 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: add vsi x-cast statsShannon Nelson
Add VSI HW stats for unicast, multicast, and broadcast for Rx and Tx. Stop printing the netdev multicast value because it doesn't include Tx and would be confusing. Change-ID: I08278b6657e7c838fd29a4a1f305f78fe1b150be Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: increase reset wait timeShannon Nelson
The wait time was originally too optimistic and the resets were failing after EMPR. This increases the loop count to wait considerably longer. This won't delay the actual wait longer than really needed, just allows us to poll more times as needed. Change-ID: If7b96f55cc25b8d06cbbe8665259d250188c53d7 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e/i40evf: add Tx pre queue disable functionMatt Jared
Add a function which indicates our intention to enable or disable a particular Tx queue. Also add a function to notify the device's Tx unit that we're about to enable or disable a Tx queue. Change-ID: I6adf3cbb5bb3e3c984d1ec969e06577c19ef296d Signed-off-by: Matt Jared <matthew.a.jared@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e/i40evf: check AQ register for valid dataKamil Krawczyk
B0 Si blocks AQ registers when in Blank Flash mode - write is dropped, read gives 0xDEADBEEF. Introduce a simple check for a correct value in one of the AQ registers to be sure that AQ was configured correctly. Without this check we get into an endless loop while trying to send GetVersion AQ cmd. Change-ID: I00102b8c5fa6c16d14289be677aafadf87f10f0d Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40evf: make messages less direMitch Williams
Depending on the timing of what the PF driver is doing, it make take a few tries before the VF driver is able to communicate with the PF driver on init or reset recovery. In order to prevent confusion, make the most common messages less scary by lowering them to a less terrifying log level and indicate that the driver will retry. Change-ID: I1ec22aa59a68f4469aabe14775a1bfc1ab4b7f2f Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: print message for pre-production hardwareJesse Brandeburg
The driver and hardware are not expected to work correctly with revision_id 0 hardware. Don't prevent the user from using it, but be sure to print a warning. Change-ID: I3712d34752bfad458078a5f35dfd0aa0ae9fd20e Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: add VEB stats to ethtoolShannon Nelson
Print the VEB statistics in the ethtool stats output. Change-ID: Ic93d4c3922345c43e4cfd7f7e7a906844dd2f49f Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06i40e: set lan_veb indexShannon Nelson
When the VEB is created for the basic LAN device and its VSIs, we need to set the tracking lan_veb index for later use. Change-ID: I66bb74993bbda3621ca557437cb4b3517f9b315b Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/xen-netback/netback.c net/core/filter.c A filter bug fix overlapped some cleanups and a conversion over to some new insn generation macros. A xen-netback bug fix overlapped the addition of multi-queue support. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05net: systemport: start with carrier offFlorian Fainelli
The SYSTEMPORT driver uses libphy to determine the carrier state, so make sure we start with a carrier off until libphy has completed the link training process. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05net: systemport: fix comment about HW prepending 2bytesFlorian Fainelli
The comment about how the hardware prepends 2bytes to align the IP header on a 4-byte boundary was not correct, fix that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05net: systemport: correctly check for RX_STATUS_OVFLOW flagFlorian Fainelli
We were missing an and comparison with status to check whether RX_STATUS_OVFLOW is asserted or not in the per-packet status word, fix that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05net: systemport: fix transmit locking schemeFlorian Fainelli
Our transmit locking scheme did not account for the TX ring full interrupt. If a TX ring full interrupt fires while we are attempting to transmit, we will cause a deadlock to occur. Fix this by making sure that we properly disable interrupts while acquiring the spinlock. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05amd-xgbe: Configuration and build supportLendacky, Thomas
This patch provides the Kconfig and Makefile changes needed to configure and build the AMD 10GbE platform driver and the AMD 10GbE phylib driver. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05amd-xgbe: Initial AMD 10GbE phylib driverLendacky, Thomas
This patch provides the initial phylib driver in support of the AMD 10GbE device. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05amd-xgbe: Initial AMD 10GbE platform driverLendacky, Thomas
This patch provides the initial platform driver for the AMD 10GbE device. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05hplance: fix ram size in commentAmos Kong
drivers/net/ethernet/amd/hplance.h: #define HPLANCE_MEMOFF 0x8000 /* struct lance_init_block */ #define HPLANCE_NVRAMOFF 0xC008 /* etheraddress as one *nibble* per byte */ The offset of RAM start is 0x8000, the offset of RAM end is 0xC008, so the RAM size is 16392 bytes. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05mvme147: fix ram size in commentAmos Kong
The order of ram pages is 3, so the ram size is 2^3 * 4K = 32K. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: avoid sleeping in dm9000_timeout callbackAndrew Ruder
On the DM9000B, dm9000_msleep() is called during the dm9000_timeout() routine. Since dm9000_timeout() holds the main spinlock through the entire routine, mdelay() needs to be used rather than msleep(). Furthermore, the mutex_lock()/mutex_unlock() should be avoided so as to not sleep with spinlocks held. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: handle initial link statusAndrew Ruder
On the DM9000A/DM9000B force the initial check of the link status. The DM9000A/B has a link status changed event and this interrupt bit isn't always set out of reset when a cable is plugged in. This results in the driver not seeing the cable attached link status until the cable is removed and plugged in again. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: remove redundant ISR status clearAndrew Ruder
Since dm9000_interrupt() is already reading/clearing every set bit in DM9000_ISR, this additional clear in dm9000_rx() (which is only called by dm9000_interrupt()) is unnecessary and can be removed. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: clean up edge-triggered irq compatibilityAndrew Ruder
DM9000 uses level-triggered interrupts. Some systems (PXA270) only support edge-triggered interrupts on GPIOs. Some changes are necessary to ensure that interrupts are not triggered while the GPIO interrupt is masked or we will miss the interrupt forever. * Make some helper functions called dm9000_mask_interrupts() and dm9000_unmask_interrupts() for readability. * dm9000_init_dm9000(): ensure that this function always leaves interrupts masked regardless of the state when it entered the function. This is primarily to support the situation in dm9000_open where the logic used to go: dm9000_open() dm9000_init_dm9000() unmask interrupts request_irq() If an interrupt occurred between unmasking the interrupt and requesting the irq, it would be missed forever as the edge event would never be seen by the GPIO hardware in the PXA270. This allows us to change the logic to: dm9000_open() dm9000_init_dm9000() dm9000_mask_interrupts() request_irq() dm9000_unmask_interrupts() * dm9000_timeout(), dm9000_drv_resume(): Add the missing dm9000_unmask_interrupts() now required by the change above. * dm9000_shutdown(): Use mask helper function * dm9000_interrupt(): Use mask/unmask helper functions Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: clean up reset codeAndrew Ruder
* Change a hard-coded 0x3 to NCR_RST | NCR_MAC_LBK in dm9000_reset * Every single place where dm9000_init_dm9000 was ran, a dm9000_reset was called immediately before-hand. Bring dm9000_reset into dm9000_init_dm9000. * The following commit updated the dm9000_probe reset routine to use NCR_RST | NCR_MAC_LBK: 6741f40 DM9000B: driver initialization upgrade and a later commit added a bug-fix to always reset the chip twice: 09ee9f8 dm9000: Implement full reset of DM9000 network device Unfortunately, since the changes in 6741f40 were made by replacing the dm9000_probe dm9000_reset with the adjusted iow(), the changes in 09ee9f8 were not incorporated into the dm9000_probe reset. Furthermore, it bypassed the requisite reset-delay causing some boards to get at least one "read wrong id ..." dev_err message during dm9000_probe. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05dm9000: acquire irq flags from device treeAndrew Ruder
The DM9000 supports both active high interrupts and active low interrupts. This is configured via the attached EEPROM. In the device-tree case, make sure that the DM9000 driver passes the correct flags to request_irq. Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05xen-netback: Fix handling of skbs requiring too many slotsZoltan Kiss
A recent commit (a02eb4 "xen-netback: worse-case estimate in xenvif_rx_action is underestimating") capped the slot estimation to MAX_SKB_FRAGS, but that triggers the next BUG_ON a few lines down, as the packet consumes more slots than estimated. This patch introduces full_coalesce on the skb callback buffer, which is used in start_new_rx_buffer() to decide whether netback needs coalescing more aggresively. By doing that, no packet should need more than (XEN_NETIF_MAX_TX_SIZE + 1) / PAGE_SIZE data slots (excluding the optional GSO slot, it doesn't carry data, therefore irrelevant in this case), as the provided buffers are fully utilized. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: Paul Durrant <paul.durrant@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Paul Durrant <paul.durrant@gmail.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05qlcnic: Initialize mailbox cmd structure to zeroRajesh Borundia
o Uninitialzed fields in mailbox command structure caused commands to time out randomly due to garbage values so initialize it to zero. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05gianfar: Call netif_carrier_off() prior to registrationFabio Estevam
Quoting David Miller: "At the moment you call register_netdev() the device is visible, notifications are sent to userspace, and userland tools can try to bring the interface up and see the incorrect link state, before you do the netif_carrier_off(). Said another way, between the register_netdev() and netif_carrier_off() call, userspace can see the device in an inconsistent state." So call netif_carrier_off() prior to register_netdev(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-05i40e: add missing VSI statisticsShannon Nelson
Add a couple more statistics that the hardware offers but aren't part of the standard netdev stats. Change-ID: I201db2898f2c284aee3d9631470bc5edd349e9a5 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e/i40evf: remove rx_errors and rx_missedShannon Nelson
The rx_errors (GLV_REPC) and rx_missed (GLV_RMPC) were removed from the chip design. Change-ID: Ifdeb69c90feac64ec95c36d3d32c75e3a06de3b7 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: refactor stats collectionShannon Nelson
Pull the PF stat collection out of the VSI collection routine, and add a unifying stats update routine to call the various stat collection routines. Change-ID: I224192455bb3a6e5dc0a426935e67dffc123e306 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: refactor send versionJesse Brandeburg
This change moves some common code in two places into a small helper function, and corrects a bug in one of the two places in the process. Change-ID: If3bba7152b240f13a7881eb0e8a781655fa66ce7 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e/i40evf: VEB structure added, GTIME macro updateKamil Krawczyk
Structure for VEB context added. Update macro for transition from ms to GTIME (us) time units. Change-ID: Ib3a19587b4cf355348655df8f60c6f37bb1497a3 Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: notify VF of all types of resetsMitch Williams
Currently, the PF driver only notifies the VFs for PF reset events. Instead, notify the VFs for all types of resets, so they can attempt a graceful reinit. Change-ID: I03eb7afde25727198ef620f8b4e78bb667a11370 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40evf: fix crash when changing ring sizesMitch Williams
i40evf_set_ringparam was broken in several ways. First, it only changed the size of the first ring, and second, changing the ring size would often result in a panic because it would change the count before deallocating resources, causing the driver to either free nonexistent buffers, or leak leftover buffers. Fix this by storing the descriptor count in the adapter structure, and updating the count for each ring each time we allocate them. This ensures that we always free the right size ring, and always end up with the requested count when the device is (re)opened. Change-ID: I298396cd3d452ba8509d9f2d33a93f25868a9a55 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40evf: set descriptor multiple to 32Mitch Williams
Hardware requires descriptors to be allocated in groups of 32. Change-ID: I752ccc96769d1bd8d3018c004b8aeff464045bf2 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: clamp jumbo frame sizeJesse Brandeburg
The driver was allowing the user to set larger size MTU than the hardware was being configured to support. The driver was already using VLAN_HLEN when setting the hardware max receivable frame size, so just add it to the netdev MTU set entry point as well. Change-ID: Ie20e2a35d04f8c411253e255bea79ca69aaeaea3 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e/i40evf: remove unused RX_LRO defineJesse Brandeburg
Remove unused defines and macros for RX_LRO. Change-ID: I8ca6715edfa62b56837417a1c4ff68c2345dab6e Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: remove check for large bufferKamil Krawczyk
We introduced this check in case this structure changed in the future, the AQ definition is now mature enough that this check is no longer necessary. Change-ID: Ic66321d0a08557dc9d8cb84029185352cb534330 Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: Rework register diagnosticKamil Krawczyk
Register range, being subject to register diagnostic, can vary among different NVMs. We will try to identify the full range and use it for a register test. This is needed to avoid false test results. If we fail to define the proper register range we will test only the first register from that group. Change-ID: Ieee7173c719733b61d3733177a94dc557eb7b3fd Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e: don't use OR to check a valueJesse Brandeburg
A couple of FD checks ended up using bitwise OR to check a value, which ends up always being evaluated to true. This should fix the issue. Thanks to DaveJ for noticing and reporting the issue! CC: Dave Jones <davej@redhat.com> Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05vxlan: Add support for UDP checksums (v4 sending, v6 zero csums)Tom Herbert
Added VXLAN link configuration for sending UDP checksums, and allowing TX and RX of UDP6 checksums. Also, call common iptunnel_handle_offloads and added GSO support for checksums. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-04bonding: Support macvlans on top of tlb/rlb mode bondsVlad Yasevich
To make TLB mode work, the patch allows learning packets to be sent using mac addresses assigned to macvlan devices, also taking into an account vlans that may be between the bond and macvlan device. To make RLB work, all we have to do is accept ARP packets for addresses added to the bond dev->uc list. Since RLB mode will take care to update the peers directly with correct mac addresses, learning packets for these addresses do not have be send to switch. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-04macvlan: Support bonding eventsVlad Yasevich
Bonding and team drivers generate specific events during failover that trigger switch updates. When a macvlan device is configured on top of bonding, we want switches to learn about the macvlan devices as well. This patch adds a handler to macvlan driver to propagate these events to all macvlan devices. We let the generic inetdev event handler do the work. This allows macvlan to operated correctly over active-backup mode bond. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>