sh_eth: check sh_eth_cpu_data::dual_port when dumping registers
commit3249b1e442upstream. When adding the sh_eth_cpu_data::dual_port flag I forgot to add the flag checks to __sh_eth_get_regs(), causing the non-existing TSU registers to be dumped by 'ethtool' on the single port Ether controllers having TSU... Fixes:a94cf2a614("sh_eth: fix TSU init on SH7734/R8A7740") Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
34e855f998
commit
fd0d69bb32
1 changed files with 21 additions and 17 deletions
|
|
@ -2184,24 +2184,28 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf)
|
|||
if (cd->tsu) {
|
||||
add_tsu_reg(ARSTR);
|
||||
add_tsu_reg(TSU_CTRST);
|
||||
add_tsu_reg(TSU_FWEN0);
|
||||
add_tsu_reg(TSU_FWEN1);
|
||||
add_tsu_reg(TSU_FCM);
|
||||
add_tsu_reg(TSU_BSYSL0);
|
||||
add_tsu_reg(TSU_BSYSL1);
|
||||
add_tsu_reg(TSU_PRISL0);
|
||||
add_tsu_reg(TSU_PRISL1);
|
||||
add_tsu_reg(TSU_FWSL0);
|
||||
add_tsu_reg(TSU_FWSL1);
|
||||
if (cd->dual_port) {
|
||||
add_tsu_reg(TSU_FWEN0);
|
||||
add_tsu_reg(TSU_FWEN1);
|
||||
add_tsu_reg(TSU_FCM);
|
||||
add_tsu_reg(TSU_BSYSL0);
|
||||
add_tsu_reg(TSU_BSYSL1);
|
||||
add_tsu_reg(TSU_PRISL0);
|
||||
add_tsu_reg(TSU_PRISL1);
|
||||
add_tsu_reg(TSU_FWSL0);
|
||||
add_tsu_reg(TSU_FWSL1);
|
||||
}
|
||||
add_tsu_reg(TSU_FWSLC);
|
||||
add_tsu_reg(TSU_QTAGM0);
|
||||
add_tsu_reg(TSU_QTAGM1);
|
||||
add_tsu_reg(TSU_FWSR);
|
||||
add_tsu_reg(TSU_FWINMK);
|
||||
add_tsu_reg(TSU_ADQT0);
|
||||
add_tsu_reg(TSU_ADQT1);
|
||||
add_tsu_reg(TSU_VTAG0);
|
||||
add_tsu_reg(TSU_VTAG1);
|
||||
if (cd->dual_port) {
|
||||
add_tsu_reg(TSU_QTAGM0);
|
||||
add_tsu_reg(TSU_QTAGM1);
|
||||
add_tsu_reg(TSU_FWSR);
|
||||
add_tsu_reg(TSU_FWINMK);
|
||||
add_tsu_reg(TSU_ADQT0);
|
||||
add_tsu_reg(TSU_ADQT1);
|
||||
add_tsu_reg(TSU_VTAG0);
|
||||
add_tsu_reg(TSU_VTAG1);
|
||||
}
|
||||
add_tsu_reg(TSU_ADSBSY);
|
||||
add_tsu_reg(TSU_TEN);
|
||||
add_tsu_reg(TSU_POST1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue