aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
commit2a3a028fc61d03e80ac57091330eb514280bd5be (patch)
treec0f98d752faa37fed4d11231f08d368dce120786 /drivers/net/wireless/intel/iwlwifi/fw/dbg.c
parent444fe991353987c1c9bc5ab1f903d01f1b4ad415 (diff)
parente6986423d28362aafe64d3757bbbc493f2687f8f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle init flow failures properly in iwlwifi driver, from Shahar S Matityahu. 2) mac80211 TXQs need to be unscheduled on powersave start, from Felix Fietkau. 3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau. 4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed. 5) Avoid checksum complete with XDP in mlx5, also from Saeed. 6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon. 7) Partial sent TLS record leak fix from Jakub Kicinski. 8) Reject zero size iova range in vhost, from Jason Wang. 9) Allow pending work to complete before clcsock release from Karsten Graul. 10) Fix XDP handling max MTU in thunderx, from Matteo Croce. 11) A lot of protocols look at the sa_family field of a sockaddr before validating it's length is large enough, from Tetsuo Handa. 12) Don't write to free'd pointer in qede ptp error path, from Colin Ian King. 13) Have to recompile IP options in ipv4_link_failure because it can be invoked from ARP, from Stephen Suryaputra. 14) Doorbell handling fixes in qed from Denis Bolotin. 15) Revert net-sysfs kobject register leak fix, it causes new problems. From Wang Hai. 16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva. 17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay Aleksandrov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits) socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW tcp: tcp_grow_window() needs to respect tcp_space() ocelot: Clean up stats update deferred work ocelot: Don't sleep in atomic context (irqs_disabled()) net: bridge: fix netlink export of vlan_stats_per_port option qed: fix spelling mistake "faspath" -> "fastpath" tipc: set sysctl_tipc_rmem and named_timeout right range tipc: fix link established but not in session net: Fix missing meta data in skb with vlan packet net: atm: Fix potential Spectre v1 vulnerabilities net/core: work around section mismatch warning for ptp_classifier net: bridge: fix per-port af_packet sockets bnx2x: fix spelling mistake "dicline" -> "decline" route: Avoid crash from dereferencing NULL rt->from MAINTAINERS: normalize Woojung Huh's email address bonding: fix event handling for stacked bonds Revert "net-sysfs: Fix memory leak in netdev_register_kobject" rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check qed: Fix the DORQ's attentions handling qed: Fix missing DORQ attentions ...
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/dbg.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index f119c49cd39c..d7380016f1c0 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -1614,6 +1614,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
1614 if (!range) { 1614 if (!range) {
1615 IWL_ERR(fwrt, "Failed to fill region header: id=%d, type=%d\n", 1615 IWL_ERR(fwrt, "Failed to fill region header: id=%d, type=%d\n",
1616 le32_to_cpu(reg->region_id), type); 1616 le32_to_cpu(reg->region_id), type);
1617 memset(*data, 0, le32_to_cpu((*data)->len));
1617 return; 1618 return;
1618 } 1619 }
1619 1620
@@ -1623,6 +1624,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
1623 if (range_size < 0) { 1624 if (range_size < 0) {
1624 IWL_ERR(fwrt, "Failed to dump region: id=%d, type=%d\n", 1625 IWL_ERR(fwrt, "Failed to dump region: id=%d, type=%d\n",
1625 le32_to_cpu(reg->region_id), type); 1626 le32_to_cpu(reg->region_id), type);
1627 memset(*data, 0, le32_to_cpu((*data)->len));
1626 return; 1628 return;
1627 } 1629 }
1628 range = range + range_size; 1630 range = range + range_size;
@@ -1807,12 +1809,12 @@ _iwl_fw_error_ini_dump(struct iwl_fw_runtime *fwrt,
1807 1809
1808 trigger = fwrt->dump.active_trigs[id].trig; 1810 trigger = fwrt->dump.active_trigs[id].trig;
1809 1811
1810 size = sizeof(*dump_file); 1812 size = iwl_fw_ini_get_trigger_len(fwrt, trigger);
1811 size += iwl_fw_ini_get_trigger_len(fwrt, trigger);
1812
1813 if (!size) 1813 if (!size)
1814 return NULL; 1814 return NULL;
1815 1815
1816 size += sizeof(*dump_file);
1817
1816 dump_file = vzalloc(size); 1818 dump_file = vzalloc(size);
1817 if (!dump_file) 1819 if (!dump_file)
1818 return NULL; 1820 return NULL;
@@ -1942,14 +1944,10 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
1942 iwl_dump_error_desc->len = 0; 1944 iwl_dump_error_desc->len = 0;
1943 1945
1944 ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, false, 0); 1946 ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, false, 0);
1945 if (ret) { 1947 if (ret)
1946 kfree(iwl_dump_error_desc); 1948 kfree(iwl_dump_error_desc);
1947 } else { 1949 else
1948 set_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status); 1950 iwl_trans_sync_nmi(fwrt->trans);
1949
1950 /* trigger nmi to halt the fw */
1951 iwl_force_nmi(fwrt->trans);
1952 }
1953 1951
1954 return ret; 1952 return ret;
1955} 1953}
@@ -2489,22 +2487,6 @@ IWL_EXPORT_SYMBOL(iwl_fw_dbg_apply_point);
2489 2487
2490void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt) 2488void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt)
2491{ 2489{
2492 /* if the wait event timeout elapses instead of wake up then
2493 * the driver did not receive NMI interrupt and can not assume the FW
2494 * is halted
2495 */
2496 int ret = wait_event_timeout(fwrt->trans->fw_halt_waitq,
2497 !test_bit(STATUS_FW_WAIT_DUMP,
2498 &fwrt->trans->status),
2499 msecs_to_jiffies(2000));
2500 if (!ret) {
2501 /* failed to receive NMI interrupt, assuming the FW is stuck */
2502 set_bit(STATUS_FW_ERROR, &fwrt->trans->status);
2503
2504 clear_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status);
2505 }
2506
2507 /* Assuming the op mode mutex is held at this point */
2508 iwl_fw_dbg_collect_sync(fwrt); 2490 iwl_fw_dbg_collect_sync(fwrt);
2509 2491
2510 iwl_trans_stop_device(fwrt->trans); 2492 iwl_trans_stop_device(fwrt->trans);