Netdev List
 help / color / mirror / Atom feed
* RE: [PATCH] ipv4: esp4: use BUG_ON instead of if condition followed by BUG
From: Yossi Kuperman @ 2017-10-24  9:29 UTC (permalink / raw)
  To: 'Gustavo A. R. Silva', Steffen Klassert, Herbert Xu,
	David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <20171023180608.GA25108@embeddedor.com>

> Subject: [PATCH] ipv4: esp4: use BUG_ON instead of if condition followed by
> BUG
> 
> Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  net/ipv4/esp4.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Please consider esp6 as well.

^ permalink raw reply

* [PATCH] drivers/wireless: ath: Convert timers to use timer_setup()
From: Kees Cook @ 2017-10-24  9:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Kalle Valo, linux-wireless, netdev, linux-kernel

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/wireless/ath/ar5523/ar5523.c      |  7 +++----
 drivers/net/wireless/ath/ath10k/htt_rx.c      |  6 +++---
 drivers/net/wireless/ath/ath10k/pci.c         | 17 ++++++++---------
 drivers/net/wireless/ath/ath10k/pci.h         |  2 +-
 drivers/net/wireless/ath/ath6kl/cfg80211.c    |  6 ++----
 drivers/net/wireless/ath/ath6kl/core.h        |  2 +-
 drivers/net/wireless/ath/ath6kl/main.c        |  5 ++---
 drivers/net/wireless/ath/ath6kl/txrx.c        |  6 +++---
 drivers/net/wireless/ath/ath6kl/wmi.c         |  4 ++--
 drivers/net/wireless/ath/ath6kl/wmi.h         |  2 +-
 drivers/net/wireless/ath/ath9k/ath9k.h        |  4 ++--
 drivers/net/wireless/ath/ath9k/channel.c      | 14 ++++++--------
 drivers/net/wireless/ath/ath9k/gpio.c         | 14 ++++++--------
 drivers/net/wireless/ath/ath9k/htc.h          |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |  3 +--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c |  4 ++--
 drivers/net/wireless/ath/ath9k/init.c         |  4 ++--
 drivers/net/wireless/ath/ath9k/link.c         |  6 +++---
 drivers/net/wireless/ath/ath9k/main.c         |  4 ++--
 drivers/net/wireless/ath/wil6210/main.c       | 15 +++++++--------
 drivers/net/wireless/ath/wil6210/p2p.c        |  4 ++--
 drivers/net/wireless/ath/wil6210/wil6210.h    |  2 +-
 22 files changed, 61 insertions(+), 72 deletions(-)

diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 68f0463ed8df..b94759daeacc 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -889,9 +889,9 @@ static void ar5523_tx_work(struct work_struct *work)
 	mutex_unlock(&ar->mutex);
 }
 
-static void ar5523_tx_wd_timer(unsigned long arg)
+static void ar5523_tx_wd_timer(struct timer_list *t)
 {
-	struct ar5523 *ar = (struct ar5523 *) arg;
+	struct ar5523 *ar = from_timer(ar, t, tx_wd_timer);
 
 	ar5523_dbg(ar, "TX watchdog timer triggered\n");
 	ieee80211_queue_work(ar->hw, &ar->tx_wd_work);
@@ -1599,8 +1599,7 @@ static int ar5523_probe(struct usb_interface *intf,
 	mutex_init(&ar->mutex);
 
 	INIT_DELAYED_WORK(&ar->stat_work, ar5523_stat_work);
-	init_timer(&ar->tx_wd_timer);
-	setup_timer(&ar->tx_wd_timer, ar5523_tx_wd_timer, (unsigned long) ar);
+	timer_setup(&ar->tx_wd_timer, ar5523_tx_wd_timer, 0);
 	INIT_WORK(&ar->tx_wd_work, ar5523_tx_wd_work);
 	INIT_WORK(&ar->tx_work, ar5523_tx_work);
 	INIT_LIST_HEAD(&ar->tx_queue_pending);
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index a3f5dc78353f..f068376ec565 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -200,9 +200,9 @@ static void ath10k_htt_rx_msdu_buff_replenish(struct ath10k_htt *htt)
 	spin_unlock_bh(&htt->rx_ring.lock);
 }
 
-static void ath10k_htt_rx_ring_refill_retry(unsigned long arg)
+static void ath10k_htt_rx_ring_refill_retry(struct timer_list *t)
 {
-	struct ath10k_htt *htt = (struct ath10k_htt *)arg;
+	struct ath10k_htt *htt = from_timer(htt, t, rx_ring.refill_retry_timer);
 
 	ath10k_htt_rx_msdu_buff_replenish(htt);
 }
@@ -507,7 +507,7 @@ int ath10k_htt_rx_alloc(struct ath10k_htt *htt)
 	*htt->rx_ring.alloc_idx.vaddr = 0;
 
 	/* Initialize the Rx refill retry timer */
-	setup_timer(timer, ath10k_htt_rx_ring_refill_retry, (unsigned long)htt);
+	timer_setup(timer, ath10k_htt_rx_ring_refill_retry, 0);
 
 	spin_lock_init(&htt->rx_ring.lock);
 
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 195dafb98131..2b975bb3f67e 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -585,10 +585,10 @@ static void ath10k_pci_sleep(struct ath10k *ar)
 	spin_unlock_irqrestore(&ar_pci->ps_lock, flags);
 }
 
-static void ath10k_pci_ps_timer(unsigned long ptr)
+static void ath10k_pci_ps_timer(struct timer_list *t)
 {
-	struct ath10k *ar = (void *)ptr;
-	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
+	struct ath10k_pci *ar_pci = from_timer(ar_pci, t, ps_timer);
+	struct ath10k *ar = ar_pci->ar;
 	unsigned long flags;
 
 	spin_lock_irqsave(&ar_pci->ps_lock, flags);
@@ -838,9 +838,10 @@ void ath10k_pci_rx_post(struct ath10k *ar)
 		ath10k_pci_rx_post_pipe(&ar_pci->pipe_info[i]);
 }
 
-void ath10k_pci_rx_replenish_retry(unsigned long ptr)
+void ath10k_pci_rx_replenish_retry(struct timer_list *t)
 {
-	struct ath10k *ar = (void *)ptr;
+	struct ath10k_pci *ar_pci = from_timer(ar_pci, t, rx_post_retry);
+	struct ath10k *ar = ar_pci->ar;
 
 	ath10k_pci_rx_post(ar);
 }
@@ -3157,8 +3158,7 @@ int ath10k_pci_setup_resource(struct ath10k *ar)
 	spin_lock_init(&ce->ce_lock);
 	spin_lock_init(&ar_pci->ps_lock);
 
-	setup_timer(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry,
-		    (unsigned long)ar);
+	timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0);
 
 	if (QCA_REV_6174(ar) || QCA_REV_9377(ar))
 		ath10k_pci_override_ce_config(ar);
@@ -3284,8 +3284,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 	ar->id.subsystem_vendor = pdev->subsystem_vendor;
 	ar->id.subsystem_device = pdev->subsystem_device;
 
