platform/kernel/linux-rpi.git
5 years agoMerge tag 'mt76-for-kvalo-2019-01-22' of https://github.com/nbd168/wireless
Kalle Valo [Wed, 30 Jan 2019 11:03:38 +0000 (13:03 +0200)]
Merge tag 'mt76-for-kvalo-2019-01-22' of https://github.com/nbd168/wireless

first batch of mt76 patches for 5.1

* fixes for mt76x0/mt76x2
* energy detect regulatory compliance fixes
* tx status handling fixes
* preparation for MT7603 support
* channel switch announcement support

5 years agoMerge tag 'iwlwifi-next-for-kalle-2019-01-25' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Tue, 29 Jan 2019 12:56:05 +0000 (14:56 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2019-01-25' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

First batch of iwlwifi patches intended for v5.1

* Support for Target Wakeup Time (TWT) -- a feature that allows the AP
  to specify when individual stations can access the medium;
* Support for mac80211 AMSDU handling;
* Debugging infrastructure work;
* Preparations for improvements in the device selection code;
* Some new PCI IDs;
* Some updates in the documentation;
* A bunch of fixes for issues found with static analyzers;
* A couple of janitorial fixes from the community;
* Some fixes in P2P;
* Other cleanups and small fixes;

5 years agoiwlwifi: fw api: document WoWLAN patterns command
Johannes Berg [Wed, 24 Oct 2018 07:50:08 +0000 (09:50 +0200)]
iwlwifi: fw api: document WoWLAN patterns command

Document the WoWLAN patterns command structure.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: fw api: remove unused/deprecated filter status
Johannes Berg [Tue, 23 Oct 2018 18:51:56 +0000 (20:51 +0200)]
iwlwifi: fw api: remove unused/deprecated filter status

These are unused by both firmware and driver, remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: avoid access out of memory allocated
Mordechay Goodstein [Sun, 21 Oct 2018 15:48:13 +0000 (18:48 +0300)]
iwlwifi: avoid access out of memory allocated

The value in num_lmac can be bigger than mem_cfg->lmac array,
warn in case it's bigger.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Fixes: 68025d5f9bfe ("iwlwifi: dbg: refactor dump code to improve readability")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: avoid possible access out of array.
Mordechay Goodstein [Sun, 21 Oct 2018 15:27:26 +0000 (18:27 +0300)]
iwlwifi: mvm: avoid possible access out of array.

The value in txq_id can be out of array scope,
validate it before accessing the array.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: memcpy from dev_cmd and not dev_cmd->hdr
Liad Kaufman [Mon, 22 Oct 2018 07:12:28 +0000 (10:12 +0300)]
iwlwifi: memcpy from dev_cmd and not dev_cmd->hdr

Klocwork complains about copying from dev_cmd->hdr if
copying more than 4 bytes since it means part of the
copy is from the next field. This isn't a real bug,
but for not failing Klocwork next time - fix this.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: tighten boundary checks
Liad Kaufman [Sun, 21 Oct 2018 11:39:05 +0000 (14:39 +0300)]
iwlwifi: tighten boundary checks

The driver assumes certain sizes and lengths aren't crossed in some
places.  Make sure this indeed happens.

Found by Klocwork.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: make num_active_macs unsigned
Liad Kaufman [Sun, 21 Oct 2018 13:04:58 +0000 (16:04 +0300)]
iwlwifi: mvm: make num_active_macs unsigned

There is no point in having num_active_macs signed
since it should never be negative. Set it to be an
unsigned variable to ensure this.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: update hcmds documentation
Liad Kaufman [Mon, 8 Oct 2018 10:37:43 +0000 (13:37 +0300)]
iwlwifi: update hcmds documentation

A few commands refer to a struct that no longer exists
in the mentioned name. Our trace-cmd parsing scripts
rely on these mentioned names and can't find them,
resulting in these commands not being parsed nicely.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: Do not set RTS/CTS protection for P2P Device MAC
Ilan Peer [Wed, 17 Oct 2018 13:51:59 +0000 (16:51 +0300)]
iwlwifi: mvm: Do not set RTS/CTS protection for P2P Device MAC

As this is not needed and might cause interoperability issues
during pairing with devices that would not reply to RTS frames.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: Set Tx rate and flags when there is not station
Ilan Peer [Wed, 17 Oct 2018 11:06:19 +0000 (14:06 +0300)]
iwlwifi: mvm: Set Tx rate and flags when there is not station

When a frame is transmitted without a station, need to set the rate
and flags in the Tx command, as the FW does not have any information as
to what rate and flags should be used for this frame.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: Flush transmit queues on P2P Device ROC done
Ilan Peer [Tue, 16 Oct 2018 12:29:45 +0000 (15:29 +0300)]
iwlwifi: mvm: Flush transmit queues on P2P Device ROC done

When a time event for a P2P Device interface is done, it is possible
that there is still a frame pending for transmission that should be
flushed.

Set the IWL_MVM_STATUS_NEED_FLUSH_P2P to indicate to the ROC worker
that P2P Device station queue need also to be flushed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: bring back mvm GSO code
Sara Sharon [Thu, 18 Oct 2018 08:03:06 +0000 (11:03 +0300)]
iwlwifi: mvm: bring back mvm GSO code

We have a slightly better TCP performance with GSO.
Add it back, it can co-exist with the code that builds
AMSDUs in mac80211.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: fix spelling mistake "registrating" -> "registering"
Colin Ian King [Thu, 11 Oct 2018 09:57:57 +0000 (10:57 +0100)]
iwlwifi: fix spelling mistake "registrating" -> "registering"

Trivial fix to spelling mistake in IWL_ERR error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: use kmemdup in iwl_parse_nvm_mcc_info()
YueHaibing [Fri, 5 Oct 2018 09:02:49 +0000 (09:02 +0000)]
iwlwifi: use kmemdup in iwl_parse_nvm_mcc_info()

Use kmemdup rather than duplicating its implementation in
iwl_parse_nvm_mcc_info().

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: fix values in the table example
Luca Coelho [Wed, 17 Oct 2018 06:04:09 +0000 (09:04 +0300)]
iwlwifi: mvm: fix values in the table example

We erroneously had some values for NGI in the table we give as an
example in rs_fill_rates_for_column(), when they should be SGI.
Change them so that they match what we say.

Reported-by: Rémy Grünblatt <remy@grunblatt.org>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: support mac80211 AMSDU
Sara Sharon [Tue, 28 Aug 2018 07:08:35 +0000 (10:08 +0300)]
iwlwifi: mvm: support mac80211 AMSDU

Support getting mac80211 building AMSDUs for us. Remove GSO
support from mvm - we don't need it anymore.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: support mac80211 TXQs model
Sara Sharon [Tue, 21 Aug 2018 12:23:39 +0000 (15:23 +0300)]
iwlwifi: mvm: support mac80211 TXQs model

Move to use the new mac80211 TXQs implementation. This has
quite a few benefits for us. We can get rid of the awkward
mapping of DQA to mac80211 queues. We can stop buffering
traffic while waiting for the queue to be allocated. We can
also use mac80211 AMSDUs instead of building it ourselves.

The usage is pretty simple:
Each ieee80211_txq contains iwl_mvm_txq. There is such a
queue for each TID, and one for management frames. We keep
having static AP queues for probes and non-bufferable MMPDUs,
along with broadcast and multicast queues. Those are being
used from the "old" TX invocation path - iwl_mvm_mac_tx.

When there is a new frame in a TXQ, iwl_mvm_mac_wake_tx is
being called, and either invokes the TX path, or allocates
the queue if it does not exist.

Most of the TX path is left untouched, although we can consider
cleaning it up some more, for example get rid of the duplication
of txq_id in both iwl_mvm_txq and iwl_mvm_dqa_txq_info.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: make NVM access actually fail on failures
Johannes Berg [Fri, 12 Oct 2018 07:35:00 +0000 (09:35 +0200)]
iwlwifi: mvm: make NVM access actually fail on failures

On any failure, including if we crash the firmware or get garbage
data, we currently ignore this and pretend the OTP was empty.
Clearly, this isn't typically the case.

In cases other than the firmware saying it can't read the requested
section, or the section having ended, make the access actually fail
and trickle the error up through the layers to fail init.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: wrt: add 22000 device familiy prph dump support
Shahar S Matityahu [Tue, 2 Oct 2018 11:13:48 +0000 (14:13 +0300)]
iwlwifi: wrt: add 22000 device familiy prph dump support

Add prph dump addresses to support prph dump in 22000 HW.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: pcie: remove suspend/resume workaround for 9000A devices
Luca Coelho [Thu, 4 Oct 2018 12:23:37 +0000 (15:23 +0300)]
iwlwifi: pcie: remove suspend/resume workaround for 9000A devices

We don't support 9000 A-step devices anymore, so we can remove the
suspend/resume workaround.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: pcie: remove unnecessary iwl_pcie_enable_rx_wake() function
Luca Coelho [Thu, 4 Oct 2018 12:20:38 +0000 (15:20 +0300)]
iwlwifi: pcie: remove unnecessary iwl_pcie_enable_rx_wake() function

This function was only used by 9000 A-step devices, which we don't
support anymore, so it can be removed.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: remove support for 9000 A-step devices
Luca Coelho [Thu, 4 Oct 2018 11:28:02 +0000 (14:28 +0300)]
iwlwifi: remove support for 9000 A-step devices

We don't support 9000 A-step devices anymore, so we can remove support
for loading both the a0/a0 and a0/b0 FWs.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: fix firmware statistics usage
Emmanuel Grumbach [Thu, 4 Oct 2018 07:41:45 +0000 (10:41 +0300)]
iwlwifi: mvm: fix firmware statistics usage

The new (CDB) statistics API is used by non-CDB devices
as well. Look at the right TLV flag to know which version
of the statistics notification to use.
To avoid confusion, remove the _cdb suffix from the
structure name.
While at it, remove a structure that was never used.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Fixes: 678d9b6dddea ("iwlwifi: mvm: update rx statistics cmd api")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: add new cards for 22560, 9260 and killer series
Ihab Zhaika [Sun, 5 Aug 2018 13:05:25 +0000 (16:05 +0300)]
iwlwifi: add new cards for 22560, 9260 and killer series

add few PCI ID'S for 22560, 9260 and killer series.

Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: correct one of the PCI struct names
Ihab Zhaika [Sun, 5 Aug 2018 12:05:45 +0000 (15:05 +0300)]
iwlwifi: correct one of the PCI struct names

One of the cfg struct names is mistakenly "iwl22000", when it should
be "iwl22560".

Chage-Id: If9fbfa4bceef81d028c90c98d47115fbe39da547
Signed-off-by: Ihab Zhaika <ihab.zhaika@intel.com>
Fixes: 2f7a3863191a ("iwlwifi: rename the temporary name of A000 to the official 22000")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: fix wrong DCM TLC config
Shaul Triebitz [Sun, 16 Sep 2018 06:58:15 +0000 (09:58 +0300)]
iwlwifi: mvm: fix wrong DCM TLC config

When configuring TLC DCM flag:
1. check the peer's RX DCM capabilities (since we TX)
2. do not set DCM_NSS_2 since we do not support it

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Fixes: 423584dd8060 ("iwlwifi: rs-fw: support dcm")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: pcie: recognize NICs with hw_rev 0x364 correctly
Luca Coelho [Tue, 2 Oct 2018 08:42:28 +0000 (11:42 +0300)]
iwlwifi: pcie: recognize NICs with hw_rev 0x364 correctly

Some devices with PCI ID 0x2723, which is supposed to be 22260, are
actually not.  So we need to differentiate them by checking the hw_rev
and change the cfg accordingly.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: add PCI IDs for the 22260 device series
Luca Coelho [Tue, 25 Sep 2018 08:21:50 +0000 (11:21 +0300)]
iwlwifi: add PCI IDs for the 22260 device series

Add new structs and PCI IDs for 22260 devices.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: rely on mac80211 to configure TWT support
Emmanuel Grumbach [Wed, 12 Sep 2018 13:25:27 +0000 (16:25 +0300)]
iwlwifi: mvm: rely on mac80211 to configure TWT support

Mac80211 will check both the HE Capability IE and the
Extended Capability IE, so set the TWT support bit when
mac80211 tells us to.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: mvm: advertise support for TWT in the Extended Capability IE
Emmanuel Grumbach [Wed, 12 Sep 2018 11:10:56 +0000 (14:10 +0300)]
iwlwifi: mvm: advertise support for TWT in the Extended Capability IE

We want to advertise support for TWT in the Extended
Capability IE. Since we don't want to set the bits for all
the interface types, define an interface specific
configuration.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: wrt: add to dump number of lmacs, lmac1 and umac error id
Shahar S Matityahu [Thu, 13 Sep 2018 11:52:59 +0000 (14:52 +0300)]
iwlwifi: wrt: add to dump number of lmacs, lmac1 and umac error id

Add to the dump the number of lmacs, the error id of the umac
and the error id of lmac1, if supported.
In case the reason for the dump trigger is not an assert
the error id is zero.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agoiwlwifi: pcie: make array 'prop' static, shrinks object size
Colin Ian King [Tue, 21 Aug 2018 10:21:09 +0000 (11:21 +0100)]
iwlwifi: pcie: make array 'prop' static, shrinks object size

Don't populate the array prop on the stack but instead make it static.
Makes the object code smaller by 30 bytes:

Before:
   text    data     bss     dec     hex filename
  80138   15382     576   96096   17760 drivers/net/wireless/intel/iwlwifi/pcie/trans.o

After:
   text    data     bss     dec     hex filename
  79948   15542     576   96066   17742 drivers/net/wireless/intel/iwlwifi/pcie/trans.o

(gcc version 8.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
5 years agomt76: avoid scheduling tx queues for powersave stations
Felix Fietkau [Mon, 21 Jan 2019 16:33:38 +0000 (17:33 +0100)]
mt76: avoid scheduling tx queues for powersave stations

In case a tx queue wake call arrives after a client has transitioned to
powersave, make sure that the queue is not kept active until the client
has left powersave mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: fix per-chain signal strength reporting
Felix Fietkau [Tue, 22 Jan 2019 15:33:53 +0000 (16:33 +0100)]
mt76: fix per-chain signal strength reporting

Fix an off-by-one error that resulted in not reporting the signal strength
for the first chain

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: do not report out-of-range rx nss
Lorenzo Bianconi [Sat, 19 Jan 2019 15:00:26 +0000 (16:00 +0100)]
mt76: do not report out-of-range rx nss

Take into account device rx stream in mt76x02_mac_process_rate
in order to not report wrong number of rx spatial stream to mac80211.
The issue has been reported on mt76x0 device which is 1x1:1 however
the hw sometimes reports rx nss equal to 2

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: add channel switch announcement support
Felix Fietkau [Tue, 15 Jan 2019 13:26:53 +0000 (14:26 +0100)]
mt76: add channel switch announcement support

Use the appropriate mac80211 callbacks after beacon transmission

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: fix signedness of rx status signal field
Felix Fietkau [Sat, 29 Dec 2018 12:01:31 +0000 (13:01 +0100)]
mt76: fix signedness of rx status signal field

It is usually negative, so it needs to be signed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: fix rssi ewma tracking
Felix Fietkau [Fri, 11 Jan 2019 13:17:30 +0000 (14:17 +0100)]
mt76: fix rssi ewma tracking

The generic EWMA code cannot deal with negative numbers, so convert signal
to a positive number before adding it
Fixes mt76x2 AGC tuning

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: move mt76x02_phy_get_min_avg_rssi to mt76 core
Felix Fietkau [Wed, 5 Dec 2018 16:06:58 +0000 (17:06 +0100)]
mt76: move mt76x02_phy_get_min_avg_rssi to mt76 core

This will be used by mt7603 as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: move mt76x02_get_txpower to mt76 core
Felix Fietkau [Thu, 6 Dec 2018 13:27:34 +0000 (14:27 +0100)]
mt76: move mt76x02_get_txpower to mt76 core

It will be reused by mt7603 later

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR flag
Felix Fietkau [Wed, 16 Jan 2019 21:33:18 +0000 (22:33 +0100)]
mt76: set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR flag

The hardware does not deal with multiple WCID entries for the same station
properly. Set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR to avoid those cases

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: fix tx status reporting for non-probing frames
Felix Fietkau [Fri, 11 Jan 2019 12:37:43 +0000 (13:37 +0100)]
mt76: fix tx status reporting for non-probing frames

On MT76x2, the hardware does not report tx status in the FIFO register,
if the packet id is 0.
Change the allocation of packet IDs to use 0 for no-ack packets, 1 for
non-probing packets and 2-255 for packets with tx status requested.
Fixes rate control issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: add led support to mt76x0e driver
Lorenzo Bianconi [Thu, 10 Jan 2019 13:27:06 +0000 (14:27 +0100)]
mt76: add led support to mt76x0e driver

Move mt76x02 led support in mt76x02-lib module in order to
add tpt led trigger to mt76x0e driver

Tested-by: LGA1150 <dqfext@gmail.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: use proper name for __MT76x02_H macro
Lorenzo Bianconi [Thu, 10 Jan 2019 11:14:04 +0000 (12:14 +0100)]
mt76: use proper name for __MT76x02_H macro

Use proper name for __MT76x02_H macro in mt76x02.h

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: dma: avoid indirect call in mt76_dma_tx_queue_skb
Lorenzo Bianconi [Mon, 31 Dec 2018 14:42:54 +0000 (15:42 +0100)]
mt76: dma: avoid indirect call in mt76_dma_tx_queue_skb

Call mt76_dma_add_buf routine directly in mt76_dma_tx_queue_skb
and avoid indirect call if not necessary

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: make const array 'data' static, shrinks object size
Colin Ian King [Sun, 30 Dec 2018 13:26:40 +0000 (13:26 +0000)]
mt76: make const array 'data' static, shrinks object size

Don't populate the const array 'data' on the stack but instead
make it static. Makes the object code smaller by 78 bytes:

Before:
   text    data     bss     dec     hex filename
   5438    1080       0    6518    1976 mediatek/mt76/mt76x2/usb_mcu.o

After:
   text    data     bss     dec     hex filename
   5296    1144       0    6440    1928 mediatek/mt76/mt76x2/usb_mcu.o

(gcc version 8.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: mmio: introduce mt76x02_check_tx_hang watchdog
Lorenzo Bianconi [Fri, 28 Dec 2018 14:44:09 +0000 (15:44 +0100)]
mt76: mmio: introduce mt76x02_check_tx_hang watchdog

Port mt76x02_check_tx_hang watchdog from vendor driver in order to
perform a device reset when tx mac/dma logic hangs. Tx mac/dma stuck
has been observed when the device is heavy loaded or in a noisy
environment. Moreover introduce wdt delayed work in order to run
tx_hang watchdog. For the moment run mt76x02_check_tx_hang watchdog
just on mt76x2 devices since the issue has not been observed on mt76x0
driver yet

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: dma: do not build skb if reported len does not fit in buf_size
Lorenzo Bianconi [Mon, 3 Dec 2018 14:34:24 +0000 (15:34 +0100)]
mt76: dma: do not build skb if reported len does not fit in buf_size

Precompute data length in order to avoid to allocate the related
skb data structure if reported length does not fit in queue buf_size

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: mac: minor optimizations in mt76x02_mac_tx_rate_val
Lorenzo Bianconi [Fri, 28 Dec 2018 10:00:47 +0000 (11:00 +0100)]
mt76: mac: minor optimizations in mt76x02_mac_tx_rate_val

Do not set bw variable to zero for legacy rates since it is already
initialized to zero. Moreover set nss to 1 just for legacy rates
since nss will be properly set for VHT/HT rates

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: add energy detect CCA support to mt76x{0,2}e drivers
Lorenzo Bianconi [Wed, 12 Dec 2018 21:51:55 +0000 (22:51 +0100)]
mt76: add energy detect CCA support to mt76x{0,2}e drivers

Ported from the reference driver. Should fix compliance with ETSI
regulatories on preventing transmission while energy detect values
are above the threshold.
The code has been tested using an ath9k device running tx99 as
noise generator

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x2: init: set default value for MT_TX_LINK_CFG
Lorenzo Bianconi [Wed, 12 Dec 2018 21:51:54 +0000 (22:51 +0100)]
mt76x2: init: set default value for MT_TX_LINK_CFG

Update default value for MT_TX_LINK_CFG according to vendor driver

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: dfs: run mt76x02_dfs_set_domain atomically
Lorenzo Bianconi [Wed, 12 Dec 2018 21:51:53 +0000 (22:51 +0100)]
mt76: dfs: run mt76x02_dfs_set_domain atomically

Grab mt76_dev mutex in mt76x02_dfs_set_domain since it runs
concurrently with mt76x{0,2}_set_channel routines

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x2: add static qualifier to mt76x2_init_hardware
Lorenzo Bianconi [Mon, 10 Dec 2018 11:54:05 +0000 (12:54 +0100)]
mt76x2: add static qualifier to mt76x2_init_hardware

Add static qualifier to mt76x2_init_hardware routine since it is
used just in pci_init.c

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x0: configure MT_VHT_HT_FBK_CFG1
Stanislaw Gruszka [Mon, 10 Dec 2018 10:53:58 +0000 (11:53 +0100)]
mt76x0: configure MT_VHT_HT_FBK_CFG1

Configure MT_VHT_HT_FBK_CFG1 values similar like vendor driver.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x02: set protection according to ht operation element
Stanislaw Gruszka [Mon, 10 Dec 2018 10:53:57 +0000 (11:53 +0100)]
mt76x02: set protection according to ht operation element

Configure protection based on information that are provided to
us either by remote AP or by hostapd via HT operation IE.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x02: fixup MT_PROT_RATE_* defines
Stanislaw Gruszka [Mon, 10 Dec 2018 10:53:56 +0000 (11:53 +0100)]
mt76x02: fixup MT_PROT_RATE_* defines

On new mt76 chips, phy mode is configured by last 3 bits
of rate value. Hence OFDM bit is marked by 0x2000
instead of 0x4000.

Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x02: do not set protection on set_rts_threshold callback
Stanislaw Gruszka [Mon, 10 Dec 2018 10:53:55 +0000 (11:53 +0100)]
mt76x02: do not set protection on set_rts_threshold callback

Use set_rts_threshold calback to enable/disable threshold only for
legacy traffic.

Protection for HT and VHT traffic is defined by HT operation element
and it's provided by remote AP or by hostapd.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76x0: pci: fix ACS support
Lorenzo Bianconi [Mon, 10 Dec 2018 10:22:00 +0000 (11:22 +0100)]
mt76x0: pci: fix ACS support

Fix Automatic Channel Selection (ACS) support in mt76x0e driver
configuring properly MT_CH_TIME_CFG register

Fixes: 6250318694ca ("mt76x0: pci: add get_survey support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: usb: avoid queue/status spinlocks while passing tx status to mac80211
Lorenzo Bianconi [Thu, 6 Dec 2018 18:11:55 +0000 (19:11 +0100)]
mt76: usb: avoid queue/status spinlocks while passing tx status to mac80211

As already done for pcie code in commit 79d1c94c9c78 ("mt76: avoid
queue/status spinlocks while passing tx status to mac80211") make sure
that no tx related spinlocks are taken during the ieee80211_tx_status call

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: mac: run mt76x02_mac_work routine atomically
Lorenzo Bianconi [Thu, 6 Dec 2018 16:07:39 +0000 (17:07 +0100)]
mt76: mac: run mt76x02_mac_work routine atomically

Grab mt76_dev mutex in mt76x02_mac_work handler since it runs
concurrently with mt76x{0,2}_set_channel routines

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: fix typo in mt76x02_check_mac_err routine
Lorenzo Bianconi [Thu, 6 Dec 2018 11:40:23 +0000 (12:40 +0100)]
mt76: fix typo in mt76x02_check_mac_err routine

Reconfigure properly MT_MAC_SYS_CTRL register after mac sw-reset
in mt76x02_check_mac_err routine

Fixes: 73556561ab9f ("mt76x0: use mt76x02_mac_work as stats handler")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: Add missing include of linux/module.h
Hauke Mehrtens [Sun, 2 Dec 2018 12:06:34 +0000 (13:06 +0100)]
mt76: Add missing include of linux/module.h

MODULE_FIRMWARE() is used in usb_mcu.c and provided by linux/module.h,
but this header file is not directly included. This causes problems in
backports with some kernel versions.

Add the missing include.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: usb: do not build the skb if reported len does not fit in buf_size
Lorenzo Bianconi [Sat, 1 Dec 2018 14:01:19 +0000 (15:01 +0100)]
mt76: usb: do not build the skb if reported len does not fit in buf_size

Precompute data length in order to avoid to allocate the related
skb data structure if reported length does not fit in queue buf_size

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: dma: remove napi from mt76_dma_rx_fill signature
Lorenzo Bianconi [Sat, 1 Dec 2018 09:55:06 +0000 (10:55 +0100)]
mt76: dma: remove napi from mt76_dma_rx_fill signature

Remove napi from mt76_dma_rx_fill routine signature since
it is a leftover of a previous implementation and it is no
longer used

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: request tx status for powersave released EOSP packet
Felix Fietkau [Tue, 13 Nov 2018 19:54:17 +0000 (20:54 +0100)]
mt76: request tx status for powersave released EOSP packet

Allows mac80211 to keep track of the service period

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: throttle transmission of buffered multicast packets
Felix Fietkau [Thu, 29 Nov 2018 12:13:54 +0000 (13:13 +0100)]
mt76: throttle transmission of buffered multicast packets

Avoids drowning out regular transmissions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agomt76: add size check for additional rx fragments
Felix Fietkau [Tue, 6 Nov 2018 11:29:44 +0000 (12:29 +0100)]
mt76: add size check for additional rx fragments

So far the code only validates the buffer size of the first skb.
Extend this check to cover additional fragments as well, in case the size
is corrupted during a DMA reset.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years agobrcmfmac: Use firmware_request_nowarn for the clm_blob
Hans de Goede [Mon, 7 Jan 2019 13:33:27 +0000 (14:33 +0100)]
brcmfmac: Use firmware_request_nowarn for the clm_blob

The linux-firmware brcmfmac firmware files contain an embedded table with
per country allowed channels and strength info.

For recent hardware these versions of the firmware are specially build for
linux-firmware, the firmware files directly available from Cypress rely on
a separate clm_blob file for this info.

For some unknown reason Cypress refuses to provide the standard firmware
files + clm_blob files it uses elsewhere for inclusion into linux-firmware,
instead relying on these special builds with the clm_blob info embedded.
This means that the linux-firmware firmware versions often lag behind,
but I digress.

The brcmfmac driver does support the separate clm_blob file and always
tries to load this. Currently we use request_firmware for this. This means
that on any standard install, using the standard combo of linux-kernel +
linux-firmware, we will get a warning:
"Direct firmware load for ... failed with error -2"

On top of this, brcmfmac itself prints: "no clm_blob available (err=-2),
device may have limited channels available".

This commit switches to firmware_request_nowarn, fixing almost any brcmfmac
device logging the warning (it leaves the brcmfmac info message in place).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobrcmfmac: fix system warning message during wowl suspend
Lo-Hsiang Lo [Mon, 7 Jan 2019 08:46:16 +0000 (08:46 +0000)]
brcmfmac: fix system warning message during wowl suspend

There is a system warning message, warn_slowpath-fmt, during suspend
while using supplicant join AP and enable wowl feature by IW command.
It's caused by brcmf_pno_remove_request path can't find the reqid.
This fix will not go to remove pno request function if there is no
pno scan.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Lo-Hsiang Lo <double.lo@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobcma: use dev_* printing functions
Rafał Miłecki [Tue, 1 Jan 2019 23:00:02 +0000 (00:00 +0100)]
bcma: use dev_* printing functions

It provides more meaningful messages.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobcma: keep a direct pointer to the struct device
Rafał Miłecki [Tue, 1 Jan 2019 23:00:01 +0000 (00:00 +0100)]
bcma: keep a direct pointer to the struct device

Accessing struct device is pretty useful/common so having a direct
pointer:
1) Simplifies some code
2) Makes bcma_bus_get_host_dev() unneeded
3) Allows further improvements like using dev_* printing helpers

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agorsi: add support for hardware scan offload
Prameela Rani Garnepudi [Thu, 27 Dec 2018 09:26:18 +0000 (14:56 +0530)]
rsi: add support for hardware scan offload

With the current approach of scanning, roaming delays are observed.
Firmware has support for back ground scanning. To get this advantage,
mac80211 hardware scan is implemented, which decides type of scan to
do based on connected state.

When station is in not connected, driver returns with special value 1
to trigger software scan in mac80211. In case of connected state,
background scan will be triggered.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobrcmfmac: add a check for the status of usb_register
Kangjie Lu [Wed, 26 Dec 2018 01:22:24 +0000 (19:22 -0600)]
brcmfmac: add a check for the status of usb_register

usb_register() may fail, so let's check its status and issue an error
message if it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agocw1200: drop useless LIST_HEAD
Julia Lawall [Sun, 23 Dec 2018 08:57:15 +0000 (09:57 +0100)]
cw1200: drop useless LIST_HEAD

Drop LIST_HEAD where the variable it declares has never
been used.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
  ... when != x
// </smpl>

Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agocw1200: fix missing unlock on error in cw1200_hw_scan()
Wei Yongjun [Sat, 22 Dec 2018 10:34:54 +0000 (10:34 +0000)]
cw1200: fix missing unlock on error in cw1200_hw_scan()

Add the missing unlock before return from function cw1200_hw_scan()
in the error handling case.

Fixes: 4f68ef64cd7f ("cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobrcmfmac: Add DMI nvram filename quirk for PoV TAB-P1006W-232 tablet
Hans de Goede [Thu, 20 Dec 2018 16:40:58 +0000 (17:40 +0100)]
brcmfmac: Add DMI nvram filename quirk for PoV TAB-P1006W-232 tablet

The Point of View TAB-P1006W-232 tablet contains quite generic names in
the sys_vendor and product_name DMI strings, without this patch brcmfmac
will try to load: brcmfmac43340-sdio.Insyde-BayTrail.txt as nvram file
which is a bit too generic.

Add a DMI quirk so that a unique and clearly identifiable nvram file
name is used on the PoV TAB-P1006W-232 tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agoray_cs: fix array out-of-bounds access
Colin Ian King [Thu, 20 Dec 2018 14:05:50 +0000 (14:05 +0000)]
ray_cs: fix array out-of-bounds access

Currently array element org[3] is being accessed, however the array is
only 3 elements in size, so this looks like an off-by-one out-of-bounds
error. Fix this by using org[2], which I believe was the original
intent.

This issue has existed in the driver back in the pre-git days, so no
idea when it was introduced.

Detected by CoverityScan, CID#711344 ("Out-of-bounds read")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agowlcore: Fix memory leak in case wl12xx_fetch_firmware failure
Zumeng Chen [Wed, 19 Dec 2018 07:50:29 +0000 (15:50 +0800)]
wlcore: Fix memory leak in case wl12xx_fetch_firmware failure

Release fw_status, raw_fw_status, and tx_res_if when wl12xx_fetch_firmware
failed instead of meaningless goto out to avoid the following memory leak
reports(Only the last one listed):

unreferenced object 0xc28a9a00 (size 512):
  comm "kworker/0:4", pid 31298, jiffies 2783204 (age 203.290s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  backtrace:
    [<6624adab>] kmemleak_alloc+0x40/0x74
    [<500ddb31>] kmem_cache_alloc_trace+0x1ac/0x270
    [<db4d731d>] wl12xx_chip_wakeup+0xc4/0x1fc [wlcore]
    [<76c5db53>] wl1271_op_add_interface+0x4a4/0x8f4 [wlcore]
    [<cbf30777>] drv_add_interface+0xa4/0x1a0 [mac80211]
    [<65bac325>] ieee80211_reconfig+0x9c0/0x1644 [mac80211]
    [<2817c80e>] ieee80211_restart_work+0x90/0xc8 [mac80211]
    [<7e1d425a>] process_one_work+0x284/0x42c
    [<55f9432e>] worker_thread+0x2fc/0x48c
    [<abb582c6>] kthread+0x148/0x160
    [<63144b13>] ret_from_fork+0x14/0x2c
    [< (null)>] (null)
    [<1f6e7715>] 0xffffffff

Signed-off-by: Zumeng Chen <zumeng.chen@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agobrcmsmac: remove set but not used variables 'phybw40, maxtargetpwr'
YueHaibing [Thu, 20 Dec 2018 03:55:22 +0000 (11:55 +0800)]
brcmsmac: remove set but not used variables 'phybw40, maxtargetpwr'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:1202:5: warning: variable 'phybw40' set but not used [-Wunused-but-set-variable]
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4625:5: warning: variable 'phybw40' set but not used [-Wunused-but-set-variable]
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4834:5: warning: variable 'phybw40' set but not used [-Wunused-but-set-variable]

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:3085:17: warning: variable 'maxtargetpwr' set but not used [-Wunused-but-set-variable]
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4215:17: warning: variable 'maxtargetpwr' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
5 years agoLinux 5.0-rc1
Linus Torvalds [Mon, 7 Jan 2019 01:08:20 +0000 (17:08 -0800)]
Linux 5.0-rc1

5 years agoMerge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Mon, 7 Jan 2019 00:33:10 +0000 (16:33 -0800)]
Merge tag 'kbuild-v4.21-3' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

 - improve boolinit.cocci and use_after_iter.cocci semantic patches

 - fix alignment for kallsyms

 - move 'asm goto' compiler test to Kconfig and clean up jump_label
   CONFIG option

 - generate asm-generic wrappers automatically if arch does not
   implement mandatory UAPI headers

 - remove redundant generic-y defines

 - misc cleanups

* tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: rename generated .*conf-cfg to *conf-cfg
  kbuild: remove unnecessary stubs for archheader and archscripts
  kbuild: use assignment instead of define ... endef for filechk_* rules
  arch: remove redundant UAPI generic-y defines
  kbuild: generate asm-generic wrappers if mandatory headers are missing
  arch: remove stale comments "UAPI Header export list"
  riscv: remove redundant kernel-space generic-y
  kbuild: change filechk to surround the given command with { }
  kbuild: remove redundant target cleaning on failure
  kbuild: clean up rule_dtc_dt_yaml
  kbuild: remove UIMAGE_IN and UIMAGE_OUT
  jump_label: move 'asm goto' support test to Kconfig
  kallsyms: lower alignment on ARM
  scripts: coccinelle: boolinit: drop warnings on named constants
  scripts: coccinelle: check for redeclaration
  kconfig: remove unused "file" field of yylval union
  nds32: remove redundant kernel-space generic-y
  nios2: remove unneeded HAS_DMA define

5 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 7 Jan 2019 00:30:14 +0000 (16:30 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf tooling updates form Ingo Molnar:
 "A final batch of perf tooling changes: mostly fixes and small
  improvements"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits)
  perf session: Add comment for perf_session__register_idle_thread()
  perf thread-stack: Fix thread stack processing for the idle task
  perf thread-stack: Allocate an array of thread stacks
  perf thread-stack: Factor out thread_stack__init()
  perf thread-stack: Allow for a thread stack array
  perf thread-stack: Avoid direct reference to the thread's stack
  perf thread-stack: Tidy thread_stack__bottom() usage
  perf thread-stack: Simplify some code in thread_stack__process()
  tools gpio: Allow overriding CFLAGS
  tools power turbostat: Override CFLAGS assignments and add LDFLAGS to build command
  tools thermal tmon: Allow overriding CFLAGS assignments
  tools power x86_energy_perf_policy: Override CFLAGS assignments and add LDFLAGS to build command
  perf c2c: Increase the HITM ratio limit for displayed cachelines
  perf c2c: Change the default coalesce setup
  perf trace beauty ioctl: Beautify USBDEVFS_ commands
  perf trace beauty: Export function to get the files for a thread
  perf trace: Wire up ioctl's USBDEBFS_ cmd table generator
  perf beauty ioctl: Add generator for USBDEVFS_ ioctl commands
  tools headers uapi: Grab a copy of usbdevice_fs.h
  perf trace: Store the major number for a file when storing its pathname
  ...

5 years agoChange mincore() to count "mapped" pages rather than "cached" pages
Linus Torvalds [Sun, 6 Jan 2019 01:50:59 +0000 (17:50 -0800)]
Change mincore() to count "mapped" pages rather than "cached" pages

The semantics of what "in core" means for the mincore() system call are
somewhat unclear, but Linux has always (since 2.3.52, which is when
mincore() was initially done) treated it as "page is available in page
cache" rather than "page is mapped in the mapping".

The problem with that traditional semantic is that it exposes a lot of
system cache state that it really probably shouldn't, and that users
shouldn't really even care about.

So let's try to avoid that information leak by simply changing the
semantics to be that mincore() counts actual mapped pages, not pages
that might be cheaply mapped if they were faulted (note the "might be"
part of the old semantics: being in the cache doesn't actually guarantee
that you can access them without IO anyway, since things like network
filesystems may have to revalidate the cache before use).

In many ways the old semantics were somewhat insane even aside from the
information leak issue.  From the very beginning (and that beginning is
a long time ago: 2.3.52 was released in March 2000, I think), the code
had a comment saying

  Later we can get more picky about what "in core" means precisely.

and this is that "later".  Admittedly it is much later than is really
comfortable.

NOTE! This is a real semantic change, and it is for example known to
change the output of "fincore", since that program literally does a
mmmap without populating it, and then doing "mincore()" on that mapping
that doesn't actually have any pages in it.

I'm hoping that nobody actually has any workflow that cares, and the
info leak is real.

We may have to do something different if it turns out that people have
valid reasons to want the old semantics, and if we can limit the
information leak sanely.

Cc: Kevin Easton <kevin@guarana.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Masatake YAMATO <yamato@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 years agoFix 'acccess_ok()' on alpha and SH
Linus Torvalds [Sun, 6 Jan 2019 19:15:04 +0000 (11:15 -0800)]
Fix 'acccess_ok()' on alpha and SH

Commit 594cc251fdd0 ("make 'user_access_begin()' do 'access_ok()'")
broke both alpha and SH booting in qemu, as noticed by Guenter Roeck.

It turns out that the bug wasn't actually in that commit itself (which
would have been surprising: it was mostly a no-op), but in how the
addition of access_ok() to the strncpy_from_user() and strnlen_user()
functions now triggered the case where those functions would test the
access of the very last byte of the user address space.

The string functions actually did that user range test before too, but
they did it manually by just comparing against user_addr_max().  But
with user_access_begin() doing the check (using "access_ok()"), it now
exposed problems in the architecture implementations of that function.

For example, on alpha, the access_ok() helper macro looked like this:

  #define __access_ok(addr, size) \
        ((get_fs().seg & (addr | size | (addr+size))) == 0)

and what it basically tests is of any of the high bits get set (the
USER_DS masking value is 0xfffffc0000000000).

And that's completely wrong for the "addr+size" check.  Because it's
off-by-one for the case where we check to the very end of the user
address space, which is exactly what the strn*_user() functions do.

Why? Because "addr+size" will be exactly the size of the address space,
so trying to access the last byte of the user address space will fail
the __access_ok() check, even though it shouldn't.  As a result, the
user string accessor functions failed consistently - because they
literally don't know how long the string is going to be, and the max
access is going to be that last byte of the user address space.

Side note: that alpha macro is buggy for another reason too - it re-uses
the arguments twice.

And SH has another version of almost the exact same bug:

  #define __addr_ok(addr) \
        ((unsigned long __force)(addr) < current_thread_info()->addr_limit.seg)

so far so good: yes, a user address must be below the limit.  But then:

  #define __access_ok(addr, size)         \
        (__addr_ok((addr) + (size)))

is wrong with the exact same off-by-one case: the case when "addr+size"
is exactly _equal_ to the limit is actually perfectly fine (think "one
byte access at the last address of the user address space")

The SH version is actually seriously buggy in another way: it doesn't
actually check for overflow, even though it did copy the _comment_ that
talks about overflow.

So it turns out that both SH and alpha actually have completely buggy
implementations of access_ok(), but they happened to work in practice
(although the SH overflow one is a serious serious security bug, not
that anybody likely cares about SH security).

This fixes the problems by using a similar macro on both alpha and SH.
It isn't trying to be clever, the end address is based on this logic:

        unsigned long __ao_end = __ao_a + __ao_b - !!__ao_b;

which basically says "add start and length, and then subtract one unless
the length was zero".  We can't subtract one for a zero length, or we'd
just hit an underflow instead.

For a lot of access_ok() users the length is a constant, so this isn't
actually as expensive as it initially looks.

Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5 years agoMerge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Sun, 6 Jan 2019 20:21:11 +0000 (12:21 -0800)]
Merge tag 'fscrypt_for_linus' of git://git./linux/kernel/git/tytso/fscrypt

Pull fscrypt updates from Ted Ts'o:
 "Add Adiantum support for fscrypt"

* tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt:
  fscrypt: add Adiantum support

5 years agoMerge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 6 Jan 2019 20:19:23 +0000 (12:19 -0800)]
Merge tag 'ext4_for_linus_stable' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 bug fixes from Ted Ts'o:
 "Fix a number of ext4 bugs"

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix special inode number checks in __ext4_iget()
  ext4: track writeback errors using the generic tracking infrastructure
  ext4: use ext4_write_inode() when fsyncing w/o a journal
  ext4: avoid kernel warning when writing the superblock to a dead device
  ext4: fix a potential fiemap/page fault deadlock w/ inline_data
  ext4: make sure enough credits are reserved for dioread_nolock writes

5 years agoMerge tag 'dma-mapping-4.21-1' of git://git.infradead.org/users/hch/dma-mapping
Linus Torvalds [Sun, 6 Jan 2019 19:47:26 +0000 (11:47 -0800)]
Merge tag 'dma-mapping-4.21-1' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:
 "Fix various regressions introduced in this cycles:

   - fix dma-debug tracking for the map_page / map_single
     consolidatation

   - properly stub out DMA mapping symbols for !HAS_DMA builds to avoid
     link failures

   - fix AMD Gart direct mappings

   - setup the dma address for no kernel mappings using the remap
     allocator"

* tag 'dma-mapping-4.21-1' of git://git.infradead.org/users/hch/dma-mapping:
  dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations
  x86/amd_gart: fix unmapping of non-GART mappings
  dma-mapping: remove a few unused exports
  dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA
  dma-mapping: remove dmam_{declare,release}_coherent_memory
  dma-mapping: implement dmam_alloc_coherent using dmam_alloc_attrs
  dma-mapping: implement dma_map_single_attrs using dma_map_page_attrs

5 years agoMerge tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sun, 6 Jan 2019 19:40:06 +0000 (11:40 -0800)]
Merge tag 'tag-chrome-platform-for-v4.21' of git://git./linux/kernel/git/bleung/chrome-platform

Pull chrome platform updates from Benson Leung:

 - Changes for EC_MKBP_EVENT_SENSOR_FIFO handling.

 - Also, maintainership changes. Olofj out, Enric balletbo in.

* tag 'tag-chrome-platform-for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
  MAINTAINERS: add maintainers for ChromeOS EC sub-drivers
  MAINTAINERS: platform/chrome: Add Enric as a maintainer
  MAINTAINERS: platform/chrome: remove myself as maintainer
  platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup
  platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

5 years agoMerge tag 'hwlock-v4.21' of git://github.com/andersson/remoteproc
Linus Torvalds [Sun, 6 Jan 2019 19:37:44 +0000 (11:37 -0800)]
Merge tag 'hwlock-v4.21' of git://github.com/andersson/remoteproc

Pull hwspinlock updates from Bjorn Andersson:
 "This adds support for the hardware semaphores found in STM32MP1"

* tag 'hwlock-v4.21' of git://github.com/andersson/remoteproc:
  hwspinlock: fix return value check in stm32_hwspinlock_probe()
  hwspinlock: add STM32 hwspinlock device
  dt-bindings: hwlock: Document STM32 hwspinlock bindings

5 years agofscrypt: add Adiantum support
Eric Biggers [Sun, 6 Jan 2019 13:36:21 +0000 (08:36 -0500)]
fscrypt: add Adiantum support

Add support for the Adiantum encryption mode to fscrypt.  Adiantum is a
tweakable, length-preserving encryption mode with security provably
reducible to that of XChaCha12 and AES-256, subject to a security bound.
It's also a true wide-block mode, unlike XTS.  See the paper
"Adiantum: length-preserving encryption for entry-level processors"
(https://eprint.iacr.org/2018/720.pdf) for more details.  Also see
commit 059c2a4d8e16 ("crypto: adiantum - add Adiantum support").

On sufficiently long messages, Adiantum's bottlenecks are XChaCha12 and
the NH hash function.  These algorithms are fast even on processors
without dedicated crypto instructions.  Adiantum makes it feasible to
enable storage encryption on low-end mobile devices that lack AES
instructions; currently such devices are unencrypted.  On ARM Cortex-A7,
on 4096-byte messages Adiantum encryption is about 4 times faster than
AES-256-XTS encryption; decryption is about 5 times faster.

In fscrypt, Adiantum is suitable for encrypting both file contents and
names.  With filenames, it fixes a known weakness: when two filenames in
a directory share a common prefix of >= 16 bytes, with CTS-CBC their
encrypted filenames share a common prefix too, leaking information.
Adiantum does not have this problem.

Since Adiantum also accepts long tweaks (IVs), it's also safe to use the
master key directly for Adiantum encryption rather than deriving
per-file keys, provided that the per-file nonce is included in the IVs
and the master key isn't used for any other encryption mode.  This
configuration saves memory and improves performance.  A new fscrypt
policy flag is added to allow users to opt-in to this configuration.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
5 years agoMerge tag 'docs-5.0-fixes' of git://git.lwn.net/linux
Linus Torvalds [Sun, 6 Jan 2019 02:35:02 +0000 (18:35 -0800)]
Merge tag 'docs-5.0-fixes' of git://git.lwn.net/linux

Pull documentation fixes from Jonathan Corbet:
 "A handful of late-arriving documentation fixes"

* tag 'docs-5.0-fixes' of git://git.lwn.net/linux:
  doc: filesystems: fix bad references to nonexistent ext4.rst file
  Documentation/admin-guide: update URL of LKML information link
  Docs/kernel-api.rst: Remove blk-tag.c reference

5 years agoMerge tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sun, 6 Jan 2019 02:33:21 +0000 (18:33 -0800)]
Merge tag 'firewire-update' of git://git./linux/kernel/git/ieee1394/linux1394

Pull firewire fixlet from Stefan Richter:
 "Remove an explicit dependency in Kconfig which is implied by another
  dependency"

* tag 'firewire-update' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: Remove depends on HAS_DMA in case of platform dependency

5 years agoMerge tag 'for-linus-20190104' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 6 Jan 2019 02:29:13 +0000 (18:29 -0800)]
Merge tag 'for-linus-20190104' of git://git.kernel.dk/linux-block

Pull block updates and fixes from Jens Axboe:

 - Pulled in MD changes that Shaohua had queued up for 4.21.

   Unfortunately we lost Shaohua late 2018, I'm sending these in on his
   behalf.

 - In conjunction with the above, I added a CREDITS entry for Shaoua.

 - sunvdc queue restart fix (Ming)

* tag 'for-linus-20190104' of git://git.kernel.dk/linux-block:
  Add CREDITS entry for Shaohua Li
  block: sunvdc: don't run hw queue synchronously from irq context
  md: fix raid10 hang issue caused by barrier
  raid10: refactor common wait code from regular read/write request
  md: remvoe redundant condition check
  lib/raid6: add option to skip algo benchmarking
  lib/raid6: sort algos in rough performance order
  lib/raid6: check for assembler SSSE3 support
  lib/raid6: avoid __attribute_const__ redefinition
  lib/raid6: add missing include for raid6test
  md: remove set but not used variable 'bi_rdev'

5 years agoMerge tag 'drm-next-2019-01-05' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Sun, 6 Jan 2019 02:25:19 +0000 (18:25 -0800)]
Merge tag 'drm-next-2019-01-05' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Happy New Year, just decloaking from leave to get some stuff from the
  last week in before rc1:

  core:
   - two regression fixes for damage blob and atomic

  i915 gvt:
   - Some missed GVT fixes from the original pull

  amdgpu:
   - new PCI IDs
   - SR-IOV fixes
   - DC fixes
   - Vega20 fixes"

* tag 'drm-next-2019-01-05' of git://anongit.freedesktop.org/drm/drm: (53 commits)
  drm: Put damage blob when destroy plane state
  drm: fix null pointer dereference on null state pointer
  drm/amdgpu: Add new VegaM pci id
  drm/ttm: Use drm_debug_printer for all ttm_bo_mem_space_debug output
  drm/amdgpu: add Vega20 PSP ASD firmware loading
  drm/amd/display: Fix MST dp_blank REG_WAIT timeout
  drm/amd/display: validate extended dongle caps
  drm/amd/display: Use div_u64 for flip timestamp ns to ms
  drm/amdgpu/uvd:Change uvd ring name convention
  drm/amd/powerplay: add Vega20 LCLK DPM level setting support
  drm/amdgpu: print process info when job timeout
  drm/amdgpu/nbio7.4: add hw bug workaround for vega20
  drm/amdgpu/nbio6.1: add hw bug workaround for vega10/12
  drm/amd/display: Optimize passive update planes.
  drm/amd/display: verify lane status before exiting verify link cap
  drm/amd/display: Fix bug with not updating VSP infoframe
  drm/amd/display: Add retry to read ddc_clock pin
  drm/amd/display: Don't skip link training for empty dongle
  drm/amd/display: Wait edp HPD to high in detect_sink
  drm/amd/display: fix surface update sequence
  ...

