diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-06-23 00:44:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-27 23:30:47 -0400 |
commit | aca7a3acb19a7a4b1084f6f2411f6eaf52dd79c0 (patch) | |
tree | 7db67a402f464fa3e69e2c7f21b9fa8bac2bc638 | |
parent | d5b8aa1d246fddfe4042be6f6eb169efa5cfbb94 (diff) |
mlx4: use pci_dev->revision
Commit 725c89997e03d71b09ea3c17c997da0712b9d835 (mlx4_en: Reporting HW revision
in ethtool -i) added code to read the revision ID from the PCI configuration
register while it's already stored by PCI subsystem in the 'revision' field of
'struct pci_dev'...
While at it, move the code being changed a bit in order to not break the
initialization sequence.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/mlx4/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 3814fc9b1145..0cb0431ee19c 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -1230,11 +1230,11 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1230 | INIT_LIST_HEAD(&priv->pgdir_list); | 1230 | INIT_LIST_HEAD(&priv->pgdir_list); |
1231 | mutex_init(&priv->pgdir_mutex); | 1231 | mutex_init(&priv->pgdir_mutex); |
1232 | 1232 | ||
1233 | pci_read_config_byte(pdev, PCI_REVISION_ID, &dev->rev_id); | ||
1234 | |||
1235 | INIT_LIST_HEAD(&priv->bf_list); | 1233 | INIT_LIST_HEAD(&priv->bf_list); |
1236 | mutex_init(&priv->bf_mutex); | 1234 | mutex_init(&priv->bf_mutex); |
1237 | 1235 | ||
1236 | dev->rev_id = pdev->revision; | ||
1237 | |||
1238 | /* | 1238 | /* |
1239 | * Now reset the HCA before we touch the PCI capabilities or | 1239 | * Now reset the HCA before we touch the PCI capabilities or |
1240 | * attempt a firmware command, since a boot ROM may have left | 1240 | * attempt a firmware command, since a boot ROM may have left |