-	setup_timer(&ar_pci->ps_timer, ath10k_pci_ps_timer,
-		    (unsigned long)ar);
+	timer_setup(&ar_pci->ps_timer, ath10k_pci_ps_timer, 0);
 
 	ret = ath10k_pci_setup_resource(ar);
 	if (ret) {
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index 424ff323b2dc..08704fbc11e3 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -278,7 +278,7 @@ void ath10k_pci_hif_power_down(struct ath10k *ar);
 int ath10k_pci_alloc_pipes(struct ath10k *ar);
 void ath10k_pci_free_pipes(struct ath10k *ar);
 void ath10k_pci_free_pipes(struct ath10k *ar);
-void ath10k_pci_rx_replenish_retry(unsigned long ptr);
+void ath10k_pci_rx_replenish_retry(struct timer_list *t);
 void ath10k_pci_ce_deinit(struct ath10k *ar);
 void ath10k_pci_init_napi(struct ath10k *ar);
 int ath10k_pci_init_pipes(struct ath10k *ar);
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 414b5b596efc..b53eb2b85f02 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3589,10 +3589,8 @@ static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
 		return -ENOMEM;
 	}
 
-	setup_timer(&vif->disconnect_timer, disconnect_timer_handler,
-		    (unsigned long) vif->ndev);
-	setup_timer(&vif->sched_scan_timer, ath6kl_wmi_sscan_timer,
-		    (unsigned long) vif);
+	timer_setup(&vif->disconnect_timer, disconnect_timer_handler, 0);
+	timer_setup(&vif->sched_scan_timer, ath6kl_wmi_sscan_timer, 0);
 
 	set_bit(WMM_ENABLED, &vif->flags);
 	spin_lock_init(&vif->if_lock);
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 87e99c12d4ba..e23d450babd2 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -893,7 +893,7 @@ static inline u32 ath6kl_get_hi_item_addr(struct ath6kl *ar,
 
 int ath6kl_configure_target(struct ath6kl *ar);
 void ath6kl_detect_error(unsigned long ptr);
-void disconnect_timer_handler(unsigned long ptr);
+void disconnect_timer_handler(struct timer_list *t);
 void init_netdev(struct net_device *dev);
 void ath6kl_cookie_init(struct ath6kl *ar);
 void ath6kl_cookie_cleanup(struct ath6kl *ar);
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index b90c77ef792e..db95f85751e3 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -494,10 +494,9 @@ void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr,
 	netif_wake_queue(vif->ndev);
 }
 
-void disconnect_timer_handler(unsigned long ptr)
+void disconnect_timer_handler(struct timer_list *t)
 {
-	struct net_device *dev = (struct net_device *)ptr;
-	struct ath6kl_vif *vif = netdev_priv(dev);
+	struct ath6kl_vif *vif = from_timer(vif, t, disconnect_timer);
 
 	ath6kl_init_profile_info(vif);
 	ath6kl_disconnect(vif);
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 4e5cc2b7045a..1379906bf849 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1620,10 +1620,10 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
 	ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb);
 }
 
-static void aggr_timeout(unsigned long arg)
+static void aggr_timeout(struct timer_list *t)
 {
 	u8 i, j;
-	struct aggr_info_conn *aggr_conn = (struct aggr_info_conn *) arg;
+	struct aggr_info_conn *aggr_conn = from_timer(aggr_conn, t, timer);
 	struct rxtid *rxtid;
 	struct rxtid_stats *stats;
 
@@ -1753,7 +1753,7 @@ void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info,
 
 	aggr_conn->aggr_sz = AGGR_SZ_DEFAULT;
 	aggr_conn->dev = vif->ndev;
-	setup_timer(&aggr_conn->timer, aggr_timeout, (unsigned long)aggr_conn);
+	timer_setup(&aggr_conn->timer, aggr_timeout, 0);
 	aggr_conn->aggr_info = aggr_info;
 
 	aggr_conn->timer_scheduled = false;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index bfc20b45b806..777acc564ac9 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1078,9 +1078,9 @@ static int ath6kl_wmi_tkip_micerr_event_rx(struct wmi *wmi, u8 *datap, int len,
 	return 0;
 }
 
-void ath6kl_wmi_sscan_timer(unsigned long ptr)
+void ath6kl_wmi_sscan_timer(struct timer_list *t)
 {
-	struct ath6kl_vif *vif = (struct ath6kl_vif *) ptr;
+	struct ath6kl_vif *vif = from_timer(vif, t, sched_scan_timer);
 
 	cfg80211_sched_scan_results(vif->ar->wiphy, 0);
 }
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3af464a73b58..a60bb49fe920 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -2719,7 +2719,7 @@ int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type,
 
 int ath6kl_wmi_set_inact_period(struct wmi *wmi, u8 if_idx, int inact_timeout);
 
-void ath6kl_wmi_sscan_timer(unsigned long ptr);
+void ath6kl_wmi_sscan_timer(struct timer_list *t);
 
 int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source);
 
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index cf076719c27e..ef0de4f1312c 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -750,14 +750,14 @@ void ath_reset_work(struct work_struct *work);
 bool ath_hw_check(struct ath_softc *sc);
 void ath_hw_pll_work(struct work_struct *work);
 void ath_paprd_calibrate(struct work_struct *work);
-void ath_ani_calibrate(unsigned long data);
+void ath_ani_calibrate(struct timer_list *t);
 void ath_start_ani(struct ath_softc *sc);
 void ath_stop_ani(struct ath_softc *sc);
 void ath_check_ani(struct ath_softc *sc);
 int ath_update_survey_stats(struct ath_softc *sc);
 void ath_update_survey_nf(struct ath_softc *sc, int channel);
 void ath9k_queue_reset(struct ath_softc *sc, enum ath_reset_type type);
-void ath_ps_full_sleep(unsigned long data);
+void ath_ps_full_sleep(struct timer_list *t);
 void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop,
 		   bool sw_pending, bool timeout_override);
 
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index f0439f2d566b..6cdba5a71095 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -1042,9 +1042,9 @@ static void ath_scan_channel_start(struct ath_softc *sc)
 	mod_timer(&sc->offchannel.timer, jiffies + sc->offchannel.duration);
 }
 
-static void ath_chanctx_timer(unsigned long data)
+static void ath_chanctx_timer(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *) data;
+	struct ath_softc *sc = from_timer(sc, t, sched.timer);
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
 
 	ath_dbg(common, CHAN_CTX,
@@ -1053,9 +1053,9 @@ static void ath_chanctx_timer(unsigned long data)
 	ath_chanctx_event(sc, NULL, ATH_CHANCTX_EVENT_TSF_TIMER);
 }
 
-static void ath_offchannel_timer(unsigned long data)
+static void ath_offchannel_timer(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *)data;
+	struct ath_softc *sc = from_timer(sc, t, offchannel.timer);
 	struct ath_chanctx *ctx;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
 
@@ -1361,10 +1361,8 @@ void ath9k_init_channel_context(struct ath_softc *sc)
 {
 	INIT_WORK(&sc->chanctx_work, ath_chanctx_work);
 
-	setup_timer(&sc->offchannel.timer, ath_offchannel_timer,
-		    (unsigned long)sc);
-	setup_timer(&sc->sched.timer, ath_chanctx_timer,
-		    (unsigned long)sc);
+	timer_setup(&sc->offchannel.timer, ath_offchannel_timer, 0);
+	timer_setup(&sc->sched.timer, ath_chanctx_timer, 0);
 
 	init_completion(&sc->go_beacon);
 }
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index ddb28861e7fe..b457e52dd365 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -191,9 +191,9 @@ static void ath_mci_ftp_adjust(struct ath_softc *sc)
  * 45ms, bt traffic will be given priority during 55% of this
  * period while wlan gets remaining 45%
  */
-static void ath_btcoex_period_timer(unsigned long data)
+static void ath_btcoex_period_timer(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *) data;
+	struct ath_softc *sc = from_timer(sc, t, btcoex.period_timer);
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_btcoex *btcoex = &sc->btcoex;
 	enum ath_stomp_type stomp_type;
@@ -252,9 +252,9 @@ static void ath_btcoex_period_timer(unsigned long data)
  * Generic tsf based hw timer which configures weight
  * registers to time slice between wlan and bt traffic
  */
-static void ath_btcoex_no_stomp_timer(unsigned long arg)
+static void ath_btcoex_no_stomp_timer(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *)arg;
+	struct ath_softc *sc = from_timer(sc, t, btcoex.no_stomp_timer);
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_btcoex *btcoex = &sc->btcoex;
 
@@ -284,10 +284,8 @@ static void ath_init_btcoex_timer(struct ath_softc *sc)
 				   btcoex->btcoex_period / 100;
 	btcoex->bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
 
-	setup_timer(&btcoex->period_timer, ath_btcoex_period_timer,
-			(unsigned long) sc);
-	setup_timer(&btcoex->no_stomp_timer, ath_btcoex_no_stomp_timer,
-			(unsigned long) sc);
+	timer_setup(&btcoex->period_timer, ath_btcoex_period_timer, 0);
+	timer_setup(&btcoex->no_stomp_timer, ath_btcoex_no_stomp_timer, 0);
 
 	spin_lock_init(&btcoex->btcoex_lock);
 }
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 16dff4b89a86..9f64e32381f9 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -584,7 +584,7 @@ void ath9k_htc_tx_clear_slot(struct ath9k_htc_priv *priv, int slot);
 void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv);
 void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event);
 void ath9k_tx_failed_tasklet(unsigned long data);
-void ath9k_htc_tx_cleanup_timer(unsigned long data);
+void ath9k_htc_tx_cleanup_timer(struct timer_list *t);
 bool ath9k_htc_csa_is_finished(struct ath9k_htc_priv *priv);
 
 int ath9k_rx_init(struct ath9k_htc_priv *priv);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index da2164b0cccc..a5cb796f114d 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -654,8 +654,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv,
 	INIT_DELAYED_WORK(&priv->ani_work, ath9k_htc_ani_work);
 	INIT_WORK(&priv->ps_work, ath9k_ps_work);
 	INIT_WORK(&priv->fatal_work, ath9k_fatal_work);
-	setup_timer(&priv->tx.cleanup_timer, ath9k_htc_tx_cleanup_timer,
-		    (unsigned long)priv);
+	timer_setup(&priv->tx.cleanup_timer, ath9k_htc_tx_cleanup_timer, 0);
 
 	/*
 	 * Cache line size is used to size and align various
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index b38a586ea59a..242304eb8798 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -752,9 +752,9 @@ static void ath9k_htc_tx_cleanup_queue(struct ath9k_htc_priv *priv,
 	}
 }
 
-void ath9k_htc_tx_cleanup_timer(unsigned long data)
+void ath9k_htc_tx_cleanup_timer(struct timer_list *t)
 {
-	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) data;
+	struct ath9k_htc_priv *priv = from_timer(priv, t, tx.cleanup_timer);
 	struct ath_common *common = ath9k_hw_common(priv->ah);
 	struct ath9k_htc_tx_event *event, *tmp;
 	struct sk_buff *skb;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index bb7936090b91..7beba4e1a8a4 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -369,7 +369,7 @@ static void ath9k_init_misc(struct ath_softc *sc)
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
 	int i = 0;
 
-	setup_timer(&common->ani.timer, ath_ani_calibrate, (unsigned long)sc);
+	timer_setup(&common->ani.timer, ath_ani_calibrate, 0);
 
 	common->last_rssi = ATH_RSSI_DUMMY_MARKER;
 	memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
@@ -678,7 +678,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet,
 		     (unsigned long)sc);
 
-	setup_timer(&sc->sleep_timer, ath_ps_full_sleep, (unsigned long)sc);
+	timer_setup(&sc->sleep_timer, ath_ps_full_sleep, 0);
 	INIT_WORK(&sc->hw_reset_work, ath_reset_work);
 	INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
 	INIT_DELAYED_WORK(&sc->hw_pll_work, ath_hw_pll_work);
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 27c50562dc47..7d2462781bb8 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -301,11 +301,11 @@ void ath_paprd_calibrate(struct work_struct *work)
  *  When the task is complete, it reschedules itself depending on the
  *  appropriate interval that was calculated.
  */
-void ath_ani_calibrate(unsigned long data)
+void ath_ani_calibrate(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *)data;
+	struct ath_common *common = from_timer(common, t, ani.timer);
+	struct ath_softc *sc = (struct ath_softc *)common->priv;
 	struct ath_hw *ah = sc->sc_ah;
-	struct ath_common *common = ath9k_hw_common(ah);
 	bool longcal = false;
 	bool shortcal = false;
 	bool aniflag = false;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 8b4ac7f0a09b..22ac9cf2d3f2 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -93,9 +93,9 @@ static bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode)
 	return ret;
 }
 
-void ath_ps_full_sleep(unsigned long data)
+void ath_ps_full_sleep(struct timer_list *t)
 {
-	struct ath_softc *sc = (struct ath_softc *) data;
+	struct ath_softc *sc = from_timer(sc, t, sleep_timer);
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
 	bool reset;
 
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index bac829aa950d..885924abf61c 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -336,9 +336,9 @@ static void wil_disconnect_worker(struct work_struct *work)
 	clear_bit(wil_status_fwconnecting, wil->status);
 }
 
-static void wil_connect_timer_fn(ulong x)
+static void wil_connect_timer_fn(struct timer_list *t)
 {
-	struct wil6210_priv *wil = (void *)x;
+	struct wil6210_priv *wil = from_timer(wil, t, connect_timer);
 	bool q;
 
 	wil_err(wil, "Connect timeout detected, disconnect station\n");
@@ -351,9 +351,9 @@ static void wil_connect_timer_fn(ulong x)
 	wil_dbg_wmi(wil, "queue_work of disconnect_worker -> %d\n", q);
 }
 
-static void wil_scan_timer_fn(ulong x)
+static void wil_scan_timer_fn(struct timer_list *t)
 {
-	struct wil6210_priv *wil = (void *)x;
+	struct wil6210_priv *wil = from_timer(wil, t, scan_timer);
 
 	clear_bit(wil_status_fwready, wil->status);
 	wil_err(wil, "Scan timeout detected, start fw error recovery\n");
@@ -540,10 +540,9 @@ int wil_priv_init(struct wil6210_priv *wil)
 	init_completion(&wil->halp.comp);
 
 	wil->bcast_vring = -1;
-	setup_timer(&wil->connect_timer, wil_connect_timer_fn, (ulong)wil);
-	setup_timer(&wil->scan_timer, wil_scan_timer_fn, (ulong)wil);
-	setup_timer(&wil->p2p.discovery_timer, wil_p2p_discovery_timer_fn,
-		    (ulong)wil);
+	timer_setup(&wil->connect_timer, wil_connect_timer_fn, 0);
+	timer_setup(&wil->scan_timer, wil_scan_timer_fn, 0);
+	timer_setup(&wil->p2p.discovery_timer, wil_p2p_discovery_timer_fn, 0);
 
 	INIT_WORK(&wil->disconnect_worker, wil_disconnect_worker);
 	INIT_WORK(&wil->wmi_event_worker, wmi_event_worker);
diff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c
index 792484756654..7dbee2c3e482 100644
--- a/drivers/net/wireless/ath/wil6210/p2p.c
+++ b/drivers/net/wireless/ath/wil6210/p2p.c
@@ -65,9 +65,9 @@ bool wil_p2p_is_social_scan(struct cfg80211_scan_request *request)
 	       (request->channels[0]->hw_value == P2P_DMG_SOCIAL_CHANNEL);
 }
 
-void wil_p2p_discovery_timer_fn(ulong x)
+void wil_p2p_discovery_timer_fn(struct timer_list *t)
 {
-	struct wil6210_priv *wil = (void *)x;
+	struct wil6210_priv *wil = from_timer(wil, t, p2p.discovery_timer);
 
 	wil_dbg_misc(wil, "p2p_discovery_timer_fn\n");
 
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 315ec8b59662..1e340d04bd70 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -918,7 +918,7 @@ void wil6210_mask_halp(struct wil6210_priv *wil);
 
 /* P2P */
 bool wil_p2p_is_social_scan(struct cfg80211_scan_request *request);
-void wil_p2p_discovery_timer_fn(ulong x);
+void wil_p2p_discovery_timer_fn(struct timer_list *t);
 int wil_p2p_search(struct wil6210_priv *wil,
 		   struct cfg80211_scan_request *request);
 int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,
-- 
2.7.4


-- 
Kees Cook
Pixel Security

^ permalink raw reply related

* Re: [PATCH v2] net: smc_close: mark expected switch fall-through
From: David Miller @ 2017-10-24  9:30 UTC (permalink / raw)
  To: garsilva; +Cc: ubraun, linux-s390, netdev, linux-kernel
In-Reply-To: <20171022013530.GA15859@embeddedor.com>

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Sat, 21 Oct 2017 20:35:30 -0500

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case I placed the "fall through" comment
> on its own line, which is what GCC is expecting to find.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> Changes in v2:
>  Move the "fall through" comment on its own line
>  above the rest of the sentence.

Applied.

^ permalink raw reply

* Re: [PATCH] drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet
From: David Miller @ 2017-10-24  9:31 UTC (permalink / raw)
  To: ran.wang_1-3arQi8VN3Tc
  Cc: oliver-GvhC2dPhHPQdnm+yROfE0A, hayeswang-Rasf1IRRPZFBDgjK7y7TUQ,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20171023101023.5470-1-ran.wang_1-3arQi8VN3Tc@public.gmane.org>

From: Ran Wang <ran.wang_1-3arQi8VN3Tc@public.gmane.org>
Date: Mon, 23 Oct 2017 18:10:23 +0800

> This product is named 'TP-LINK USB 3.0 Gigabit Ethernet Network
> Adapter (Model No.is UE300)'. It uses chip RTL8153 and works with
> driver drivers/net/usb/r8152.c
> 
> Signed-off-by: Ran Wang <ran.wang_1-3arQi8VN3Tc@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH net 1/3] net: mvpp2: fix TSO headers allocation and management
From: David Miller @ 2017-10-24  9:34 UTC (permalink / raw)
  To: antoine.tenart
  Cc: ymarkman, andrew, gregory.clement, thomas.petazzoni,
	miquel.raynal, nadavh, linux-kernel, mw, stefanc, netdev
In-Reply-To: <20171023132431.5756-1-antoine.tenart@free-electrons.com>

From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Mon, 23 Oct 2017 15:24:29 +0200

> From: Yan Markman <ymarkman@marvell.com>
> 
> TSO headers are managed with txq index and therefore should be aligned
> with the txq size, not with the aggregated txq size.
> 
> Fixes: 186cd4d4e414 ("net: mvpp2: software tso support")
> Reported-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Yan Markman <ymarkman@marvell.com>
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 2/3] net: mvpp2: do not unmap TSO headers buffers
From: David Miller @ 2017-10-24  9:34 UTC (permalink / raw)
  To: antoine.tenart
  Cc: andrew, gregory.clement, thomas.petazzoni, miquel.raynal, nadavh,
	linux-kernel, mw, stefanc, netdev
In-Reply-To: <20171023132431.5756-2-antoine.tenart@free-electrons.com>

From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Mon, 23 Oct 2017 15:24:30 +0200

> The TSO header buffers are coming from a per cpu pool and should not
> be unmapped as they are reused. The PPv2 driver was unmapping all
> descriptors buffers unconditionally. This patch fixes this by checking
> the buffers dma addresses before unmapping them, and by not unmapping
> those who are located in the TSO header pool.
> 
> Fixes: 186cd4d4e414 ("net: mvpp2: software tso support")
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 3/3] net: mvpp2: do not call txq_done from the Tx path when Tx irqs are used
From: David Miller @ 2017-10-24  9:34 UTC (permalink / raw)
  To: antoine.tenart
  Cc: andrew, gregory.clement, thomas.petazzoni, miquel.raynal, nadavh,
	linux-kernel, mw, stefanc, netdev
In-Reply-To: <20171023132431.5756-3-antoine.tenart@free-electrons.com>

From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Mon, 23 Oct 2017 15:24:31 +0200

> When Tx IRQs are used, txq_bufs_free() can be called from both the Tx
> path and from NAPI poll(). This led to CPU stalls as if these two tasks
> (Tx and Poll) are scheduled on two CPUs at the same time, DMA unmapping
> operations are done on the same txq buffers.
> 
> This patch adds a check not to call txq_done() from the Tx path if Tx
> interrupts are used as it does not make sense to do so.
> 
> Fixes: edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer")
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Applied.

^ permalink raw reply

* [PATCH net-next 0/2] net: dsa: lan9303: Learn addresses on CPU port when bridged
From: Egil Hjelmeland @ 2017-10-24  9:35 UTC (permalink / raw)
  To: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel; +Cc: Egil Hjelmeland

When CPU transmit directly to port using tag, the LAN9303 does not
learn MAC addresses received on the CPU port into the ALR table.
ALR learning is performed only when transmitting using ALR lookup.

Solution:
If the two external ports are bridged and the packet is not STP BPDU,
then use ALR lookup to allow ALR learning on CPU port.
Otherwise transmit directly to port with STP state override.

The first patch moves struct lan9303 to include/linux/lan9303.h in order
to prepare for the second patch. 

Egil Hjelmeland (2):
  net: dsa: lan9303: Move struct lan9303 to include/linux/lan9303.h
  net: dsa: lan9303: Learn addresses on CPU port when bridged

 MAINTAINERS               |  1 +
 drivers/net/dsa/lan9303.h | 34 +---------------------------------
 include/linux/lan9303.h   | 35 +++++++++++++++++++++++++++++++++++
 net/dsa/tag_lan9303.c     | 23 ++++++++++++++++++++++-
 4 files changed, 59 insertions(+), 34 deletions(-)
 create mode 100644 include/linux/lan9303.h

-- 
2.11.0

^ permalink raw reply

* Re: [PATCH] cdc_ether: flag the Huawei ME906/ME909 as WWAN
From: David Miller @ 2017-10-24  9:35 UTC (permalink / raw)
  To: aleksander; +Cc: linux-usb, netdev, oliver, linux-kernel
In-Reply-To: <20171023151641.5674-1-aleksander@aleksander.es>

From: Aleksander Morgado <aleksander@aleksander.es>
Date: Mon, 23 Oct 2017 17:16:41 +0200

> The Huawei ME906 (12d1:15c1) comes with a standard ECM interface that
> requires management via AT commands sent over one of the control TTYs
> (e.g. connected with AT^NDISDUP).
> 
> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

Applied.

^ permalink raw reply