5 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Linus Torvalds [Sun, 6 Jan 2019 02:20:51 +0000 (18:20 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
 "Over the break a few defects were found, so this is a -rc style pull
  request of various small things that have been posted.

   - An attempt to shorten RCU grace period driven delays showed crashes
     during heavier testing, and has been entirely reverted

   - A missed merge/rebase error between the advise_mr and ib_device_ops
     series

   - Some small static analysis driven fixes from Julia and Aditya

   - Missed ability to create a XRC_INI in the devx verbs interop
     series"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  infiniband/qedr: Potential null ptr dereference of qp
  infiniband: bnxt_re: qplib: Check the return value of send_message
  IB/ipoib: drop useless LIST_HEAD
  IB/core: Add advise_mr to the list of known ops
  Revert "IB/mlx5: Fix long EEH recover time with NVMe offloads"
  IB/mlx5: Allow XRC INI usage via verbs in DEVX context

5 years agoMerge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux
Linus Torvalds [Sun, 6 Jan 2019 02:15:37 +0000 (18:15 -0800)]
Merge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:
 "This time the pull request is really small.

  The most notable changes are fixing fbcon to not cause crash on
  unregister_framebuffer() operation when there is more than one
  framebuffer, adding config option to center the bootup logo and making
  FB_BACKLIGHT config option tristate (which in turn uncovered incorrect
  FB_BACKLIGHT usage by DRM's nouveau driver).

  Summary:

   - fix fbcon to not cause crash on unregister_framebuffer() when there
     is more than one framebuffer (Noralf Trønnes)

   - improve support for small rotated displays (Peter Rosin)

   - fix probe failure handling in udlfb driver (Dan Carpenter)

   - add config option to center the bootup logo (Peter Rosin)

   - make FB_BACKLIGHT config option tristate (Rob Clark)

   - remove superfluous HAS_DMA dependency for goldfishfb driver (Geert
     Uytterhoeven)

   - misc fixes (Alexey Khoroshilov, YueHaibing, Colin Ian King, Lubomir
     Rintel)

   - misc cleanups (Yangtao Li, Wen Yang)

  also there is DRM's nouveau driver fix for wrong FB_BACKLIGHT config
  option usage (FB_BACKLIGHT is for internal fbdev subsystem use only)"

* tag 'fbdev-v4.21' of git://github.com/bzolnier/linux:
  drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig
  fbdev: fbcon: Fix unregister crash when more than one framebuffer
  fbdev: Remove depends on HAS_DMA in case of platform dependency
  pxa168fb: trivial typo fix
  fbdev: fsl-diu: remove redundant null check on cmap
  fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE
  fbdev: uvesafb: fix spelling mistake "memoery" -> "memory"
  fbdev: fbmem: add config option to center the bootup logo
  fbdev: fbmem: make fb_show_logo_line return the end instead of the height
  video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"
  fbdev: fbmem: behave better with small rotated displays and many CPUs
  video: clps711x-fb: release disp device node in probe()
  fbdev: make FB_BACKLIGHT a tristate
  udlfb: fix some inconsistent NULL checking

5 years agoMerge branch 'i2c/for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Linus Torvalds [Sun, 6 Jan 2019 02:13:35 +0000 (18:13 -0800)]
Merge branch 'i2c/for-5.0' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "I2C has only driver updates for you this time.

  Mostly new IDs/DT compatibles, also SPDX conversions, small cleanups.
  STM32F7 got FastMode+ and PM support, Axxia some reliabilty
  improvements"

* 'i2c/for-5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (26 commits)
  i2c: Add Actions Semiconductor Owl family S700 I2C support
  dt-bindings: i2c: Add S700 support for Actions Semi Soc's
  i2c: ismt: Add support for Intel Cedar Fork
  i2c: tegra: Switch to SPDX identifier
  i2c: tegra: Add missing kerneldoc for some fields
  i2c: tegra: Cleanup kerneldoc comments
  i2c: axxia: support sequence command mode
  dt-bindings: i2c: rcar: Add r8a774c0 support
  dt-bindings: i2c: sh_mobile: Add r8a774c0 support
  i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E)
  i2c: i2c-cros-ec-tunnel: Switch to SPDX identifier.
  i2c: powermac: Use of_node_name_eq for node name comparisons
  i2c-axxia: check for error conditions first
  i2c-axxia: dedicated function to set client addr
  dt-bindings: i2c: Use correct vendor prefix for Atmel
  i2c: tegra: replace spin_lock_irqsave with spin_lock in ISR
  eeprom: at24: add support for 24c2048
  dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string
  i2c: i2c-stm32f7: add PM Runtime support
  i2c: sh_mobile: add support for r8a77990 (R-Car E3)
  ...

5 years agoMerge tag 'pci-v4.21-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Sun, 6 Jan 2019 01:57:34 +0000 (17:57 -0800)]
Merge tag 'pci-v4.21-changes' of git://git./linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:

 - Remove unused lists from ASPM pcie_link_state (Frederick Lawler)

 - Fix Broadcom CNB20LE host bridge unintended sign extension (Colin Ian
   King)

 - Expand Kconfig "PF" acronyms (Randy Dunlap)

 - Update MAINTAINERS for arch/x86/kernel/early-quirks.c (Bjorn Helgaas)

 - Add missing include to drivers/pci.h (Alexandru Gagniuc)

 - Override Synopsys USB 3.x HAPS device class so dwc3-haps can claim it
   instead of xhci (Thinh Nguyen)

 - Clean up P2PDMA documentation (Randy Dunlap)

 - Allow runtime PM even if driver doesn't supply callbacks (Jarkko
   Nikula)

 - Remove status check after submitting Switchtec MRPC Firmware Download
   commands to avoid Completion Timeouts (Kelvin Cao)

 - Set Switchtec coherent DMA mask to allow 64-bit DMA (Boris Glimcher)

 - Fix Switchtec SWITCHTEC_IOCTL_EVENT_IDX_ALL flag overwrite issue
   (Joey Zhang)

 - Enable write combining for Switchtec MRPC Input buffers (Kelvin Cao)

 - Add Switchtec MRPC DMA mode support (Wesley Sheng)

 - Skip VF scanning on powerpc, which does this in firmware (Sebastian
   Ott)

 - Add Amlogic Meson PCIe controller driver and DT bindings (Yue Wang)

 - Constify histb dw_pcie_host_ops structure (Julia Lawall)

 - Support multiple power domains for imx6 (Leonard Crestez)

 - Constify layerscape driver data (Stefan Agner)

 - Update imx6 Kconfig to allow imx6 PCIe in imx7 kernel (Trent Piepho)

 - Support armada8k GPIO reset (Baruch Siach)

 - Support suspend/resume support on imx6 (Leonard Crestez)

 - Don't hard-code DesignWare DBI/ATU offst (Stephen Warren)

 - Skip i.MX6 PHY setup on i.MX7D (Andrey Smirnov)

 - Remove Jianguo Sun from HiSilicon STB maintainers (Lorenzo Pieralisi)

 - Mask DesignWare interrupts instead of disabling them to avoid lost
   interrupts (Marc Zyngier)

 - Add locking when acking DesignWare interrupts (Marc Zyngier)

 - Ack DesignWare interrupts in the proper callbacks (Marc Zyngier)

 - Use devm resource parser in mediatek (Honghui Zhang)

 - Remove unused mediatek "num-lanes" DT property (Honghui Zhang)

 - Add UniPhier PCIe controller driver and DT bindings (Kunihiko
   Hayashi)

 - Enable MSI for imx6 downstream components (Richard Zhu)

* tag 'pci-v4.21-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (40 commits)
  PCI: imx: Enable MSI from downstream components
  s390/pci: skip VF scanning
  PCI/IOV: Add flag so platforms can skip VF scanning
  PCI/IOV: Factor out sriov_add_vfs()
  PCI: uniphier: Add UniPhier PCIe host controller support
  dt-bindings: PCI: Add UniPhier PCIe host controller description
  PCI: amlogic: Add the Amlogic Meson PCIe controller driver
  dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller
  arm64: dts: mt7622: Remove un-used property for PCIe
  arm: dts: mt7623: Remove un-used property for PCIe
  dt-bindings: PCI: MediaTek: Remove un-used property
  PCI: mediatek: Remove un-used variant in struct mtk_pcie_port
  MAINTAINERS: Remove Jianguo Sun from HiSilicon STB DWC entry
  PCI: dwc: Don't hard-code DBI/ATU offset
  PCI: imx: Add imx6sx suspend/resume support
  PCI: armada8k: Add support for gpio controlled reset signal
  PCI: dwc: Adjust Kconfig to allow IMX6 PCIe host on IMX7
  PCI: dwc: layerscape: Constify driver data
  PCI: imx: Add multi-pd support
  PCI: Override Synopsys USB 3.x HAPS device class
  ...