From owner-freebsd-current@FreeBSD.ORG Sat Jun 14 23:25:36 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45B622D8 for ; Sat, 14 Jun 2014 23:25:36 +0000 (UTC) Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com [209.85.213.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FB7E28C2 for ; Sat, 14 Jun 2014 23:25:35 +0000 (UTC) Received: by mail-ig0-f176.google.com with SMTP id a13so1687214igq.15 for ; Sat, 14 Jun 2014 16:25:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:content-type:mime-version:subject :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=CSiOWbqcYX0Pmw4cQEEQpROm6+/Gz4Oassb5i58Mapg=; b=BaPepv2OdwrQiF/PSIyb3MHbeH/MrXZlAGZuedGqfEgX3/GKS6weJBRWekpnAplUfd VqB+2H6TekXuyLAdXrIgz8wvmHJ1jfVm5LkrJ3tejfuzHgPTpAMnzleUdlog99SjLElN R1LV6LVoo87PEt6hrGV9SoonWnsvwPn4Eq3xKnMCiL5viAp+S86jwyfOZWx4grShIFKG mRIzlbqXbxC1vSSA8bx83uovawxIaDG7j/dt0LlLD9iWyIWRUTyO08VoNrrsH6FYWZN5 XEVu6rYKe8diYXYPALIvJb8rhUVTApcp8OYXc3s8cYza+5/OgpAqvrcQKjYBIoltm1+f BB0Q== X-Gm-Message-State: ALoCoQnfUgGM9IB0TKgEX5f30ry5upyaal+XG6yjb3pu6bXvIYIK6HCeXgxl1ELuirW9qFvKI17m X-Received: by 10.50.141.164 with SMTP id rp4mr15249607igb.20.1402788328917; Sat, 14 Jun 2014 16:25:28 -0700 (PDT) Received: from [10.0.0.119] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id t18sm7370410igr.18.2014.06.14.16.25.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Jun 2014 16:25:28 -0700 (PDT) Sender: Warner Losh From: Warner Losh X-Google-Original-From: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: SMBus controller In-Reply-To: <1402785781.1106.5.camel@bruno> Date: Sat, 14 Jun 2014 17:25:33 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <6F35309D-FA6D-4882-99A2-57346DFF16B9@gmail.com> References: <1402772923.1120.13.camel@bruno> <1402785781.1106.5.camel@bruno> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1878.2) Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2014 23:25:36 -0000 On Jun 14, 2014, at 4:43 PM, Sean Bruno wrote: > On Sat, 2014-06-14 at 12:08 -0700, Sean Bruno wrote:=20 >> I note that my TLenovo 61 has one of these: >>=20 >> ichsmb0@pci0:0:31:3: class=3D0x0c0500 card=3D0x20a917aa = chip=3D0x283e8086 >> rev=3D0x03 hdr=3D0x00 >> vendor =3D 'Intel Corporation' >> device =3D '82801H (ICH8 Family) SMBus Controller' >> class =3D serial bus >> subclass =3D SMBus >>=20 >>=20 >=20 > So, there's something broken in the initialization of the driver and = the > driver dependencies here. >=20 > If I load "smb.ko" by itself, no other modules are loaded (ichsmb, > smbus). Should it? I don=92t think so. If I kldload pci, would you expect most of the = drivers in the system to be loaded? > If I load ichsmb, smbus is loaded, so that's good. But, the first = time > I do this, the driver seems to think I have 16 bus instances: >=20 >=20 > iicsmb0: on iicbus0 > iicsmb1: on iicbus1 > iicsmb2: on iicbus2 > iicsmb3: on iicbus3 > iicsmb4: on iicbus4 > iicsmb5: on iicbus5 > iicsmb6: on iicbus6 > iicsmb7: on iicbus7 > iicsmb8: on iicbus8 > iicsmb9: on iicbus9 > iicsmb10: on iicbus10 > iicsmb11: on iicbus11 > iicsmb12: on iicbus12 > iicsmb13: on iicbus13 > iicsmb14: on iicbus14 > iicsmb15: on iicbus15 > smbus0: on iicsmb0 > smbus1: on iicsmb1 > smbus2: on iicsmb2 > smbus3: on iicsmb3 > smbus4: on iicsmb4 > smbus5: on iicsmb5 > smbus6: on iicsmb6 > smbus7: on iicsmb7 > smbus8: on iicsmb8 > smbus9: on iicsmb9 > smbus10: on iicsmb10 > smbus11: on iicsmb11 > smbus12: on iicsmb12 > smbus13: on iicsmb13 > smbus14: on iicsmb14 > smbus15: on iicsmb15 >=20 > I then load smb.ko and I get no useful output from smbmsg -p. >=20 > If I try to acces /dev/smb1, ctrl-c it, unload all modules and then > reload them, I get completely different (and functional) behavior. I > only get ONE smbus and I can poll "devices" there, even though I have = no > idea what they are. >=20 > ichsmb0: port 0x1c60-0x1c7f mem > 0xfe227400-0xfe2274ff irq 23 at device 31.3 on pci0 > smbus0: on ichsmb0 > smb0: on smbus0 > root@bruno:/home/sbruno # smbmsg -p > Probing for devices on /dev/smb0: > Device @0x10: w > Device @0x88: rw > Device @0xa8: w > Device @0xaa: rw > Device @0xac: rw > Device @0xae: rw > Device @0xb8: rw > Device @0xc2: w > Device @0xc8: w >=20 >=20 >=20 >=20 >=20 >=20 > Right ... so, I did the following: >=20 > kldload ichsmb >=20 > This seems to know to bull in smbus.ko. I kinda think that=92s a bug. Makes it impossible to load/unload smbus = independent of ichsmb. pccard had that issue, but I fixed it eons ago. = However, it might be a necessary at the moment bug due to symbols being = exported from smbus.ko that are needed btt ichsmb=85 > ichsmb0: port 0x1c60-0x1c7f mem > 0xfe227400-0xfe2274ff irq 23 at device 31.3 on pci0 > smbus0: on ichsmb0 >=20 >=20 > This doesn't really do anything useful, until I load "smb.ko=94: That makes sense to me. Again, each of these things is independent, or = should be. It sounds like there=92s other breakage going on. You might want to see = what putting it in your kernel tells you. Warner=