* [PATCH net-next 2/2] net: dsa: lan9303: Learn addresses on CPU port when bridged
From: Egil Hjelmeland @ 2017-10-24  9:35 UTC (permalink / raw)
  To: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel; +Cc: Egil Hjelmeland
In-Reply-To: <20171024093515.6749-1-privat@egil-hjelmeland.no>

When CPU transmit directly to port using tag, the LAN9303 does not
learn MAC addresses received on the CPU port into the ALR.
ALR learning is performed only when transmitting using ALR lookup.

Solution:
If the two external ports are bridged and the packet is not STP BPDU,
then use ALR lookup to allow ALR learning on CPU port.
Otherwise transmit directly to port with STP state override.

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
---
 net/dsa/tag_lan9303.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
index 57519597c6fc..174721293a34 100644
--- a/net/dsa/tag_lan9303.c
+++ b/net/dsa/tag_lan9303.c
@@ -12,6 +12,7 @@
  *
  */
 #include <linux/etherdevice.h>
+#include <linux/lan9303.h>
 #include <linux/list.h>
 #include <linux/slab.h>
 
@@ -39,6 +40,23 @@
  */
 
 #define LAN9303_TAG_LEN 4
+# define LAN9303_TAG_TX_USE_ALR BIT(3)
+# define LAN9303_TAG_TX_STP_OVERRIDE BIT(4)
+#define eth_stp_addr eth_reserved_addr_base
+
+/* Decide whether to transmit using ALR lookup, or transmit directly to
+ * port using tag. ALR learning is performed only when using ALR lookup.
+ * If the two external ports are bridged and the packet is not STP BPDU,
+ * then use ALR lookup to allow ALR learning on CPU port.
+ * Otherwise transmit directly to port with STP state override.
+ * See also: lan9303_separate_ports() and lan9303.pdf 6.4.10.1
+ */
+static inline int lan9303_tx_use_arl(struct dsa_port *dp, u8 *dest_addr)
+{
+	struct lan9303 *chip = dp->ds->priv;
+
+	return chip->is_bridged && !ether_addr_equal(dest_addr, eth_stp_addr);
+}
 
 static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
 {
@@ -62,7 +80,10 @@ static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	lan9303_tag = (u16 *)(skb->data + 2 * ETH_ALEN);
 	lan9303_tag[0] = htons(ETH_P_8021Q);
-	lan9303_tag[1] = htons(dp->index | BIT(4));
+	lan9303_tag[1] = lan9303_tx_use_arl(dp, skb->data) ?
+				LAN9303_TAG_TX_USE_ALR :
+				dp->index | LAN9303_TAG_TX_STP_OVERRIDE;
+	lan9303_tag[1] = htons(lan9303_tag[1]);
 
 	return skb;
 }
-- 
2.11.0

^ permalink raw reply related

* [PATCH net-next 1/2] net: dsa: lan9303: Move struct lan9303 to include/linux/lan9303.h
From: Egil Hjelmeland @ 2017-10-24  9:35 UTC (permalink / raw)
  To: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel; +Cc: Egil Hjelmeland
In-Reply-To: <20171024093515.6749-1-privat@egil-hjelmeland.no>

The next patch require net/dsa/tag_lan9303.c to access struct lan9303.
Therefore move struct lan9303 definitions from drivers/net/dsa/lan9303.h
to new file include/linux/lan9303.h.

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
---
 MAINTAINERS               |  1 +
 drivers/net/dsa/lan9303.h | 34 +---------------------------------
 include/linux/lan9303.h   | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 33 deletions(-)
 create mode 100644 include/linux/lan9303.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e3a7ca9d2783..9535e32bd421 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9416,6 +9416,7 @@ S:	Maintained
 F:	net/dsa/
 F:	include/net/dsa.h
 F:	drivers/net/dsa/
+F:	include/linux/lan9303.h
 
 NETWORKING [GENERAL]
 M:	"David S. Miller" <davem@davemloft.net>
diff --git a/drivers/net/dsa/lan9303.h b/drivers/net/dsa/lan9303.h
index d807b1be35f2..e6675e11c833 100644
--- a/drivers/net/dsa/lan9303.h
+++ b/drivers/net/dsa/lan9303.h
@@ -2,39 +2,7 @@
 #include <linux/device.h>
 #include <net/dsa.h>
 
-struct lan9303;
-
-struct lan9303_phy_ops {
-	/* PHY 1 and 2 access*/
-	int	(*phy_read)(struct lan9303 *chip, int port, int regnum);
-	int	(*phy_write)(struct lan9303 *chip, int port,
-			     int regnum, u16 val);
-};
-
-#define LAN9303_NUM_ALR_RECORDS 512
-struct lan9303_alr_cache_entry {
-	u8  mac_addr[ETH_ALEN];
-	u8  port_map;           /* Bitmap of ports. Zero if unused entry */
-	u8  stp_override;       /* non zero if set ALR_DAT1_AGE_OVERRID */
-};
-
-struct lan9303 {
-	struct device *dev;
-	struct regmap *regmap;
-	struct regmap_irq_chip_data *irq_data;
-	struct gpio_desc *reset_gpio;
-	u32 reset_duration; /* in [ms] */
-	bool phy_addr_sel_strap;
-	struct dsa_switch *ds;
-	struct mutex indirect_mutex; /* protect indexed register access */
-	const struct lan9303_phy_ops *ops;
-	bool is_bridged; /* true if port 1 and 2 are bridged */
-	u32 swe_port_state; /* remember SWE_PORT_STATE while not bridged */
-	/* LAN9303 do not offer reading specific ALR entry. Cache all
-	 * static entries in a flat table
-	 **/
-	struct lan9303_alr_cache_entry alr_cache[LAN9303_NUM_ALR_RECORDS];
-};
+#include <linux/lan9303.h>
 
 extern const struct regmap_access_table lan9303_register_set;
 extern const struct lan9303_phy_ops lan9303_indirect_phy_ops;
diff --git a/include/linux/lan9303.h b/include/linux/lan9303.h
new file mode 100644
index 000000000000..5810bdb43581
--- /dev/null
+++ b/include/linux/lan9303.h
@@ -0,0 +1,35 @@
+/* Included by drivers/net/dsa/lan9303.h and net/dsa/tag_lan9303.c */
+
+struct lan9303;
+
+struct lan9303_phy_ops {
+	/* PHY 1 and 2 access*/
+	int	(*phy_read)(struct lan9303 *chip, int port, int regnum);
+	int	(*phy_write)(struct lan9303 *chip, int port,
+			     int regnum, u16 val);
+};
+
+#define LAN9303_NUM_ALR_RECORDS 512
+struct lan9303_alr_cache_entry {
+	u8  mac_addr[ETH_ALEN];
+	u8  port_map;           /* Bitmap of ports. Zero if unused entry */
+	u8  stp_override;       /* non zero if set ALR_DAT1_AGE_OVERRID */
+};
+
+struct lan9303 {
+	struct device *dev;
+	struct regmap *regmap;
+	struct regmap_irq_chip_data *irq_data;
+	struct gpio_desc *reset_gpio;
+	u32 reset_duration; /* in [ms] */
+	bool phy_addr_sel_strap;
+	struct dsa_switch *ds;
+	struct mutex indirect_mutex; /* protect indexed register access */
+	const struct lan9303_phy_ops *ops;
+	bool is_bridged; /* true if port 1 and 2 are bridged */
+	u32 swe_port_state; /* remember SWE_PORT_STATE while not bridged */
+	/* LAN9303 do not offer reading specific ALR entry. Cache all
+	 * static entries in a flat table
+	 **/
+	struct lan9303_alr_cache_entry alr_cache[LAN9303_NUM_ALR_RECORDS];
+};
-- 
2.11.0

