summaryrefslogtreecommitdiff
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* wl1251: Fix typo in MODULE_DESCRIPTION in wl1251/main.cMasanari Iida2015-04-071-1/+1
| | | | | | | | This patch fix a spelling typo in MODULE_DESCRIPTION in wl1251/main.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* wireless: Use bool function returns of true/false instead of 1/0Joe Perches2015-04-076-17/+17
| | | | | | | Use bool constants as the return values instead of 1 and 0. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Add encryption argument in rtl_is_special_data for checking DHCP ↵Taehee Yoo2015-04-074-6/+11
| | | | | | | | | | | | | | | | | packet. rtl8192cu can't connect to AP after physical reconnect. according to dmesg, that problem's cause was DHCP timeout. rtl_is_special_data function checks packet type for adjusting rate. when that function is called from _rtl_rc_get_highest_rix, it can not calculate offset correctly. so i add argument is_encn in rtl_is_special_data. is_enc variable mean that iv header is added in skb parameter. i test only rtl8192cu chipset. because i doesn't have other rtlwifi chipsets. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k_htc: check seq number instead of cmd id for timeoutFred Chou2015-04-072-7/+7
| | | | | | | | As the driver may send multiple wmi commands with identical cmd id, it is more robust to check seq number for timeout instead. Signed-off-by: Fred Chou <fred.chou.nd@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge tag 'iwlwifi-next-for-kalle-2015-04-02' of ↵Kalle Valo2015-04-0738-310/+712
|\ | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * some more work on LAR * fixes for UMAC scan * more work on debugging framework * more work for 8000 devices * cleanups and small bugfixes
| * iwlwifi: mvm: capture connection loss as part of MLME triggerEmmanuel Grumbach2015-04-025-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | The only other way to catch these would have been to monitor the Tx deauth event, but we can send a deauth when we roam. So it would have been tricky to make sure we capture the connection losses only. Define a separate trigger for the connection losses to make it easier to catch them. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: add trigger for time eventsEmmanuel Grumbach2015-04-024-0/+63
| | | | | | | | | | | | | | | | | | | | This will allow to collect data when a time event notifcation with a certain id and action is coming from the firmware. This can be very useful to debug various flows. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: do string formatting in debug triggersJohannes Berg2015-04-026-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code has a lot of duplicates of printing into a buffer (while having to make sure it's NUL-filled and -terminated) and then passing that to the debug trigger collection. Since that's error-prone, instead make the debug trigger collection function take a format string and format arguments (with compiler validity checking) and handle the buffer internally. This makes one behavioural change -- instead of sending the whole buffer to userspace (clearing is needed to not leak stack data) it just passes the actual string (including NUL-terminator.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: fix spelling errorsSara Sharon2015-04-0221-42/+42
| | | | | | | | | | | | | | | | | | Fix spelling error across the driver. Modified only comments and prints. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: don't return uninitialized value in get_survey()Johannes Berg2015-04-021-0/+1
| | | | | | | | | | | | | | | | | | If ucode_loaded isn't true the function returns the 'ret' variable without having assigned a value properly. Fix that. Reported-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: add trigger for firmware dump upon MLME failuresEmmanuel Grumbach2015-04-023-2/+102
| | | | | | | | | | | | | | This will allow to catch failures in MLME and get the firmware data when this happens. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * Merge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-nextEmmanuel Grumbach2015-04-0271-406/+759
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Lots of updates for net-next; along with the usual flurry of small fixes, cleanups and internal features we have: * VHT support for TDLS and IBSS (conditional on drivers though) * first TX performance improvements (the biggest will come later) * many suspend/resume (race) fixes * name_assign_type support from Tom Gundersen
| * | iwlwifi: mvm: remove unused argumentsJohannes Berg2015-04-022-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The str/len arguments to iwl_fw_dbg_trigger_simple_stop() aren't used, and for a simple trigger don't really need to be used as the trigger code itself encodes the reason, so remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queueMatti Gottlieb2015-04-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending multiple action frames off channel, one after the other can create a race that will result in a timeout: 1. Start sending action frame off channel. 2. Once the frame is sent or the time event is over, the flow will eventually call ieee80211_start_next_roc to start the next roc frame & iwl_mvm_roc_finished schedules to schedule a work to flush the queue. 3. Start sending new roc frame and write it to the queue before the flush work has started. 4. The work is called and it flushes the new packet that was placed on the on the queue so the packet is lost. This causes the frame to be removed & not sent, that causes a timeout in userspace. Flush the work queue that flushes the roc/off channel queue before starting to send a new frame off channel, in order to avoid a race between the new frame that is transmitted off channel & the flushing of the queue. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: always reconfigure last MCC on initArik Nemtsov2015-04-022-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the last found MCC is reconfigured only in the recovery flow. But it should always be used when available, for the ifdown/up or RF-Kill/CT-Kill scenarios. While at it, fix a couple of bugs in the init-from-last-MCC flow. Return an error value when a current MCC is not found. Pass on the regdomain to cfg80211 only if it was changed and don't ignore the return value from the cfg80211-setter function. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: add debugfs entry with the number of net-detect scansLuciano Coelho2015-04-023-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our testers need to know the number of scans performed while in net-detect mode before the device wakes up. The firmware already passes this information to the driver, so we can save it and report it in a debugfs entry. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: rs: refactor rs_update_rate_tblEyal Shapira2015-04-021-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Minor cleanup and refactoring. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: check the size of the trigger struct from the firmware fileEmmanuel Grumbach2015-04-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we access the triggers we need to make sure that the data we expect was actually provided by the firmware file. Check this when we decode the triggers from the firmware file. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: rs: fix comment indentationLiad Kaufman2015-03-301-3/+1
| | | | | | | | | | | | | | | Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: Clean up UMAC scan UIDs in the reset and drv_stop flowsAlexander Bondar2015-03-302-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the reset flow, the driver cancels ongoing scan and sends scan complete notification to mac80211. However it does not clean its UID. Add cleaning scan UID for the ongoing scan. Loop over all other UIDs to make sure there's nothing left there and warn if any is found. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: 8000: change PNVM in case it doesn't match to the HW stepEran Harary2015-03-304-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a strong relationship between the NVM version and the hardware step. Enforce that in the driver in case the default NVM on the platform is the wrong one. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: fix debug print in the RSA ownership workaroundEran Harary2015-03-301-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | The semaphore may not be accessible. Fix the debug prints accordingly. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: allow to configure the timeout for the Tx queuesEmmanuel Grumbach2015-03-307-12/+80
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes we will want to configure the timeouts for the Tx queues based on the vif type. Allow to do that using the trigger mechanism. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: drop support for early versions of 8000Emmanuel Grumbach2015-03-2611-116/+46
| | | | | | | | | | | | | | | | | | These early versions are no longer supported. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: use debugfs_create_bool() for enable_scan_iteration_notifLuciano Coelho2015-03-262-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to implement the enable_scan_iteration_notif handling explicitly and there's no reason not to export the current value. So use debugfs_create_bool() instead. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: add delay to scheduled scanLuciano Coelho2015-03-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add support for delaying the start of a scheduled scan (or a WoWLAN net-detect scan). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: pcie: initialize trans_pcie->ref_count on configure()Eliad Peller2015-03-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ref_count is currently initialized on start_fw(). This causes some issues in restart flow, as currently active references (e.g. unclaimed command) will get cleared, resulting in invalid reference accounting. Move the ref_count initialization to the configure() trans op, so it won't be re-initialized on restart. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: inform mac80211 about umac scans that was aborted by restartDavid Spinadel2015-03-263-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In nic restart flow we inform mac80211 that scan was aborted, but it was based only on scan_status which is not set by UMAC scan. Fix that. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: remove d0i3 ref correctly during AP startArik Nemtsov2015-03-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The AP_START d0i3 reference was never removed if the AP started correctly. This has the unpleasant side-effect of preventing D0i3 on Android if the WiFi hotspot was ever started on the device. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: take IWL_MVM_REF_UCODE_DOWN before restarting hwEliad Peller2015-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we unref IWL_MVM_REF_UCODE_DOWN on iwl_mvm_restart_complete(). Usually, the restart is initiated by iwl_mvm_nic_restart(), which takes the reference before restarting the hw. However, in D3 flow we might call ieee80211_restart_hw() directly (in case of suspend error and on d3_test-resume), which without taking the ref first. fix it. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: don't wait for firmware verificationEran Harary2015-03-192-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware has a race in the flow that indicates the completion of the authentication. Checking the completion of the authentication is not really needed anyway since we can wait for the ALIVE notification instead. Remove the unneeded and buggy code. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: remove time-event start/end failure warningJohannes Berg2015-03-181-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is misleading. In many cases, for example P2P ROC time events, this will happen if the time event is aborted, for example due to a higher priority time event. This is entirely normal and not worth warning about. In other cases, where we actually do act upon this, for example when trying to connect and this fails, we should instead warn as part of the disconnect operation. Change the code to do that, i.e. make the warning a debug message, and make it more prominent (an error) when we actually disconnect because of it. This also fixes confusion in the logs - the warning was mistaken for something that needed investigation, while in most cases it's just expected behaviour that occasionally some lower-priority time events would not complete fully. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: add iccm data to 8000 b-step data dumpLiad Kaufman2015-03-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 8000 HW family B-step only, the ICCM is separate from the SRAM. This adds the ICCM to the dump data collected for FW debug. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: properly flush the queues for buffering transportEmmanuel Grumbach2015-03-183-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are transport that must buffer frames in the driver. This means that we have frames that are not in the op_mode and not visible to the firwmare. This causes issues when we flush the queues: the op_mode flushes a queue, and the firmware flushes all the frames that are *currently* on the rings, but if the transport buffers frames, it can submit these while we are flushing. This leads to a situation where we still have frames on the queues after we flushed them. Preventing those buffered frame from getting into the firmware is possible, but then, we have to run the Tx response path on frames that didn't reach the firmware which is not desirable. The way I solve this here is to let these frames go to the firmware, but make sure the firmware will not transmit them (by setting the station as draining). The op_mode then needs to wait until the transport itself is empty to be sure that the queue is really empty. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: pcie: add rx packet sequence number to dbg printLiad Kaufman2015-03-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each RX packet until this patch there only was a debug print of the HCMD and the offset. This adds also the sequence number of the packet for easier matching between what was sent, what came back / was received, and what got stuck somewhere and was never responded by the FW. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: assign new TLV bit for multi-source LARArik Nemtsov2015-03-182-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to FW methodology, the capability bits should be the only ones that change per-HW. The API bits should remain constant across different HWs. Currently this is not the case with multi-source LAR (API bit 9). Assign a new capability bit to eventually replace the API bit. Until the API bit can be deprecated, the driver will check either to enable multi-source LAR. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: continue (with error) CSA on GO time event failureJohannes Berg2015-03-183-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, on a GO, the CSA time event fails to be scheduled, continue the flow towards mac80211's state machine so it doesn't get stuck, but report an error later on the post switch which will cause mac80211 to tear down the operation. This ensures nothing gets stuck due to the scheduling failure. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-04-063-11/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/mellanox/mlx4/cmd.c net/core/fib_rules.c net/ipv4/fib_frontend.c The fib_rules.c and fib_frontend.c conflicts were locking adjustments in 'net' overlapping addition and removal of code in 'net-next'. The mlx4 conflict was a bug fix in 'net' happening in the same place a constant was being replaced with a more suitable macro. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | net/mlx4_core: Fix error message deprecation for ConnectX-2 cardsJack Morgenstein2015-04-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1daa4303b4ca ("net/mlx4_core: Deprecate error message at ConnectX-2 cards startup to debug") did the deprecation only for port 1 of the card. Need to deprecate for port 2 as well. Fixes: 1daa4303b4ca ("net/mlx4_core: Deprecate error message at ConnectX-2 cards startup to debug") Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | mvneta: dont call mvneta_adjust_link() manuallyStas Sergeev2015-04-061-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mvneta_adjust_link() is a callback for of_phy_connect() and should not be called directly. The result of calling it directly is as below: Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | xen-netfront: transmit fully GSO-sized packetsJonathan Davies2015-04-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xen-netfront limits transmitted skbs to be at most 44 segments in size. However, GSO permits up to 65536 bytes, which means a maximum of 45 segments of 1448 bytes each. This slight reduction in the size of packets means a slight loss in efficiency. Since c/s 9ecd1a75d, xen-netfront sets gso_max_size to XEN_NETIF_MAX_TX_SIZE - MAX_TCP_HEADER, where XEN_NETIF_MAX_TX_SIZE is 65535 bytes. The calculation used by tcp_tso_autosize (and also tcp_xmit_size_goal since c/s 6c09fa09d) in determining when to split an skb into two is sk->sk_gso_max_size - 1 - MAX_TCP_HEADER. So the maximum permitted size of an skb is calculated to be (XEN_NETIF_MAX_TX_SIZE - MAX_TCP_HEADER) - 1 - MAX_TCP_HEADER. Intuitively, this looks like the wrong formula -- we don't need two TCP headers. Instead, there is no need to deviate from the default gso_max_size of 65536 as this already accommodates the size of the header. Currently, the largest skb transmitted by netfront is 63712 bytes (44 segments of 1448 bytes each), as observed via tcpdump. This patch makes netfront send skbs of up to 65160 bytes (45 segments of 1448 bytes each). Similarly, the maximum allowable mtu does not need to subtract MAX_TCP_HEADER as it relates to the size of the whole packet, including the header. Fixes: 9ecd1a75d977 ("xen-netfront: reduce gso_max_size to account for max TCP header") Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | virtio: document queue state logicMichael S. Tsirkin2015-04-061-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit d631b94e7a15277858ec5f88d674d93080506999 virtio: change comment in transmit started clarifying the logic behind queue state management, but introduced an inaccuracy: TX_BUSY does not cause a BUG message. Clean this up some more, explaining the tradeoffs in detail. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | mvneta: implement SGMII-based in-band link state signalingStas Sergeev2015-04-031-11/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MDIO bus is unavailable (common setup for SGMII), the in-band signaling must be used to correctly track link state. This patch enables the in-band status delivery for link state changes, namely: - link up/down - link speed - duplex full/half fixed_phy_update_state() is used to update phy status. CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> CC: Florian Fainelli <f.fainelli@gmail.com> CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | add fixed_phy_update_state() - update state of fixed_phyStas Sergeev2015-04-031-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently fixed_phy uses a callback to periodically poll the link state. This patch adds the fixed_phy_update_state() API. It solves the following problems: - On link state interrupt, MAC driver can't update status. Instead it needs to provide the callback to periodically query the HW about the link state. It is more efficient to update status after interrupt. - The callback needs to be unregistered before phy_disconnect(), or otherwise it will be called with net_dev==NULL. phy_disconnect() does not have enough info to unregister the callback automatically. - The callback needs to be registered before of_phy_connect() to avoid running with outdated state, but of_phy_connect() returns the phy_device pointer, which is needed to register the callback. Registering it before of_phy_connect() will therefore require a hack to get the pointer earlier. Overall, this addition makes the subsequent patch that implements SGMII link status for mvneta, much cleaner. CC: Florian Fainelli <f.fainelli@gmail.com> CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | i40e: Bump to version 1.3.1Catherine Sullivan2015-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump. Change-ID: I7dc88baa33264e5919bc938adf76706573209432 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>
* | | | i40evf: Refactor VF RSS codeAnjali Singhai Jain2015-04-031-32/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor VF RSS code to allow RSS on a single queue and eliminate the need for the next_queue function. Change-ID: I9253bad96b7f542ee7036e15636db0e5d58d8ef2 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | | | i40evf: protect VLAN filter listMitch Williams2015-04-031-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAC filter list is protected by a critical task bit, and the VLAN list should be protected as well. This prevents list corruption if the watchdog happens to run at the same time as a VLAN filter is being added or deleted. Change-ID: Ia4867cebbbb046a1f38012771b288a634ca5882b 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: Communicate VSI id in place of VSI index to the VFsAnjali Singhai Jain2015-04-034-53/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not affect the Virtual channel API as such but it changes the meaning of what is communicated to the VSI resource struct as vsi_id. Earlier vsi_idx was being passed in, which was the index in the PF's VSI array. Now we pass vsi_id as communicated by the FW to the driver. This will help with future expansion of VF and FW communication. With this in place now the VF and Virtual channel driver change to move over to VSI id use is complete and is validated. Change-ID: I14246ef82b3b3dc1fa76291d2dd0c05d12cedb7c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | | | i40e: stop flow director on shutdownMitch Williams2015-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the hardware would continue to try to access the FDIR ring after entering D3Hot state, which would cause either PCIe errors or NMIs, depending upon system configuration. Explicitly stop FDIR in our shutdown routine to eliminate this possibility. Change-ID: Ib98060d6352ec595ab9a78bfe252675a9fa5d8bc 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: fix up VXLAN messagesShannon Nelson2015-04-031-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the VXLAN ports are added and removed, the messaging was giving some bogus index info, the port was always '0' for the delete, and the message text style didn't match other messages in the driver. Also, there was an over-use of the tertiary statement which made reading a little harder than necessary. Change-ID: Ie805182a697b8b4c12024403ada87fd4e4fa2358 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>