Module Name: src
Committed By: pgoyette
Date: Sat May 9 04:56:39 UTC 2009
Modified Files:
src/sys/dev/pci: nfsmb.c
Log Message:
You can't use a BYTE protocol to read 16-bits worth of data from the
i2c bus. Discovered while debugging my sdtemp(4) driver.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/nfsmb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/nfsmb.c
diff -u src/sys/dev/pci/nfsmb.c:1.18 src/sys/dev/pci/nfsmb.c:1.19
--- src/sys/dev/pci/nfsmb.c:1.18 Wed May 6 10:34:32 2009
+++ src/sys/dev/pci/nfsmb.c Sat May 9 04:56:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: nfsmb.c,v 1.18 2009/05/06 10:34:32 cegger Exp $ */
+/* $NetBSD: nfsmb.c,v 1.19 2009/05/09 04:56:39 pgoyette Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfsmb.c,v 1.18 2009/05/06 10:34:32 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfsmb.c,v 1.19 2009/05/09 04:56:39 pgoyette Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -499,7 +499,7 @@
bus_space_write_1(sc->sc_iot, sc->sc_ioh, NFORCE_SMB_ADDRESS, data);
/* write smbus protocol to register */
- data = I2C_OP_READ_P(op) | NFORCE_SMB_PROTOCOL_BYTE_DATA;
+ data = I2C_OP_READ_P(op) | NFORCE_SMB_PROTOCOL_WORD_DATA;
if (flags & I2C_F_PEC)
data |= NFORCE_SMB_PROTOCOL_PEC;
bus_space_write_1(sc->sc_iot, sc->sc_ioh, NFORCE_SMB_PROTOCOL, data);