* [PATCH 2/2 resend] mlx4: use pci_dev->revision
@ 2011-06-23 14:44 Sergei Shtylyov
0 siblings, 0 replies; only message in thread
From: Sergei Shtylyov @ 2011-06-23 14:44 UTC (permalink / raw)
To: netdev; +Cc: yevgenyp
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>
---
The patch is against the recent Linus' tree.
It wasn't merged to Linux 3.0, hopefully it will be picked up for 3.1...
drivers/net/mlx4/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/net/mlx4/main.c
===================================================================
--- linux-2.6.orig/drivers/net/mlx4/main.c
+++ linux-2.6/drivers/net/mlx4/main.c
@@ -1230,11 +1230,11 @@ static int __mlx4_init_one(struct pci_de
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-23 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 14:44 [PATCH 2/2 resend] mlx4: use pci_dev->revision Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).