pci: switched PCI::[Read|Write]Config to type uint16 for the offset.
This commit is contained in:
@@ -1467,7 +1467,7 @@ PCI::_RefreshDeviceInfo(PCIBus *bus)
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
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);
|
domain_data *info = _GetDomainData(domain);
|
||||||
if (!info)
|
if (!info)
|
||||||
@@ -1490,7 +1490,7 @@ PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
|||||||
|
|
||||||
uint32
|
uint32
|
||||||
PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
PCI::ReadConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
||||||
uint8 offset, uint8 size)
|
uint16 offset, uint8 size)
|
||||||
{
|
{
|
||||||
uint32 value;
|
uint32 value;
|
||||||
if (ReadConfig(domain, bus, device, function, offset, size, &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
|
uint32
|
||||||
PCI::ReadConfig(PCIDev *device, uint8 offset, uint8 size)
|
PCI::ReadConfig(PCIDev *device, uint16 offset, uint8 size)
|
||||||
{
|
{
|
||||||
uint32 value;
|
uint32 value;
|
||||||
if (ReadConfig(device->domain, device->bus, device->device,
|
if (ReadConfig(device->domain, device->bus, device->device,
|
||||||
@@ -1515,7 +1515,7 @@ PCI::ReadConfig(PCIDev *device, uint8 offset, uint8 size)
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
PCI::WriteConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
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);
|
domain_data *info = _GetDomainData(domain);
|
||||||
if (!info)
|
if (!info)
|
||||||
@@ -1537,7 +1537,7 @@ PCI::WriteConfig(uint8 domain, uint8 bus, uint8 device, uint8 function,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
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,
|
return WriteConfig(device->domain, device->bus, device->device,
|
||||||
device->function, offset, size, value);
|
device->function, offset, size, value);
|
||||||
|
|||||||
@@ -77,17 +77,17 @@ public:
|
|||||||
status_t GetNthInfo(long index, pci_info *outInfo);
|
status_t GetNthInfo(long index, pci_info *outInfo);
|
||||||
|
|
||||||
status_t ReadConfig(uint8 domain, uint8 bus, uint8 device,
|
status_t ReadConfig(uint8 domain, uint8 bus, uint8 device,
|
||||||
uint8 function, uint8 offset, uint8 size,
|
uint8 function, uint16 offset, uint8 size,
|
||||||
uint32 *value);
|
uint32 *value);
|
||||||
uint32 ReadConfig(uint8 domain, uint8 bus, uint8 device,
|
uint32 ReadConfig(uint8 domain, uint8 bus, uint8 device,
|
||||||
uint8 function, uint8 offset, uint8 size);
|
uint8 function, uint16 offset, uint8 size);
|
||||||
uint32 ReadConfig(PCIDev *device, uint8 offset,
|
uint32 ReadConfig(PCIDev *device, uint16 offset,
|
||||||
uint8 size);
|
uint8 size);
|
||||||
|
|
||||||
status_t WriteConfig(uint8 domain, uint8 bus, uint8 device,
|
status_t WriteConfig(uint8 domain, uint8 bus, uint8 device,
|
||||||
uint8 function, uint8 offset, uint8 size,
|
uint8 function, uint16 offset, uint8 size,
|
||||||
uint32 value);
|
uint32 value);
|
||||||
status_t WriteConfig(PCIDev *device, uint8 offset,
|
status_t WriteConfig(PCIDev *device, uint16 offset,
|
||||||
uint8 size, uint32 value);
|
uint8 size, uint32 value);
|
||||||
|
|
||||||
status_t FindCapability(uint8 domain, uint8 bus,
|
status_t FindCapability(uint8 domain, uint8 bus,
|
||||||
|
|||||||
Reference in New Issue
Block a user