mlxsw: pci: Rename mlxsw_pci_sw_reset()
authorAmit Cohen <amcohen@nvidia.com>
Wed, 15 Nov 2023 12:17:19 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Nov 2023 17:38:51 +0000 (17:38 +0000)
In the next patches, mlxsw_pci_sw_reset() will be extended to support
more reset types and will not necessarily issue a software reset. Rename
the function to reflect that.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/pci.c

index 7af37f78ed1a4294356a96e6a2c470cb1409790b..fe0b8a38d44e3c0b6c983d8664d37323a26e52bc 100644 (file)
@@ -1476,8 +1476,8 @@ static int mlxsw_pci_sys_ready_wait(struct mlxsw_pci *mlxsw_pci,
        return -EBUSY;
 }
 
-static int mlxsw_pci_sw_reset(struct mlxsw_pci *mlxsw_pci,
-                             const struct pci_device_id *id)
+static int
+mlxsw_pci_reset(struct mlxsw_pci *mlxsw_pci, const struct pci_device_id *id)
 {
        struct pci_dev *pdev = mlxsw_pci->pdev;
        char mrsr_pl[MLXSW_REG_MRSR_LEN];
@@ -1537,9 +1537,9 @@ static int mlxsw_pci_init(void *bus_priv, struct mlxsw_core *mlxsw_core,
        if (!mbox)
                return -ENOMEM;
 
-       err = mlxsw_pci_sw_reset(mlxsw_pci, mlxsw_pci->id);
+       err = mlxsw_pci_reset(mlxsw_pci, mlxsw_pci->id);
        if (err)
-               goto err_sw_reset;
+               goto err_reset;
 
        err = mlxsw_pci_alloc_irq_vectors(mlxsw_pci);
        if (err < 0) {
@@ -1672,7 +1672,7 @@ err_iface_rev:
 err_query_fw:
        mlxsw_pci_free_irq_vectors(mlxsw_pci);
 err_alloc_irq:
-err_sw_reset:
+err_reset:
 mbox_put:
        mlxsw_cmd_mbox_free(mbox);
        return err;