public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Valette <eric.valette@free.fr>
To: greg@kroah.com, phil@netroedge.com
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Small fix to make i2c-viapro.c work on ASUS A7V with ACPI enabled
Date: Tue, 03 Aug 2004 22:54:32 +0200	[thread overview]
Message-ID: <410FFB88.10800@free.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 3076 bytes --]

Today, due to the heat, I tried to make lm-sensors work on my ASUS A7V 
KT133 motherboard in order to check the temperature (One fan already 
died without damaging the processor...).

Hi,

At least I suceeded to make lm-sensors work on ASUS A7V but encountered 
the following problem : i2c-viapro.c tries to request an ioports region 
(in my case 0xe800 see <====) that has already been allocated by the 
acpi motherboard.c code and fails whith an error if this region has 
already been allocated.

I first tried to use the "force_addr" methods in i2c-viapro.c using a 
free ioport location but then lm-sensors works but code breakes ACPI 
support (fails to shutdown at least) as it reprogram the bus chip base 
address without ACPI code being notified.

With the following patch targeted toward 2.6.8-rc2-mm2, both things 
works together like a charm. I have no idea if patch is correct but at 
least I think the analysis is. Let me know if you think there is a 
better fix.

(prompt)sensors
as99127f-i2c-2-2d
Adapter: SMBus Via Pro adapter at e800  <==========
VCore:     +1.81 V  (min =  +1.74 V, max =  +1.94 V)
+3.3V:     +3.52 V  (min =  +3.20 V, max =  +3.54 V)
+5V:       +5.05 V  (min =  +4.73 V, max =  +5.24 V)
+12V:     +12.34 V  (min = +10.82 V, max = +13.19 V)
-12V:     -12.33 V  (min = -13.22 V, max = -10.74 V)
-5V:       -5.15 V  (min =  -5.25 V, max =  -4.74 V)
fan1:        0 RPM  (min =    0 RPM, div = 2)
fan2:     6958 RPM  (min = 2836 RPM, div = 2)                     (beep)
fan3:        0 RPM  (min =    0 RPM, div = 2)
M/B Temp:    +47°C  (high =  +105°C, hyst =    +0°C)
CPU Temp:  +67.0°C  (high =   +95°C, hyst =   +80°C)          (beep)
temp3:     -31.5°C  (high =  +122°C, hyst =  +121°C)
vid:      +1.850 V
alarms:
beep_enable:
           Sound alarm enabled

(prompt) cat /proc/ioports
0000-001f : dma1
0020-0021 : pic1
0040-005f : timer
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02f8-02ff : serial
0378-037a : parport0
03f6-03f6 : ide0
03f8-03ff : serial
0cf8-0cff : PCI conf1
7800-783f : 0000:00:11.0
   7800-7807 : ide2
   7808-780f : ide3
   7810-783f : PDC20265
8000-8003 : 0000:00:11.0
8400-8407 : 0000:00:11.0
8800-8803 : 0000:00:11.0
   8802-8802 : ide2
9000-9007 : 0000:00:11.0
   9000-9007 : ide2
9400-94ff : 0000:00:0d.0
9800-98ff : 0000:00:0b.0
a000-a007 : 0000:00:0a.1
a400-a41f : 0000:00:0a.0
   a400-a41f : EMU10K1
d000-d01f : 0000:00:04.3
   d000-d01f : uhci_hcd
d400-d41f : 0000:00:04.2
   d400-d41f : uhci_hcd
d800-d80f : 0000:00:04.1
   d800-d807 : ide0
   d808-d80f : ide1
e200-e27f : 0000:00:04.4
e400-e4ff : 0000:00:04.4
   e400-e47f : motherboard
e800-e80f : 0000:00:04.4	<===============
   e800-e80f : motherboard

-- 
    __
   /  `                   	Eric Valette
  /--   __  o _.          	6 rue Paul Le Flem
(___, / (_(_(__         	35740 Pace

Tel: +33 (0)2 99 85 26 76	Fax: +33 (0)2 99 85 26 76
E-mail: eric.valette@free.fr




[-- Attachment #2: a7v-i2c.patch --]
[-- Type: text/x-patch, Size: 577 bytes --]

--- drivers/i2c/busses/i2c-viapro.c~	2004-08-03 22:28:22.000000000 +0200
+++ drivers/i2c/busses/i2c-viapro.c	2004-08-03 22:24:41.000000000 +0200
@@ -333,9 +333,15 @@
 
  found:
 	if (!request_region(vt596_smba, 8, "viapro-smbus")) {
+#ifndef CONFIG_ACPI_BUS
+	  /*
+	   * The VT82C586A is also managed by the ACPI motherboard.c
+	   * that also request this IO ports region (in fact a little bit more)
+	   */
 		dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",
 		        vt596_smba);
 		return -ENODEV;
+#endif
 	}
 
 	pci_read_config_byte(pdev, SMBHSTCFG, &temp);

             reply	other threads:[~2004-08-03 20:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-03 20:54 Eric Valette [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-04  2:07 Small fix to make i2c-viapro.c work on ASUS A7V with ACPI enabled Li, Shaohua
2004-08-04  8:17 ` Eric Valette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410FFB88.10800@free.fr \
    --to=eric.valette@free.fr \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phil@netroedge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox