浏览代码

Fix some remarkably obvious mistakes in pcidirect.h

tags/v0.9.3
Michael Brown 19 年前
父节点
当前提交
191a906338
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/arch/i386/include/pcidirect.h

+ 3
- 3
src/arch/i386/include/pcidirect.h 查看文件

71
 pcidirect_read_config_dword ( struct pci_device *pci, unsigned int where,
71
 pcidirect_read_config_dword ( struct pci_device *pci, unsigned int where,
72
 			      uint32_t *value ) {
72
 			      uint32_t *value ) {
73
 	pcidirect_prepare ( pci, where );
73
 	pcidirect_prepare ( pci, where );
74
-	*value = inl ( PCIDIRECT_CONFIG_DATA + where );
74
+	*value = inl ( PCIDIRECT_CONFIG_DATA );
75
 	return 0;
75
 	return 0;
76
 }
76
 }
77
 
77
 
103
 pcidirect_write_config_word ( struct pci_device *pci, unsigned int where,
103
 pcidirect_write_config_word ( struct pci_device *pci, unsigned int where,
104
 			      uint16_t value ) {
104
 			      uint16_t value ) {
105
 	pcidirect_prepare ( pci, where );
105
 	pcidirect_prepare ( pci, where );
106
-	outb ( value, PCIDIRECT_CONFIG_DATA + ( where & 2 ) );
106
+	outw ( value, PCIDIRECT_CONFIG_DATA + ( where & 2 ) );
107
 	return 0;
107
 	return 0;
108
 }
108
 }
109
 
109
 
119
 pcidirect_write_config_dword ( struct pci_device *pci, unsigned int where,
119
 pcidirect_write_config_dword ( struct pci_device *pci, unsigned int where,
120
 			       uint32_t value ) {
120
 			       uint32_t value ) {
121
 	pcidirect_prepare ( pci, where );
121
 	pcidirect_prepare ( pci, where );
122
-	outb ( value, PCIDIRECT_CONFIG_DATA + where );
122
+	outl ( value, PCIDIRECT_CONFIG_DATA );
123
 	return 0;
123
 	return 0;
124
 }
124
 }
125
 
125
 

正在加载...
取消
保存