Message ID | 20220508224848.2384723-2-hauke@hauke-m.de (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: realtek: rtl8365mb: Add SGMII and HSGMII support | expand |
On Mon, May 09, 2022 at 12:48:45AM +0200, Hauke Mehrtens wrote: > The mask should be shifted like the offset. > > Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> > --- > drivers/net/dsa/realtek/rtl8365mb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> > > diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c > index 3d70e8a77ecf..2cb722a9e096 100644 > --- a/drivers/net/dsa/realtek/rtl8365mb.c > +++ b/drivers/net/dsa/realtek/rtl8365mb.c > @@ -237,7 +237,7 @@ static const int rtl8365mb_extint_port_map[] = { -1, -1, -1, -1, -1, -1, 1, 2, > (_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \ > 0x0) > #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \ > - (0xF << (((_extint) % 2))) > + (0xF << (((_extint) % 2) * 4)) > #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(_extint) \ > (((_extint) % 2) * 4) > > -- > 2.30.2 >
diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 3d70e8a77ecf..2cb722a9e096 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -237,7 +237,7 @@ static const int rtl8365mb_extint_port_map[] = { -1, -1, -1, -1, -1, -1, 1, 2, (_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \ 0x0) #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \ - (0xF << (((_extint) % 2))) + (0xF << (((_extint) % 2) * 4)) #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(_extint) \ (((_extint) % 2) * 4)
The mask should be shifted like the offset. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- drivers/net/dsa/realtek/rtl8365mb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)