[Fwd: [RFC PATCH] Re: [OOPS] w83781d during rmmod (2.5.69-bk17)]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think this accidentially got tagged as spam.  Here it is again in case 
you didn't get it the first time.


Phil


-------- Original Message --------
From: 	- Mon Jun 2 09:13:03 2003
X-UIDL: 	9f0499e8fad0352f
X-Mozilla-Status: 	0001
X-Mozilla-Status2: 	10000000
Return-Path: 	<lm78 at Stimpy.netroedge.com>
Received: 	from Stimpy.netroedge.com (IDENT:root at Stimpy.netroedge.com 
[206.228.191.3]) by Ren.netroedge.com (8.12.8p1/8.9.1) with ESMTP id 
h51EcB4e028663 for <phil at ren.netroedge.com>; Sun, 1 Jun 2003 07:38:11 -0700
Received: 	from Stimpy.netroedge.com (IDENT:lm78 at localhost [127.0.0.1]) 
h51El5BI022083; Sun, 1 Jun 2003 07:47:05 -0700
Received: 	(from lm78 at localhost) by Stimpy.netroedge.com 
(8.12.8p1/8.12.8/Submit) id h51El3Qc022082; Sun, 1 Jun 2003 07:47:03 -0700
Received: 	from charger.oldcity.dca.net (charger.oldcity.dca.net 
[207.245.82.76])h51El1BI022068 for <sensors at stimpy.netroedge.com>; Sun, 
1 Jun 2003 07:47:01 -0700
Received: 	from earth.solarsys.private 
(adsl-216-158-52-153.cust.oldcity.dca.net [216.158.52.153]) 
h51Ec9U31311; Sun, 1 Jun 2003 10:38:09 -0400
Received: 	by earth.solarsys.private (Postfix, from userid 1000) id 
909917DE1; Sun, 1 Jun 2003 10:38:08 -0400 (EDT)
Date: 	Sun, 1 Jun 2003 10:38:08 -0400
From: 	Mark M. Hoffman <mhoffman at lightlink.com>
To: 	LKML <linux-kernel at vger.kernel.org>, Sensors 
<sensors at Stimpy.netroedge.com>
Cc: 	Mark D. Studebaker <mds at paradyne.com>, Greg KH <greg at kroah.com>
Subject: 	[RFC PATCH] Re: [OOPS] w83781d during rmmod (2.5.69-bk17)
Message-ID: 	<20030601143808.GA30177 at earth.solarsys.private>
Mail-Followup-To: 	LKML <linux-kernel at vger.kernel.org>, Sensors 
<sensors at stimpy.netroedge.com>, "Mark D. Studebaker" <mds at paradyne.com>, 
Greg KH <greg at kroah.com>
References: 	<20030524183748.GA3097 at earth.solarsys.private> 
<3ED8067E.1050503 at paradyne.com>
Mime-Version: 	1.0
X-Security: 	MIME headers sanitized on Stimpy.netroedge.com See 
http://www.impsec.org/email-tools/procmail-security.html for details. 
$Revision: 1.129 $Date: 2001-04-14 20:20:43-07
Content-Type: 	multipart/mixed; boundary="VS++wcV0S1rZb1Fb"
Content-Disposition: 	inline
In-Reply-To: 	<3ED8067E.1050503 at paradyne.com>
User-Agent: 	Mutt/1.4.1i
X-SpamBouncer: 	1.5 (8/16/02)
X-SBClass: 	OK
X-Spambayes-Classification: 	spam; 1.00
Status: 	O
X-Status: 	



* Mark D. Studebaker <mds at paradyne.com> [2003-05-30 21:33:50 -0400]:
> Mark M. Hoffman wrote:
> >This applies to all kernel versions since w83781d was brought in from 
> >the lm_sensors project.
> >
> >The subclients of w83781d are never registered with i2c_attach_client().
> >But, w83781d_detach_client() tries to i2c_detach_client() them anyway.
> >This was harmless, until i2c-core was "listified"... because the old
> >array method silently ignored the attempt to detach a non-existent client.
> >
> >The latest lm_sensors CVS of w83781d has the necessary i2c_attach_client()
> >calls - not sure why they were removed during conversion to 2.5.x.  Do we
> >intend to attach these subclients or not?
>
> Good catch.
> Greg, this needs to be fixed.
> Winbond chips take up 3 addresses on the i2c bus.
> In the original code we registered two "subclients" with the i2c layer.
> Somehow the 3-address chips need to be handled.

This fixes the oops during w83781d module removal by putting the
subclient registration back in.  While I was in there, I split
w83781d_detect in half in an attempt to reduce the goto madness.

So, the /sys tree looks like this, where 48 & 49 are the subclients.
There are no entries (besides name & power) for the subclients.

/sys/bus/i2c/
|-- devices
|   |-- 0-002d -> ../../../devices/pci0/00:02.1/i2c-0/0-002d
|   |-- 0-0048 -> ../../../devices/pci0/00:02.1/i2c-0/0-0048
|   `-- 0-0049 -> ../../../devices/pci0/00:02.1/i2c-0/0-0049
`-- drivers
    |-- i2c_adapter
    `-- w83781d
        |-- 0-002d -> ../../../../devices/pci0/00:02.1/i2c-0/0-002d
        |-- 0-0048 -> ../../../../devices/pci0/00:02.1/i2c-0/0-0048
        `-- 0-0049 -> ../../../../devices/pci0/00:02.1/i2c-0/0-0049

Also, I fixed a bug where this driver would request and release an
ISA region, then poke around in that region, then finally request
it again.

This patch against 2.5.70 works for me vs. an SMBus adapter.  It needs
re-testing against an ISA adapter since my particular chip is SMBus only.

Please CC me w/ comments.

Regards,

-- 
Mark M. Hoffman
mhoffman at lightlink.com



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-w83781d.txt
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030602/c0696ef7/attachment.txt 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux