On Fri, Jul 07, 2023 at 02:45:28AM -0700, Souradeep Chakrabarti wrote:
At present hwc timeout value is a fixed value. This patch sets the hwc timeout from the hardware.
Signed-off-by: Souradeep Chakrabarti schakrabarti@linux.microsoft.com
V1 -> V2:
- Added return check for mana_gd_query_hwc_timeout
- Removed dev_err from mana_gd_query_hwc_timeout
.../net/ethernet/microsoft/mana/gdma_main.c | 30 ++++++++++++++++++- .../net/ethernet/microsoft/mana/hw_channel.c | 25 +++++++++++++++- include/net/mana/gdma.h | 20 ++++++++++++- include/net/mana/hw_channel.h | 5 ++++ 4 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 8f3f78b68592..949c927c3a7e 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -106,6 +106,27 @@ static int mana_gd_query_max_resources(struct pci_dev *pdev) return 0; } +static int mana_gd_query_hwc_timeout(struct pci_dev *pdev, u32 *timeout_val) +{
- struct gdma_context *gc = pci_get_drvdata(pdev);
- struct gdma_query_hwc_timeout_req req = {};
- struct gdma_query_hwc_timeout_resp resp = {};
Please use reverse xmas tree - longest line to shortest - for local variables in Networking code.
...
@@ -879,6 +900,7 @@ int mana_gd_verify_vf_version(struct pci_dev *pdev) struct gdma_context *gc = pci_get_drvdata(pdev); struct gdma_verify_ver_resp resp = {}; struct gdma_verify_ver_req req = {};
- struct hw_channel_context *hwc = gc->hwc.driver_data; int err;
Ditto.