pci: switched PCI::[Read|Write]Config to type uint16 for the offset.

This commit is contained in:
Jérôme Duval
2013-06-22 19:48:54 +02:00
parent ce353e5d6e
commit e1c44764ef
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -1467,7 +1467,7 @@ PCI::_RefreshDeviceInfo(PCIBus *bus)
status_t
PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
uint8 offset, uint8 size, uint32 *value)
uint16 offset, uint8 size, uint32 *value)
{
domain_data *info = _GetDomainData(domain);
if (!info)
@@ -1490,7 +1490,7 @@ PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
uint32
PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
uint8 offset, uint8 size)
uint16 offset, uint8 size)
{
uint32 value;
if (ReadConfig(domain, bus, device, function, offset, size, &value)
@@ -1502,7 +1502,7 @@ PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
uint32
PCI::ReadConfig(PCIDev *device, uint8 offset, uint8 size)
PCI::ReadConfig(PCIDev *device, uint16 offset, uint8 size)
{
uint32 value;
if (ReadConfig(device->domain, device->bus, device->device,
@@ -1515,7 +1515,7 @@ PCI::ReadConfig(PCIDev *device, uint8 offset, uint8 size)
status_t
PCI::WriteConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
uint8 offset, uint8 size, uint32 value)
uint16 offset, uint8 size, uint32 value)
{
domain_data *info = _GetDomainData(domain);
if (!info)
@@ -1537,7 +1537,7 @@ PCI::WriteConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
status_t
PCI::WriteConfig(PCIDev *device, uint8 offset, uint8 size, uint32 value)
PCI::WriteConfig(PCIDev *device, uint16 offset, uint8 size, uint32 value)
{
return WriteConfig(device->domain, device->bus, device->device,
device->function, offset, size, value);
+5 -5
View File
@@ -77,17 +77,17 @@ public:
status_t GetNthInfo(long index, pci_info *outInfo);
status_t ReadConfig(uint8 domain, uint8 bus, uint8 device,
uint8 function, uint8 offset, uint8 size,
uint8 function, uint16 offset, uint8 size,
uint32 *value);
uint32 ReadConfig(uint8 domain, uint8 bus, uint8 device,
uint8 function, uint8 offset, uint8 size);
uint32 ReadConfig(PCIDev *device, uint8 offset,
uint8 function, uint16 offset, uint8 size);
uint32 ReadConfig(PCIDev *device, uint16 offset,
uint8 size);
status_t WriteConfig(uint8 domain, uint8 bus, uint8 device,
uint8 function, uint8 offset, uint8 size,
uint8 function, uint16 offset, uint8 size,
uint32 value);
status_t WriteConfig(PCIDev *device, uint8 offset,
status_t WriteConfig(PCIDev *device, uint16 offset,
uint8 size, uint32 value);
status_t FindCapability(uint8 domain, uint8 bus,