^ permalink raw reply related

* Re: [PATCH] ethernet: cavium: octeon: Switch to using netdev_info().
From: David Miller @ 2017-10-24  9:38 UTC (permalink / raw)
  To: steven.hill; +Cc: netdev, david.daney
In-Reply-To: <1508777005-20938-1-git-send-email-steven.hill@cavium.com>

From: "Steven J. Hill" <steven.hill@cavium.com>
Date: Mon, 23 Oct 2017 11:43:25 -0500

> @@ -705,14 +705,15 @@ static int octeon_mgmt_ioctl_hwtstamp(struct net_device *netdev,
>  			u64 clock_comp = (NSEC_PER_SEC << 32) /	octeon_get_io_clock_rate();
>  			if (!ptp.s.ptp_en)
>  				cvmx_write_csr(CVMX_MIO_PTP_CLOCK_COMP, clock_comp);
> -			pr_info("PTP Clock: Using sclk reference at %lld Hz\n",
> +			netdev_info(netdev,
> +				"PTP Clock: Using sclk reference at %lld Hz\n",

Please get the argument alignment correct when you make changes like this.

For a function call, the arguments on the second and subsequent line of
arguments must start exactly at the first column after the openning
parenthesis of the call.

You must use the appropriate number of TAB then SPACE characters necessary
to achieve this.

Thank you.

^ permalink raw reply

* Re: [PATCH v2] sctp: full support for ipv6 ip_nonlocal_bind & IP_FREEBIND
From: David Miller @ 2017-10-24  9:40 UTC (permalink / raw)
  To: laszlth; +Cc: vyasevich, nhorman, linux-sctp, netdev, lucien.xin
In-Reply-To: <20171023171933.GA4592@ubuntu-desk-vm>

From: Laszlo Toth <laszlth@gmail.com>
Date: Mon, 23 Oct 2017 19:19:33 +0200

> Commit 9b9742022888 ("sctp: support ipv6 nonlocal bind")
> introduced support for the above options as v4 sctp did,
> so patched sctp_v6_available().
> 
> In the v4 implementation it's enough, because
> sctp_inet_bind_verify() just returns with sctp_v4_available().
> However sctp_inet6_bind_verify() has an extra check before that
> for link-local scope_id, which won't respect the above options.
> 
> Added the checks before calling ipv6_chk_addr(), but
> not before the validation of scope_id.
> 
> before (w/ both options):
>  ./v6test fe80::10 sctp
>  bind failed, errno: 99 (Cannot assign requested address)
>  ./v6test fe80::10 tcp
>  bind success, errno: 0 (Success)
> 
> after (w/ both options):
>  ./v6test fe80::10 sctp
>  bind success, errno: 0 (Success)
> 
> Signed-off-by: Laszlo Toth <laszlth@gmail.com>

Applied.

^ permalink raw reply

* Re: [net-next PATCH] bpf: cpumap fix potential lost wake-up problem
From: David Miller @ 2017-10-24  9:40 UTC (permalink / raw)
  To: brouer; +Cc: netdev, mst, riel, borkmann, alexei.starovoitov
In-Reply-To: <150878036830.4768.8540758939081367484.stgit@firesoul>

From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Mon, 23 Oct 2017 19:39:28 +0200

> As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff
> to skb conversion and allocation") contains a classical example of the
> potential lost wake-up problem.
> 
> We need to recheck the condition __ptr_ring_empty() after changing
> current->state to TASK_INTERRUPTIBLE, this avoids a race between
> wake_up_process() and schedule(). After this, a race with
> wake_up_process() will simply change the state to TASK_RUNNING, and
> the schedule() call not really put us to sleep.
> 
> Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation")
> Reported-by: "Michael S. Tsirkin" <mst@redhat.com>

Applied.

^ permalink raw reply

* [PATCH net 1/3] net: mvpp2: fix typo in the tcam setup
From: Antoine Tenart @ 2017-10-24  9:41 UTC (permalink / raw)
  To: davem
  Cc: Antoine Tenart, andrew, gregory.clement, thomas.petazzoni,
	miquel.raynal, nadavh, linux-kernel, mw, stefanc, netdev

This patch fixes a typo in the mvpp2_prs_tcam_data_cmp() function, as
the shift value is inverted with the data.

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 8621e835f362..2b79b570f4e5 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -1539,7 +1539,7 @@ static bool mvpp2_prs_tcam_data_cmp(struct mvpp2_prs_entry *pe, int offs,
 	int off = MVPP2_PRS_TCAM_DATA_BYTE(offs);
 	u16 tcam_data;
 
-	tcam_data = (8 << pe->tcam.byte[off + 1]) | pe->tcam.byte[off];
+	tcam_data = (pe->tcam.byte[off + 1] << 8) | pe->tcam.byte[off];
 	if (tcam_data != data)
 		return false;
 	return true;
-- 
2.14.2

^ permalink raw reply related

* [PATCH net 2/3] net: mvpp2: fix invalid parameters order when calling the tcam init
From: Antoine Tenart @ 2017-10-24  9:41 UTC (permalink / raw)
  To: davem
  Cc: Antoine Tenart, andrew, gregory.clement, thomas.petazzoni,
	miquel.raynal, nadavh, linux-kernel, mw, stefanc, netdev
In-Reply-To: <20171024094128.24433-1-antoine.tenart@free-electrons.com>

When calling mvpp2_prs_mac_multi_set() from mvpp2_prs_mac_init(), two
parameters (the port index and the table index) are inverted. Fixes
this.

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 2b79b570f4e5..5aa57c035ed8 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -2614,8 +2614,8 @@ static void mvpp2_prs_mac_init(struct mvpp2 *priv)
 	/* place holders only - no ports */
 	mvpp2_prs_mac_drop_all_set(priv, 0, false);
 	mvpp2_prs_mac_promisc_set(priv, 0, false);
-	mvpp2_prs_mac_multi_set(priv, MVPP2_PE_MAC_MC_ALL, 0, false);
-	mvpp2_prs_mac_multi_set(priv, MVPP2_PE_MAC_MC_IP6, 0, false);
+	mvpp2_prs_mac_multi_set(priv, 0, MVPP2_PE_MAC_MC_ALL, false);
+	mvpp2_prs_mac_multi_set(priv, 0, MVPP2_PE_MAC_MC_IP6, false);
 }
 
 /* Set default entries for various types of dsa packets */
-- 
2.14.2

^ permalink raw reply related

* [PATCH net 3/3] net: mvpp2: do not sleep in set_rx_mode
From: Antoine Tenart @ 2017-10-24  9:41 UTC (permalink / raw)
  To: davem
  Cc: Antoine Tenart, andrew, gregory.clement, thomas.petazzoni,
	miquel.raynal, nadavh, linux-kernel, mw, stefanc, netdev
In-Reply-To: <20171024094128.24433-1-antoine.tenart@free-electrons.com>

This patch replaces GFP_KERNEL by GFP_ATOMIC to avoid sleeping in the
ndo_set_rx_mode() call which is called with BH disabled.

Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 5aa57c035ed8..a3231fe98384 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -3396,7 +3396,7 @@ mvpp2_prs_mac_da_range_find(struct mvpp2 *priv, int pmap, const u8 *da,
 	struct mvpp2_prs_entry *pe;
 	int tid;
 
-	pe = kzalloc(sizeof(*pe), GFP_KERNEL);
+	pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
 	if (!pe)
 		return NULL;
 	mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
@@ -3458,7 +3458,7 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2 *priv, int port,
 		if (tid < 0)
 			return tid;
 
-		pe = kzalloc(sizeof(*pe), GFP_KERNEL);
+		pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
 		if (!pe)
 			return -ENOMEM;
 		mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
-- 
2.14.2

^ permalink raw reply related

* Re: [PATCH net-next] net: dsa: check master device before put
From: David Miller @ 2017-10-24  9:43 UTC (permalink / raw)
  To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20171023180141.3674-1-vivien.didelot@savoirfairelinux.com>

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Mon, 23 Oct 2017 14:01:41 -0400

> In the case of pdata, the dsa_cpu_parse function calls dev_put() before
> making sure it isn't NULL. Fix this.
> 
> Fixes: 71e0bbde0d88 ("net: dsa: Add support for platform data")
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Please submit a 'net' version of this patch and then please patiently
wait for it to be properly merged and propagated into 'net-next'.

Thank you.

^ permalink raw reply

* Re: [PATCH] ipv4: icmp: use BUG_ON instead of if condition followed by BUG
From: David Miller @ 2017-10-24  9:45 UTC (permalink / raw)
  To: garsilva; +Cc: kuznet, yoshfuji, netdev, linux-kernel
In-Reply-To: <20171023180814.GA25198@embeddedor.com>

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Mon, 23 Oct 2017 13:08:14 -0500

> Use BUG_ON instead of if condition followed by BUG in icmp_timestamp.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied.

^ permalink raw reply

* Re: [PATCH] ipv4: tcp_minisocks: use BUG_ON instead of if condition followed by BUG
From: David Miller @ 2017-10-24  9:45 UTC (permalink / raw)
  To: garsilva; +Cc: kuznet, yoshfuji, netdev, linux-kernel
In-Reply-To: <20171023181056.GA25239@embeddedor.com>

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Mon, 23 Oct 2017 13:10:56 -0500

> Use BUG_ON instead of if condition followed by BUG in tcp_time_wait.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied.

^ permalink raw reply

* RE: [PATCH] net: tipc: Convert timers to use timer_setup()
From: Jon Maloy @ 2017-10-24  9:44 UTC (permalink / raw)
  To: Kees Cook, David S. Miller
  Cc: Ying Xue, netdev@vger.kernel.org,
	tipc-discussion@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
In-Reply-To: <20171024084637.GA23944@beast>

NAK. It doesn't sound like a good idea to send this to net. Especially since one of these timers has already been refactored in net-next.

///jon


> -----Original Message-----
> From: Kees Cook [mailto:keescook@chromium.org]
> Sent: Tuesday, October 24, 2017 10:47
> To: David S. Miller <davem@davemloft.net>
> Cc: Jon Maloy <jon.maloy@ericsson.com>; Ying Xue
> <ying.xue@windriver.com>; netdev@vger.kernel.org; tipc-
> discussion@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: [PATCH] net: tipc: Convert timers to use timer_setup()
> 
> In preparation for unconditionally passing the struct timer_list pointer to all
> timer callbacks, switch to using the new timer_setup() and from_timer() to
> pass the timer pointer explicitly.
> 
> Cc: Jon Maloy <jon.maloy@ericsson.com>
> Cc: Ying Xue <ying.xue@windriver.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: netdev@vger.kernel.org
> Cc: tipc-discussion@lists.sourceforge.net
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  net/tipc/discover.c |  6 +++---
>  net/tipc/monitor.c  |  6 +++---
>  net/tipc/node.c     |  8 ++++----
>  net/tipc/socket.c   | 10 +++++-----
>  net/tipc/subscr.c   |  6 +++---
>  5 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/net/tipc/discover.c b/net/tipc/discover.c index
> 02462d67d191..92e4828c6b09 100644
> --- a/net/tipc/discover.c
> +++ b/net/tipc/discover.c
> @@ -224,9 +224,9 @@ void tipc_disc_remove_dest(struct tipc_link_req
> *req)
>   *
>   * Called whenever a link setup request timer associated with a bearer
> expires.
>   */
> -static void disc_timeout(unsigned long data)
> +static void disc_timeout(struct timer_list *t)
>  {
> -	struct tipc_link_req *req = (struct tipc_link_req *)data;
> +	struct tipc_link_req *req = from_timer(req, t, timer);
>  	struct sk_buff *skb;
>  	int max_delay;
> 
> @@ -292,7 +292,7 @@ int tipc_disc_create(struct net *net, struct
> tipc_bearer *b,
>  	req->num_nodes = 0;
>  	req->timer_intv = TIPC_LINK_REQ_INIT;
>  	spin_lock_init(&req->lock);
> -	setup_timer(&req->timer, disc_timeout, (unsigned long)req);
> +	timer_setup(&req->timer, disc_timeout, 0);
>  	mod_timer(&req->timer, jiffies + req->timer_intv);
>  	b->link_req = req;
>  	*skb = skb_clone(req->buf, GFP_ATOMIC); diff --git
> a/net/tipc/monitor.c b/net/tipc/monitor.c index
> 9e109bb1a207..b9c32557d73c 100644
> --- a/net/tipc/monitor.c
> +++ b/net/tipc/monitor.c
> @@ -578,9 +578,9 @@ void tipc_mon_get_state(struct net *net, u32 addr,
>  	read_unlock_bh(&mon->lock);
>  }
> 
> -static void mon_timeout(unsigned long m)
> +static void mon_timeout(struct timer_list *t)
>  {
> -	struct tipc_monitor *mon = (void *)m;
> +	struct tipc_monitor *mon = from_timer(mon, t, timer);
>  	struct tipc_peer *self;
>  	int best_member_cnt = dom_size(mon->peer_cnt) - 1;
> 
> @@ -623,7 +623,7 @@ int tipc_mon_create(struct net *net, int bearer_id)
>  	self->is_up = true;
>  	self->is_head = true;
>  	INIT_LIST_HEAD(&self->list);
> -	setup_timer(&mon->timer, mon_timeout, (unsigned long)mon);
> +	timer_setup(&mon->timer, mon_timeout, 0);
>  	mon->timer_intv = msecs_to_jiffies(MON_TIMEOUT + (tn->random
> & 0xffff));
>  	mod_timer(&mon->timer, jiffies + mon->timer_intv);
>  	return 0;
> diff --git a/net/tipc/node.c b/net/tipc/node.c index
> 89f8ac73bf65..009a81631280 100644
> --- a/net/tipc/node.c
> +++ b/net/tipc/node.c
> @@ -153,7 +153,7 @@ static void tipc_node_link_down(struct tipc_node *n,
> int bearer_id,
>  				bool delete);
>  static void node_lost_contact(struct tipc_node *n, struct sk_buff_head
> *inputq);  static void tipc_node_delete(struct tipc_node *node); -static void
> tipc_node_timeout(unsigned long data);
> +static void tipc_node_timeout(struct timer_list *t);
>  static void tipc_node_fsm_evt(struct tipc_node *n, int evt);  static struct
> tipc_node *tipc_node_find(struct net *net, u32 addr);  static void
> tipc_node_put(struct tipc_node *node); @@ -361,7 +361,7 @@ struct
> tipc_node *tipc_node_create(struct net *net, u32 addr, u16 capabilities)
>  		goto exit;
>  	}
>  	tipc_node_get(n);
> -	setup_timer(&n->timer, tipc_node_timeout, (unsigned long)n);
> +	timer_setup(&n->timer, tipc_node_timeout, 0);
>  	n->keepalive_intv = U32_MAX;
>  	hlist_add_head_rcu(&n->hash, &tn-
> >node_htable[tipc_hashfn(addr)]);
>  	list_for_each_entry_rcu(temp_node, &tn->node_list, list) { @@ -
> 500,9 +500,9 @@ void tipc_node_remove_conn(struct net *net, u32 dnode,
> u32 port)
> 
>  /* tipc_node_timeout - handle expiration of node timer
>   */
> -static void tipc_node_timeout(unsigned long data)
> +static void tipc_node_timeout(struct timer_list *t)
>  {
> -	struct tipc_node *n = (struct tipc_node *)data;
> +	struct tipc_node *n = from_timer(n, t, timer);
>  	struct tipc_link_entry *le;
>  	struct sk_buff_head xmitq;
>  	int bearer_id;
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c index
> b3b72d8e9543..6387839f643d 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -125,7 +125,7 @@ static void tipc_sock_destruct(struct sock *sk);  static
> int tipc_release(struct socket *sock);  static int tipc_accept(struct socket
> *sock, struct socket *new_sock, int flags,
>  		       bool kern);
> -static void tipc_sk_timeout(unsigned long data);
> +static void tipc_sk_timeout(struct timer_list *t);
>  static int tipc_sk_publish(struct tipc_sock *tsk, uint scope,
>  			   struct tipc_name_seq const *seq);  static int
> tipc_sk_withdraw(struct tipc_sock *tsk, uint scope, @@ -464,7 +464,7 @@
> static int tipc_sk_create(struct net *net, struct socket *sock,
>  		      NAMED_H_SIZE, 0);
> 
>  	msg_set_origport(msg, tsk->portid);
> -	setup_timer(&sk->sk_timer, tipc_sk_timeout, (unsigned long)tsk);
> +	timer_setup(&sk->sk_timer, tipc_sk_timeout, 0);
>  	sk->sk_shutdown = 0;
>  	sk->sk_backlog_rcv = tipc_sk_backlog_rcv;
>  	sk->sk_rcvbuf = sysctl_tipc_rmem[1];
> @@ -2530,14 +2530,14 @@ static int tipc_shutdown(struct socket *sock, int
> how)
>  	return res;
>  }
> 
> -static void tipc_sk_timeout(unsigned long data)
> +static void tipc_sk_timeout(struct timer_list *t)
>  {
> -	struct tipc_sock *tsk = (struct tipc_sock *)data;
> +	struct sock *sk = from_timer(sk, t, sk_timer);
> +	struct tipc_sock *tsk = tipc_sk(sk);
>  	u32 peer_port = tsk_peer_port(tsk);
>  	u32 peer_node = tsk_peer_node(tsk);
>  	u32 own_node = tsk_own_node(tsk);
>  	u32 own_port = tsk->portid;
> -	struct sock *sk = &tsk->sk;
>  	struct net *net = sock_net(sk);
>  	struct sk_buff *skb = NULL;
> 
> diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index
> be3d9e3183dc..251065dfd8df 100644
> --- a/net/tipc/subscr.c
> +++ b/net/tipc/subscr.c
> @@ -133,9 +133,9 @@ void tipc_subscrp_report_overlap(struct
> tipc_subscription *sub, u32 found_lower,
>  				node);
>  }
> 
> -static void tipc_subscrp_timeout(unsigned long data)
> +static void tipc_subscrp_timeout(struct timer_list *t)
>  {
> -	struct tipc_subscription *sub = (struct tipc_subscription *)data;
> +	struct tipc_subscription *sub = from_timer(sub, t, timer);
>  	struct tipc_subscriber *subscriber = sub->subscriber;
> 
>  	spin_lock_bh(&subscriber->lock);
> @@ -303,7 +303,7 @@ static void tipc_subscrp_subscribe(struct net *net,
> struct tipc_subscr *s,
>  	tipc_subscrb_get(subscriber);
>  	spin_unlock_bh(&subscriber->lock);
> 
> -	setup_timer(&sub->timer, tipc_subscrp_timeout, (unsigned
> long)sub);
> +	timer_setup(&sub->timer, tipc_subscrp_timeout, 0);
>  	timeout = htohl(sub->evt.s.timeout, swap);
> 
>  	if (timeout != TIPC_WAIT_FOREVER)
> --
> 2.7.4
> 
> 
> --
> Kees Cook
> Pixel Security

^ permalink raw reply

* Re: [PATCH v3] net/sock: Update sk rcu iterator macro.
From: David Miller @ 2017-10-24  9:46 UTC (permalink / raw)
  To: devtimhansen; +Cc: netdev, linux-kernel, alexander.levin
In-Reply-To: <20171023193558.fhjoxerpzq6pqbo7@debian>

From: Tim Hansen <devtimhansen@gmail.com>
Date: Mon, 23 Oct 2017 15:35:58 -0400

> Mark hlist node in sk rcu iterator as protected by the rcu.
> hlist_next_rcu accomplishes this and silences the warnings
> sparse throws.
> 
> Found with make C=1 net/ipv4/udp.o on linux-next tag 
> next-20171009.
> 
> Signed-off-by: Tim Hansen <devtimhansen@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] ipv6: add ip6_null_entry check in rt6_select()
From: David Miller @ 2017-10-24  9:52 UTC (permalink / raw)
  To: weiwan; +Cc: netdev, edumazet, kafai
In-Reply-To: <20171023215935.52136-1-tracywwnj@gmail.com>

From: Wei Wang <weiwan@google.com>
Date: Mon, 23 Oct 2017 14:59:35 -0700

> From: Wei Wang <weiwan@google.com>
> 
> In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry.
> In this case, we should directly return instead of trying to carry on
> with the rest of the process.
> If not, we could crash at:
>   spin_lock_bh(&leaf->rt6i_table->rt6_lock);
> because net->ipv6.ip6_null_entry does not have rt6i_table set.
 ...
> Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table")
> Signed-off-by: Wei Wang <weiwan@google.com>
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 net] tcp/dccp: fix other lockdep splats accessing ireq_opt
From: David Miller @ 2017-10-24  9:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: fengguang.wu, netdev
In-Reply-To: <1508800508.30291.104.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 23 Oct 2017 16:15:08 -0700

> +static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq)
> +{
> +	return rcu_dereference_check(ireq->ireq_opt,
> +				     refcount_read(&ireq.req->rsk_refcnt) > 0);
                                                    ^^^^^^^^^

Eric, _please_ build test your changes properly.

^ permalink raw reply

* Re: [PATCH V3 net-next] liquidio: pass date and time info to NIC firmware
From: David Miller @ 2017-10-24  9:57 UTC (permalink / raw)
  To: felix.manlunas
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	veerasenareddy.burru
In-Reply-To: <20171024033325.GA17455@felix-thinkpad.cavium.com>

From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Mon, 23 Oct 2017 20:33:25 -0700

> From: Veerasenareddy Burru <veerasenareddy.burru@cavium.com>
> 
> Pass date and time information to NIC at the time of loading
> firmware and periodically update the host time to NIC firmware.
> This is to make NIC firmware use the same time reference as Host,
> so that it is easy to correlate logs from firmware and host for debugging.
> 
> Signed-off-by: Veerasenareddy Burru <veerasenareddy.burru@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>

Applied.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox