summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
Commit message (Collapse)AuthorAgeFilesLines
* ixgbe: Remove IXGBE_FLAG_IN_NETPOLL since it doesn't do anythingAlexander Duyck2015-03-132-15/+4Star
| | | | | | | | | | | | | | | This patch removes some dead code from the cleanup path for ixgbe. Setting and clearing the flag doesn't do anything since all we are doing is setting the flag, scheduling NAPI, clearing the flag and then letting netpoll do the polling cleanup. As such it doesn't make much sense to have it there. This patch also removes one minor white-space error. CC: <kernel-team@fb.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: enable relaxed ordering for SPARCJeff Kirsher2015-03-132-4/+12
| | | | | | | | | | | This patch makes sure that relaxed ordering is not disabled when on SPARC, where it helps with performance. CC: <kernel-team@fb.com> CC: Sowmini Varadhan <sowmini.varadhan@oracle.com> Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
* ixgbe: cleanup make ixgbe_set_ethertype_anti_spoofing_X550 staticDon Skidmore2015-03-131-2/+2
| | | | | | | | | | | Correcting a mistake when I initial created this function. I should have made this static since it is only referenced where the function pointer is assigned. CC: <kernel-team@fb.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Clean up type inconsistencyDon Skidmore2015-03-131-2/+2
| | | | | | | | | | | Missed this when I created commit 6a14ee0cfb197 ("ixgbe: Add X550 support function pointers"). Use a the __be* type to be consistent with how the value is assigned. CC: <kernel-team@fb.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: add new wrapper for X550 supportDon Skidmore2015-03-139-14/+114
| | | | | | | | | | | For the X550 mac type we have to do additional steps around enabling/disabling Rx. This patch will add a layer of indirection around these support functions to enable this. CC: <kernel-team@fb.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: add ethtool RSS supportMitch A Williams2015-03-092-0/+110
| | | | | | | | | | Add support for setting the RSS hash table and hash key through ethtool. This patch incorporates suggestions from Ben Hutchings <ben.hutchings@codethink.co.uk>. Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: Bump i40e/i40evf versionCatherine Sullivan2015-03-092-2/+2
| | | | | | | | | Bump PF version to 1.2.37 and VF version to 1.2.25 Change-ID: I0287a750408250dc055c03e1f744fd5f0caefd68 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: add MAC printing to debugfs dump VSIShannon Nelson2015-03-091-0/+5
| | | | | | | | | | | | Print the LAN, SAN, and Port MACs for the VSI if debugfs command dump VSI is used on the PF's VSI. Example output: [260221.871244] i40e 0000:04:00.0: MAC address: 68:05:ca:26:15:e0 SAN MAC: 00:00:00:00:02:00 Port MAC: 68:05:ca:26:15:e3 Change-ID: I0b393113dfb5ee7ff4f9e5227e4177885f0cc15e Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Fix inconsistent use of PF/VF vs pf/vfJeff Kirsher2015-03-099-174/+174
| | | | | | | | | | Joe Perches pointed out that we were inconsistent in the use of PF vs pf or VF vs vf in our driver code. Since acronyms are usually capitalized to denote that it is an acronym, changed all references to be consistent throughout the code. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: tame the nvmupdate read and write complaintsShannon Nelson2015-03-091-2/+7
| | | | | | | | | | | | | | | | | The NVMUpdate tool doesn't necessarily know the ReadOnly map of the current NVM image, and must try reading and writing words that may be protected. This generates an error out of the Firmware request that the driver logs. Unfortunately, this ends up spitting out hundreds of bogus read and write error message that looks rather messy. This patch checks the error type and under normal conditions will not print the typical read and write errors during NVMUpdate. This can be overridden by enabling the NVM update debugging. This results in a much less messy log file, and likely many fewer customer support questions. Change-ID: Id4ff2e9048c523b0ff503aa5ab181b025ec948ea Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: fix accidental write to ITR registersJesse Brandeburg2015-03-093-0/+5
| | | | | | | | | | | | | Fix a bug introduced in the force writeback code, where the interrupt rate was set to 0 (maximum) by accident. The driver must correctly set the NOITR fields to avoid ITR update as a side effect of triggering the software interrupt. Change-ID: I290851ae04ef3811c43aab5ee33242029f26c1a3 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40vf: don't stop me nowMitch Williams2015-03-091-5/+6
| | | | | | | | | | | | | If a reset occurs when the netdev is closed, the reset task will hang in napi_disable, causing deadlocks and general grumpiness. Check to make sure the device is actually running before stopping everything. This allows the reset task to complete and have a real good time. Change-ID: Iaaea84acbcb9b3810c216b14c3326e4287b75b58 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: future proof some sizeof callsShannon Nelson2015-03-091-2/+2
| | | | | | | | | | | Make sure the sizeof() calls are taking the size of the actual struct that we care about. By using the pointer variable, we'll always get the right struct size, even if the variable type changes sometime in the future. Change-ID: Id5858f883cf42447365ea3733080d7714f975bce Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Remove "hello world" strings from i40e driverGreg Rose2015-03-091-2/+2
| | | | | | | | | While using the Linux "strings" command I found these two strings in the driver. There's no need for them and they're kinda silly. Change-ID: I4e19b02983d48b631e9a9979f49790492845f221 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ethernet: codespell comment spelling fixesJoe Perches2015-03-099-10/+10
| | | | | | | | | | | | | | | To test a checkpatch spelling patch, I ran codespell against drivers/net/ethernet/. $ git ls-files drivers/net/ethernet/ | \ while read file ; do \ codespell -w $file; \ done I removed a false positive in e1000_hw.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* i40e: Strip configfs codeGreg Rose2015-03-075-374/+0Star
| | | | | | | | | The use of configfs is not allowed in network drivers. Strip the code that uses it. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: Bump versionSravanthi Tangeda2015-03-072-2/+2
| | | | | | | | Bump i40e to 1.2.12 and i40evf to 1.2.6. Change-ID: I641871da3a9abd396b28eda5744a4d68493c1400 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: enable prefetch of Tx descriptors during cleanupJesse Brandeburg2015-03-072-0/+4
| | | | | | | | | Performance can be improved a bit by imitating ixgbe and using prefetch to get us the next Tx descriptor. Change-ID: Ice7ffd4cd0ce87c35295059bdb7972a7f53723aa Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Simplify code for rss_size_max configAnjali Singhai Jain2015-03-071-5/+2Star
| | | | | | | | | We initialize the pf->rss_size_max in sw_init now and hence this code can be simplified. Change-ID: I1a7abc837604a40bc65e6c6b21190b909ed6bb21 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: Simplify tunnel selection logicAnjali Singhai Jain2015-03-072-4/+20
| | | | | | | | Use l4_tunnel type generically to keep code flow simple. Change-ID: Ic52287e3b1ca4204e6b6e13431890c1a6ae9c422 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: FD filters flush policy changesAnjali Singhai Jain2015-03-073-20/+67
| | | | | | | | | | | | | | | | | | | | Since GLQF_FDCNT_0 register now has the right offset, use it to simplify our FD flush flow. If the filter add error happens to be for SB we just auto disable SB. If filter error happens to be for ATR, auto disable ATR and mark the state to FD_FLUSH_REQUESTED. Which gets cleared when flush completes. If we are entering flush too quickly (< 30 seconds) and we have quite a few SB rules, its time to disable ATR for good. Since SB + ATR rules is most likely making the FD table unstable. ATR can be re-enabled by turning ntuple off (ethtool -K ntuple off) and will remain off after turning ntuple on till it gets unstable again. Change-ID: I2154a2e0a5d44851a2f0eb8731e2f1d4a4d1acbc Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Avoid logs while adding/deleting FD-SB filtersAnjali Singhai Jain2015-03-071-3/+3
| | | | | | | | | | | | It is not necessary to print FD filter add/delete log with normal debug settings because ethtool -n ethx shows all the FD-SB filters on an interface. The log can still be turned on through higher debug levels and it will continue to print a log if there was an error in the add/delete process. Change-ID: I67db2baf49e2075d2f537de40f7895e5b02cd610 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: print port stats only on partition 1Shannon Nelson2015-03-071-3/+3
| | | | | | | | | Only print the port and veb stats if this is the first partition of a multiplexed port. Change-ID: I7ce0c323cdee5cfd2e54d8bea5b0b9102987e671 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Move code to enable/disable Loopback to the main fileAkeem G Abodunrin2015-03-073-70/+68Star
| | | | | | | | | | | | Since changes made to enable or disable loopback for all VSIs, not only SR-IOV or PCIOV, then it became necessary to move the associated functions to main file - so that other non-SRIOV supported driver can take advantage of the changes. Change-ID: I59a49fd23a6136acda5e16f8d1e5ac7fd9c5fc05 Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: rework vector reservationShannon Nelson2015-03-071-19/+56
| | | | | | | | | | | | | | | | | The initial problem solved here is that the vector allocation was trying too hard to save vectors for VMDq, to the point of not giving the PF enough when in a tight situation such as an NPAR partition. This change makes sure that the PF will get all the queues and vectors it wants to fill out its destiny. Essentially, nothing is specially reserved for VMDq, it simply gets whatever is left after the PF, FCoE, and FD sideband get what they want. Additionally, the calculations for the reservations were harder to follow than necessary, so I've made it more straight forward. Change-ID: I99b384f104535b686c690b8ef0a787559485c8d4 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: clean up debug_read_registerJesse Brandeburg2015-03-071-6/+4Star
| | | | | | | | | | | There were some additional spaces and strange (double swapping) logic in this function that I started looking at because sparse was warning. This fixes the sparse warning and fixes up the other issues. Change-ID: I72a91a4197cd45921602649040e6bd25e5f17c0a Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: store msg_enable in the right sizeJesse Brandeburg2015-03-071-1/+1
| | | | | | | | | The kernel returns a u32 for netif_msg_init, and we were storing it in a u16. Fix the width of the datatype. Change-ID: I4b23326e5707c91cd59325c5a1ccb2ba7a3974fc Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Remove unneeded conversionKamil Krawczyk2015-03-071-1/+0Star
| | | | | | | | | Remove LE16 to CPU endianes conversion from i40e_read_nvm_word_srctl function, as it's already done by register read function. Change-ID: I739f0f20a9b8e18223e54c0ca5443e63d75da878 Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Remove duplicate codeCatherine Sullivan2015-03-071-8/+0Star
| | | | | | | This series of code was repeated twice, remove one of them. Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: Refactor i40e_debug_aq and make some functions staticShannon Nelson2015-03-076-54/+54
| | | | | | | | | | | | A sparse complaint in i40e_debug_aq in a funky buffer write goes away by straightening out the code out to something less convoluted. Also fix some other sparse warnings while we are at it, making some functions static and using NULL instead of 0. Change-ID: I93907534fe1f1f675830774b3d14ecf1c6ffc9a0 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000: add dummy allocator to fix race condition between mtu change and netpollSabrina Dubroca2015-03-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race condition between e1000_change_mtu's cleanups and netpoll, when we change the MTU across jumbo size: Changing MTU frees all the rx buffers: e1000_change_mtu -> e1000_down -> e1000_clean_all_rx_rings -> e1000_clean_rx_ring Then, close to the end of e1000_change_mtu: pr_info -> ... -> netpoll_poll_dev -> e1000_clean -> e1000_clean_rx_irq -> e1000_alloc_rx_buffers -> e1000_alloc_frag And when we come back to do the rest of the MTU change: e1000_up -> e1000_configure -> e1000_configure_rx -> e1000_alloc_jumbo_rx_buffers alloc_jumbo finds the buffers already != NULL, since data (shared with page in e1000_rx_buffer->rxbuf) has been re-alloc'd, but it's garbage, or at least not what is expected when in jumbo state. This results in an unusable adapter (packets don't get through), and a NULL pointer dereference on the next call to e1000_clean_rx_ring (other mtu change, link down, shutdown): BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff81194d6e>] put_compound_page+0x7e/0x330 [...] Call Trace: [<ffffffff81195445>] put_page+0x55/0x60 [<ffffffff815d9f44>] e1000_clean_rx_ring+0x134/0x200 [<ffffffff815da055>] e1000_clean_all_rx_rings+0x45/0x60 [<ffffffff815df5e0>] e1000_down+0x1c0/0x1d0 [<ffffffff811e2260>] ? deactivate_slab+0x7f0/0x840 [<ffffffff815e21bc>] e1000_change_mtu+0xdc/0x170 [<ffffffff81647050>] dev_set_mtu+0xa0/0x140 [<ffffffff81664218>] do_setlink+0x218/0xac0 [<ffffffff814459e9>] ? nla_parse+0xb9/0x120 [<ffffffff816652d0>] rtnl_newlink+0x6d0/0x890 [<ffffffff8104f000>] ? kvm_clock_read+0x20/0x40 [<ffffffff810a2068>] ? sched_clock_cpu+0xa8/0x100 [<ffffffff81663802>] rtnetlink_rcv_msg+0x92/0x260 By setting the allocator to a dummy version, netpoll can't mess up our rx buffers. The allocator is set back to a sane value in e1000_configure_rx. Fixes: edbbb3ca1077 ("e1000: implement jumbo receive with partial descriptors") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000: call netif_carrier_off early on downEliezer Tamir2015-03-061-1/+1
| | | | | | | | | | | | | | | | | When bringing down an interface netif_carrier_off() should be one the first things we do, since this will prevent the stack from queuing more packets to this interface. This operation is very fast, and should make the device behave much nicer when trying to bring down an interface under load. Also, this would Do The Right Thing (TM) if this device has some sort of fail-over teaming and redirect traffic to the other IF. Move netif_carrier_off as early as possible. Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* igb: Make arrays on stack static const to avoid reallocationAlexander Duyck2015-03-061-12/+12
| | | | | | | | | | | | | | | | | | | | While addressing the pin problem I noticed that all of the pin register values where having to be pushed onto the stack each time the function was called. To avoid that I am making them static const so that they should only need to be allocated once and we can avoid all the instructions to get them onto the stack.. size before: text data bss dec hex filename 161477 10512 8 171997 29fdd drivers/net/ethernet/intel/igb/igb.ko size after: text data bss dec hex filename 161205 10512 8 171725 29ecd drivers/net/ethernet/intel/igb/igb.ko Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* igb: Fix warning pin may be used uninitializedAlexander Duyck2015-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | When building the kernel using the gcc 4.8.3 compiler included in Fedora 20 I was repeatedly seeing the warning: drivers/net/ethernet/intel/igb/igb_ptp.c: In function ‘igb_ptp_feature_enable_i210’: drivers/net/ethernet/intel/igb/igb_ptp.c:395:21: warning: ‘pin’ may be used uninitialized in this function [-Wmaybe-uninitialized] tssdp &= ~ts_sdp_en[pin]; ^ drivers/net/ethernet/intel/igb/igb_ptp.c:471:6: note: ‘pin’ was declared here int pin; ^ To resolve it I am assigning the pin a value of -1 when it is instantiated. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: remove calls to ioremap/unmap for NVM addrYanir Lubetkin2015-03-061-3/+5
| | | | | | | | | | | | Starting I219, the NVM will not be mapped to its own BAR, but to an address region in another bar. The mapping/unmapping is relevant to older HW only. CC: John W Linville <linville@tuxdriver.com> Reported-by: John W Linville <linville@tuxdriver.com> Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: fix obscure commentsYanir Lubetkin2015-03-061-4/+8
| | | | | | | | | | | The interface to the device flash was modified in i219 and later HW. This patch better describes the change and the impact on the driver. CC: John W Linville <linville@tuxdriver.com> Reported-by: John W Linville <linville@tuxdriver.com> Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Fix mismatching type for ioremap_lenJeff Kirsher2015-03-061-2/+2
| | | | | | | | | | As pointed out by Ben Hutchings, ioremap uses unsigned long as its parameter type, so we should be using that instead of u32 or int. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* i40e/i40evf: Version bumpSravanthi Tangeda2015-03-052-2/+2
| | | | | | | | | Bump i40e to 1.2.11 and i40evf to 1.2.5 Change-ID: Ie13375941606b0a027e5b5dbc235f5f5f03b75c8 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: don't spam the system logMitch A Williams2015-03-051-3/+0Star
| | | | | | | | | | | | | The PF driver spams the system log with messages about VF VSI when VFs are created, as well as each time they are reset. This is annoying, and the information isn't even useful most of the time. Remove this message to reduce user annoyance. Change-ID: I8de90d05380f54b038c9c8c3265150be87c9242c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: move IRQ tracking setup into MSIX setupShannon Nelson2015-03-051-31/+29Star
| | | | | | | | | | | Move the IRQ tracking setup and teardown into the same routines that do the IRQ setup and teardown. This keeps like activities together and allows us to track exactly the number of vectors reserved from the OS, which may be fewer than are available from the HW. Change-ID: I6b2b1a955c5f0ac6b94c3084304ed0b2ea6777cf Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Ioremap changesAnjali Singhai2015-03-052-2/+7
| | | | | | | | | | | | | | For future device support we do not want to map the whole CSR space since some of it is mapped by other drivers with different mapping methods. Note: As a side effect, the flash region (if exposed through the memory map) gets unmapped too since it follows the future use region. Change-ID: Ic729a2eacd692984220b1a415ff4fa0f98ea419a Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: Clean up some formatting and other thingsJesse Brandeburg2015-03-058-10/+2Star
| | | | | | | | | | Fix some double blank lines and un-split a function declaration that all fits on one line. Also make i40e_get_priv_flags static. Change-ID: I11b5d25d1153a06b286d0d2f5d916d7727c58e4a Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Add AOC PHY types to case statementsCatherine Sullivan2015-03-052-0/+4
| | | | | | | | | | Add the 10G and 40G AOC PHY types to the case statement in get_media_type and ethtool get_settings so that the correct information gets reported back to the user. Change-ID: I1b4849d22199a9acf7c8807166d0317c1faad375 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Fix ethtool offline testGreg Rose2015-03-051-0/+10
| | | | | | | | | | | If the system administrator is requesting an offline diagnostic test using 'ethtool -t' then we should, you know, actually take the device offline before doing the testing. Change-ID: I6afa1cbfcc821c9ab6e6f47ed4d8dc2d8dd20e82 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Reassign incorrect PHY type to fix a FW bugCatherine Sullivan2015-03-051-0/+4
| | | | | | | | | | | | Some FW versions are incorrectly reporting a breakout cable as PHY type 0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU). If we get this value back from FW and the version is < 4.40, reassign it to I40E_PHY_TYPE_10GBASE_SFPP_CU. Change-ID: Ibb41a0e3cd2c0753744e8553959240df6ed13ae8 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: fix XPS mask when resettingJesse Brandeburg2015-03-051-11/+11
| | | | | | | | | | | | During resets (possibly caused by a Tx hang) the driver would accidentally clear the XPS mask for all queues back to 0. This caused higher CPU utilization and had some other performance impacts for transmit tests. Change-ID: I95f112432c9e643a153eaa31cd28cdcbfdd01831 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: use more portable sign extensionJesse Brandeburg2015-03-051-2/+2
| | | | | | | | | | Use automatic sign extension by replacing 0xffff... constants with ~(u64)0 or ~(u32)0. Change-ID: I73cab4cd2611795bb12e00f0f24fafaaee07457c Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e/i40evf: grab NVM devstarter version not image versionShannon Nelson2015-03-053-3/+4
| | | | | | | | | | | 0x2A is the NVM version so it has useful data but it is per image version every image can have a different one. 0x18 is the dev starter version which all the images for release will have the same version. Of the two 0x18 is more useful and is what should be displayed. Change-ID: Idf493da13a42ab211e2de0bef287f5de51033cca Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: Don't check operational or sync bit for App TLVNeerav Parikh2015-03-051-1/+1
| | | | | | | | | | | | | | In CEE mode the firmware does not set the operational status bit of the application TLV status as returned from the "Get CEE DCBX Oper Cfg" AQ command. This occurs whenever a DCBX configuration is changed. This is a workaround to remove the check for the operational and sync bits of the application TLV status till a firmware fix is provided. Change-ID: I1a31ff2fcadcb06feb5b55776a33593afc6ea176 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* i40e: during LED interaction ignore activity LED src modesMatt Jared2015-03-051-1/+34
| | | | | | | | | Modify our get and set LED functions so they ignore activity LEDs, as we are required to blink the link LEDs only. Change-ID: I647ea67a6fc95cbbab6e3cd01d81ec9ae096a9ad Signed-off-by: Matt Jared <matthew.a.jared@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>