Skip to contentSkip to conversation

igbvf: fix the bug when initializing the igbvf

PATCH In review Shan Wei 2 participants 2 messages Apr 27, 2012

Subsystems (3)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 igbvf: fix the bug when initializing the igbvf

From: Samuel Liao <[email protected]>

Maybe it's a typo, but it cause that igbvf can't be initialized successfully. Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr.

---
 drivers/net/ethernet/intel/igbvf/netdev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/igbvf/netdev.c +2 -2
index d61ca2a..8ec74b0 100644
@@ -2731,14 +2731,14 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
 			netdev->addr_len);
 	}
 
-	if (!is_valid_ether_addr(netdev->perm_addr)) {
+	if (!is_valid_ether_addr(netdev->dev_addr)) {
 		dev_err(&pdev->dev, "Invalid MAC Address: %pM\n",
 		        netdev->dev_addr);
 		err = -EIO;
 		goto err_hw_init;
 	}
 
-	memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
+	memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);
 
 	setup_timer(&adapter->watchdog_timer, &igbvf_watchdog,
 	            (unsigned long) adapter);
Signature · 1 line
1.7.1
#1 lore raw
Quoted 10 lines · Shan Wei

From: Samuel Liao <[email protected]>

Maybe it's a typo, but it cause that igbvf can't be initialized successfully.
Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr.

Quoted 5 lines
---
 drivers/net/ethernet/intel/igbvf/netdev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-) 

Thanks Samuel, I will add the patch to my queue.