From owner-freebsd-hardware Sun Jan 12 3:13:44 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 161E437B401 for ; Sun, 12 Jan 2003 03:13:43 -0800 (PST) Received: from issv0171.isis.de (issv0171.isis.de [195.158.131.223]) by mx1.FreeBSD.org (Postfix) with SMTP id 1EFAE43EB2 for ; Sun, 12 Jan 2003 03:13:42 -0800 (PST) (envelope-from jrf@subdimension.com) Received: (qmail 18916 invoked by uid 1010); 12 Jan 2003 11:13:40 -0000 Received: from unknown (HELO akane) ([195.158.147.102]) (envelope-sender ) by mail.isis.de (qmail-ldap-1.03) with SMTP for ; 12 Jan 2003 11:13:40 -0000 Date: Sun, 12 Jan 2003 12:07:18 +0100 From: To: freebsd-hardware@freebsd.org Subject: Inconsistency in SMBus drivers? Lines: 28 Message-Id: <20030112111342.1EFAE43EB2@mx1.FreeBSD.org> Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, while trying to use the ichsmb driver, I noticed something odd: in ichsmb.c, the slave address is always shifted, while the other drivers (e.g. amdpm.c) take the slave address as given. Here is an example from ichsmb.c: int ichsmb_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) { (...) bus_space_write_1(sc->io_bst, sc->io_bsh, ICH_XMIT_SLVA, (slave << 1) | ICH_XMIT_SLVA_READ); and the corresponding lines from amdpm.c: static int amdpm_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) { (...) AMDPM_SMBOUTW(sc, AMDSMB_HSTADDR, slave | LSB); Oh, and why is ichsmb under src/sys/dev, while the others are unders src/sys/pci? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message