svn commit: r359279 - head/sys/dev/ismt

Justin Hibbits jhibbits at FreeBSD.org
Tue Mar 24 18:35:42 UTC 2020


Author: jhibbits
Date: Tue Mar 24 18:35:33 2020
New Revision: 359279
URL: https://svnweb.freebsd.org/changeset/base/359279

Log:
  ismt: Fix ISMT_DESC_ADDR_RW macro, slave addresses are already left-shifted
  
  Reverts r293369.  The macro was orginally correct, since our SMBus
  framework, unlike i2c, already requires addresses to be 8-bit, LSB-cleared.
  
  MFC after:	3 days
  Sponsored by:	Juniper Networks, Inc

Modified:
  head/sys/dev/ismt/ismt.c

Modified: head/sys/dev/ismt/ismt.c
==============================================================================
--- head/sys/dev/ismt/ismt.c	Tue Mar 24 18:17:10 2020	(r359278)
+++ head/sys/dev/ismt/ismt.c	Tue Mar 24 18:35:33 2020	(r359279)
@@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
 #define ISMT_DESC_LPR	0x80	/* Large Packet Received */
 
 /* Macros */
-#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr << 1) | (is_read))
+#define ISMT_DESC_ADDR_RW(addr, is_read) ((addr) | (is_read))
 
 /* iSMT General Register address offsets (SMBBAR + <addr>) */
 #define ISMT_GR_GCTRL		0x000	/* General Control */


More information about the svn-src-all mailing list