From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Stefan Wahren <stefan.wahren@in-tech.com>,
Stefan Wahren <wahrenst@gmx.net>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 221/251] net: qca_spi: Move reset_count to struct qcaspi
Date: Thu, 16 Jan 2020 12:36:10 -0500 [thread overview]
Message-ID: <20200116173641.22137-181-sashal@kernel.org> (raw)
In-Reply-To: <20200116173641.22137-1-sashal@kernel.org>
From: Stefan Wahren <stefan.wahren@in-tech.com>
[ Upstream commit bc19c32904e36548335b35fdce6ce734e20afc0a ]
The reset counter is specific for every QCA700x chip. So move this
into the private driver struct. Otherwise we get unpredictable reset
behavior in setups with multiple QCA700x chips.
Fixes: 291ab06ecf67 (net: qualcomm: new Ethernet over SPI driver for QCA7000)
Signed-off-by: Stefan Wahren <stefan.wahren@in-tech.com>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/qualcomm/qca_spi.c | 9 ++++-----
drivers/net/ethernet/qualcomm/qca_spi.h | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
index 21f546587e3d..31583d6f044f 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
@@ -438,7 +438,6 @@ qcaspi_qca7k_sync(struct qcaspi *qca, int event)
u16 signature = 0;
u16 spi_config;
u16 wrbuf_space = 0;
- static u16 reset_count;
if (event == QCASPI_EVENT_CPUON) {
/* Read signature twice, if not valid
@@ -491,13 +490,13 @@ qcaspi_qca7k_sync(struct qcaspi *qca, int event)
qca->sync = QCASPI_SYNC_RESET;
qca->stats.trig_reset++;
- reset_count = 0;
+ qca->reset_count = 0;
break;
case QCASPI_SYNC_RESET:
- reset_count++;
+ qca->reset_count++;
netdev_dbg(qca->net_dev, "sync: waiting for CPU on, count %u.\n",
- reset_count);
- if (reset_count >= QCASPI_RESET_TIMEOUT) {
+ qca->reset_count);
+ if (qca->reset_count >= QCASPI_RESET_TIMEOUT) {
/* reset did not seem to take place, try again */
qca->sync = QCASPI_SYNC_UNKNOWN;
qca->stats.reset_timeout++;
diff --git a/drivers/net/ethernet/qualcomm/qca_spi.h b/drivers/net/ethernet/qualcomm/qca_spi.h
index 6e31a0e744a4..c48c314ca4df 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.h
+++ b/drivers/net/ethernet/qualcomm/qca_spi.h
@@ -97,6 +97,7 @@ struct qcaspi {
unsigned int intr_req;
unsigned int intr_svc;
+ u16 reset_count;
#ifdef CONFIG_DEBUG_FS
struct dentry *device_root;
--
2.20.1
next prev parent reply other threads:[~2020-01-16 18:02 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200116173641.22137-1-sashal@kernel.org>
2020-01-16 17:33 ` [PATCH AUTOSEL 4.9 047/251] iwlwifi: mvm: fix A-MPDU reference assignment Sasha Levin
2020-01-16 17:33 ` [PATCH AUTOSEL 4.9 055/251] iwlwifi: mvm: fix RSS config command Sasha Levin
2020-01-16 17:33 ` [PATCH AUTOSEL 4.9 059/251] net: phy: fixed_phy: Fix fixed_phy not checking GPIO Sasha Levin
2020-01-16 17:33 ` [PATCH AUTOSEL 4.9 079/251] net: dsa: qca8k: Enable delay for RGMII_ID mode Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 095/251] net: sh_eth: fix a missing check of of_get_phy_mode Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 102/251] tipc: tipc clang warning Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 109/251] dccp: Fix memleak in __feat_register_sp Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 112/251] ehea: Fix a copy-paste err in ehea_init_port_res Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 116/251] tipc: set sysctl_tipc_rmem and named_timeout right range Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 120/251] 6lowpan: Off by one handling ->nexthdr Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 123/251] packet: in recvmsg msg_name return at least sizeof sockaddr_ll Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 128/251] net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 129/251] net: ena: fix: Free napi resources when ena_up() fails Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 130/251] net: ena: fix incorrect test of supported hash function Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 131/251] net: ena: fix ena_com_fill_hash_function() implementation Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 133/251] l2tp: Fix possible NULL pointer dereference Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 137/251] netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule Sasha Levin
2020-01-16 17:34 ` [PATCH AUTOSEL 4.9 150/251] inet: frags: call inet_frags_fini() after unregister_pernet_subsys() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 154/251] net: netem: fix backlog accounting for corrupted GSO frames Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 155/251] net/af_iucv: always register net_device notifier Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 164/251] rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 167/251] net: pasemi: fix an use-after-free in pasemi_mac_phy_init() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 169/251] libertas_tf: Use correct channel range in lbtf_geo_init Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 170/251] qed: reduce maximum stack frame size Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 176/251] net/mlx5: Fix mlx5_ifc_query_lag_out_bits Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 186/251] mac80211: minstrel_ht: fix per-group max throughput rate initialization Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 196/251] ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 197/251] net: sonic: return NETDEV_TX_OK if failed to map buffer Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 200/251] net: sonic: replace dev_kfree_skb in sonic_send_packet Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 201/251] net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 203/251] net: hisilicon: Fix signedness bug in hix5hd2_dev_probe() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 204/251] net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 205/251] net: stmmac: dwmac-meson8b: Fix signedness bug in probe Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 206/251] of: mdio: Fix a signedness bug in of_phy_get_and_connect() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 207/251] net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse() Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 208/251] ipv6: Handle race in addrconf_dad_work Sasha Levin
2020-01-16 17:35 ` [PATCH AUTOSEL 4.9 210/251] net: stmmac: gmac4+: Not all Unicast addresses may be available Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 211/251] mac80211: accept deauth frames in IBSS mode Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 212/251] llc: fix another potential sk_buff leak in llc_ui_sendmsg() Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 213/251] llc: fix sk_buff refcounting in llc_conn_state_process() Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 214/251] net: stmmac: fix length of PTP clock's name string Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 215/251] act_mirred: Fix mirred_init_module error handling Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 219/251] net: netem: fix error path for corrupted GSO frames Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 220/251] net: netem: correct the parent's backlog when corrupted packet was dropped Sasha Levin
2020-01-16 17:36 ` Sasha Levin [this message]
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 224/251] mt7601u: fix bbp version check in mt7601u_wait_bbp_ready Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 228/251] cw1200: Fix a signedness bug in cw1200_load_firmware() Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 230/251] rtlwifi: Remove unnecessary NULL check in rtl_regd_init Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 236/251] net: neigh: use long type to store jiffies delta Sasha Levin
2020-01-16 17:36 ` [PATCH AUTOSEL 4.9 239/251] packet: fix data-race in fanout_flow_is_huge() Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200116173641.22137-181-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan.wahren@in-tech.com \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).