aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-02-02 16:54:15 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-02 16:54:15 -0500
commite78f5fa7cc1a211eb9909ef90b0de3311086ba55 (patch)
tree4c84ea613a7d771dae5a8b76c96ff278da332c43 /drivers/net/qlge
parent26351479ed43288be92935826c215fbe01e2abb2 (diff)
qlge: bugfix: Add flash offset for second port.
Without this the 2nd port gets first ports MAC addr. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r--drivers/net/qlge/qlge_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 17d02eb6c8be..c6c070475f07 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -670,12 +670,19 @@ static int ql_get_flash_params(struct ql_adapter *qdev)
670 int i; 670 int i;
671 int status; 671 int status;
672 __le32 *p = (__le32 *)&qdev->flash; 672 __le32 *p = (__le32 *)&qdev->flash;
673 u32 offset = 0;
674
675 /* Second function's parameters follow the first
676 * function's.
677 */
678 if (qdev->func)
679 offset = sizeof(qdev->flash) / sizeof(u32);
673 680
674 if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) 681 if (ql_sem_spinlock(qdev, SEM_FLASH_MASK))
675 return -ETIMEDOUT; 682 return -ETIMEDOUT;
676 683
677 for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { 684 for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) {
678 status = ql_read_flash_word(qdev, i, p); 685 status = ql_read_flash_word(qdev, i+offset, p);
679 if (status) { 686 if (status) {
680 QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); 687 QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n");
681 goto exit; 688 goto exit;