1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

- Fix PCI routing code

This commit is contained in:
Oleksandr Tymoshenko 2009-07-08 17:20:53 +00:00
parent 5ac0137013
commit 63080dcd94
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=195474
2 changed files with 8 additions and 1 deletions

View File

@ -513,8 +513,11 @@ ar71xx_pci_maxslots(device_t dev)
static int
ar71xx_pci_route_interrupt(device_t pcib, device_t device, int pin)
{
if (pci_get_slot(device) < AR71XX_PCI_BASE_SLOT)
panic("%s: PCI slot %d is less then AR71XX_PCI_BASE_SLOT",
__func__, pci_get_slot(device));
return (pin);
return (pci_get_slot(device) - AR71XX_PCI_BASE_SLOT);
}
static device_method_t ar71xx_pci_methods[] = {

View File

@ -42,6 +42,10 @@
#define AR71XX_PCI_IRQ_START 0
#define AR71XX_PCI_IRQ_END 2
#define AR71XX_PCI_NIRQS 3
/*
* PCI devices slots are starting from this number
*/
#define AR71XX_PCI_BASE_SLOT 17
/* PCI config registers */
#define AR71XX_PCI_LCONF_CMD 0x17010000