Skip to content

Commit

Permalink
mlx4: use pci_dev->revision
Browse files Browse the repository at this point in the history
Commit 725c899 (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>
  • Loading branch information
Sergei Shtylyov authored and David S. Miller committed Jun 28, 2011
1 parent d5b8aa1 commit aca7a3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,11 +1230,11 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
INIT_LIST_HEAD(&priv->pgdir_list);
mutex_init(&priv->pgdir_mutex);

pci_read_config_byte(pdev, PCI_REVISION_ID, &dev->rev_id);

INIT_LIST_HEAD(&priv->bf_list);
mutex_init(&priv->bf_mutex);

dev->rev_id = pdev->revision;

/*
* Now reset the HCA before we touch the PCI capabilities or
* attempt a firmware command, since a boot ROM may have left
Expand Down

0 comments on commit aca7a3a

Please sign in to comment.