Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255383
b: refs/heads/master
c: 1de520f
h: refs/heads/master
i:
  255381: 7b2da07
  255379: bbe2560
  255375: 201425b
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jun 1, 2011
1 parent af6f376 commit 77fa55d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33e6ef4e82f1de4f9a98a86633412390a322e2e8
refs/heads/master: 1de520f4767cb836828d074db533f93d0ca85998
23 changes: 23 additions & 0 deletions trunk/drivers/bcma/driver_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,26 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
{
bcma_pcicore_serdes_workaround(pc);
}

int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
bool enable)
{
struct pci_dev *pdev = pc->core->bus->host_pci;
u32 coremask, tmp;
int err;

err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
if (err)
goto out;

coremask = BIT(core->core_index) << 8;
if (enable)
tmp |= coremask;
else
tmp &= ~coremask;

err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);

out:
return err;
}

0 comments on commit 77fa55d

Please sign in to comment.