qtnfmac: add support for the new revision of qsr10g chip
cover qtnfmac: add support for the new revision of qsr10g chip
Hello Kalle and all,
Here are two patches adding support for the new revision of QSR10g chip. Major change from the driver perspective is a PCIe data path update.
Sergey Matyukevich (2):
qtnfmac: refactor data path to prepare for the next QSR10G chip revision
qtnfmac: add support for the new revision of QSR10g chip
drivers/net/wireless/quantenna/qtnfmac/bus.h | 3 +- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 4 +- .../wireless/quantenna/qtnfmac/pcie/pearl_pcie.c | 629 ++++++++++++++++----- .../quantenna/qtnfmac/pcie/pearl_pcie_ipc.h | 3 + .../quantenna/qtnfmac/pcie/pearl_pcie_regs.h | 33 +- .../net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 1 + drivers/net/wireless/quantenna/qtnfmac/util.c | 2 + 7 files changed, 517 insertions(+), 158 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/2 qtnfmac: prepare for the next chip revision
Data path operations may differ between chip revisions. Extract such operations and settings and into a separate structure in order to support multiple QSR10G chips revisions with single module. Remove data path counters specific to a single chip revision.
--- drivers/net/wireless/quantenna/qtnfmac/bus.h | 3 +- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +- .../wireless/quantenna/qtnfmac/pcie/pearl_pcie.c | 356 +++++++++++++-------- 3 files changed, 220 insertions(+), 142 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/bus.h +1 -2
@@ -52,8 +52,7 @@ struct qtnf_bus_ops {struct qtnf_bus {struct device *dev;enum qtnf_fw_state fw_state; -u32 chip; -u32 chiprev; +u32 chipid;struct qtnf_bus_ops *bus_ops;struct qtnf_wmac *mac[QTNF_MAX_MAC ];struct qtnf_qlink_transport trans;
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +2 -1
@@ -335,10 +335,11 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)if (!bus)return -ENOMEM ; + bus->fw_state =QTNF_FW_STATE_DETACHED ; + bus->chipid = chipid; pcie_priv =get_bus_priv (bus);pci_set_drvdata (pdev, bus); bus->dev = &pdev->dev; - bus->fw_state =QTNF_FW_STATE_DETACHED ; pcie_priv->pdev = pdev; pcie_priv->tx_stopped =0 ; pcie_priv->flashboot = flashboot;
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c +217 -139
465 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 2/2 qtnfmac: add support for the new revision of QSR10g chip
In reply to Sergey MatyukevichAdd support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
--- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 1 + .../wireless/quantenna/qtnfmac/pcie/pearl_pcie.c | 273 +++++++++++++++++++-- .../quantenna/qtnfmac/pcie/pearl_pcie_ipc.h | 3 + .../quantenna/qtnfmac/pcie/pearl_pcie_regs.h | 33 ++- .../net/wireless/quantenna/qtnfmac/qtn_hw_ids.h | 1 + drivers/net/wireless/quantenna/qtnfmac/util.c | 2 + 6 files changed, 297 insertions(+), 16 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +1 -0
@@ -322,6 +322,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)case QTN_CHIP_ID_PEARL :case QTN_CHIP_ID_PEARL_B :case QTN_CHIP_ID_PEARL_C : +case QTN_CHIP_ID_PEARL_C1 : bus =qtnf_pcie_pearl_alloc (pdev);break ;case QTN_CHIP_ID_TOPAZ :
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c +259 -14
363 lines not on this page · raw message
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie_ipc.h +3 -0
@@ -61,6 +61,9 @@#define QTN_ENET_ADDR_LENGTH 6 +#define QTN_HDP_BD_WRAP 0x8000 +#define QTN_HDP_DMA_PTR_SIZE (4 * sizeof(u64)) +#define QTN_TXDONE_MASK ((u32)0x80000000)#define QTN_GET_LEN (x) ((x) & 0xFFFF)
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie_regs.h +31 -2
@@ -4,7 +4,7 @@#ifndef __PEARL_PCIE_H#define __PEARL_PCIE_H -/* Pearl PCIe HDP registers */ +/* Pearl rev B PCIe HDP registers */ #define PCIE_HDP_CTRL (base) ((base) + 0x2c00)#define PCIE_HDP_AXI_CTRL (base) ((base) + 0x2c04)#define PCIE_HDP_HOST_WR_DESC0 (base) ((base) + 0x2c10)
@@ -60,7 +60,6 @@#define PCIE_HDP_RX3DMA_CNT (base) ((base) + 0x2d1c)#define PCIE_HDP_TX0DMA_CNT (base) ((base) + 0x2d20)#define PCIE_HDP_TX1DMA_CNT (base) ((base) + 0x2d24) -#define PCIE_HDP_RXDMA_CTRL (base) ((base) + 0x2d28)#define PCIE_HDP_TX_HOST_Q_SZ_CTRL (base) ((base) + 0x2d2c)#define PCIE_HDP_TX_HOST_Q_BASE_L (base) ((base) + 0x2d30)#define PCIE_HDP_TX_HOST_Q_BASE_H (base) ((base) + 0x2d34)
@@ -68,6 +67,36 @@#define PCIE_HDP_TX_HOST_Q_RD_PTR (base) ((base) + 0x2d3c)#define PCIE_HDP_TX_HOST_Q_STS (base) ((base) + 0x2d40) +#define PCIE_HDP_TX_DMA_CTRL (base) ((base) + 0x2dcc) +#define PCIE_HDP_TXDMA_NEW (BIT(8)) + +#define PCIE_HDP_RXDMA_CTRL (base) ((base) + 0x2d28) +#define PCIE_HDP_RXDMA_WPTR (BIT(27)) +#define PCIE_HDP_RXDMA_NEW (BIT(29)) +#define PCIE_HDP_RXDMA_INTERLEAVE (BIT(30)) + +/* Pearl rev C PCIe HDP registers */ +#define PCIE_HDP_TX0_DEV_PTR_ADDR (base) ((base) + 0x2db0) +#define PCIE_HDP_TX0_DEV_PTR_ADDR_H (base) ((base) + 0x2db4) +#define PCIE_HDP_TX0_DESC_Q_WR_PTR (base) ((base) + 0x2da4) +#define PCIE_HDP_TX0_DESC_BASE_ADDR (base) ((base) + 0x2dac) +#define PCIE_HDP_TX0_DESC_BASE_ADDR_H (base) ((base) + 0x2da8) + +#define PCIE_HDP_RX2_DESC_BASE_ADDR (base) ((base) + 0x2c20) +#define PCIE_HDP_RX2_DESC_BASE_ADDR_H (base) ((base) + 0x2c24) +#define PCIE_HDP_RX2_DESC_Q_WR_PTR (base) ((base) + 0x2d84) +#define PCIE_HDP_RX2_DEV_PTR_ADDR (base) ((base) + 0x2dd8) +#define PCIE_HDP_RX2_DEV_PTR_ADDR_H (base) ((base) + 0x2ddc) + +#define PCIE_HDP_TX0_DESC_Q_CTRL (base) ((base) + 0x2da0) +#define PCIE_HDP_RX2_DESC_Q_CTRL (base) ((base) + 0x2d80) +#define PCIE_HDP_DESC_FETCH_EN (BIT(31)) + +#define PCIE_HDP_AXI_MASTER_CTRL (base) ((base) + 0x2de0) +#define PCIE_HDP_AXI_EN_BURST32_READ (BIT(3) | BIT(7)) +#define PCIE_HDP_AXI_EN_BURST32_WRITE BIT(11) +#define PCIE_HDP_AXI_BURST32_SIZE (32 * 8) +/* Pearl PCIe HBM pool registers */ #define PCIE_HHBM_CSR_REG (base) ((base) + 0x2e00)#define PCIE_HHBM_Q_BASE_REG (base) ((base) + 0x2e04)
drivers/net/wireless/quantenna/qtnfmac/qtn_hw_ids.h +1 -0
@@ -18,6 +18,7 @@#define QTN_CHIP_ID_PEARL 0x50#define QTN_CHIP_ID_PEARL_B 0x60#define QTN_CHIP_ID_PEARL_C 0x70 +#define QTN_CHIP_ID_PEARL_C1 0x80/* FW names */
drivers/net/wireless/quantenna/qtnfmac/util.c +2 -0
@@ -116,6 +116,8 @@ const char *qtnf_chipid_to_string(unsigned long chip_id)return "Pearl revB" ;case QTN_CHIP_ID_PEARL_C :return "Pearl revC" ; +case QTN_CHIP_ID_PEARL_C1 : +return "Pearl revC1" ;default :return "unknown" ; }
Signature · 1 line
2.11.0
Re: [PATCH 2/2] qtnfmac: add support for the new revision of QSR10g chip
Quoted 8 lines · Sergey Matyukevich
Add support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
Signed-off-by Sergey Matyukevich <[email protected]>
What about the firmware, is that available for this new revision?
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCH 2/2] qtnfmac: add support for the new revision of QSR10g chip
Quoted 10 lines
Quoted 8 lines
Add support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
Signed-off-by Sergey Matyukevich <[email protected]>What about the firmware, is that available for this new revision?
Hello Kalle,
There are two drivers: pearl_qtnfmac for QSR10G and topaz_qtnfmac for QSR1000. Firmware for QSR1000 chips has a higher priority since those devices have been in production for quite a while now and there are multiple products available. From the engineering perspective we are ready to release firmware and SDK for QSR1000/QSR2000 devices. Now we are waiting for the ACK from legal team. This was delayed by the acquisition of Quantenna by On Semiconductor.
As for the latest QSR10G chips, we are not yet ready to release SDK. The main reason is that platform is under active development.
Regards,
Sergey
Re: [PATCH 2/2] qtnfmac: add support for the new revision of QSR10g chip
Quoted 21 lines
Quoted 10 lines
Quoted 8 lines
Add support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
Signed-off-by Sergey Matyukevich <[email protected]>What about the firmware, is that available for this new revision?
Hello Kalle,
There are two drivers:
pearl_qtnfmacfor QSR10G andtopaz_qtnfmacfor QSR1000. Firmware for QSR1000 chips has a higher priority since those devices have been in production for quite a while now and there are multiple products available. From the engineering perspective we are ready to release firmware and SDK for QSR1000/QSR2000 devices. Now we are waiting for the ACK from legal team. This was delayed by the acquisition of Quantenna by On Semiconductor.
Quoted 2 lines
As for the latest QSR10G chips, we are not yet ready to release SDK. The main reason is that platform is under active development.
Hello Kalle,
I noticed that you marked these two patches as deferred in patchwork. Is there anything else I have to do here ?
Regards,
Sergey
Re: [PATCH 2/2] qtnfmac: add support for the new revision of QSR10g chip
Quoted 24 lines
Quoted 21 lines
Quoted 10 lines
Quoted 8 lines
Add support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
Signed-off-by Sergey Matyukevich <[email protected]>What about the firmware, is that available for this new revision?
Hello Kalle,
There are two drivers:
pearl_qtnfmacfor QSR10G andtopaz_qtnfmacfor QSR1000. Firmware for QSR1000 chips has a higher priority since those devices have been in production for quite a while now and there are multiple products available. From the engineering perspective we are ready to release firmware and SDK for QSR1000/QSR2000 devices. Now we are waiting for the ACK from legal team. This was delayed by the acquisition of Quantenna by On Semiconductor.Quoted 2 lines
As for the latest QSR10G chips, we are not yet ready to release SDK. The main reason is that platform is under active development.
Quoted 7 lines
Hello Kalle,
I noticed that you marked these two patches as deferred in patchwork. Is there anything else I have to do here ?
Regards,
Sergey
Hello Kalle,
Could you please clarify your expectations regarding this functionality. Am I correct assuming that you implicitly tie acceptance of these patches with the promised release of firmware and SDK for QSR1000/2000 family ?
Regards,
Sergey
Re: [PATCH 2/2] qtnfmac: add support for the new revision of QSR10g chip
Quoted 29 lines · Sergey Matyukevich
Quoted 29 lines
Quoted 21 lines
Quoted 10 lines
Quoted 8 lines
Add support for the new minor revision of QSR10g chip. Major changes from the driver perspective include PCIe data path modifications. Setup is now more complicated, but finally more things have been offloaded to hardware. As a result, less driver boilerplate operations are needed after Tx/Rx descriptors queues have been configured. Besides, restrictions on descriptors queue lengths have been relaxed.
Signed-off-by Sergey Matyukevich <[email protected]>What about the firmware, is that available for this new revision?
Hello Kalle,
There are two drivers:
pearl_qtnfmacfor QSR10G andtopaz_qtnfmacfor QSR1000. Firmware for QSR1000 chips has a higher priority since those devices have been in production for quite a while now and there are multiple products available. From the engineering perspective we are ready to release firmware and SDK for QSR1000/QSR2000 devices. Now we are waiting for the ACK from legal team. This was delayed by the acquisition of Quantenna by On Semiconductor.Quoted 2 lines
As for the latest QSR10G chips, we are not yet ready to release SDK. The main reason is that platform is under active development.
Hello Kalle,
I noticed that you marked these two patches as deferred in patchwork. Is there anything else I have to do here ?
Quoted 8 lines
Quoted 2 lines
Regards,
SergeyHello Kalle,
Could you please clarify your expectations regarding this functionality. Am I correct assuming that you implicitly tie acceptance of these patches with the promised release of firmware and SDK for QSR1000/2000 family ?
Sorry for the delay, I wanted to check the qtnfmac firmware status before responding. And it didn't look good. The wiki page[1] mentions nothing about the firmware, neither does Kconfig and even a quick google search didn't make me any wiser. So I have no clue what's the current situation with the firmware.
I don't like this at all. All upstream drivers are supposed to be used by _anyone_ and the firmware should be publically available, with a very strong preference having the firmware in linux-firmware repo. I made an exception with qtnfmac and didn't require it to be in linux-firmware, IIRC the reason being there were some problems with the firmware license (something related to GPL?).
Upstream drivers need to have the firmware available. If Quantenna does not want to release the firmware I'm not willing to accept patches to new hardware either. I will accept patches for hardware already in upstream, but any patches adding new hardware support will be automatically rejected until the firmware issue is resolved.
[1] https://wireless.wiki.kernel.org/en/users/drivers/qtnfmac
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches