Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106951
b: refs/heads/master
c: ce6fce4
h: refs/heads/master
i:
  106949: 26da13b
  106947: 406a9c9
  106943: 3f8448c
v: v3
  • Loading branch information
Matthew Wilcox authored and Jesse Barnes committed Jul 28, 2008
1 parent e9bbdcb commit c4a795f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29111f579f4f3f2a07385f931854ab0527ae7ea5
refs/heads/master: ce6fce4295ba727b36fdc73040e444bd1aae64cd
15 changes: 12 additions & 3 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ static void msix_flush_writes(unsigned int irq)
}
}

static void msi_set_mask_bits(unsigned int irq, u32 mask, u32 flag)
/*
* PCI 2.3 does not specify mask bits for each MSI interrupt. Attempting to
* mask all MSI interrupts by clearing the MSI enable bit does not work
* reliably as devices without an INTx disable bit will then generate a
* level IRQ which will never be cleared.
*
* Returns 1 if it succeeded in masking the interrupt and 0 if the device
* doesn't support MSI masking.
*/
static int msi_set_mask_bits(unsigned int irq, u32 mask, u32 flag)
{
struct msi_desc *entry;

Expand All @@ -144,8 +153,7 @@ static void msi_set_mask_bits(unsigned int irq, u32 mask, u32 flag)
mask_bits |= flag & mask;
pci_write_config_dword(entry->dev, pos, mask_bits);
} else {
__msi_set_enable(entry->dev, entry->msi_attrib.pos,
!flag);
return 0;
}
break;
case PCI_CAP_ID_MSIX:
Expand All @@ -161,6 +169,7 @@ static void msi_set_mask_bits(unsigned int irq, u32 mask, u32 flag)
break;
}
entry->msi_attrib.masked = !!flag;
return 1;
}

void read_msi_msg(unsigned int irq, struct msi_msg *msg)
Expand Down

0 comments on commit c4a795f

Please sign in to comment.