Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2012 12:28:14 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241579 - head/sys/dev/etherswitch/arswitch
Message-ID:  <201210151228.q9FCSEal087469@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Mon Oct 15 12:28:14 2012
New Revision: 241579
URL: http://svn.freebsd.org/changeset/base/241579

Log:
  Mask data to only 16 bits to be sure on write into switch reg.
  
  Submitted by:	Luiz Otavio O Souza
  Approved by:	adrian (mentor)

Modified:
  head/sys/dev/etherswitch/arswitch/arswitch_reg.c

Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c
==============================================================================
--- head/sys/dev/etherswitch/arswitch/arswitch_reg.c	Mon Oct 15 12:20:40 2012	(r241578)
+++ head/sys/dev/etherswitch/arswitch/arswitch_reg.c	Mon Oct 15 12:28:14 2012	(r241579)
@@ -148,7 +148,7 @@ int
 arswitch_writereg_msb(device_t dev, int addr, int data)
 {
 
-	return (arswitch_writereg16(dev, addr + 2, data >> 16));
+	return (arswitch_writereg16(dev, addr + 2, (data >> 16) & 0xffff));
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210151228.q9FCSEal087469>