Browse Source

Fix some remarkably obvious mistakes in pcidirect.h

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
191a906338
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/arch/i386/include/pcidirect.h

+ 3
- 3
src/arch/i386/include/pcidirect.h View File

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
 

Loading…
Cancel
Save