diff mbox

lan9118: Ignore write to MAC_VLAN1 register

Message ID 1301406072-8649-1-git-send-email-anemo@mba.ocn.ne.jp
State New
Headers show

Commit Message

Atsushi Nemoto March 29, 2011, 1:41 p.m. UTC
Since kernel 2.6.38, smsc911x driver writes to VLAN1 registger.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 hw/lan9118.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Aurelien Jarno April 4, 2011, 6:15 p.m. UTC | #1
On Tue, Mar 29, 2011 at 10:41:12PM +0900, Atsushi Nemoto wrote:
> Since kernel 2.6.38, smsc911x driver writes to VLAN1 registger.
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
>  hw/lan9118.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/lan9118.c b/hw/lan9118.c
> index af6949f..62aead3 100644
> --- a/hw/lan9118.c
> +++ b/hw/lan9118.c
> @@ -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.
diff mbox

Patch

diff --git a/hw/lan9118.c b/hw/lan9118.c
index af6949f..62aead3 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -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);