mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Fix interrupt routing for some cards after the previous fix to clear BARs
in cardbus cards: update the saved copy of the PCIR_INTLINE register in the PCI ivars in addition to the actual register. Reviewed by: imp
This commit is contained in:
parent
567590460f
commit
d193b870a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169633
@ -75,7 +75,7 @@ static int cardbus_attach(device_t cbdev);
|
||||
static int cardbus_attach_card(device_t cbdev);
|
||||
static int cardbus_detach(device_t cbdev);
|
||||
static int cardbus_detach_card(device_t cbdev);
|
||||
static void cardbus_device_setup_regs(device_t dev);
|
||||
static void cardbus_device_setup_regs(pcicfgregs *cfg);
|
||||
static void cardbus_driver_added(device_t cbdev, driver_t *driver);
|
||||
static int cardbus_probe(device_t cbdev);
|
||||
static int cardbus_read_ivar(device_t cbdev, device_t child, int which,
|
||||
@ -136,8 +136,9 @@ cardbus_resume(device_t self)
|
||||
/************************************************************************/
|
||||
|
||||
static void
|
||||
cardbus_device_setup_regs(device_t dev)
|
||||
cardbus_device_setup_regs(pcicfgregs *cfg)
|
||||
{
|
||||
device_t dev = cfg->dev;
|
||||
int i;
|
||||
|
||||
/*
|
||||
@ -147,9 +148,9 @@ cardbus_device_setup_regs(device_t dev)
|
||||
for (i = 0; i < PCI_MAX_BAR_0; i++)
|
||||
pci_write_config(dev, PCIR_BAR(i), 0, 4);
|
||||
|
||||
/* XXXimp is getting the interrpt like this right? */
|
||||
pci_write_config(dev, PCIR_INTLINE,
|
||||
pci_get_irq(device_get_parent(device_get_parent(dev))), 1);
|
||||
cfg->intline =
|
||||
pci_get_irq(device_get_parent(device_get_parent(dev)));
|
||||
pci_write_config(dev, PCIR_INTLINE, cfg->intline, 1);
|
||||
pci_write_config(dev, PCIR_CACHELNSZ, 0x08, 1);
|
||||
pci_write_config(dev, PCIR_LATTIMER, 0xa8, 1);
|
||||
pci_write_config(dev, PCIR_MINGNT, 0x14, 1);
|
||||
@ -194,7 +195,7 @@ cardbus_attach_card(device_t cbdev)
|
||||
DEVPRINTF((cbdev, "Warning: Bogus CIS ignored\n"));
|
||||
pci_cfg_save(dinfo->pci.cfg.dev, &dinfo->pci, 0);
|
||||
pci_cfg_restore(dinfo->pci.cfg.dev, &dinfo->pci);
|
||||
cardbus_device_setup_regs(dinfo->pci.cfg.dev);
|
||||
cardbus_device_setup_regs(&dinfo->pci.cfg);
|
||||
pci_add_resources(cbdev, child, 1, dinfo->mprefetchable);
|
||||
pci_print_verbose(&dinfo->pci);
|
||||
if (device_probe_and_attach(child) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user