From: Ron Mercer Date: Mon, 2 Feb 2009 21:54:15 +0000 (-0800) Subject: qlge: bugfix: Add flash offset for second port. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e78f5fa7cc1a211eb9909ef90b0de3311086ba55;p=linux-beck.git qlge: bugfix: Add flash offset for second port. Without this the 2nd port gets first ports MAC addr. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- 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) int i; int status; __le32 *p = (__le32 *)&qdev->flash; + u32 offset = 0; + + /* Second function's parameters follow the first + * function's. + */ + if (qdev->func) + offset = sizeof(qdev->flash) / sizeof(u32); if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) return -ETIMEDOUT; for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { - status = ql_read_flash_word(qdev, i, p); + status = ql_read_flash_word(qdev, i+offset, p); if (status) { QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); goto exit;