* [PATCH 1/3] mt76: move beacon_int in mt76_dev
From: Lorenzo Bianconi @ 2019-04-26 20:55 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556310998.git.lorenzo@kernel.org>
Move beacon_int in mt76_dev data structure since it is used by
all drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 75a0d150a224..be0ca4af7254 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -469,6 +469,8 @@ struct mt76_dev {
u8 antenna_mask;
u16 chainmask;
+ int beacon_int;
+
struct mt76_sband sband_2g;
struct mt76_sband sband_5g;
struct debugfs_blob_wrapper eeprom;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index 1b6c3f32bc1b..64e15d566283 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -156,7 +156,7 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
return;
}
- dev->beacon_int = intval;
+ dev->mt76.beacon_int = intval;
mt76_wr(dev, MT_TBTT,
FIELD_PREP(MT_TBTT_PERIOD, intval) | MT_TBTT_CAL_ENABLE);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 2fd63597d305..a5a881738d83 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1268,7 +1268,7 @@ static void mt7603_dma_sched_reset(struct mt7603_dev *dev)
static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
{
- int beacon_int = dev->beacon_int;
+ int beacon_int = dev->mt76.beacon_int;
u32 mask = dev->mt76.mmio.irqmask;
int i;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index 184ed4cead0a..a94dbe714be2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -545,7 +545,7 @@ mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
struct mt7603_dev *dev = hw->priv;
clear_bit(MT76_SCANNING, &dev->mt76.state);
- mt7603_beacon_set_timer(dev, -1, dev->beacon_int);
+ mt7603_beacon_set_timer(dev, -1, dev->mt76.beacon_int);
tasklet_enable(&dev->pre_tbtt_tasklet);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 3816f1e8ae70..a2cda08ca70b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -109,7 +109,6 @@ struct mt7603_dev {
ktime_t survey_time;
ktime_t ed_time;
- int beacon_int;
struct mt76_queue q_rx;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
index dfd3a4f1a624..dde1f64390ce 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
@@ -106,7 +106,6 @@ struct mt76x02_dev {
u8 beacon_data_mask;
u8 tbtt_count;
- u16 beacon_int;
u32 tx_hang_reset;
u8 tx_hang_check;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
index 0c232d02f189..985a9b5d0e45 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
@@ -167,7 +167,7 @@ void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev,
void
mt76x02_resync_beacon_timer(struct mt76x02_dev *dev)
{
- u32 timer_val = dev->beacon_int << 4;
+ u32 timer_val = dev->mt76.beacon_int << 4;
dev->tbtt_count++;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 818b96064dec..81cebd92a4e8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -147,7 +147,7 @@ static void mt76x02u_restart_pre_tbtt_timer(struct mt76x02_dev *dev)
dev_dbg(dev->mt76.dev, "TSF: %llu us TBTT %u us\n", tsf, tbtt);
/* Convert beacon interval in TU (1024 usec) to nsec */
- time = ((1000000000ull * dev->beacon_int) >> 10);
+ time = ((1000000000ull * dev->mt76.beacon_int) >> 10);
/* Adjust time to trigger hrtimer 8ms before TBTT */
if (tbtt < PRE_TBTT_USEC)
@@ -217,7 +217,7 @@ static void mt76x02u_beacon_enable(struct mt76x02_dev *dev, bool en)
{
int i;
- if (WARN_ON_ONCE(!dev->beacon_int))
+ if (WARN_ON_ONCE(!dev->mt76.beacon_int))
return;
if (en) {
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index ad8a53def7f7..227c360165b0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -650,7 +650,7 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
mt76_rmw_field(dev, MT_BEACON_TIME_CFG,
MT_BEACON_TIME_CFG_INTVAL,
info->beacon_int << 4);
- dev->beacon_int = info->beacon_int;
+ dev->mt76.beacon_int = info->beacon_int;
}
if (changed & BSS_CHANGED_BEACON_ENABLED)
--
2.20.1
^ permalink raw reply related
* [PATCH 2/3] mt76: move beacon_mask in mt76_dev
From: Lorenzo Bianconi @ 2019-04-26 20:55 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556310998.git.lorenzo@kernel.org>
Move beacon_mask in mt76_dev data structure since it is used by
all drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
.../net/wireless/mediatek/mt76/mt7603/beacon.c | 17 +++++++++--------
.../net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 --
drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 -
.../net/wireless/mediatek/mt76/mt76x02_beacon.c | 16 ++++++++--------
.../net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x02_mmio.c | 6 +++---
.../wireless/mediatek/mt76/mt76x02_usb_core.c | 7 ++++---
8 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index be0ca4af7254..fb0ba1500d89 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -470,6 +470,7 @@ struct mt76_dev {
u16 chainmask;
int beacon_int;
+ u8 beacon_mask;
struct mt76_sband sband_2g;
struct mt76_sband sband_5g;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index 64e15d566283..f3e7406e731f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -16,7 +16,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
struct sk_buff *skb = NULL;
- if (!(dev->beacon_mask & BIT(mvif->idx)))
+ if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
return;
skb = ieee80211_beacon_get(mt76_hw(dev), vif);
@@ -48,7 +48,7 @@ mt7603_add_buffered_bc(void *priv, u8 *mac, struct ieee80211_vif *vif)
struct ieee80211_tx_info *info;
struct sk_buff *skb;
- if (!(dev->beacon_mask & BIT(mvif->idx)))
+ if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
return;
skb = ieee80211_get_buffered_bc(mt76_hw(dev), vif);
@@ -134,7 +134,7 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
out:
mt76_queue_tx_cleanup(dev, MT_TXQ_BEACON, false);
if (dev->mt76.q_tx[MT_TXQ_BEACON].q->queued >
- hweight8(dev->beacon_mask))
+ hweight8(dev->mt76.beacon_mask))
dev->beacon_check++;
}
@@ -144,12 +144,12 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
if (idx >= 0) {
if (intval)
- dev->beacon_mask |= BIT(idx);
+ dev->mt76.beacon_mask |= BIT(idx);
else
- dev->beacon_mask &= ~BIT(idx);
+ dev->mt76.beacon_mask &= ~BIT(idx);
}
- if (!dev->beacon_mask || (!intval && idx < 0)) {
+ if (!dev->mt76.beacon_mask || (!intval && idx < 0)) {
mt7603_irq_disable(dev, MT_INT_MAC_IRQ3);
mt76_clear(dev, MT_ARB_SCR, MT_ARB_SCR_BCNQ_OPMODE_MASK);
mt76_wr(dev, MT_HW_INT_MASK(3), 0);
@@ -174,10 +174,11 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
mt76_set(dev, MT_WF_ARB_BCN_START,
MT_WF_ARB_BCN_START_BSSn(0) |
- ((dev->beacon_mask >> 1) * MT_WF_ARB_BCN_START_BSS0n(1)));
+ ((dev->mt76.beacon_mask >> 1) *
+ MT_WF_ARB_BCN_START_BSS0n(1)));
mt7603_irq_enable(dev, MT_INT_MAC_IRQ3);
- if (dev->beacon_mask & ~BIT(0))
+ if (dev->mt76.beacon_mask & ~BIT(0))
mt76_set(dev, MT_LPON_SBTOR(0), MT_LPON_SBTOR_SUB_BSS_EN);
else
mt76_clear(dev, MT_LPON_SBTOR(0), MT_LPON_SBTOR_SUB_BSS_EN);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index a2cda08ca70b..8f5ae1644a92 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -125,8 +125,6 @@ struct mt7603_dev {
s8 sensitivity;
- u8 beacon_mask;
-
u8 beacon_check;
u8 tx_hang_check;
u8 tx_dma_check;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
index dde1f64390ce..f754790dada4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
@@ -102,7 +102,6 @@ struct mt76x02_dev {
u32 aggr_stats[32];
struct sk_buff *beacons[8];
- u8 beacon_mask;
u8 beacon_data_mask;
u8 tbtt_count;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
index 985a9b5d0e45..e196b9c0a686 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
@@ -119,23 +119,23 @@ static void
__mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, u8 vif_idx,
bool val, struct sk_buff *skb)
{
- u8 old_mask = dev->beacon_mask;
+ u8 old_mask = dev->mt76.beacon_mask;
bool en;
u32 reg;
if (val) {
- dev->beacon_mask |= BIT(vif_idx);
+ dev->mt76.beacon_mask |= BIT(vif_idx);
if (skb)
mt76x02_mac_set_beacon(dev, vif_idx, skb);
} else {
- dev->beacon_mask &= ~BIT(vif_idx);
+ dev->mt76.beacon_mask &= ~BIT(vif_idx);
mt76x02_mac_set_beacon(dev, vif_idx, NULL);
}
- if (!!old_mask == !!dev->beacon_mask)
+ if (!!old_mask == !!dev->mt76.beacon_mask)
return;
- en = dev->beacon_mask;
+ en = dev->mt76.beacon_mask;
reg = MT_BEACON_TIME_CFG_BEACON_TX |
MT_BEACON_TIME_CFG_TBTT_EN |
@@ -156,7 +156,7 @@ void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev,
if (mt76_is_usb(dev))
skb = ieee80211_beacon_get(mt76_hw(dev), vif);
- if (!dev->beacon_mask)
+ if (!dev->mt76.beacon_mask)
dev->tbtt_count = 0;
__mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb);
@@ -203,7 +203,7 @@ mt76x02_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
struct sk_buff *skb = NULL;
- if (!(dev->beacon_mask & BIT(mvif->idx)))
+ if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
return;
skb = ieee80211_beacon_get(mt76_hw(dev), vif);
@@ -223,7 +223,7 @@ mt76x02_add_buffered_bc(void *priv, u8 *mac, struct ieee80211_vif *vif)
struct ieee80211_tx_info *info;
struct sk_buff *skb;
- if (!(dev->beacon_mask & BIT(mvif->idx)))
+ if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
return;
skb = ieee80211_get_buffered_bc(mt76_hw(dev), vif);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
index 28851060aa0f..8e0294bfce9c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
@@ -1044,7 +1044,7 @@ void mt76x02_mac_work(struct work_struct *work)
dev->aggr_stats[idx++] += val >> 16;
}
- if (!dev->beacon_mask)
+ if (!dev->mt76.beacon_mask)
mt76x02_check_mac_err(dev);
if (dev->ed_monitor)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 644706ab2893..31e0d4b03f6b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -415,7 +415,7 @@ static void mt76x02_reset_state(struct mt76x02_dev *dev)
}
dev->vif_mask = 0;
- dev->beacon_mask = 0;
+ dev->mt76.beacon_mask = 0;
}
static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
@@ -438,7 +438,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
if (restart)
mt76x02_reset_state(dev);
- if (dev->beacon_mask)
+ if (dev->mt76.beacon_mask)
mt76_clear(dev, MT_BEACON_TIME_CFG,
MT_BEACON_TIME_CFG_BEACON_TX |
MT_BEACON_TIME_CFG_TBTT_EN);
@@ -470,7 +470,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
if (dev->ed_monitor)
mt76_set(dev, MT_TXOP_CTRL_CFG, MT_TXOP_ED_CCA_EN);
- if (dev->beacon_mask && !restart)
+ if (dev->mt76.beacon_mask && !restart)
mt76_set(dev, MT_BEACON_TIME_CFG,
MT_BEACON_TIME_CFG_BEACON_TX |
MT_BEACON_TIME_CFG_TBTT_EN);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 81cebd92a4e8..5b6ac1b364e1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -175,7 +175,7 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
struct sk_buff *skb;
int i, nbeacons;
- if (!dev->beacon_mask)
+ if (!dev->mt76.beacon_mask)
return;
mt76x02_resync_beacon_timer(dev);
@@ -184,7 +184,7 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
IEEE80211_IFACE_ITER_RESUME_ALL,
mt76x02_update_beacon_iter, dev);
- nbeacons = hweight8(dev->beacon_mask);
+ nbeacons = hweight8(dev->mt76.beacon_mask);
mt76x02_enqueue_buffered_bc(dev, &data, N_BCN_SLOTS - nbeacons);
for (i = nbeacons; i < N_BCN_SLOTS; i++) {
@@ -207,7 +207,8 @@ static enum hrtimer_restart mt76x02u_pre_tbtt_interrupt(struct hrtimer *timer)
static void mt76x02u_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
{
- if (en && dev->beacon_mask && !hrtimer_active(&dev->pre_tbtt_timer))
+ if (en && dev->mt76.beacon_mask &&
+ !hrtimer_active(&dev->pre_tbtt_timer))
mt76x02u_start_pre_tbtt_timer(dev);
if (!en)
mt76x02u_stop_pre_tbtt_timer(dev);
--
2.20.1
^ permalink raw reply related
* [PATCH 3/3] mt76: move pre_tbtt_tasklet in mt76_dev
From: Lorenzo Bianconi @ 2019-04-26 20:55 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556310998.git.lorenzo@kernel.org>
Move pre_tbtt_tasklet tasklet in mt76_dev data structure since
it is used by all drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7603/core.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 8 ++++----
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 --
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 12 ++++++------
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 4 ++--
12 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index fb0ba1500d89..859c9f019323 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -469,6 +469,7 @@ struct mt76_dev {
u8 antenna_mask;
u16 chainmask;
+ struct tasklet_struct pre_tbtt_tasklet;
int beacon_int;
u8 beacon_mask;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/core.c b/drivers/net/wireless/mediatek/mt76/mt7603/core.c
index 0d06ff67ce44..37e5644b45ef 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/core.c
@@ -27,7 +27,7 @@ irqreturn_t mt7603_irq_handler(int irq, void *dev_instance)
mt76_wr(dev, MT_HW_INT_STATUS(3), hwintr);
if (hwintr & MT_HW_INT3_PRE_TBTT0)
- tasklet_schedule(&dev->pre_tbtt_tasklet);
+ tasklet_schedule(&dev->mt76.pre_tbtt_tasklet);
if ((hwintr & MT_HW_INT3_TBTT0) && dev->mt76.csa_complete)
mt76_csa_finish(&dev->mt76);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/init.c b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
index d394839f1bd8..c3c295919020 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
@@ -514,7 +514,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
spin_lock_init(&dev->ps_lock);
INIT_DELAYED_WORK(&dev->mt76.mac_work, mt7603_mac_work);
- tasklet_init(&dev->pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet,
+ tasklet_init(&dev->mt76.pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet,
(unsigned long)dev);
/* Check for 7688, which only has 1SS */
@@ -573,7 +573,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
void mt7603_unregister_device(struct mt7603_dev *dev)
{
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76_unregister_device(&dev->mt76);
mt7603_mcu_exit(dev);
mt7603_dma_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index a5a881738d83..ad517e1af75b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1279,7 +1279,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
mt76_txq_schedule_all(&dev->mt76);
tasklet_disable(&dev->mt76.tx_tasklet);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
napi_disable(&dev->mt76.napi[0]);
napi_disable(&dev->mt76.napi[1]);
@@ -1328,7 +1328,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
tasklet_enable(&dev->mt76.tx_tasklet);
tasklet_schedule(&dev->mt76.tx_tasklet);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
mt7603_beacon_set_timer(dev, -1, beacon_int);
napi_enable(&dev->mt76.napi[0]);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index a94dbe714be2..a01ee3723314 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -294,9 +294,9 @@ mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (changed & (BSS_CHANGED_BEACON_ENABLED | BSS_CHANGED_BEACON_INT)) {
int beacon_int = !!info->enable_beacon * info->beacon_int;
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt7603_beacon_set_timer(dev, mvif->idx, beacon_int);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
}
mutex_unlock(&dev->mt76.mutex);
@@ -535,7 +535,7 @@ mt7603_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt7603_dev *dev = hw->priv;
set_bit(MT76_SCANNING, &dev->mt76.state);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt7603_beacon_set_timer(dev, -1, 0);
}
@@ -546,7 +546,7 @@ mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
clear_bit(MT76_SCANNING, &dev->mt76.state);
mt7603_beacon_set_timer(dev, -1, dev->mt76.beacon_int);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
}
static void
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 8f5ae1644a92..56ef73e41a5a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -140,8 +140,6 @@ struct mt7603_dev {
u32 reset_test;
unsigned int reset_cause[__RESET_CAUSE_MAX];
-
- struct tasklet_struct pre_tbtt_tasklet;
};
extern const struct mt76_driver_ops mt7603_drv_ops;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
index f106dbfa665f..6a8fe82ab9ad 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
@@ -219,7 +219,7 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static void mt76x0e_cleanup(struct mt76x02_dev *dev)
{
clear_bit(MT76_STATE_INITIALIZED, &dev->mt76.state);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76x0_chip_onoff(dev, false, false);
mt76x0e_stop_hw(dev);
mt76x02_dma_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
index f754790dada4..07579a951dd9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
@@ -90,7 +90,6 @@ struct mt76x02_dev {
struct sk_buff *rx_head;
struct tasklet_struct tx_tasklet;
- struct tasklet_struct pre_tbtt_tasklet;
struct delayed_work cal_work;
struct delayed_work wdt_work;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 31e0d4b03f6b..c4ead6a76766 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -68,9 +68,9 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
static void mt76x02e_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
{
if (en)
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
else
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
}
static void mt76x02e_beacon_enable(struct mt76x02_dev *dev, bool en)
@@ -184,7 +184,7 @@ int mt76x02_dma_init(struct mt76x02_dev *dev)
tasklet_init(&dev->mt76.tx_tasklet, mt76x02_tx_tasklet,
(unsigned long) dev);
- tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
+ tasklet_init(&dev->mt76.pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
(unsigned long)dev);
kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
@@ -267,7 +267,7 @@ irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance)
}
if (intr & MT_INT_PRE_TBTT)
- tasklet_schedule(&dev->pre_tbtt_tasklet);
+ tasklet_schedule(&dev->mt76.pre_tbtt_tasklet);
/* send buffered multicast frames now */
if (intr & MT_INT_TBTT) {
@@ -427,7 +427,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
ieee80211_stop_queues(dev->mt76.hw);
set_bit(MT76_RESET, &dev->mt76.state);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
tasklet_disable(&dev->mt76.tx_tasklet);
for (i = 0; i < ARRAY_SIZE(dev->mt76.napi); i++)
@@ -484,7 +484,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
tasklet_enable(&dev->mt76.tx_tasklet);
tasklet_schedule(&dev->mt76.tx_tasklet);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
for (i = 0; i < ARRAY_SIZE(dev->mt76.napi); i++) {
napi_enable(&dev->mt76.napi[i]);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 227c360165b0..12724e96b290 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -594,7 +594,7 @@ void mt76x02_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt76x02_dev *dev = hw->priv;
if (mt76_is_mmio(dev))
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
set_bit(MT76_SCANNING, &dev->mt76.state);
}
EXPORT_SYMBOL_GPL(mt76x02_sw_scan);
@@ -606,7 +606,7 @@ void mt76x02_sw_scan_complete(struct ieee80211_hw *hw,
clear_bit(MT76_SCANNING, &dev->mt76.state);
if (mt76_is_mmio(dev))
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
if (dev->cal.gain_init_done) {
/* Restore AGC gain and resume calibration after scanning. */
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
index 90c1a0489294..71aea2832644 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
@@ -300,7 +300,7 @@ void mt76x2_stop_hardware(struct mt76x02_dev *dev)
void mt76x2_cleanup(struct mt76x02_dev *dev)
{
tasklet_disable(&dev->dfs_pd.dfs_tasklet);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76x2_stop_hardware(dev);
mt76x02_dma_cleanup(dev);
mt76x02_mcu_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
index 77f63cb14f35..93ad12391e33 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
@@ -66,7 +66,7 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
mt76_set_channel(&dev->mt76);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
tasklet_disable(&dev->dfs_pd.dfs_tasklet);
mt76x2_mac_stop(dev, true);
@@ -80,7 +80,7 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
mt76x2_mac_resume(dev);
tasklet_enable(&dev->dfs_pd.dfs_tasklet);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
clear_bit(MT76_RESET, &dev->mt76.state);
--
2.20.1
^ permalink raw reply related
* [PATCH v2] wireless-regdb: Update regulatory rules for South Korea
From: Peter Oh @ 2019-04-26 21:31 UTC (permalink / raw)
To: wireless-regdb@lists.infradead.org
Cc: Peter Oh, linux-wireless@vger.kernel.org
From: Peter Oh <peter.oh@bowerswilkins.com>
Update power limit as documented in:
http://www.law.go.kr/%ED%96%89%EC%A0%95%EA%B7%9C%EC%B9%99/
%EC%8B%A0%EA%B3%A0%ED%95%98%EC%A7%80%EC%95%84%EB%8B%88%ED
%95%98%EA%B3%A0%EA%B0%9C%EC%84%A4%ED%95%A0%EC%88%98%EC%9E
%88%EB%8A%94%EB%AC%B4%EC%84%A0%EA%B5%AD%EC%9A%A9%EB%AC%B4
%EC%84%A0%EA%B8%B0%EA%B8%B0/(2018-89,20181227)
which revised on December 27, 2018.
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
---
db.txt | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/db.txt b/db.txt
index 4fb1948..8d24305 100644
--- a/db.txt
+++ b/db.txt
@@ -695,11 +695,12 @@ country KP: DFS-JP
(5735 - 5815 @ 20), (30)
country KR: DFS-JP
- (2402 - 2482 @ 40), (13)
- (5170 - 5250 @ 80), (20), AUTO-BW
- (5250 - 5330 @ 80), (20), DFS, AUTO-BW
- (5490 - 5710 @ 160), (30), DFS
- (5735 - 5835 @ 80), (30)
+ # ref: https://www.rra.go.kr
+ (2402 - 2482 @ 40), (23)
+ (5170 - 5250 @ 80), (23), AUTO-BW
+ (5250 - 5330 @ 80), (23), DFS, AUTO-BW
+ (5490 - 5710 @ 160), (23), DFS
+ (5735 - 5835 @ 80), (23)
# 60 GHz band channels 1-4,
# ref: http://www.law.go.kr/%ED%96%89%EC%A0%95%EA%B7%9C%EC%B9%99/%EB%AC%B4%EC%84%A0%EC%84%A4%EB%B9%84%EA%B7%9C%EC%B9%99
(57000 - 66000 @ 2160), (43)
--
2.7.4
^ permalink raw reply related
* Re: [PATCH] mmc: dw_mmc: Disable SDIO interrupts while suspended to fix suspend/resume
From: Doug Anderson @ 2019-04-26 22:08 UTC (permalink / raw)
To: Emil Renner Berthing
Cc: Jaehoon Chung, Ulf Hansson, Shawn Lin, Heiko Stuebner,
Linux MMC List, Brian Norris, linux-wireless, stable,
Linux Kernel Mailing List, open list:ARM/Rockchip SoC...,
Matthias Kaehlcke, Ryan Case, Kalle Valo
In-Reply-To: <CANBLGcxpjDFKNdT7uk8uCS=C8Gjxc9wVqDs_ZGHqRpLFVsJxxQ@mail.gmail.com>
Hi,
On Fri, Apr 26, 2019 at 10:19 AM Emil Renner Berthing
<emil.renner.berthing@gmail.com> wrote:
>
> Hi Doug,
>
> TLDR: I'm no longer convinced this patch breaks suspend/resume more
> than it already is. Sorry about the noise.
>
> On Thu, 25 Apr 2019 at 23:25, Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Wed, Apr 24, 2019 at 1:19 AM Emil Renner Berthing
> > <emil.renner.berthing@gmail.com> wrote:
> > >
> > > Hi Douglas,
> > >
> > > Unfortunately this seems to beak resume on my rk3399-gru-kevin. I have
> > > a semi-complicated setup with my rootfs as a btrfs on dmcrypt on
> > > mmcblk0 which is the dw_mmc, so I'm guessing something goes wrong when
> > > waking up the dm_mmc which probably wasn't suspended before this
> > > patch. It's not 100% consistent though. Sometimes I see it resume the
> > > first time I try suspending, but then 2nd time I suspend it won't come
> > > back.
> >
> > Thanks for testing!
>
> Thanks for your detailed response. It made me want to make absolutely
> sure that this patch is the culprit.
> As a baseline I booted a vanilla 5.0.9 and suspend/resumed it about a
> dusin times without any errors.
> So I applied this patch and immediately it crashed on suspend, but in
> a way that I could still see the kernel log,
> and it was the mwifiex driver that crashed. I rebooted and tried
> supend/resume again and
> this time it seemed like it was the dwc3 or usb3-phy that crashed.
> I still have the kernel log if anyone is interested.
> However 3rd time booting 5.0.9 with this patch suspend/resume just works.
> At least the 2 dusin times I tried before giving up on making it crash.
> I went back to vanilla 5.0.9 and after a few tries I managed to make
> that one crash too.
> I guess that means this patch is off the hook. I'm sorry about the
> false report :/
No worries, I've certainly been there and I'm super happy to have
people testing patches. :-)
Odd that you're having suspend/resume patches. My first guess for
super randomness would be WiFi. The PCIe bus on rk3399 causes the
most impossible to debug problems if you try to access it at the wrong
time. If you disable WiFi do all your problems go away? I tried
putting v5.0.9 on the kevin sitting on my desk and it seems to
suspend/resume OK (25 cycles), but:
* I just jammed it straight onto a normal Chrome OS root filesystem.
Since that filesystem expects the GPU to be there, I'm just booting to
a serial prompt and the screen just displays the boot splash.
* I didn't try to configure WiFi or anything.
* I'm using the Chrome OS "fallback config" for the kernel (the config
our build system picks if building an upstream kernel without the
normal split config). AKA:
<https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/refs/heads/master/eclass/cros-kernel/rockchip64_defconfig>.
I'm not 100% sure everything is enabled there...
* I'm booting w/ serial console enabled and doing my testing with "no
console suspend" which can certainly affect suspend/resume timing.
Best of luck tracking your problems down! I suppose if things used to
work maybe a bisect would be possible?
-Doug
^ permalink raw reply
* [PATCH 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Petr Štetiar @ 2019-04-26 23:06 UTC (permalink / raw)
To: netdev, devicetree, linux-kernel, David S. Miller, Rob Herring,
Mark Rutland, Andrew Lunn, Vivien Didelot, Florian Fainelli,
Heiko Stuebner, Fugang Duan, Claudiu Manoil, Yisen Zhuang,
Salil Mehta, Woojung Huh, Microchip Linux Driver Support,
Neil Armstrong, Kunihiko Hayashi, Masahiro Yamada, Jassi Brar,
Maxime Coquelin, Alexandre Torgue, Kalle Valo, Matthias Brugger,
Li Yang
Cc: Heiner Kallweit, Frank Rowand, Srinivas Kandagatla, Maxime Ripard,
Alban Bedel, Petr Štetiar, linux-arm-kernel, linux-rockchip,
linux-oxnas, linux-stm32, linux-wireless, linux-mediatek,
linuxppc-dev
In-Reply-To: <1556320002-26213-1-git-send-email-ynezz@true.cz>
As of_get_mac_address now supports NVMEM under the hood, we should
update the bindings documentation with the new nvmem-cell* properties.
While at it, fix also other missing properties supported by
of_get_mac_address.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
Documentation/devicetree/bindings/net/altera_tse.txt | 3 +++
Documentation/devicetree/bindings/net/arc_emac.txt | 4 ++++
Documentation/devicetree/bindings/net/brcm,amac.txt | 3 +++
Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 5 +++++
Documentation/devicetree/bindings/net/brcm,systemport.txt | 4 ++++
Documentation/devicetree/bindings/net/cavium-mix.txt | 7 ++++++-
Documentation/devicetree/bindings/net/cavium-pip.txt | 5 +++++
Documentation/devicetree/bindings/net/cpsw.txt | 3 +++
Documentation/devicetree/bindings/net/davicom-dm9000.txt | 4 ++++
Documentation/devicetree/bindings/net/davinci_emac.txt | 2 ++
Documentation/devicetree/bindings/net/dsa/dsa.txt | 7 ++++---
Documentation/devicetree/bindings/net/emac_rockchip.txt | 4 ++++
Documentation/devicetree/bindings/net/ethernet.txt | 2 ++
Documentation/devicetree/bindings/net/ezchip_enet.txt | 6 ++++++
Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++++
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | 4 ++++
Documentation/devicetree/bindings/net/hisilicon-femac.txt | 3 +++
Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt | 3 +++
Documentation/devicetree/bindings/net/keystone-netcp.txt | 9 ++++++---
Documentation/devicetree/bindings/net/macb.txt | 8 ++++----
Documentation/devicetree/bindings/net/marvell-orion-net.txt | 3 +++
Documentation/devicetree/bindings/net/marvell-pxa168.txt | 3 +++
Documentation/devicetree/bindings/net/microchip,enc28j60.txt | 3 +++
Documentation/devicetree/bindings/net/microchip,lan78xx.txt | 2 ++
Documentation/devicetree/bindings/net/opencores-ethoc.txt | 4 ++++
Documentation/devicetree/bindings/net/oxnas-dwmac.txt | 6 ++++++
Documentation/devicetree/bindings/net/qca,qca7000.txt | 3 +++
Documentation/devicetree/bindings/net/samsung-sxgbe.txt | 3 +++
Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt | 2 ++
Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 4 ++++
.../devicetree/bindings/net/socionext,uniphier-ave4.txt | 3 +++
Documentation/devicetree/bindings/net/socionext-netsec.txt | 2 ++
Documentation/devicetree/bindings/net/stmmac.txt | 4 ++++
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt | 2 ++
Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt | 2 ++
Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/ucc.txt | 3 +++
36 files changed, 128 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/altera_tse.txt b/Documentation/devicetree/bindings/net/altera_tse.txt
index 0e21df9..dbc2bb4 100644
--- a/Documentation/devicetree/bindings/net/altera_tse.txt
+++ b/Documentation/devicetree/bindings/net/altera_tse.txt
@@ -47,8 +47,11 @@ Required properties:
- device_type: Must be "ethernet-phy".
Optional properties:
+- mac-address: See ethernet.txt in the same directory.
- local-mac-address: See ethernet.txt in the same directory.
- max-frame-size: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example:
diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt
index c73a0e9..139204e 100644
--- a/Documentation/devicetree/bindings/net/arc_emac.txt
+++ b/Documentation/devicetree/bindings/net/arc_emac.txt
@@ -13,6 +13,10 @@ Optional properties:
only if property "phy-reset-gpios" is available. Missing the property
will have the duration be 1 millisecond. Numbers greater than 1000 are
invalid and 1 millisecond will be used instead.
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Clock handling:
The clock frequency is needed to calculate and set polling period of EMAC.
diff --git a/Documentation/devicetree/bindings/net/brcm,amac.txt b/Documentation/devicetree/bindings/net/brcm,amac.txt
index 0bfad65..a9b9514 100644
--- a/Documentation/devicetree/bindings/net/brcm,amac.txt
+++ b/Documentation/devicetree/bindings/net/brcm,amac.txt
@@ -18,6 +18,9 @@ Required properties:
Optional properties:
- mac-address: See ethernet.txt file in the same directory
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Examples:
diff --git a/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
index 3956af1..b7e2517 100644
--- a/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
+++ b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
@@ -30,6 +30,11 @@ Optional properties:
See Documentation/devicetree/bindings/net/fixed-link.txt for information on
the property specifics
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
+
Required child nodes:
- mdio bus node: this node should always be present regardless of the PHY
diff --git a/Documentation/devicetree/bindings/net/brcm,systemport.txt b/Documentation/devicetree/bindings/net/brcm,systemport.txt
index 83f29e0..ce3c812 100644
--- a/Documentation/devicetree/bindings/net/brcm,systemport.txt
+++ b/Documentation/devicetree/bindings/net/brcm,systemport.txt
@@ -20,6 +20,10 @@ Optional properties:
- systemport,num-tier1-arb: number of tier 1 arbiters, an integer
- systemport,num-txq: number of HW transmit queues, an integer
- systemport,num-rxq: number of HW receive queues, an integer
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example:
ethernet@f04a0000 {
diff --git a/Documentation/devicetree/bindings/net/cavium-mix.txt b/Documentation/devicetree/bindings/net/cavium-mix.txt
index 8d7c309..41bcc99 100644
--- a/Documentation/devicetree/bindings/net/cavium-mix.txt
+++ b/Documentation/devicetree/bindings/net/cavium-mix.txt
@@ -18,7 +18,12 @@ Properties:
- interrupts: Two interrupt specifiers. The first is the MIX
interrupt routing and the second the routing for the AGL interrupts.
-- phy-handle: Optional, see ethernet.txt file in the same directory.
+Optional properties:
+- phy-handle: See ethernet.txt file in the same directory.
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example:
ethernet@1070000100800 {
diff --git a/Documentation/devicetree/bindings/net/cavium-pip.txt b/Documentation/devicetree/bindings/net/cavium-pip.txt
index e3b8fe71..4b1c3d9 100644
--- a/Documentation/devicetree/bindings/net/cavium-pip.txt
+++ b/Documentation/devicetree/bindings/net/cavium-pip.txt
@@ -43,6 +43,11 @@ Properties for PIP port which is a child the PIP interface:
- tx-delay: Delay value for RGMII transmit clock. Optional. Disabled if 0.
Value range is 1-31, and mapping to the actual delay varies depending on HW.
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
+
Example:
pip@11800a0000000 {
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 3264e19..248f7df 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -50,6 +50,9 @@ Required properties:
Optional properties:
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
- mac-address : See ethernet.txt file in the same directory
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- phy_id : Specifies slave phy id (deprecated, use phy-handle)
- phy-handle : See ethernet.txt file in the same directory
diff --git a/Documentation/devicetree/bindings/net/davicom-dm9000.txt b/Documentation/devicetree/bindings/net/davicom-dm9000.txt
index 64c159e..ce60d35 100644
--- a/Documentation/devicetree/bindings/net/davicom-dm9000.txt
+++ b/Documentation/devicetree/bindings/net/davicom-dm9000.txt
@@ -12,6 +12,10 @@ Optional properties:
- davicom,ext-phy : Use external PHY
- reset-gpios : phandle of gpio that will be used to reset chip during probe
- vcc-supply : phandle of regulator that will be used to enable power to chip
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example:
diff --git a/Documentation/devicetree/bindings/net/davinci_emac.txt b/Documentation/devicetree/bindings/net/davinci_emac.txt
index ca83dcc..c953945 100644
--- a/Documentation/devicetree/bindings/net/davinci_emac.txt
+++ b/Documentation/devicetree/bindings/net/davinci_emac.txt
@@ -20,6 +20,8 @@ Required properties:
Optional properties:
- phy-handle: See ethernet.txt file in the same directory.
If absent, davinci_emac driver defaults to 100/FULL.
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
- nvmem-cells: phandle, reference to an nvmem node for the MAC address
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
- ti,davinci-rmii-en: 1 byte, 1 means use RMII
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt
index d66a529..9e2f0fa 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.txt
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt
@@ -71,9 +71,10 @@ properties, described in binding documents:
Documentation/devicetree/bindings/net/fixed-link.txt
for details.
-- local-mac-address : See
- Documentation/devicetree/bindings/net/ethernet.txt
- for details.
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example
diff --git a/Documentation/devicetree/bindings/net/emac_rockchip.txt b/Documentation/devicetree/bindings/net/emac_rockchip.txt
index 05bd7da..a84944a 100644
--- a/Documentation/devicetree/bindings/net/emac_rockchip.txt
+++ b/Documentation/devicetree/bindings/net/emac_rockchip.txt
@@ -14,6 +14,10 @@ Required properties:
Optional properties:
- phy-supply: phandle to a regulator if the PHY needs one
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Clock handling:
- clocks: Must contain an entry for each entry in clock-names.
diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt
index 2974e63..1e2bc9a 100644
--- a/Documentation/devicetree/bindings/net/ethernet.txt
+++ b/Documentation/devicetree/bindings/net/ethernet.txt
@@ -10,6 +10,8 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
the boot program; should be used in cases where the MAC address assigned to
the device by the boot program is different from the "local-mac-address"
property;
+- nvmem-cells: phandle, reference to an nvmem node for the MAC address
+- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
the maximum frame size (there's contradiction in the Devicetree
diff --git a/Documentation/devicetree/bindings/net/ezchip_enet.txt b/Documentation/devicetree/bindings/net/ezchip_enet.txt
index 4e29b2b..f928b92 100644
--- a/Documentation/devicetree/bindings/net/ezchip_enet.txt
+++ b/Documentation/devicetree/bindings/net/ezchip_enet.txt
@@ -5,6 +5,12 @@ Required properties:
- reg: Address and length of the register set for the device
- interrupts: Should contain the ENET interrupt
+Optional properties:
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
+
Examples:
ethernet@f0003000 {
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index 2d41fb9..f2099f0 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -46,6 +46,10 @@ Optional properties:
tx/rx queues 1 and 2. "int0" will be used for queue 0 and ENET_MII interrupts.
For imx6sx, "int0" handles all 3 queues and ENET_MII. "pps" is for the pulse
per second interrupt associated with 1588 precision time protocol(PTP).
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Optional subnodes:
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
index 047bdf7..6bc9a68 100644
--- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
+++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
@@ -71,6 +71,10 @@ Properties:
in the L2.
- rx-stash-idx : Denotes the index of the first byte from the received
buffer to stash in the L2.
+ - mac-address: See ethernet.txt in the same directory.
+ - local-mac-address: See ethernet.txt in the same directory.
+ - nvmem-cells: See ethernet.txt in the same directory.
+ - nvmem-cell-names: See ethernet.txt in the same directory.
Example:
ethernet@24000 {
diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac.txt b/Documentation/devicetree/bindings/net/hisilicon-femac.txt
index d11af5e..e28bb6e 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-femac.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-femac.txt
@@ -15,6 +15,9 @@ Required properties:
- reset-names: should contain the reset signal name "mac"(required)
and "phy"(optional).
- mac-address: see ethernet.txt [1].
+- local-mac-address: see ethernet.txt [1].
+- nvmem-cells: see ethernet.txt [1].
+- nvmem-cell-names: see ethernet.txt [1].
- phy-mode: see ethernet.txt [1].
- phy-handle: see ethernet.txt [1].
- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
index eea73ad..dddd408 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
@@ -19,6 +19,9 @@ Required properties:
- phy-mode: see ethernet.txt [1].
- phy-handle: see ethernet.txt [1].
- mac-address: see ethernet.txt [1].
+- local-mac-address: see ethernet.txt [1].
+- nvmem-cells: see ethernet.txt [1].
+- nvmem-cell-names: see ethernet.txt [1].
- clocks: clock phandle and specifier pair.
- clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
- resets: should contain the phandle to the MAC core reset signal(optional),
diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt
index 04ba1dc..61e8019 100644
--- a/Documentation/devicetree/bindings/net/keystone-netcp.txt
+++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt
@@ -137,9 +137,12 @@ Optional properties:
when it obtains the mac address from efuse.
- local-mac-address: the driver is designed to use the of_get_mac_address api
only if efuse-mac is 0. When efuse-mac is 0, the MAC
- address is obtained from local-mac-address. If this
- attribute is not present, then the driver will use a
- random MAC address.
+ address is obtained from nvmem-cells, mac-address and
+ local-mac-address. If any of this attributes is not present,
+ then the driver will use a random MAC address.
+- mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- "netcp-device label": phandle to the device specification for each of NetCP
sub-module attached to this interface.
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 8b80515..92c5642 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -26,15 +26,15 @@ Required properties:
Optional elements: 'tsu_clk'
- clocks: Phandles to input clocks.
-Optional properties:
-- nvmem-cells: phandle, reference to an nvmem node for the MAC address
-- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
-
Optional properties for PHY child node:
- reset-gpios : Should specify the gpio for phy reset
- magic-packet : If present, indicates that the hardware supports waking
up via magic packet.
- phy-handle : see ethernet.txt file in the same directory
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Examples:
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-net.txt b/Documentation/devicetree/bindings/net/marvell-orion-net.txt
index 6fd988c..2e0c06f 100644
--- a/Documentation/devicetree/bindings/net/marvell-orion-net.txt
+++ b/Documentation/devicetree/bindings/net/marvell-orion-net.txt
@@ -37,6 +37,9 @@ Required port properties:
- reg: port number relative to ethernet controller, shall be 0, 1, or 2.
- interrupts: port interrupt.
- local-mac-address: See ethernet.txt file in the same directory.
+ - mac-address: See ethernet.txt in the same directory.
+ - nvmem-cells: See ethernet.txt in the same directory.
+ - nvmem-cell-names: See ethernet.txt in the same directory.
Optional port properties:
- marvell,tx-queue-size: size of the transmit ring buffer.
diff --git a/Documentation/devicetree/bindings/net/marvell-pxa168.txt b/Documentation/devicetree/bindings/net/marvell-pxa168.txt
index 845a148..5eaafa2 100644
--- a/Documentation/devicetree/bindings/net/marvell-pxa168.txt
+++ b/Documentation/devicetree/bindings/net/marvell-pxa168.txt
@@ -12,6 +12,9 @@ Optional properties:
- #size-cells: must be 0 when using sub-nodes.
- phy-handle: see ethernet.txt file in the same directory.
- local-mac-address: see ethernet.txt file in the same directory.
+- mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Sub-nodes:
Each PHY can be represented as a sub-node. This is not mandatory.
diff --git a/Documentation/devicetree/bindings/net/microchip,enc28j60.txt b/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
index 24626e0..c06923d 100644
--- a/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
+++ b/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
@@ -22,6 +22,9 @@ Optional properties:
According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
board designs may need to limit this value.
- local-mac-address: See ethernet.txt in the same directory.
+- mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Example (for NXP i.MX28 with pin control stuff for GPIO irq):
diff --git a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
index 76786a0..a31c475 100644
--- a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
+++ b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
@@ -10,6 +10,8 @@ Required properties:
Optional properties:
- local-mac-address: see ethernet.txt
- mac-address: see ethernet.txt
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Optional properties of the embedded PHY:
- microchip,led-modes: a 0..4 element vector, with each element configuring
diff --git a/Documentation/devicetree/bindings/net/opencores-ethoc.txt b/Documentation/devicetree/bindings/net/opencores-ethoc.txt
index 2dc127c..e7969dc 100644
--- a/Documentation/devicetree/bindings/net/opencores-ethoc.txt
+++ b/Documentation/devicetree/bindings/net/opencores-ethoc.txt
@@ -10,6 +10,10 @@ Required properties:
Optional properties:
- clocks: phandle to refer to the clk used as per
Documentation/devicetree/bindings/clock/clock-bindings.txt
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
Examples:
diff --git a/Documentation/devicetree/bindings/net/oxnas-dwmac.txt b/Documentation/devicetree/bindings/net/oxnas-dwmac.txt
index d7117a2..7f43451 100644
--- a/Documentation/devicetree/bindings/net/oxnas-dwmac.txt
+++ b/Documentation/devicetree/bindings/net/oxnas-dwmac.txt
@@ -17,6 +17,12 @@ Required properties on all platforms:
- oxsemi,sys-ctrl: a phandle to the system controller syscon node
+Optional properties:
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
+
Example :
etha: ethernet@40400000 {
diff --git a/Documentation/devicetree/bindings/net/qca,qca7000.txt b/Documentation/devicetree/bindings/net/qca,qca7000.txt
index e4a8a51..5a2627e 100644
--- a/Documentation/devicetree/bindings/net/qca,qca7000.txt
+++ b/Documentation/devicetree/bindings/net/qca,qca7000.txt
@@ -24,6 +24,9 @@ Optional properties:
are invalid. Missing the property will set the SPI
frequency to 8000000 Hertz.
- local-mac-address : see ./ethernet.txt
+- mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- qca,legacy-mode : Set the SPI data transfer of the QCA7000 to legacy mode.
In this mode the SPI master must toggle the chip select
between each data word. In burst mode these gaps aren't
diff --git a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
index 46e5911..94c12b4 100644
--- a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
+++ b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
@@ -22,6 +22,9 @@ Required properties:
Optional properties:
- mac-address: 6 bytes, mac address
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather
than the maximum frame size.
diff --git a/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt b/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
index 36f1aef..881848f 100644
--- a/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
+++ b/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
@@ -105,6 +105,8 @@ Optional properties:
- dma-coherent: Present if dma operations are coherent
- mac-address: See ethernet.txt in the same directory
- local-mac-address: See ethernet.txt in the same directory
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY.
See ../gpio/gpio.txt.
- snps,en-lpi: If present it enables use of the AXI low-power interface
diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
index 17d6819..29ffd21 100644
--- a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
+++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
@@ -19,6 +19,10 @@ altr,emac-splitter: Should be the phandle to the emac splitter soft IP node if
DWMAC controller is connected emac splitter.
phy-mode: The phy mode the ethernet operates in
altr,sgmii-to-sgmii-converter: phandle to the TSE SGMII converter
+mac-address: See ethernet.txt in the same directory.
+local-mac-address: See ethernet.txt in the same directory.
+nvmem-cells: See ethernet.txt in the same directory.
+nvmem-cell-names: See ethernet.txt in the same directory.
This device node has additional phandle dependency, the sgmii converter:
diff --git a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
index fc8f017..13daf31 100644
--- a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
+++ b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
@@ -33,6 +33,9 @@ Required properties:
Optional properties:
- local-mac-address: See ethernet.txt in the same directory.
+ - mac-address: See ethernet.txt in the same directory.
+ - nvmem-cells: See ethernet.txt in the same directory.
+ - nvmem-cell-names: See ethernet.txt in the same directory.
Required subnode:
- mdio: A container for child nodes representing phy nodes.
diff --git a/Documentation/devicetree/bindings/net/socionext-netsec.txt b/Documentation/devicetree/bindings/net/socionext-netsec.txt
index 0cff94f..c5ac7fc 100644
--- a/Documentation/devicetree/bindings/net/socionext-netsec.txt
+++ b/Documentation/devicetree/bindings/net/socionext-netsec.txt
@@ -28,6 +28,8 @@ Optional properties: (See ethernet.txt file in the same directory)
accesses performed by the device are cache coherent.
- local-mac-address: See ethernet.txt in the same directory.
- mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- max-speed: See ethernet.txt in the same directory.
- max-frame-size: See ethernet.txt in the same directory.
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index cb69406..0a0519a 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -21,6 +21,10 @@ Required properties:
The 3rd cell is reset post-delay in micro seconds.
Optional properties:
+- mac-address: See ethernet.txt in the same directory.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- resets: Should contain a phandle to the STMMAC reset signal, if any
- reset-names: Should contain the reset signal name "stmmaceth", if a
reset phandle is given
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
index 7b9a776..bd5cc92 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
@@ -15,6 +15,8 @@ Optional properties:
- mac-address: See ethernet.txt in the parent directory
- local-mac-address: See ethernet.txt in the parent directory
+- nvmem-cells: See ethernet.txt in the parent directory.
+- nvmem-cell-names: See ethernet.txt in the parent directory.
- ieee80211-freq-limit: See ieee80211.txt
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
index b7396c8..77074a0 100644
--- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
@@ -36,6 +36,8 @@ Optional properties:
kernel firmware loader).
- mac-address: See ethernet.txt in the parent directory
- local-mac-address: See ethernet.txt in the parent directory
+- nvmem-cells: See ethernet.txt in the parent directory.
+- nvmem-cell-names: See ethernet.txt in the parent directory.
In this example, the node is defined as child node of the PCI controller:
diff --git a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/ucc.txt b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/ucc.txt
index 5efb7ac..7fee9d5 100644
--- a/Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/ucc.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/ucc.txt
@@ -43,6 +43,9 @@ to check for the new properties first.
Required properties for network device_type:
- mac-address : list of bytes representing the ethernet address.
+- local-mac-address: See ethernet.txt in the same directory.
+- nvmem-cells: See ethernet.txt in the same directory.
+- nvmem-cell-names: See ethernet.txt in the same directory.
- phy-handle : The phandle for the PHY connected to this controller.
Recommended properties:
--
1.9.1
^ permalink raw reply related
* Re: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driver
From: gregkh @ 2019-04-27 6:36 UTC (permalink / raw)
To: Tony Chuang
Cc: Kalle Valo, linux-wireless@vger.kernel.org,
johannes@sipsolutions.net, Pkshih, Andy Huang,
Larry.Finger@lwfinger.net, sgruszka@redhat.com,
briannorris@chromium.org
In-Reply-To: <F7CD281DE3E379468C6D07993EA72F84D17E3307@RTITMBSVM04.realtek.com.tw>
On Fri, Apr 26, 2019 at 12:19:14PM +0000, Tony Chuang wrote:
> Hi Greg,
>
> > -----Original Message-----
> > From: Kalle Valo [mailto:kvalo@codeaurora.org]
> > Sent: Friday, April 26, 2019 8:10 PM
> > To: Tony Chuang
> > Cc: linux-wireless@vger.kernel.org; johannes@sipsolutions.net; Pkshih; Andy
> > Huang; Larry.Finger@lwfinger.net; sgruszka@redhat.com;
> > briannorris@chromium.org; gregkh@linuxfoundation.org
> > Subject: Re: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driver
> >
> > <yhchuang@realtek.com> writes:
> >
> > > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> > >
> > > The rtlwifi driver is conflicting with Realtek's new 802.11ac chip
> > > series driver rtw88, remove it to avoid racing with the same ID.
> > >
> > > The rtw88 driver can be found at drivers/net/wireless/realtek/rtw88
> > >
> > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >
> > BTW, this patch does not apply to wireless-drivers-next anymore. To
> > avoid any conflicts, would be it be safer that the driver is removed
> > directly from Greg's tree? After rtw88 is applied to
> > wireless-drivers-next, of course.
> >
> > error: patch failed: drivers/staging/rtlwifi/Kconfig:1
> > error: drivers/staging/rtlwifi/Kconfig: patch does not apply
> > error: patch failed: drivers/staging/rtlwifi/efuse.c:1
> > error: drivers/staging/rtlwifi/efuse.c: patch does not apply
> > error: patch failed:
> > drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:1
> > error: drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c: patch
> > does not apply
> > error: patch failed: drivers/staging/rtlwifi/pci.h:1
> > error: drivers/staging/rtlwifi/pci.h: patch does not apply
> > error: patch failed: drivers/staging/rtlwifi/phydm/phydm_rainfo.c:1
> > error: drivers/staging/rtlwifi/phydm/phydm_rainfo.c: patch does not apply
> > error: patch failed: drivers/staging/rtlwifi/phydm/rtl_phydm.c:1
> > error: drivers/staging/rtlwifi/phydm/rtl_phydm.c: patch does not apply
> > error: patch failed: drivers/staging/rtlwifi/rtl8822be/fw.c:1
> > error: drivers/staging/rtlwifi/rtl8822be/fw.c: patch does not apply
> > Patch failed at 0014 staging: rtlwifi: remove staging rtlwifi driver
> >
>
> Hi Greg,
>
> Can you help us to remove the staging driver rtlwifi in your tree ?
> I think Kalle can issue a signal to you when he has done reviewing
> the rtw88 driver and merge it into wireless-drivers-next.
Sure, I will be glad to drop the driver from my tree once the new driver
has been added to the wireless-drivers-next tree. Just let me know!
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v8 12/15] kvm/vmx: Emulate MSR TEST_CTL
From: Xiaoyao Li @ 2019-04-27 12:20 UTC (permalink / raw)
To: Thomas Gleixner, Fenghua Yu
Cc: Ingo Molnar, Borislav Petkov, H Peter Anvin, Paolo Bonzini,
Dave Hansen, Ashok Raj, Peter Zijlstra, Ravi V Shankar,
Christopherson Sean J, Kalle Valo, Michael Chan, linux-kernel,
x86, kvm, netdev, linux-wireless
In-Reply-To: <alpine.DEB.2.21.1904250931020.1762@nanos.tec.linutronix.de>
On Thu, 2019-04-25 at 09:42 +0200, Thomas Gleixner wrote:
> On Wed, 24 Apr 2019, Fenghua Yu wrote:
> >
> > +static void atomic_switch_msr_test_ctl(struct vcpu_vmx *vmx)
> > +{
> > + u64 host_msr_test_ctl;
> > +
> > + if (!boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT))
> > + return;
>
> Again: MSR_TST_CTL is not only about LOCK_DETECT. Check the control mask.
>
> > + host_msr_test_ctl = this_cpu_read(msr_test_ctl_cache);
> > +
> > + if (host_msr_test_ctl == vmx->msr_test_ctl) {
>
> This still assumes that the only bit which can be set in the MSR is that
> lock detect bit.
>
> > + clear_atomic_switch_msr(vmx, MSR_TEST_CTL);
> > + } else {
> > + add_atomic_switch_msr(vmx, MSR_TEST_CTL, vmx->msr_test_ctl,
> > + host_msr_test_ctl, false);
>
> So what happens here is that if any other bit is set on the host, VMENTER
> will happily clear it.
There are two bits of MSR TEST_CTL defined in Intel SDM now, which is bit 29 and
bit 31. Bit 31 is not used in kernel, and here we only need to switch bit 29
between host and guest.
So should I also change the name to atomic_switch_split_lock_detect() to
indicate that we only switch bit 29?
> guest = (host & ~vmx->test_ctl_mask) | vmx->test_ctl;
>
> That preserves any bits which are not exposed to the guest.
>
> But the way more interesting question is why are you exposing the MSR and
> the bit to the guest at all if the host has split lock detection enabled?
>
> That does not make any sense as you basically allow the guest to switch it
> off and then launch a slowdown attack. If the host has it enabled, then a
> guest has to be treated like any other process and the #AC trap has to be
> caught by the hypervisor which then kills the guest.
>
> Only if the host has split lock detection disabled, then you can expose it
> and allow the guest to turn it on and handle it on its own.
Indeed, if we use split lock detection for protection purpose, when host has it
enabled we should directly pass it to guest and forbid guest from disabling it.
And only when host disables split lock detection, we can expose it and allow the
guest to turn it on.
If it is used for protection purpose, then it should follow what you said and
this feature needs to be disabled by default. Because there are split lock
issues in old/current kernels and BIOS. That will cause the existing guest
booting failure and killed due to those split lock.
If it is only used for debug purpose, I think it might be OK to enable this
feature by default and make it indepedent between host and guest?
So I think how to handle this feature between host and guest depends on how we
use it? Once you give me a decision, I will follow it in next version.
> Thanks,
>
> tglx
>
>
^ permalink raw reply
* [PATCH] mt76: mt7603: report firmware version using ethtool
From: Lorenzo Bianconi @ 2019-04-27 13:02 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
In-Reply-To: <cover.1556369866.git.lorenzo@kernel.org>
Print fw_ver and build_date members of struct mt7603_fw_trailer
similarly to what appears in the output of 'dmesg' when the MCU firmware
is loaded.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index 57481012ee47..19b66e9aae45 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -260,6 +260,9 @@ int mt7603_load_firmware(struct mt7603_dev *dev)
mt76_clear(dev, MT_SCH_4, BIT(8));
dev->mcu_running = true;
+ snprintf(dev->mt76.hw->wiphy->fw_version,
+ sizeof(dev->mt76.hw->wiphy->fw_version),
+ "%.10s-%.15s", hdr->fw_ver, hdr->build_date);
dev_info(dev->mt76.dev, "firmware init done\n");
out:
--
2.20.1
^ permalink raw reply related
* Re: [PATCH 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Andrew Lunn @ 2019-04-27 16:31 UTC (permalink / raw)
To: Petr Štetiar
Cc: netdev, devicetree, linux-kernel, David S. Miller, Rob Herring,
Mark Rutland, Vivien Didelot, Florian Fainelli, Heiko Stuebner,
Fugang Duan, Claudiu Manoil, Yisen Zhuang, Salil Mehta,
Woojung Huh, Microchip Linux Driver Support, Neil Armstrong,
Kunihiko Hayashi, Masahiro Yamada, Jassi Brar, Maxime Coquelin,
Alexandre Torgue, Kalle Valo, Matthias Brugger, Li Yang,
Heiner Kallweit, Frank Rowand, Srinivas Kandagatla, Maxime Ripard,
Alban Bedel, linux-arm-kernel, linux-rockchip, linux-oxnas,
linux-stm32, linux-wireless, linux-mediatek, linuxppc-dev
In-Reply-To: <1556320002-26213-3-git-send-email-ynezz@true.cz>
> diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt
> index 2974e63..1e2bc9a 100644
> --- a/Documentation/devicetree/bindings/net/ethernet.txt
> +++ b/Documentation/devicetree/bindings/net/ethernet.txt
> @@ -10,6 +10,8 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
> the boot program; should be used in cases where the MAC address assigned to
> the device by the boot program is different from the "local-mac-address"
> property;
> +- nvmem-cells: phandle, reference to an nvmem node for the MAC address
> +- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
You put the new values after local-mac-address and mac-address. That
suggests they are of lower priority. That conflicts with the current
patch. If you think NVMEM should take priority, please put the
properties first.
Andrew
^ permalink raw reply
* Re: [PATCH 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Andrew Lunn @ 2019-04-27 16:39 UTC (permalink / raw)
To: Petr Štetiar
Cc: netdev, devicetree, linux-kernel, David S. Miller, Rob Herring,
Mark Rutland, Vivien Didelot, Florian Fainelli, Heiko Stuebner,
Fugang Duan, Claudiu Manoil, Yisen Zhuang, Salil Mehta,
Woojung Huh, Microchip Linux Driver Support, Neil Armstrong,
Kunihiko Hayashi, Masahiro Yamada, Jassi Brar, Maxime Coquelin,
Alexandre Torgue, Kalle Valo, Matthias Brugger, Li Yang,
Heiner Kallweit, Frank Rowand, Srinivas Kandagatla, Maxime Ripard,
Alban Bedel, linux-arm-kernel, linux-rockchip, linux-oxnas,
linux-stm32, linux-wireless, linux-mediatek, linuxppc-dev
In-Reply-To: <1556320002-26213-3-git-send-email-ynezz@true.cz>
> diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
> index 8b80515..92c5642 100644
> --- a/Documentation/devicetree/bindings/net/macb.txt
> +++ b/Documentation/devicetree/bindings/net/macb.txt
> @@ -26,15 +26,15 @@ Required properties:
> Optional elements: 'tsu_clk'
> - clocks: Phandles to input clocks.
>
> -Optional properties:
> -- nvmem-cells: phandle, reference to an nvmem node for the MAC address
> -- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
> -
> Optional properties for PHY child node:
> - reset-gpios : Should specify the gpio for phy reset
> - magic-packet : If present, indicates that the hardware supports waking
> up via magic packet.
> - phy-handle : see ethernet.txt file in the same directory
> +- mac-address: See ethernet.txt in the same directory.
> +- local-mac-address: See ethernet.txt in the same directory.
> +- nvmem-cells: See ethernet.txt in the same directory.
> +- nvmem-cell-names: See ethernet.txt in the same directory.
This looks wrong. The MAC address is not a PHY property, so should not
be inside the PHY child node.
phy-handle is in the wrong place, but that is a separate problem.
Andrew
^ permalink raw reply
* Re: [PATCH 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Florian Fainelli @ 2019-04-27 16:56 UTC (permalink / raw)
To: Petr Štetiar, netdev, devicetree, linux-kernel,
David S. Miller, Rob Herring, Mark Rutland, Andrew Lunn,
Vivien Didelot, Heiko Stuebner, Fugang Duan, Claudiu Manoil,
Yisen Zhuang, Salil Mehta, Woojung Huh,
Microchip Linux Driver Support, Neil Armstrong, Kunihiko Hayashi,
Masahiro Yamada, Jassi Brar, Maxime Coquelin, Alexandre Torgue,
Kalle Valo, Matthias Brugger, Li Yang
Cc: Heiner Kallweit, Frank Rowand, Srinivas Kandagatla, Maxime Ripard,
Alban Bedel, linux-arm-kernel, linux-rockchip, linux-oxnas,
linux-stm32, linux-wireless, linux-mediatek, linuxppc-dev
In-Reply-To: <1556320002-26213-3-git-send-email-ynezz@true.cz>
On 4/26/2019 4:06 PM, Petr Štetiar wrote:
> As of_get_mac_address now supports NVMEM under the hood, we should
> update the bindings documentation with the new nvmem-cell* properties.
> While at it, fix also other missing properties supported by
> of_get_mac_address.
>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
While I appreciate your effort in making the bindings up to date and
consistent, this does really scale well and is an error prone exercise,
how about consolidating all MAC address related properties into the
ethernet.txt document like you just did and update all bindings to
indicate something along the lines of:
For all other standard Ethernet related properties, please refer to
ethernet.txt or something like that?
--
Florian
^ permalink raw reply
* Re: [PATCH v2 25/79] docs: convert docs to ReST and rename to *.rst
From: Mark Brown @ 2019-04-27 17:25 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Linux Doc Mailing List, Mauro Carvalho Chehab, linux-kernel,
Jonathan Corbet, Sebastian Reichel, Bjorn Helgaas,
Rafael J. Wysocki, Viresh Kumar, Len Brown, Pavel Machek,
Nishanth Menon, Stephen Boyd, Liam Girdwood, Mathieu Poirier,
Suzuki K Poulose, Harry Wei, Alex Shi, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, David Airlie, Daniel Vetter,
Johannes Berg, David S. Miller, linux-pm, linux-pci,
linux-arm-kernel, intel-gfx, dri-devel, linux-wireless, netdev
In-Reply-To: <20190426064609.7f00e013@coco.lan>
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
On Fri, Apr 26, 2019 at 06:46:09AM -0300, Mauro Carvalho Chehab wrote:
> Mark Brown <broonie@kernel.org> escreveu:
> > This is massively CCed covering a large range of subsystems and is patch
> > 25 of a 79 patch series so I've no context for what's going on here or
> > why...
> You can see more details at patch 00/79:
> https://lore.kernel.org/lkml/20190422115110.26443b44@coco.lan/
OK, it would've helped to CC people on that. Anyway
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH v2 25/79] docs: convert docs to ReST and rename to *.rst
From: Mauro Carvalho Chehab @ 2019-04-27 18:13 UTC (permalink / raw)
To: Mark Brown
Cc: Linux Doc Mailing List, Mauro Carvalho Chehab, linux-kernel,
Jonathan Corbet, Sebastian Reichel, Bjorn Helgaas,
Rafael J. Wysocki, Viresh Kumar, Len Brown, Pavel Machek,
Nishanth Menon, Stephen Boyd, Liam Girdwood, Mathieu Poirier,
Suzuki K Poulose, Harry Wei, Alex Shi, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, David Airlie, Daniel Vetter,
Johannes Berg, David S. Miller, linux-pm, linux-pci,
linux-arm-kernel, intel-gfx, dri-devel, linux-wireless, netdev
In-Reply-To: <20190427172551.GI14916@sirena.org.uk>
Em Sun, 28 Apr 2019 02:25:51 +0900
Mark Brown <broonie@kernel.org> escreveu:
> On Fri, Apr 26, 2019 at 06:46:09AM -0300, Mauro Carvalho Chehab wrote:
> > Mark Brown <broonie@kernel.org> escreveu:
>
> > > This is massively CCed covering a large range of subsystems and is patch
> > > 25 of a 79 patch series so I've no context for what's going on here or
> > > why...
>
> > You can see more details at patch 00/79:
> > https://lore.kernel.org/lkml/20190422115110.26443b44@coco.lan/
>
> OK, it would've helped to CC people on that.
I know, but, due to bad experiences in the past, I had to actually
remove people from it, because several servers reject e-mails with
more than ~30 destination addresses, as they consider it to be spam.
> Anyway
>
> Acked-by: Mark Brown <broonie@kernel.org>
Thanks!
Thanks,
Mauro
^ permalink raw reply
* [PATCH] brcmfmac: print firmware messages after a firmware crash
From: Rafał Miłecki @ 2019-04-27 18:30 UTC (permalink / raw)
To: Kalle Valo
Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl,
brcm80211-dev-list, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
Normally firmware messages are printed with debugging enabled only. It's
a good idea as firmware may print a lot of messages that normal users
don't need to care about.
However, on firmware crash, it may be very helpful to log all recent
messages. There is almost always a backtrace available as well as rought
info on the latest actions/state.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
.../broadcom/brcm80211/brcmfmac/pcie.c | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 637973fe8928..f519b050aff3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -764,15 +764,22 @@ static void brcmf_pcie_bus_console_init(struct brcmf_pciedev_info *devinfo)
console->base_addr, console->buf_addr, console->bufsize);
}
-
-static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo)
+/**
+ * brcmf_pcie_bus_console_read - reads firmware messages
+ *
+ * @error: specifies if error has occurred (prints messages unconditionally)
+ */
+static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo,
+ int error)
{
+ struct pci_dev *pdev = devinfo->pdev;
+ struct brcmf_bus *bus = dev_get_drvdata(&pdev->dev);
struct brcmf_pcie_console *console;
u32 addr;
u8 ch;
u32 newidx;
- if (!BRCMF_FWCON_ON())
+ if (!error && !BRCMF_FWCON_ON())
return;
console = &devinfo->shared.console;
@@ -796,7 +803,10 @@ static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo)
}
if (ch == '\n') {
console->log_str[console->log_idx] = 0;
- pr_debug("CONSOLE: %s", console->log_str);
+ if (error)
+ brcmf_err(bus, "CONSOLE: %s", console->log_str);
+ else
+ pr_debug("CONSOLE: %s", console->log_str);
console->log_idx = 0;
}
}
@@ -857,7 +867,7 @@ static irqreturn_t brcmf_pcie_isr_thread(int irq, void *arg)
&devinfo->pdev->dev);
}
}
- brcmf_pcie_bus_console_read(devinfo);
+ brcmf_pcie_bus_console_read(devinfo, false);
if (devinfo->state == BRCMFMAC_PCIE_STATE_UP)
brcmf_pcie_intr_enable(devinfo);
devinfo->in_irq = false;
@@ -1426,6 +1436,8 @@ static int brcmf_pcie_reset(struct device *dev)
struct brcmf_fw_request *fwreq;
int err;
+ brcmf_pcie_bus_console_read(devinfo, true);
+
brcmf_detach(dev);
brcmf_pcie_release_irq(devinfo);
@@ -1824,7 +1836,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
if (brcmf_attach(&devinfo->pdev->dev, devinfo->settings) == 0)
return;
- brcmf_pcie_bus_console_read(devinfo);
+ brcmf_pcie_bus_console_read(devinfo, false);
fail:
device_release_driver(dev);
--
2.21.0
^ permalink raw reply related
* [PATCH] mac80211: fix possible deadlock in TX path
From: Erik Stromdahl @ 2019-04-27 20:41 UTC (permalink / raw)
To: johannes, davem, linux-wireless, linux-kernel; +Cc: Erik Stromdahl
This patch fixes a possible deadlock when updating the TX statistics
(when calling into ieee80211_tx_stats()) from ieee80211_tx_dequeue().
ieee80211_tx_dequeue() might be called from process context.
Since we take a lock without softirq's disabled when updating the TX
statistics (u64_stats_update_begin() takes a lock), there is a risk that
we get an interrupt while in the write critical section (after the call
to u64_stats_update_begin() and before u64_stats_update_end()).
We could then have a softirq (in interrupt context) when the interrupt
exits. The softirq can then end up taking the same lock resulting in a
deadlock of a CPU.
By using the _irqsave and _irqrestore versions of u64_stats_update_begin,
we make sure softirq's are disabled in the critical write section.
This issue was reported by lockdep (see splat below).
In this case lockdep has detected a potential scenario where
ieee80211_tx_dequeue() is called from a threaded IRQ (SDIO IRQ thread).
The thread could be interrupted and a softirq also calling
ieee80211_tx_dequeue() could get scheduled while the lock is held.
================================
WARNING: inconsistent lock state
5.1.0-rc6-wt-ath+ #34 Not tainted
--------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
irq/64-mmc0/120 [HC0[0]:SC0[0]:HE1:SE1] takes:
2bf4fbe3 (&syncp->seq#4){+.?.}, at: ieee80211_tx_dequeue+0x30c/0xb9c
{IN-SOFTIRQ-W} state was registered at:
lock_acquire+0xd0/0x1f4
ieee80211_xmit_fast_finish+0xa8/0x2b4
ieee80211_tx_dequeue+0x30c/0xb9c
ath10k_mac_tx_push_txq+0x78/0x2a4 [ath10k_core]
ath10k_mac_op_wake_tx_queue+0xb0/0xbc [ath10k_core]
ieee80211_queue_skb+0x2e0/0x4c4
__ieee80211_subif_start_xmit+0x6c4/0xc4c
ieee80211_subif_start_xmit+0x4c/0x414
dev_hard_start_xmit+0xd8/0x37c
__dev_queue_xmit+0xcd0/0xe40
dev_queue_xmit+0x1c/0x20
neigh_resolve_output+0x15c/0x21c
ip6_finish_output2+0x200/0xd68
ip6_finish_output+0x124/0x2c8
ip6_output+0x80/0x480
mld_sendpack+0x340/0x7ec
mld_ifc_timer_expire+0x1dc/0x2fc
call_timer_fn+0xd0/0x33c
expire_timers+0xe0/0x1ac
run_timer_softirq+0xfc/0x1e4
__do_softirq+0xf8/0x54c
irq_exit+0x13c/0x190
handle_IPI+0x120/0x3d4
gic_handle_irq+0xb8/0xcc
__irq_svc+0x70/0x98
cpuidle_enter_state+0x188/0x5e4
cpuidle_enter+0x24/0x28
call_cpuidle+0x30/0x4c
do_idle+0x230/0x2d0
cpu_startup_entry+0x28/0x2c
secondary_start_kernel+0x164/0x1ac
0x10102b0c
irq event stamp: 90887157
hardirqs last enabled at (90887157): [<c013417c>] __local_bh_enable_ip+0xb4/0x18c
hardirqs last disabled at (90887155): [<c0134130>] __local_bh_enable_ip+0x68/0x18c
softirqs last enabled at (90887156): [<c0cb4444>] ieee80211_tx_dequeue+0x24c/0xb9c
softirqs last disabled at (90887152): [<c0cb4248>] ieee80211_tx_dequeue+0x50/0xb9c
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&syncp->seq#4);
<Interrupt>
lock(&syncp->seq#4);
*** DEADLOCK ***
1 lock held by irq/64-mmc0/120:
#0: e6439974 (rcu_read_lock){....}, at: ath10k_mac_tx_push_pending+0x48/0x2e0 [ath10k_core]
stack backtrace:
CPU: 0 PID: 120 Comm: irq/64-mmc0 Not tainted 5.1.0-rc6-wt-ath+ #34
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Backtrace:
[<c010ecec>] (dump_backtrace) from [<c010efec>] (show_stack+0x20/0x24)
r7:00000000 r6:60010093 r5:00000000 r4:c14ea35c
[<c010efcc>] (show_stack) from [<c0cfaef4>] (dump_stack+0xdc/0x114)
[<c0cfae18>] (dump_stack) from [<c01867f0>] (print_usage_bug+0x1f4/0x2f0)
r10:d2890000 r9:ff7b9c24 r8:c1415100 r7:c10ca668 r6:00000004 r5:c1994c58
r4:d2890000 r3:fe066f04
[<c01865fc>] (print_usage_bug) from [<c0186a94>] (mark_lock+0x1a8/0x708)
r8:00000004 r7:00000004 r6:d2890000 r5:00000006 r4:d2890518
[<c01868ec>] (mark_lock) from [<c01872bc>] (__lock_acquire+0x250/0x1fa4)
r10:d2890000 r9:ff7b9c24 r8:00000004 r7:d2890518 r6:00000000 r5:00000001
r4:00000420
[<c018706c>] (__lock_acquire) from [<c0189810>] (lock_acquire+0xd0/0x1f4)
r10:c1414970 r9:00000000 r8:00000000 r7:00000000 r6:ff7b9c24 r5:00000000
r4:60010013
[<c0189740>] (lock_acquire) from [<c0cb190c>] (ieee80211_xmit_fast_finish+0xa8/0x2b4)
r10:ff7b9c24 r9:c0cb4504 r8:00000001 r7:00000000 r6:d2d60000 r5:d2f1a900
r4:ff7b9c00
[<c0cb1864>] (ieee80211_xmit_fast_finish) from [<c0cb4504>] (ieee80211_tx_dequeue+0x30c/0xb9c)
r10:d2f1a900 r9:d2d607a4 r8:d2cf20dc r7:d330b29c r6:d2cf2000 r5:d2c342ba
r4:d2899d3c
[<c0cb41f8>] (ieee80211_tx_dequeue) from [<bf057f64>] (ath10k_mac_tx_push_txq+0x78/0x2a4 [ath10k_core])
r10:d2d607cc r9:d2fe06a0 r8:00000000 r7:d2fe1e30 r6:d2fe1d38 r5:d2fe1540
r4:d2cf20dc
[<bf057eec>] (ath10k_mac_tx_push_txq [ath10k_core]) from [<bf058364>] (ath10k_mac_tx_push_pending+0x1d4/0x2e0 [ath10k_core])
r10:d2cf20dc r9:bf0582b4 r8:bf0b1dba r7:00000002 r6:c1429994 r5:00000000
r4:d2fe06a0
[<bf058190>] (ath10k_mac_tx_push_pending [ath10k_core]) from [<bf0e25a4>] (ath10k_sdio_irq_handler+0x30c/0x4d8 [ath10k_sdio])
r10:00005b5a r9:d2fcc040 r8:00180201 r7:d2fe6540 r6:d2fe6a7c r5:00000000
r4:d2fe1540
[<bf0e2298>] (ath10k_sdio_irq_handler [ath10k_sdio]) from [<c08e9d20>] (process_sdio_pending_irqs+0x4c/0x1bc)
r10:d288cb00 r9:d229f400 r8:00000001 r7:00000000 r6:d27fe800 r5:c1414948
r4:d27f3000
[<c08e9cd4>] (process_sdio_pending_irqs) from [<c08e9edc>] (sdio_run_irqs+0x4c/0x68)
r10:d288cb00 r9:d229f400 r8:00000001 r7:00000000 r6:d27f36a0 r5:00000100
r4:d27f3000
[<c08e9e90>] (sdio_run_irqs) from [<c08f5360>] (sdhci_thread_irq+0x80/0xbc)
r5:00000100 r4:d27f34c0
[<c08f52e0>] (sdhci_thread_irq) from [<c019a648>] (irq_thread_fn+0x2c/0x88)
r7:00000000 r6:d288cb24 r5:d229f400 r4:d288cb00
[<c019a61c>] (irq_thread_fn) from [<c019a984>] (irq_thread+0x120/0x22c)
r7:00000000 r6:d288cb24 r5:ffffe000 r4:00000000
[<c019a864>] (irq_thread) from [<c0155214>] (kthread+0x154/0x168)
r10:d2101bd8 r9:c019a864 r8:d288cb00 r7:d2898000 r6:d288cb40 r5:d2198600
r4:00000000
[<c01550c0>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
Exception stack(0xd2899fb0 to 0xd2899ff8)
9fa0: 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c01550c0
r4:d288cb40
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
net/mac80211/tx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8037384fc06e..b033fbf1d1cd 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -44,12 +44,13 @@
static inline void ieee80211_tx_stats(struct net_device *dev, u32 len)
{
+ unsigned long flags;
struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
- u64_stats_update_begin(&tstats->syncp);
+ flags = u64_stats_update_begin_irqsave(&tstats->syncp);
tstats->tx_packets++;
tstats->tx_bytes += len;
- u64_stats_update_end(&tstats->syncp);
+ u64_stats_update_end_irqrestore(&tstats->syncp, flags);
}
static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
--
2.19.1
^ permalink raw reply related
* [PATCH] ath10k: remove mmc_hw_reset while hif power down
From: Wen Gong @ 2019-04-28 2:17 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless
For sdio 3.0 chip, the clock will drop from 200M Hz to 50M Hz after load
ath10k driver, it is because mmc_hw_reset will reset the sdio's power,
then mmc will consider it as sdio 2.0 and drop the clock.
Remove mmc_hw_reset will avoid the drop of clock.
Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00007-QCARMSWP-1.
Signed-off-by: Wen Gong <wgong@codeaurora.org>
---
drivers/net/wireless/ath/ath10k/sdio.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index fae56c6..f1d2af8 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -1433,10 +1433,6 @@ static void ath10k_sdio_hif_power_down(struct ath10k *ar)
return;
}
- ret = mmc_hw_reset(ar_sdio->func->card->host);
- if (ret)
- ath10k_warn(ar, "unable to reset sdio: %d\n", ret);
-
sdio_release_host(ar_sdio->func);
ar_sdio->is_disabled = true;
--
1.9.1
^ permalink raw reply related
* pull-request: iwlwifi-fixes 2019-04-28
From: Luca Coelho @ 2019-04-28 7:06 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, linuxwifi, david.e.box, joe.konno
[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]
Hi Kalle,
This is the fourth batch of fixes for v5.1. It contains two fixes I
send in the last patchset plus a patch that I sent separately to fix a
merge damage caused by the previous pull. More details about the
contents in the tag description.
I have sent this out before and kbuildbot reported success.
Please let me know if there are any issues.
Cheers,
Luca.
The following changes since commit b82d6c1f8f8288f744a9dcc16cd3085d535decca:
mwifiex: Make resume actually do something useful again on SDIO cards (2019-04-25 14:05:14 +0300)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git tags/iwlwifi-for-kalle-2019-04-28
for you to fetch changes up to d156e67d3f58c5d3c7ebe1bec80657db534f32d4:
iwlwifi: mvm: fix merge damage in iwl_mvm_vif_dbgfs_register() (2019-04-28 09:59:59 +0300)
----------------------------------------------------------------
Fourth batch of patches intended for v5.1
* Fix an oops when we receive a packet with bogus lengths;
* Fix a bug that prevented 5350 devices from working;
* Fix a small merge damage from the previous series;
----------------------------------------------------------------
Emmanuel Grumbach (1):
iwlwifi: fix driver operation for 5350
Luca Coelho (2):
iwlwifi: mvm: check for length correctness in iwl_mvm_create_skb()
iwlwifi: mvm: fix merge damage in iwl_mvm_vif_dbgfs_register()
drivers/net/wireless/intel/iwlwifi/cfg/5000.c | 3 ++-
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 6 ------
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 28 ++++++++++++++++++++++++----
3 files changed, 26 insertions(+), 11 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH v8 12/15] kvm/vmx: Emulate MSR TEST_CTL
From: Thomas Gleixner @ 2019-04-28 7:09 UTC (permalink / raw)
To: Xiaoyao Li
Cc: Fenghua Yu, Ingo Molnar, Borislav Petkov, H Peter Anvin,
Paolo Bonzini, Dave Hansen, Ashok Raj, Peter Zijlstra,
Ravi V Shankar, Christopherson Sean J, Kalle Valo, Michael Chan,
linux-kernel, x86, kvm, netdev, linux-wireless
In-Reply-To: <7395908840acfbf806146f5f20d3509342771a19.camel@linux.intel.com>
On Sat, 27 Apr 2019, Xiaoyao Li wrote:
> On Thu, 2019-04-25 at 09:42 +0200, Thomas Gleixner wrote:
> > On Wed, 24 Apr 2019, Fenghua Yu wrote:
> > >
> > > +static void atomic_switch_msr_test_ctl(struct vcpu_vmx *vmx)
> > > +{
> > > + u64 host_msr_test_ctl;
> > > +
> > > + if (!boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT))
> > > + return;
> >
> > Again: MSR_TST_CTL is not only about LOCK_DETECT. Check the control mask.
> >
> > > + host_msr_test_ctl = this_cpu_read(msr_test_ctl_cache);
> > > +
> > > + if (host_msr_test_ctl == vmx->msr_test_ctl) {
> >
> > This still assumes that the only bit which can be set in the MSR is that
> > lock detect bit.
> >
> > > + clear_atomic_switch_msr(vmx, MSR_TEST_CTL);
> > > + } else {
> > > + add_atomic_switch_msr(vmx, MSR_TEST_CTL, vmx->msr_test_ctl,
> > > + host_msr_test_ctl, false);
> >
> > So what happens here is that if any other bit is set on the host, VMENTER
> > will happily clear it.
>
> There are two bits of MSR TEST_CTL defined in Intel SDM now, which is bit
> 29 and bit 31. Bit 31 is not used in kernel, and here we only need to
> switch bit 29 between host and guest. So should I also change the name
> to atomic_switch_split_lock_detect() to indicate that we only switch bit
> 29?
No. Just because we ony use the split lock bit now, there is no
jusification to name everything splitlock. This is going to have renamed
when yet another bit is added in the future. The MSR is exposed to the
guest and the restriction of bits happens to be splitlock today.
> > guest = (host & ~vmx->test_ctl_mask) | vmx->test_ctl;
> >
> > That preserves any bits which are not exposed to the guest.
> >
> > But the way more interesting question is why are you exposing the MSR and
> > the bit to the guest at all if the host has split lock detection enabled?
> >
> > That does not make any sense as you basically allow the guest to switch it
> > off and then launch a slowdown attack. If the host has it enabled, then a
> > guest has to be treated like any other process and the #AC trap has to be
> > caught by the hypervisor which then kills the guest.
> >
> > Only if the host has split lock detection disabled, then you can expose it
> > and allow the guest to turn it on and handle it on its own.
>
> Indeed, if we use split lock detection for protection purpose, when host
> has it enabled we should directly pass it to guest and forbid guest from
> disabling it. And only when host disables split lock detection, we can
> expose it and allow the guest to turn it on.
?
> If it is used for protection purpose, then it should follow what you said and
> this feature needs to be disabled by default. Because there are split lock
> issues in old/current kernels and BIOS. That will cause the existing guest
> booting failure and killed due to those split lock.
Rightfully so.
> If it is only used for debug purpose, I think it might be OK to enable this
> feature by default and make it indepedent between host and guest?
No. It does not make sense.
> So I think how to handle this feature between host and guest depends on how we
> use it? Once you give me a decision, I will follow it in next version.
As I said: The host kernel makes the decision.
If the host kernel has it enabled then the guest is not allowed to change
it. If the guest triggers an #AC it will be killed.
If the host kernel has it disabled then the guest can enable it for it's
own purposes.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH v8 12/15] kvm/vmx: Emulate MSR TEST_CTL
From: Xiaoyao Li @ 2019-04-28 7:34 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Fenghua Yu, Ingo Molnar, Borislav Petkov, H Peter Anvin,
Paolo Bonzini, Dave Hansen, Ashok Raj, Peter Zijlstra,
Ravi V Shankar, Christopherson Sean J, Kalle Valo, Michael Chan,
linux-kernel, x86, kvm, netdev, linux-wireless
In-Reply-To: <alpine.DEB.2.21.1904280903520.1757@nanos.tec.linutronix.de>
On 4/28/2019 3:09 PM, Thomas Gleixner wrote:
> On Sat, 27 Apr 2019, Xiaoyao Li wrote:
>> On Thu, 2019-04-25 at 09:42 +0200, Thomas Gleixner wrote:
>>> On Wed, 24 Apr 2019, Fenghua Yu wrote:
>>>>
>>>> +static void atomic_switch_msr_test_ctl(struct vcpu_vmx *vmx)
>>>> +{
>>>> + u64 host_msr_test_ctl;
>>>> +
>>>> + if (!boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT))
>>>> + return;
>>>
>>> Again: MSR_TST_CTL is not only about LOCK_DETECT. Check the control mask.
>>>
>>>> + host_msr_test_ctl = this_cpu_read(msr_test_ctl_cache);
>>>> +
>>>> + if (host_msr_test_ctl == vmx->msr_test_ctl) {
>>>
>>> This still assumes that the only bit which can be set in the MSR is that
>>> lock detect bit.
>>>
>>>> + clear_atomic_switch_msr(vmx, MSR_TEST_CTL);
>>>> + } else {
>>>> + add_atomic_switch_msr(vmx, MSR_TEST_CTL, vmx->msr_test_ctl,
>>>> + host_msr_test_ctl, false);
>>>
>>> So what happens here is that if any other bit is set on the host, VMENTER
>>> will happily clear it.
>>
>> There are two bits of MSR TEST_CTL defined in Intel SDM now, which is bit
>> 29 and bit 31. Bit 31 is not used in kernel, and here we only need to
>> switch bit 29 between host and guest. So should I also change the name
>> to atomic_switch_split_lock_detect() to indicate that we only switch bit
>> 29?
>
> No. Just because we ony use the split lock bit now, there is no
> jusification to name everything splitlock. This is going to have renamed
> when yet another bit is added in the future. The MSR is exposed to the
> guest and the restriction of bits happens to be splitlock today.
Got it.
>>> guest = (host & ~vmx->test_ctl_mask) | vmx->test_ctl;
>>>
>>> That preserves any bits which are not exposed to the guest.
>>>
>>> But the way more interesting question is why are you exposing the MSR and
>>> the bit to the guest at all if the host has split lock detection enabled?
>>>
>>> That does not make any sense as you basically allow the guest to switch it
>>> off and then launch a slowdown attack. If the host has it enabled, then a
>>> guest has to be treated like any other process and the #AC trap has to be
>>> caught by the hypervisor which then kills the guest.
>>>
>>> Only if the host has split lock detection disabled, then you can expose it
>>> and allow the guest to turn it on and handle it on its own.
>>
>> Indeed, if we use split lock detection for protection purpose, when host
>> has it enabled we should directly pass it to guest and forbid guest from
>> disabling it. And only when host disables split lock detection, we can
>> expose it and allow the guest to turn it on.
> ?
>> If it is used for protection purpose, then it should follow what you said and
>> this feature needs to be disabled by default. Because there are split lock
>> issues in old/current kernels and BIOS. That will cause the existing guest
>> booting failure and killed due to those split lock.
>
> Rightfully so.
So, the patch 13 "Enable split lock detection by default" needs to be
removed?
>> If it is only used for debug purpose, I think it might be OK to enable this
>> feature by default and make it indepedent between host and guest?
>
> No. It does not make sense.
>
>> So I think how to handle this feature between host and guest depends on how we
>> use it? Once you give me a decision, I will follow it in next version.
>
> As I said: The host kernel makes the decision.
>
> If the host kernel has it enabled then the guest is not allowed to change
> it. If the guest triggers an #AC it will be killed.
>
> If the host kernel has it disabled then the guest can enable it for it's
> own purposes.
>
> Thanks,
>
> tglx
>
^ permalink raw reply
* Re: pull-request: iwlwifi-fixes 2019-04-28
From: Kalle Valo @ 2019-04-28 11:27 UTC (permalink / raw)
To: Luca Coelho; +Cc: linux-wireless, linuxwifi, david.e.box, joe.konno
In-Reply-To: <aab3d1cab0caf00d7c3ae1cc10ca3ec99cc54efd.camel@coelho.fi>
Luca Coelho <luca@coelho.fi> writes:
> This is the fourth batch of fixes for v5.1. It contains two fixes I
> send in the last patchset plus a patch that I sent separately to fix a
> merge damage caused by the previous pull. More details about the
> contents in the tag description.
>
> I have sent this out before and kbuildbot reported success.
>
> Please let me know if there are any issues.
>
> Cheers,
> Luca.
>
>
> The following changes since commit b82d6c1f8f8288f744a9dcc16cd3085d535decca:
>
> mwifiex: Make resume actually do something useful again on SDIO cards (2019-04-25 14:05:14 +0300)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git tags/iwlwifi-for-kalle-2019-04-28
>
> for you to fetch changes up to d156e67d3f58c5d3c7ebe1bec80657db534f32d4:
>
> iwlwifi: mvm: fix merge damage in iwl_mvm_vif_dbgfs_register() (2019-04-28 09:59:59 +0300)
>
> ----------------------------------------------------------------
> Fourth batch of patches intended for v5.1
>
> * Fix an oops when we receive a packet with bogus lengths;
> * Fix a bug that prevented 5350 devices from working;
> * Fix a small merge damage from the previous series;
>
> ----------------------------------------------------------------
Pulled, thanks Luca.
--
Kalle Valo
^ permalink raw reply
* [PATCH v2 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Petr Štetiar @ 2019-04-28 12:53 UTC (permalink / raw)
To: netdev, devicetree, linux-kernel, David S. Miller, Rob Herring,
Mark Rutland, Andrew Lunn, Vivien Didelot, Florian Fainelli,
Yisen Zhuang, Salil Mehta, Woojung Huh,
Microchip Linux Driver Support, Kunihiko Hayashi, Masahiro Yamada,
Jassi Brar, Kalle Valo, Matthias Brugger
Cc: Heiner Kallweit, Frank Rowand, Srinivas Kandagatla, Maxime Ripard,
Alban Bedel, Petr Štetiar, linux-arm-kernel, linux-wireless,
linux-mediatek
In-Reply-To: <1556456002-13430-1-git-send-email-ynezz@true.cz>
As of_get_mac_address now supports NVMEM under the hood, we need to update
the bindings documentation with the new nvmem-cell* properties, which would
mean copy&pasting a lot of redundant information to every binding
documentation currently referencing some of the MAC address properties.
So I've just removed all the references to the optional MAC address
properties and replaced them with the reference to the net/ethernet.txt
file. While at it, I've also removed other optional Ethernet properties.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
Changes since v1:
* instead of updating all bindings documentation with nvmem properties,
I've just updated those docs which were already referencing MAC address
properties and replaced them with reference to common net/ethernet.txt
Documentation/devicetree/bindings/net/altera_tse.txt | 5 ++---
Documentation/devicetree/bindings/net/amd-xgbe.txt | 5 +++--
Documentation/devicetree/bindings/net/brcm,amac.txt | 4 ++--
Documentation/devicetree/bindings/net/cpsw.txt | 5 +++--
Documentation/devicetree/bindings/net/davinci_emac.txt | 5 +++--
Documentation/devicetree/bindings/net/dsa/dsa.txt | 13 ++-----------
Documentation/devicetree/bindings/net/ethernet.txt | 6 ++++--
Documentation/devicetree/bindings/net/hisilicon-femac.txt | 6 ++----
.../devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt | 7 +++----
Documentation/devicetree/bindings/net/keystone-netcp.txt | 8 +++-----
Documentation/devicetree/bindings/net/macb.txt | 5 ++---
Documentation/devicetree/bindings/net/marvell-pxa168.txt | 5 +++--
.../devicetree/bindings/net/microchip,enc28j60.txt | 3 ++-
Documentation/devicetree/bindings/net/microchip,lan78xx.txt | 5 ++---
Documentation/devicetree/bindings/net/qca,qca7000.txt | 4 +++-
Documentation/devicetree/bindings/net/samsung-sxgbe.txt | 6 ++----
.../devicetree/bindings/net/snps,dwc-qos-ethernet.txt | 6 +++---
.../devicetree/bindings/net/socionext,uniphier-ave4.txt | 4 ++--
Documentation/devicetree/bindings/net/socionext-netsec.txt | 7 +++----
.../devicetree/bindings/net/wireless/mediatek,mt76.txt | 5 +++--
.../devicetree/bindings/net/wireless/qca,ath9k.txt | 4 ++--
21 files changed, 54 insertions(+), 64 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/altera_tse.txt b/Documentation/devicetree/bindings/net/altera_tse.txt
index 0e21df9..c85a589 100644
--- a/Documentation/devicetree/bindings/net/altera_tse.txt
+++ b/Documentation/devicetree/bindings/net/altera_tse.txt
@@ -46,9 +46,8 @@ Required properties:
- reg: phy id used to communicate to phy.
- device_type: Must be "ethernet-phy".
-Optional properties:
-- local-mac-address: See ethernet.txt in the same directory.
-- max-frame-size: See ethernet.txt in the same directory.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example:
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt
index 93dcb79..b607765 100644
--- a/Documentation/devicetree/bindings/net/amd-xgbe.txt
+++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt
@@ -24,8 +24,6 @@ Required properties:
- phy-mode: See ethernet.txt file in the same directory
Optional properties:
-- mac-address: mac address to be assigned to the device. Can be overridden
- by UEFI.
- dma-coherent: Present if dma operations are coherent
- amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate
a unique interrupt for each DMA channel - this requires an additional
@@ -48,6 +46,9 @@ property is used.
- amd,serdes-dfe-tap-config: DFE taps available to run
- amd,serdes-dfe-tap-enable: DFE taps to enable
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
Example:
xgbe@e0700000 {
compatible = "amd,xgbe-seattle-v1a";
diff --git a/Documentation/devicetree/bindings/net/brcm,amac.txt b/Documentation/devicetree/bindings/net/brcm,amac.txt
index 0bfad65..5e0ba27 100644
--- a/Documentation/devicetree/bindings/net/brcm,amac.txt
+++ b/Documentation/devicetree/bindings/net/brcm,amac.txt
@@ -16,8 +16,8 @@ Required properties:
registers (required for Northstar2)
- interrupts: Interrupt number
-Optional properties:
-- mac-address: See ethernet.txt file in the same directory
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Examples:
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 3264e19..370161c9 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -49,9 +49,10 @@ Required properties:
Optional properties:
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
-- mac-address : See ethernet.txt file in the same directory
- phy_id : Specifies slave phy id (deprecated, use phy-handle)
-- phy-handle : See ethernet.txt file in the same directory
+
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Slave sub-nodes:
- fixed-link : See fixed-link.txt file in the same directory
diff --git a/Documentation/devicetree/bindings/net/davinci_emac.txt b/Documentation/devicetree/bindings/net/davinci_emac.txt
index ca83dcc..d250c8e 100644
--- a/Documentation/devicetree/bindings/net/davinci_emac.txt
+++ b/Documentation/devicetree/bindings/net/davinci_emac.txt
@@ -20,11 +20,12 @@ Required properties:
Optional properties:
- phy-handle: See ethernet.txt file in the same directory.
If absent, davinci_emac driver defaults to 100/FULL.
-- nvmem-cells: phandle, reference to an nvmem node for the MAC address
-- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
- ti,davinci-rmii-en: 1 byte, 1 means use RMII
- ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM?
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
Example (enbw_cmc board):
eth0: emac@1e20000 {
compatible = "ti,davinci-dm6467-emac";
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt
index d66a529..6c8da44 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.txt
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt
@@ -58,22 +58,13 @@ A user port has the following optional property:
Port child nodes may also contain the following optional standardised
properties, described in binding documents:
-- phy-handle : Phandle to a PHY on an MDIO bus. See
- Documentation/devicetree/bindings/net/ethernet.txt
- for details.
-
-- phy-mode : See
- Documentation/devicetree/bindings/net/ethernet.txt
- for details.
-
- fixed-link : Fixed-link subnode describing a link to a non-MDIO
managed entity. See
Documentation/devicetree/bindings/net/fixed-link.txt
for details.
-- local-mac-address : See
- Documentation/devicetree/bindings/net/ethernet.txt
- for details.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example
diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt
index 2974e63..e6e01e0 100644
--- a/Documentation/devicetree/bindings/net/ethernet.txt
+++ b/Documentation/devicetree/bindings/net/ethernet.txt
@@ -4,12 +4,14 @@ NOTE: All 'phy*' properties documented below are Ethernet specific. For the
generic PHY 'phys' property, see
Documentation/devicetree/bindings/phy/phy-bindings.txt.
-- local-mac-address: array of 6 bytes, specifies the MAC address that was
- assigned to the network device;
- mac-address: array of 6 bytes, specifies the MAC address that was last used by
the boot program; should be used in cases where the MAC address assigned to
the device by the boot program is different from the "local-mac-address"
property;
+- local-mac-address: array of 6 bytes, specifies the MAC address that was
+ assigned to the network device;
+- nvmem-cells: phandle, reference to an nvmem node for the MAC address
+- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
the maximum frame size (there's contradiction in the Devicetree
diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac.txt b/Documentation/devicetree/bindings/net/hisilicon-femac.txt
index d11af5e..99ad4d5 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-femac.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-femac.txt
@@ -14,15 +14,13 @@ Required properties:
the PHY reset signal(optional).
- reset-names: should contain the reset signal name "mac"(required)
and "phy"(optional).
-- mac-address: see ethernet.txt [1].
-- phy-mode: see ethernet.txt [1].
-- phy-handle: see ethernet.txt [1].
- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
The 1st cell is reset pre-delay in micro seconds.
The 2nd cell is reset pulse in micro seconds.
The 3rd cell is reset post-delay in micro seconds.
-[1] Documentation/devicetree/bindings/net/ethernet.txt
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example:
hisi_femac: ethernet@10090000 {
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
index eea73ad..f4aad2a 100644
--- a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
+++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
@@ -16,9 +16,6 @@ Required properties:
- interrupts: should contain the MAC interrupt.
- #address-cells: must be <1>.
- #size-cells: must be <0>.
-- phy-mode: see ethernet.txt [1].
-- phy-handle: see ethernet.txt [1].
-- mac-address: see ethernet.txt [1].
- clocks: clock phandle and specifier pair.
- clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
- resets: should contain the phandle to the MAC core reset signal(optional),
@@ -31,9 +28,11 @@ Required properties:
The 2nd cell is reset pulse in micro seconds.
The 3rd cell is reset post-delay in micro seconds.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
- PHY subnode: inherits from phy binding [2]
-[1] Documentation/devicetree/bindings/net/ethernet.txt
[2] Documentation/devicetree/bindings/net/phy.txt
Example:
diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt
index 04ba1dc..2c9e8ac 100644
--- a/Documentation/devicetree/bindings/net/keystone-netcp.txt
+++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt
@@ -135,14 +135,12 @@ Optional properties:
are swapped. The netcp driver will swap the two DWORDs
back to the proper order when this property is set to 2
when it obtains the mac address from efuse.
-- local-mac-address: the driver is designed to use the of_get_mac_address api
- only if efuse-mac is 0. When efuse-mac is 0, the MAC
- address is obtained from local-mac-address. If this
- attribute is not present, then the driver will use a
- random MAC address.
- "netcp-device label": phandle to the device specification for each of NetCP
sub-module attached to this interface.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
Example binding:
netcp: netcp@2000000 {
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 8b80515..58923f3 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -26,9 +26,8 @@ Required properties:
Optional elements: 'tsu_clk'
- clocks: Phandles to input clocks.
-Optional properties:
-- nvmem-cells: phandle, reference to an nvmem node for the MAC address
-- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Optional properties for PHY child node:
- reset-gpios : Should specify the gpio for phy reset
diff --git a/Documentation/devicetree/bindings/net/marvell-pxa168.txt b/Documentation/devicetree/bindings/net/marvell-pxa168.txt
index 845a148..0d36fcb 100644
--- a/Documentation/devicetree/bindings/net/marvell-pxa168.txt
+++ b/Documentation/devicetree/bindings/net/marvell-pxa168.txt
@@ -10,8 +10,9 @@ Optional properties:
- port-id: Ethernet port number. Should be '0','1' or '2'.
- #address-cells: must be 1 when using sub-nodes.
- #size-cells: must be 0 when using sub-nodes.
-- phy-handle: see ethernet.txt file in the same directory.
-- local-mac-address: see ethernet.txt file in the same directory.
+
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Sub-nodes:
Each PHY can be represented as a sub-node. This is not mandatory.
diff --git a/Documentation/devicetree/bindings/net/microchip,enc28j60.txt b/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
index 24626e0..dc15eba 100644
--- a/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
+++ b/Documentation/devicetree/bindings/net/microchip,enc28j60.txt
@@ -21,8 +21,9 @@ Optional properties:
- spi-max-frequency: Maximum frequency of the SPI bus when accessing the ENC28J60.
According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
board designs may need to limit this value.
-- local-mac-address: See ethernet.txt in the same directory.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example (for NXP i.MX28 with pin control stuff for GPIO irq):
diff --git a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
index 76786a0..7824581 100644
--- a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
+++ b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt
@@ -7,9 +7,8 @@ The Device Tree properties, if present, override the OTP and EEPROM.
Required properties:
- compatible: Should be one of "usb424,7800", "usb424,7801" or "usb424,7850".
-Optional properties:
-- local-mac-address: see ethernet.txt
-- mac-address: see ethernet.txt
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Optional properties of the embedded PHY:
- microchip,led-modes: a 0..4 element vector, with each element configuring
diff --git a/Documentation/devicetree/bindings/net/qca,qca7000.txt b/Documentation/devicetree/bindings/net/qca,qca7000.txt
index e4a8a51..26cce1c 100644
--- a/Documentation/devicetree/bindings/net/qca,qca7000.txt
+++ b/Documentation/devicetree/bindings/net/qca,qca7000.txt
@@ -23,7 +23,6 @@ Optional properties:
Numbers smaller than 1000000 or greater than 16000000
are invalid. Missing the property will set the SPI
frequency to 8000000 Hertz.
-- local-mac-address : see ./ethernet.txt
- qca,legacy-mode : Set the SPI data transfer of the QCA7000 to legacy mode.
In this mode the SPI master must toggle the chip select
between each data word. In burst mode these gaps aren't
@@ -31,6 +30,9 @@ Optional properties:
the QCA7000 is setup via GPIO pin strapping. If the
property is missing the driver defaults to burst mode.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
SPI Example:
/* Freescale i.MX28 SPI master*/
diff --git a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
index 46e5911..09bd850 100644
--- a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
+++ b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
@@ -20,10 +20,8 @@ Required properties:
When fixed length is needed for burst mode, it can be set within allowable
range.
-Optional properties:
-- mac-address: 6 bytes, mac address
-- max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather
- than the maximum frame size.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example:
diff --git a/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt b/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
index 36f1aef..db4c698 100644
--- a/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
+++ b/Documentation/devicetree/bindings/net/snps,dwc-qos-ethernet.txt
@@ -103,8 +103,6 @@ Required properties:
Optional properties:
- dma-coherent: Present if dma operations are coherent
-- mac-address: See ethernet.txt in the same directory
-- local-mac-address: See ethernet.txt in the same directory
- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY.
See ../gpio/gpio.txt.
- snps,en-lpi: If present it enables use of the AXI low-power interface
@@ -118,7 +116,6 @@ Optional properties:
- snps,rxpbl: DMA Programmable burst length for the RX DMA
- snps,en-tx-lpi-clockgating: Enable gating of the MAC TX clock during
TX low-power mode.
-- phy-handle: See ethernet.txt file in the same directory
- mdio device tree subnode: When the GMAC has a phy connected to its local
mdio, there must be device tree subnode with the following
required properties:
@@ -133,6 +130,9 @@ Optional properties:
- device_type: Must be "ethernet-phy".
- fixed-mode device tree subnode: see fixed-link.txt in the same directory
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
Examples:
ethernet2@40010000 {
clock-names = "phy_ref_clk", "apb_pclk";
diff --git a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
index fc8f017..d90d27e 100644
--- a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
+++ b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt
@@ -31,8 +31,8 @@ Required properties:
- socionext,syscon-phy-mode: A phandle to syscon with one argument
that configures phy mode. The argument is the ID of MAC instance.
-Optional properties:
- - local-mac-address: See ethernet.txt in the same directory.
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Required subnode:
- mdio: A container for child nodes representing phy nodes.
diff --git a/Documentation/devicetree/bindings/net/socionext-netsec.txt b/Documentation/devicetree/bindings/net/socionext-netsec.txt
index 0cff94f..3073c16 100644
--- a/Documentation/devicetree/bindings/net/socionext-netsec.txt
+++ b/Documentation/devicetree/bindings/net/socionext-netsec.txt
@@ -26,10 +26,9 @@ Required properties:
Optional properties: (See ethernet.txt file in the same directory)
- dma-coherent: Boolean property, must only be present if memory
accesses performed by the device are cache coherent.
-- local-mac-address: See ethernet.txt in the same directory.
-- mac-address: See ethernet.txt in the same directory.
-- max-speed: See ethernet.txt in the same directory.
-- max-frame-size: See ethernet.txt in the same directory.
+
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
Example:
eth0: ethernet@522d0000 {
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
index 7b9a776..bcccbb9 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
@@ -13,11 +13,12 @@ properties:
Optional properties:
-- mac-address: See ethernet.txt in the parent directory
-- local-mac-address: See ethernet.txt in the parent directory
- ieee80211-freq-limit: See ieee80211.txt
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
+
Optional nodes:
- led: Properties for a connected LED
Optional properties:
diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
index b7396c8..d07542f 100644
--- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
@@ -34,9 +34,9 @@ Optional properties:
ath9k wireless chip (in this case the calibration /
EEPROM data will be loaded from userspace using the
kernel firmware loader).
-- mac-address: See ethernet.txt in the parent directory
-- local-mac-address: See ethernet.txt in the parent directory
+For all other optional Ethernet properties, please refer to
+Documentation/devicetree/bindings/net/ethernet.txt.
In this example, the node is defined as child node of the PCI controller:
&pci0 {
--
1.9.1
^ permalink raw reply related
* Re: [PATCH v2 2/4] dt-bindings: doc: Reflect new NVMEM of_get_mac_address behaviour
From: Andrew Lunn @ 2019-04-28 16:53 UTC (permalink / raw)
To: Petr Štetiar
Cc: netdev, devicetree, linux-kernel, David S. Miller, Rob Herring,
Mark Rutland, Vivien Didelot, Florian Fainelli, Yisen Zhuang,
Salil Mehta, Woojung Huh, Microchip Linux Driver Support,
Kunihiko Hayashi, Masahiro Yamada, Jassi Brar, Kalle Valo,
Matthias Brugger, Heiner Kallweit, Frank Rowand,
Srinivas Kandagatla, Maxime Ripard, Alban Bedel, linux-arm-kernel,
linux-wireless, linux-mediatek
In-Reply-To: <1556456002-13430-3-git-send-email-ynezz@true.cz>
On Sun, Apr 28, 2019 at 02:53:20PM +0200, Petr Štetiar wrote:
> As of_get_mac_address now supports NVMEM under the hood, we need to update
> the bindings documentation with the new nvmem-cell* properties, which would
> mean copy&pasting a lot of redundant information to every binding
> documentation currently referencing some of the MAC address properties.
>
> So I've just removed all the references to the optional MAC address
> properties and replaced them with the reference to the net/ethernet.txt
> file. While at it, I've also removed other optional Ethernet properties.
Hi Petr
I think each individual binding needs to give a hint if
of_get_mac_address() is used, and hence if these optional properties
are respected. The same is true for other optional properties. I don't
want to have to look at the driver to know which optional properties
are implemented, the binding should tell me. What the optional
properties mean, and which order they are used in can then be defined
in ethernet.txt.
So i would suggests something like:
The MAC address will be determined using the optional properties
defined in ethernet.txt.
And leave all the other optional parameters in the bindings.
Andrew
^ permalink raw reply
* Re: [PATCH] mt7603: wait for pre_tbtt_tasklet before scanning
From: Lorenzo Bianconi @ 2019-04-28 20:57 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: Felix Fietkau, linux-wireless
In-Reply-To: <e7bc3645ce73a15ef9fa16a40f2bdb8577494769.1556280002.git.lorenzo@kernel.org>
>
> Disable pre_tbtt_tasklet tasklet before performing frequency scanning
>
Hi Felix,
please drop this patch and 'mt76: move common beacon code in mt76
module' series, I will send a v2 rebasing on a new patch
Regards,
Lorenzo
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
> index 18a33d921601..184ed4cead0a 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
> @@ -535,6 +535,7 @@ mt7603_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> struct mt7603_dev *dev = hw->priv;
>
> set_bit(MT76_SCANNING, &dev->mt76.state);
> + tasklet_disable(&dev->pre_tbtt_tasklet);
> mt7603_beacon_set_timer(dev, -1, 0);
> }
>
> @@ -545,6 +546,7 @@ mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
>
> clear_bit(MT76_SCANNING, &dev->mt76.state);
> mt7603_beacon_set_timer(dev, -1, dev->beacon_int);
> + tasklet_enable(&dev->pre_tbtt_tasklet);
> }
>
> static void
> --
> 2.20.1
>
^ permalink raw reply
* Re: [PATCH] brcmfmac: print firmware messages after a firmware crash
From: Arend Van Spriel @ 2019-04-28 21:06 UTC (permalink / raw)
To: Rafał Miłecki, Kalle Valo
Cc: linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
Rafał Miłecki
In-Reply-To: <20190427183008.27111-1-zajec5@gmail.com>
On 4/27/2019 8:30 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Normally firmware messages are printed with debugging enabled only. It's
> a good idea as firmware may print a lot of messages that normal users
> don't need to care about.
>
> However, on firmware crash, it may be very helpful to log all recent
> messages. There is almost always a backtrace available as well as rought
> info on the latest actions/state.
nice... there is one minor nit below, but other than that...
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> .../broadcom/brcm80211/brcmfmac/pcie.c | 24 ++++++++++++++-----
> 1 file changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> index 637973fe8928..f519b050aff3 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -764,15 +764,22 @@ static void brcmf_pcie_bus_console_init(struct brcmf_pciedev_info *devinfo)
> console->base_addr, console->buf_addr, console->bufsize);
> }
>
> -
> -static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo)
> +/**
> + * brcmf_pcie_bus_console_read - reads firmware messages
> + *
> + * @error: specifies if error has occurred (prints messages unconditionally)
> + */
> +static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo,
> + int error)
Given how it is called I would say 'bool error' makes a bit more sense.
Gr. AvS
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox