lan9118: Ignore write to MAC_VLAN1 register
PATCH 1/1 lan9118: Ignore write to MAC_VLAN1 register
Since kernel 2.6.38, smsc911x driver writes to VLAN1 registger.
--- hw/lan9118.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/lan9118.c +2 -0
@@ -785,6 +785,8 @@ static void do_mac_write(lan9118_state *s, int reg, uint32_t val)case MAC_FLOW : s->mac_flow = val &0xffff0000 ;break ; +case MAC_VLAN1 : +break ;/* just ignore */ default :hw_error ("lan9118: Unimplemented MAC register write: %d = 0x%x\n" , s->mac_cmd &0xf , val);
Signature · 1 line
1.5.6.5
Quoted 12 lines · Atsushi Nemoto
Since kernel 2.6.38, smsc911x driver writes to VLAN1 registger.
Signed-off-by Atsushi Nemoto <[email protected]>--- hw/lan9118.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/lan9118.c +0
-0
hw/lan9118.c static void do_mac_write(lan9118_state *s, int reg, uint32_t val) · line 792
Quoted 8 lines
hw/lan9118.c +2
-0@@ -785,6 +785,8 @@ static void do_mac_write(lan9118_state *s, int reg, uint32_t val)case MAC_FLOW : s->mac_flow = val &0xffff0000 ;break ; +case MAC_VLAN1 : +break ;/* just ignore */ default :hw_error ("lan9118: Unimplemented MAC register write: %d = 0x%x\n" , s->mac_cmd &0xf , val);
Is it really safe ignoring write to this register? If yes, it's probably a good idea to explain why in a comment. In any case, if supporting this register is easy to do, it would be the best option.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 3 lines · Aurelien Jarno
Is it really safe ignoring write to this register? If yes, it's probably a good idea to explain why in a comment. In any case, if supporting this register is easy to do, it would be the best option.
I think it is safe. Please see an updated comment below.
And though implementing this register might be possible, I suppose it is not worth to supporting FrameTooLong detection, for now at least.
Thank you for comments.
Quoted 1 line
8---------------------------------------------------------------------
From: Atsushi Nemoto <[email protected]>
Date: Tue, 5 Apr 2011 23:12:07 +0900
Subject: [PATCH] lan9118: Ignore write to MAC_VLAN1 register
Since linux 2.6.38, smsc911x driver writes to VLAN1 registger. Since this register only affects FrameTooLong detection, ignoring write to this register should be safe.
--- hw/lan9118.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
hw/lan9118.c +6 -0
@@ -785,6 +785,12 @@ static void do_mac_write(lan9118_state *s, int reg, uint32_t val)case MAC_FLOW : s->mac_flow = val &0xffff0000 ;break ; +case MAC_VLAN1 : +/* Writing to this register changes a condition for +* FrameTooLong bit in rx_status. Since we do not set +* FrameTooLong anyway, just ignore write to this. +*/ +break ;default :hw_error ("lan9118: Unimplemented MAC register write: %d = 0x%x\n" , s->mac_cmd &0xf , val);
Signature · 1 line
1.5.6.5