]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: bgmac: init sequence bug
authorJon Mason <jon.mason@broadcom.com>
Thu, 2 Mar 2017 22:59:56 +0000 (17:59 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Mar 2017 17:44:28 +0000 (09:44 -0800)
commita0902ca0204f060eb5e9a42a60b8ccef3045e0c3
tree7ef36f943d7e924f12827f8e37e7b68885feac62
parentafab631bd7049e2ba2dec8e8ae00ec084d45902d
net: ethernet: bgmac: init sequence bug

Fix a bug in the 'bgmac' driver init sequence that blind writes for init
sequence where it should preserve most bits other than the ones it is
deliberately manipulating.

The code now checks to see if the adapter needs to be brought out of
reset (where as before it was doing an IDM write to bring it out of
reset regardless of whether it was in reset or not).  Also, removed
unnecessary usleeps (as there is already a read present to flush the
IDM writes).

Signed-off-by: Zac Schroff <zschroff@broadcom.com>
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Fixes: 0f217913b4a ("net: ethernet: bgmac: Add platform device support")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac-platform.c
drivers/net/ethernet/broadcom/bgmac.h