亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 2429 | 回復(fù): 1
打印 上一主題 下一主題

關(guān)于smbus(又要麻煩各位大牛了) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2006-04-20 17:05 |只看該作者 |倒序?yàn)g覽
最近需要通過(guò)smbus來(lái)讀取一些信息,但是在一些機(jī)器上smbus好像被隱藏了.我google了好久就找到了一個(gè)linux內(nèi)核得patch;我剛開(kāi)始學(xué)習(xí)linux所以麻煩各位大牛解釋一下
我想知道得是pci_read_config_word(dev, 0xF2, &val);讀取得是這個(gè)設(shè)備得什么信息?


勞煩各位指點(diǎn)一下;不勝感激;


Asus hides the SMBus PCI bridge within the ICH2 or ICH4 southbridge on
Asus P4B/P4PE mainboards. The attached patch adds a quirk to re-enable the
SMBus PCI bridge for P4B533 and P4PE mainboards.

           Dominik

diff -ru linux-original/drivers/pci/quirks.c linux/drivers/pci/quirks.c
--- linux-original/drivers/pci/quirks.c        2003-03-19 22:13:57.000000000 +0100
+++ linux/drivers/pci/quirks.c        2003-03-19 22:14:52.000000000 +0100
@@ -647,6 +647,53 @@
}

/*
+ * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
+ * is not activated. The myth is that Asus said that they do not want the
+ * users to be irritated by just another PCI Device in the Win98 device
+ * manager. (see the file prog/hotplug/README.p4b in the lm_sensors
+ * package 2.7.0 for details)
+ *
+ * The SMBus PCI Device can be activated by setting a bit in the ICH LPC
+ * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it
+ * becomes necessary to do this tweak in two steps -- I've chosen the Host
+ * bridge as trigger.
+ */
+
+static int __initdata asus_hides_smbus = 0;
+
+static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
+{
+        if (likely(dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK))
+                return;
+
+        if ((dev->device == PCI_DEVICE_ID_INTEL_82845_HB) &&
+            (dev->subsystem_device == 0x808) /* P4B533 */
+                asus_hides_smbus = 1;
+        if ((dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) &&
+            (dev->subsystem_device == 0x80b2)) /* P4PE */
+                asus_hides_smbus = 1;
+        return;
+}
+
+static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
+{
+        u16 val;
+       
+        if (likely(!asus_hides_smbus))
+                return;
+
+        pci_read_config_word(dev, 0xF2, &val);
+        if (val & 0x {
+                pci_write_config_word(dev, 0xF2, val & (~0x);
+                pci_read_config_word(dev, 0xF2, &val);
+                if(val & 0x
+                        printk(KERN_INFO "CI: i801 SMBus device continues to play 'hide and seek'! 0x%x\n", val);
+                else
+                        printk(KERN_INFO "CI: Enabled i801 SMBus device\n";
+        }
+}
+
+/*
  *  The main table of quirks.
  */

@@ -724,6 +771,13 @@
       
        { PCI_FIXUP_HEADER,        PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82375,        quirk_eisa_bridge },

+        /*
+         * on Asus P4B boards, the i801SMBus device is disabled at startup.
+         */
+        { PCI_FIXUP_HEADER,        PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82845_HB,        asus_hides_smbus_hostbridge },
+        { PCI_FIXUP_HEADER,        PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82845G_HB,        asus_hides_smbus_hostbridge },
+        { PCI_FIXUP_HEADER,        PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82801DB_0,        asus_hides_smbus_lpc },
+
        { 0 }
};

論壇徽章:
5
2 [報(bào)告]
發(fā)表于 2006-04-21 10:10 |只看該作者
原帖由 haohao06 于 2006-4-20 17:05 發(fā)表
最近需要通過(guò)smbus來(lái)讀取一些信息,但是在一些機(jī)器上smbus好像被隱藏了.我google了好久就找到了一個(gè)linux內(nèi)核得patch;我剛開(kāi)始學(xué)習(xí)linux所以麻煩各位大牛解釋一下
我想知道得是pci_read_config_word(dev, 0xF2, & ...


讀配置空間的內(nèi)容. 至于具體的意義, 要參考硬件的spec, 有對(duì)配置空間的詳細(xì)描述.
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP