diff options
| author | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-05-02 22:14:21 -0400 |
| commit | ff24e4980a68d83090a02fda081741a410fe8eef (patch) | |
| tree | 4d874dfcaf2bb8c3abc2446af9447a983402c0ae /drivers/net/wireless/ath | |
| parent | 26f146ed971c0e4a264ce525d7a66a71ef73690d (diff) | |
| parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ath')
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/ce.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/core.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/core.h | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/coredump.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 24 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.h | 2 |
7 files changed, 31 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 24b983edb357..eca87f7c5b6c 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c | |||
| @@ -1855,7 +1855,7 @@ void ath10k_ce_dump_registers(struct ath10k *ar, | |||
| 1855 | struct ath10k_ce_crash_data ce_data; | 1855 | struct ath10k_ce_crash_data ce_data; |
| 1856 | u32 addr, id; | 1856 | u32 addr, id; |
| 1857 | 1857 | ||
| 1858 | lockdep_assert_held(&ar->data_lock); | 1858 | lockdep_assert_held(&ar->dump_mutex); |
| 1859 | 1859 | ||
| 1860 | ath10k_err(ar, "Copy Engine register dump:\n"); | 1860 | ath10k_err(ar, "Copy Engine register dump:\n"); |
| 1861 | 1861 | ||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 835b8de92d55..aff585658fc0 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c | |||
| @@ -3119,6 +3119,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev, | |||
| 3119 | goto err_free_wq; | 3119 | goto err_free_wq; |
| 3120 | 3120 | ||
| 3121 | mutex_init(&ar->conf_mutex); | 3121 | mutex_init(&ar->conf_mutex); |
| 3122 | mutex_init(&ar->dump_mutex); | ||
| 3122 | spin_lock_init(&ar->data_lock); | 3123 | spin_lock_init(&ar->data_lock); |
| 3123 | 3124 | ||
| 3124 | INIT_LIST_HEAD(&ar->peers); | 3125 | INIT_LIST_HEAD(&ar->peers); |
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index e08a17b01e03..e35aae5146f1 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
| @@ -1063,6 +1063,9 @@ struct ath10k { | |||
| 1063 | /* prevents concurrent FW reconfiguration */ | 1063 | /* prevents concurrent FW reconfiguration */ |
| 1064 | struct mutex conf_mutex; | 1064 | struct mutex conf_mutex; |
| 1065 | 1065 | ||
| 1066 | /* protects coredump data */ | ||
| 1067 | struct mutex dump_mutex; | ||
| 1068 | |||
| 1066 | /* protects shared structure data */ | 1069 | /* protects shared structure data */ |
| 1067 | spinlock_t data_lock; | 1070 | spinlock_t data_lock; |
| 1068 | 1071 | ||
diff --git a/drivers/net/wireless/ath/ath10k/coredump.c b/drivers/net/wireless/ath/ath10k/coredump.c index 33838d9c1cb6..45a355fb62b9 100644 --- a/drivers/net/wireless/ath/ath10k/coredump.c +++ b/drivers/net/wireless/ath/ath10k/coredump.c | |||
| @@ -1102,7 +1102,7 @@ struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar) | |||
| 1102 | { | 1102 | { |
| 1103 | struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data; | 1103 | struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data; |
| 1104 | 1104 | ||
| 1105 | lockdep_assert_held(&ar->data_lock); | 1105 | lockdep_assert_held(&ar->dump_mutex); |
| 1106 | 1106 | ||
| 1107 | if (ath10k_coredump_mask == 0) | 1107 | if (ath10k_coredump_mask == 0) |
| 1108 | /* coredump disabled */ | 1108 | /* coredump disabled */ |
| @@ -1146,7 +1146,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar) | |||
| 1146 | if (!buf) | 1146 | if (!buf) |
| 1147 | return NULL; | 1147 | return NULL; |
| 1148 | 1148 | ||
| 1149 | spin_lock_bh(&ar->data_lock); | 1149 | mutex_lock(&ar->dump_mutex); |
| 1150 | 1150 | ||
| 1151 | dump_data = (struct ath10k_dump_file_data *)(buf); | 1151 | dump_data = (struct ath10k_dump_file_data *)(buf); |
| 1152 | strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP", | 1152 | strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP", |
| @@ -1213,7 +1213,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar) | |||
| 1213 | sofar += sizeof(*dump_tlv) + crash_data->ramdump_buf_len; | 1213 | sofar += sizeof(*dump_tlv) + crash_data->ramdump_buf_len; |
| 1214 | } | 1214 | } |
| 1215 | 1215 | ||
| 1216 | spin_unlock_bh(&ar->data_lock); | 1216 | mutex_unlock(&ar->dump_mutex); |
| 1217 | 1217 | ||
| 1218 | return dump_data; | 1218 | return dump_data; |
| 1219 | } | 1219 | } |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 41e89db244d2..9c703d287333 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
| @@ -5774,7 +5774,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, | |||
| 5774 | } | 5774 | } |
| 5775 | 5775 | ||
| 5776 | if (changed & BSS_CHANGED_MCAST_RATE && | 5776 | if (changed & BSS_CHANGED_MCAST_RATE && |
| 5777 | !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { | 5777 | !ath10k_mac_vif_chan(arvif->vif, &def)) { |
| 5778 | band = def.chan->band; | 5778 | band = def.chan->band; |
| 5779 | rateidx = vif->bss_conf.mcast_rate[band] - 1; | 5779 | rateidx = vif->bss_conf.mcast_rate[band] - 1; |
| 5780 | 5780 | ||
| @@ -5812,7 +5812,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, | |||
| 5812 | } | 5812 | } |
| 5813 | 5813 | ||
| 5814 | if (changed & BSS_CHANGED_BASIC_RATES) { | 5814 | if (changed & BSS_CHANGED_BASIC_RATES) { |
| 5815 | if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) { | 5815 | if (ath10k_mac_vif_chan(vif, &def)) { |
| 5816 | mutex_unlock(&ar->conf_mutex); | 5816 | mutex_unlock(&ar->conf_mutex); |
| 5817 | return; | 5817 | return; |
| 5818 | } | 5818 | } |
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 271f92c24d44..2c27f407a851 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c | |||
| @@ -1441,7 +1441,7 @@ static void ath10k_pci_dump_registers(struct ath10k *ar, | |||
| 1441 | __le32 reg_dump_values[REG_DUMP_COUNT_QCA988X] = {}; | 1441 | __le32 reg_dump_values[REG_DUMP_COUNT_QCA988X] = {}; |
| 1442 | int i, ret; | 1442 | int i, ret; |
| 1443 | 1443 | ||
| 1444 | lockdep_assert_held(&ar->data_lock); | 1444 | lockdep_assert_held(&ar->dump_mutex); |
| 1445 | 1445 | ||
| 1446 | ret = ath10k_pci_diag_read_hi(ar, ®_dump_values[0], | 1446 | ret = ath10k_pci_diag_read_hi(ar, ®_dump_values[0], |
| 1447 | hi_failure_state, | 1447 | hi_failure_state, |
| @@ -1656,7 +1656,7 @@ static void ath10k_pci_dump_memory(struct ath10k *ar, | |||
| 1656 | int ret, i; | 1656 | int ret, i; |
| 1657 | u8 *buf; | 1657 | u8 *buf; |
| 1658 | 1658 | ||
| 1659 | lockdep_assert_held(&ar->data_lock); | 1659 | lockdep_assert_held(&ar->dump_mutex); |
| 1660 | 1660 | ||
| 1661 | if (!crash_data) | 1661 | if (!crash_data) |
| 1662 | return; | 1662 | return; |
| @@ -1734,14 +1734,19 @@ static void ath10k_pci_dump_memory(struct ath10k *ar, | |||
| 1734 | } | 1734 | } |
| 1735 | } | 1735 | } |
| 1736 | 1736 | ||
| 1737 | static void ath10k_pci_fw_crashed_dump(struct ath10k *ar) | 1737 | static void ath10k_pci_fw_dump_work(struct work_struct *work) |
| 1738 | { | 1738 | { |
| 1739 | struct ath10k_pci *ar_pci = container_of(work, struct ath10k_pci, | ||
| 1740 | dump_work); | ||
| 1739 | struct ath10k_fw_crash_data *crash_data; | 1741 | struct ath10k_fw_crash_data *crash_data; |
| 1742 | struct ath10k *ar = ar_pci->ar; | ||
| 1740 | char guid[UUID_STRING_LEN + 1]; | 1743 | char guid[UUID_STRING_LEN + 1]; |
| 1741 | 1744 | ||
| 1742 | spin_lock_bh(&ar->data_lock); | 1745 | mutex_lock(&ar->dump_mutex); |
| 1743 | 1746 | ||
| 1747 | spin_lock_bh(&ar->data_lock); | ||
| 1744 | ar->stats.fw_crash_counter++; | 1748 | ar->stats.fw_crash_counter++; |
| 1749 | spin_unlock_bh(&ar->data_lock); | ||
| 1745 | 1750 | ||
| 1746 | crash_data = ath10k_coredump_new(ar); | 1751 | crash_data = ath10k_coredump_new(ar); |
| 1747 | 1752 | ||
| @@ -1756,11 +1761,18 @@ static void ath10k_pci_fw_crashed_dump(struct ath10k *ar) | |||
| 1756 | ath10k_ce_dump_registers(ar, crash_data); | 1761 | ath10k_ce_dump_registers(ar, crash_data); |
| 1757 | ath10k_pci_dump_memory(ar, crash_data); | 1762 | ath10k_pci_dump_memory(ar, crash_data); |
| 1758 | 1763 | ||
| 1759 | spin_unlock_bh(&ar->data_lock); | 1764 | mutex_unlock(&ar->dump_mutex); |
| 1760 | 1765 | ||
| 1761 | queue_work(ar->workqueue, &ar->restart_work); | 1766 | queue_work(ar->workqueue, &ar->restart_work); |
| 1762 | } | 1767 | } |
| 1763 | 1768 | ||
| 1769 | static void ath10k_pci_fw_crashed_dump(struct ath10k *ar) | ||
| 1770 | { | ||
| 1771 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | ||
| 1772 | |||
| 1773 | queue_work(ar->workqueue, &ar_pci->dump_work); | ||
| 1774 | } | ||
| 1775 | |||
| 1764 | void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe, | 1776 | void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe, |
| 1765 | int force) | 1777 | int force) |
| 1766 | { | 1778 | { |
| @@ -3442,6 +3454,8 @@ int ath10k_pci_setup_resource(struct ath10k *ar) | |||
| 3442 | spin_lock_init(&ar_pci->ps_lock); | 3454 | spin_lock_init(&ar_pci->ps_lock); |
| 3443 | mutex_init(&ar_pci->ce_diag_mutex); | 3455 | mutex_init(&ar_pci->ce_diag_mutex); |
| 3444 | 3456 | ||
| 3457 | INIT_WORK(&ar_pci->dump_work, ath10k_pci_fw_dump_work); | ||
| 3458 | |||
| 3445 | timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0); | 3459 | timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0); |
| 3446 | 3460 | ||
| 3447 | if (QCA_REV_6174(ar) || QCA_REV_9377(ar)) | 3461 | if (QCA_REV_6174(ar) || QCA_REV_9377(ar)) |
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index 3773c79f322f..4455ed6c5275 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h | |||
| @@ -121,6 +121,8 @@ struct ath10k_pci { | |||
| 121 | /* For protecting ce_diag */ | 121 | /* For protecting ce_diag */ |
| 122 | struct mutex ce_diag_mutex; | 122 | struct mutex ce_diag_mutex; |
| 123 | 123 | ||
| 124 | struct work_struct dump_work; | ||
| 125 | |||
| 124 | struct ath10k_ce ce; | 126 | struct ath10k_ce ce; |
| 125 | struct timer_list rx_post_retry; | 127 | struct timer_list rx_post_retry; |
| 126 | 128 | ||
