Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362907
b: refs/heads/master
c: 9925ad0
h: refs/heads/master
i:
  362905: c405355
  362903: 0927c4d
v: v3
  • Loading branch information
Bjorn Helgaas committed Apr 23, 2013
1 parent 1160879 commit b4e83b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 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: f84ecd285f40012f804173110c10f2caaa23b7ee
refs/heads/master: 9925ad0cf12675203cf209e1d96ebab19f19c86a
16 changes: 8 additions & 8 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
int pos = dev->msi_cap;
u16 data;

pci_read_config_dword(dev, msi_lower_address_reg(pos),
&msg->address_lo);
pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_LO,
&msg->address_lo);
if (entry->msi_attrib.is_64) {
pci_read_config_dword(dev, msi_upper_address_reg(pos),
&msg->address_hi);
pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
&msg->address_hi);
pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
} else {
msg->address_hi = 0;
Expand Down Expand Up @@ -304,11 +304,11 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
msgctl |= entry->msi_attrib.multiple << 4;
pci_write_config_word(dev, pos + PCI_MSI_FLAGS, msgctl);

pci_write_config_dword(dev, msi_lower_address_reg(pos),
msg->address_lo);
pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_LO,
msg->address_lo);
if (entry->msi_attrib.is_64) {
pci_write_config_dword(dev, msi_upper_address_reg(pos),
msg->address_hi);
pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
msg->address_hi);
pci_write_config_word(dev, msi_data_reg(pos, 1),
msg->data);
} else {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/pci/msi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef MSI_H
#define MSI_H

#define msi_lower_address_reg(base) (base + PCI_MSI_ADDRESS_LO)
#define msi_upper_address_reg(base) (base + PCI_MSI_ADDRESS_HI)
#define msi_data_reg(base, is64bit) \
(base + ((is64bit == 1) ? PCI_MSI_DATA_64 : PCI_MSI_DATA_32))
#define msi_mask_reg(base, is64bit) \
Expand Down

0 comments on commit b4e83b7

Please sign in to comment.