mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
[pci] Use single "busdevfn" field in struct pci_device
Merge the "bus" and "devfn" fields into a single "busdevfn" field, to match the format used by the majority of external code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -73,7 +73,7 @@ int pcibios_read ( struct pci_device *pci, uint32_t command, uint32_t *value ){
|
||||
: "=a" ( status ), "=b" ( discard_b ),
|
||||
"=c" ( *value ), "=D" ( discard_D )
|
||||
: "a" ( command >> 16 ), "D" ( command ),
|
||||
"b" ( PCI_BUSDEVFN ( pci->bus, pci->devfn ) )
|
||||
"b" ( pci->busdevfn )
|
||||
: "edx" );
|
||||
|
||||
return ( ( status >> 8 ) & 0xff );
|
||||
@@ -99,8 +99,7 @@ int pcibios_write ( struct pci_device *pci, uint32_t command, uint32_t value ){
|
||||
: "=a" ( status ), "=b" ( discard_b ),
|
||||
"=c" ( discard_c ), "=D" ( discard_D )
|
||||
: "a" ( command >> 16 ), "D" ( command ),
|
||||
"b" ( PCI_BUSDEVFN ( pci->bus, pci->devfn ) ),
|
||||
"c" ( value )
|
||||
"b" ( pci->busdevfn ), "c" ( value )
|
||||
: "edx" );
|
||||
|
||||
return ( ( status >> 8 ) & 0xff );
|
||||
|
||||
Reference in New Issue
Block a user