Message ID | 20190320100340.14168-13-sergey.matyukevich.os@quantenna.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | qtnfmac: regulatory rework and misc fixes | expand |
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes: > Fix creation of debugfs entries for qtnfmac wireless card: use separate > directories for different wireless cards. This commit enables support > for multiple qtnfmac wireless cards on the same PCIe host. > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > --- > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > index b561b75e4433..56fc6d49c121 100644 > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) > > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > { > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); > + char card_id[64]; > int ret; > > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > if (ret) { > pr_err("failed to attach core\n"); > } else { > - qtnf_debugfs_init(bus, DRV_NAME); > + snprintf(card_id, sizeof(card_id), "%s:%s", > + DRV_NAME, pci_name(priv->pdev)); Can you give an example for the path?
> > Fix creation of debugfs entries for qtnfmac wireless card: use separate > > directories for different wireless cards. This commit enables support > > for multiple qtnfmac wireless cards on the same PCIe host. > > > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > > --- > > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > index b561b75e4433..56fc6d49c121 100644 > > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) > > > > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > > { > > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); > > + char card_id[64]; > > int ret; > > > > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; > > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > > if (ret) { > > pr_err("failed to attach core\n"); > > } else { > > - qtnf_debugfs_init(bus, DRV_NAME); > > + snprintf(card_id, sizeof(card_id), "%s:%s", > > + DRV_NAME, pci_name(priv->pdev)); > > Can you give an example for the path? > For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 Regards, Sergey
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes: >> > Fix creation of debugfs entries for qtnfmac wireless card: use separate >> > directories for different wireless cards. This commit enables support >> > for multiple qtnfmac wireless cards on the same PCIe host. >> > >> > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> >> > --- >> > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- >> > 1 file changed, 5 insertions(+), 1 deletion(-) >> > >> > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> > index b561b75e4433..56fc6d49c121 100644 >> > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) >> > >> > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >> > { >> > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); >> > + char card_id[64]; >> > int ret; >> > >> > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; >> > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >> > if (ret) { >> > pr_err("failed to attach core\n"); >> > } else { >> > - qtnf_debugfs_init(bus, DRV_NAME); >> > + snprintf(card_id, sizeof(card_id), "%s:%s", >> > + DRV_NAME, pci_name(priv->pdev)); >> >> Can you give an example for the path? >> > > For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 TBH not really fond of that. What about "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used something like that. And please add an example path to the commit log.
Hello Kalle, > >> > Fix creation of debugfs entries for qtnfmac wireless card: use separate > >> > directories for different wireless cards. This commit enables support > >> > for multiple qtnfmac wireless cards on the same PCIe host. > >> > > >> > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > >> > --- > >> > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- > >> > 1 file changed, 5 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > >> > index b561b75e4433..56fc6d49c121 100644 > >> > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > >> > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > >> > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) > >> > > >> > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > >> > { > >> > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); > >> > + char card_id[64]; > >> > int ret; > >> > > >> > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; > >> > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > >> > if (ret) { > >> > pr_err("failed to attach core\n"); > >> > } else { > >> > - qtnf_debugfs_init(bus, DRV_NAME); > >> > + snprintf(card_id, sizeof(card_id), "%s:%s", > >> > + DRV_NAME, pci_name(priv->pdev)); > >> > >> Can you give an example for the path? > >> > > > > For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 > > TBH not really fond of that. What about > "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used > something like that. > > And please add an example path to the commit log. Ok, will be fixed and resubmitted in v2. Or, alternatively, if the other patches are ok for you, feel free to drop the questionable ones and apply all the others. I will rework the rejected pieces and resubmit them, adding more pending fixes. Regards, Sergey
On 3/21/2019 8:35 AM, Kalle Valo wrote: > Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes: > >>>> Fix creation of debugfs entries for qtnfmac wireless card: use separate >>>> directories for different wireless cards. This commit enables support >>>> for multiple qtnfmac wireless cards on the same PCIe host. >>>> >>>> Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> >>>> --- >>>> drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- >>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>> index b561b75e4433..56fc6d49c121 100644 >>>> --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>> +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>> @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) >>>> >>>> int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >>>> { >>>> + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); >>>> + char card_id[64]; >>>> int ret; >>>> >>>> bus->fw_state = QTNF_FW_STATE_BOOT_DONE; >>>> @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >>>> if (ret) { >>>> pr_err("failed to attach core\n"); >>>> } else { >>>> - qtnf_debugfs_init(bus, DRV_NAME); >>>> + snprintf(card_id, sizeof(card_id), "%s:%s", >>>> + DRV_NAME, pci_name(priv->pdev)); >>> >>> Can you give an example for the path? >>> >> >> For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 > > TBH not really fond of that. What about > "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used > something like that. In brcmfmac we used to have it like that, but I changed it to use wiphy debugfs, ie. /sys/kernel/debug/ieee80211/phyX/. Gr. AvS
> > > > > Fix creation of debugfs entries for qtnfmac wireless card: use separate > > > > > directories for different wireless cards. This commit enables support > > > > > for multiple qtnfmac wireless cards on the same PCIe host. > > > > > > > > > > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> > > > > > --- > > > > > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- > > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > > > > index b561b75e4433..56fc6d49c121 100644 > > > > > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > > > > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c > > > > > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) > > > > > > > > > > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > > > > > { > > > > > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); > > > > > + char card_id[64]; > > > > > int ret; > > > > > > > > > > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; > > > > > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) > > > > > if (ret) { > > > > > pr_err("failed to attach core\n"); > > > > > } else { > > > > > - qtnf_debugfs_init(bus, DRV_NAME); > > > > > + snprintf(card_id, sizeof(card_id), "%s:%s", > > > > > + DRV_NAME, pci_name(priv->pdev)); > > > > > > > > Can you give an example for the path? > > > > > > > > > > For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 > > > > TBH not really fond of that. What about > > "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used > > something like that. Hello Arend, > In brcmfmac we used to have it like that, but I changed it to use wiphy > debugfs, ie. /sys/kernel/debug/ieee80211/phyX/. Yes, I saw the patches for brcmfmac. In fact, looking at those patches we figured out that we have a problem before we started testing two cards in one pcie host :) But /sys/kernel/debug/eee80211/phyX approach does not fit well for our use-case. We may have up to 3 phy-s for single card, but counters exported via debugfs are for pcie device as a whole. Thanks, Sergey
Arend Van Spriel <arend.vanspriel@broadcom.com> writes: > On 3/21/2019 8:35 AM, Kalle Valo wrote: >> Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes: >> >>>>> Fix creation of debugfs entries for qtnfmac wireless card: use separate >>>>> directories for different wireless cards. This commit enables support >>>>> for multiple qtnfmac wireless cards on the same PCIe host. >>>>> >>>>> Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> >>>>> --- >>>>> drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- >>>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>>> index b561b75e4433..56fc6d49c121 100644 >>>>> --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>>> +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >>>>> @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) >>>>> >>>>> int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >>>>> { >>>>> + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); >>>>> + char card_id[64]; >>>>> int ret; >>>>> >>>>> bus->fw_state = QTNF_FW_STATE_BOOT_DONE; >>>>> @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >>>>> if (ret) { >>>>> pr_err("failed to attach core\n"); >>>>> } else { >>>>> - qtnf_debugfs_init(bus, DRV_NAME); >>>>> + snprintf(card_id, sizeof(card_id), "%s:%s", >>>>> + DRV_NAME, pci_name(priv->pdev)); >>>> >>>> Can you give an example for the path? >>>> >>> >>> For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 >> >> TBH not really fond of that. What about >> "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used >> something like that. > > In brcmfmac we used to have it like that, but I changed it to use > wiphy debugfs, ie. /sys/kernel/debug/ieee80211/phyX/. Yeah, that's much better.
Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> writes: > Hello Kalle, > >> >> > Fix creation of debugfs entries for qtnfmac wireless card: use separate >> >> > directories for different wireless cards. This commit enables support >> >> > for multiple qtnfmac wireless cards on the same PCIe host. >> >> > >> >> > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> >> >> > --- >> >> > drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- >> >> > 1 file changed, 5 insertions(+), 1 deletion(-) >> >> > >> >> > diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> >> > index b561b75e4433..56fc6d49c121 100644 >> >> > --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> >> > +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c >> >> > @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) >> >> > >> >> > int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >> >> > { >> >> > + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); >> >> > + char card_id[64]; >> >> > int ret; >> >> > >> >> > bus->fw_state = QTNF_FW_STATE_BOOT_DONE; >> >> > @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) >> >> > if (ret) { >> >> > pr_err("failed to attach core\n"); >> >> > } else { >> >> > - qtnf_debugfs_init(bus, DRV_NAME); >> >> > + snprintf(card_id, sizeof(card_id), "%s:%s", >> >> > + DRV_NAME, pci_name(priv->pdev)); >> >> >> >> Can you give an example for the path? >> >> >> > >> > For instance: /sys/kernel/debug/qtnfmac_pcie:0000:01:00.0 >> >> TBH not really fond of that. What about >> "/sys/kernel/debug/qtnfmac/pcie:0000:01:00.0"? IIRC iwlwifi used >> something like that. >> >> And please add an example path to the commit log. > > Ok, will be fixed and resubmitted in v2. Thanks. > Or, alternatively, if the other patches are ok for you, > feel free to drop the questionable ones and apply all > the others. I will rework the rejected pieces and > resubmit them, adding more pending fixes. A good point, that's easier. So I have dropped patch 12.
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c index b561b75e4433..56fc6d49c121 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c @@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data) int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) { + struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus); + char card_id[64]; int ret; bus->fw_state = QTNF_FW_STATE_BOOT_DONE; @@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus) if (ret) { pr_err("failed to attach core\n"); } else { - qtnf_debugfs_init(bus, DRV_NAME); + snprintf(card_id, sizeof(card_id), "%s:%s", + DRV_NAME, pci_name(priv->pdev)); + qtnf_debugfs_init(bus, card_id); qtnf_debugfs_add_entry(bus, "mps", qtnf_dbg_mps_show); qtnf_debugfs_add_entry(bus, "msi_enabled", qtnf_dbg_msi_show); qtnf_debugfs_add_entry(bus, "shm_stats", qtnf_dbg_shm_stats);
Fix creation of debugfs entries for qtnfmac wireless card: use separate directories for different wireless cards. This commit enables support for multiple qtnfmac wireless cards on the same PCIe host. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> --- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)