Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142752
b: refs/heads/master
c: 0cdbe30
h: refs/heads/master
v: v3
  • Loading branch information
Yuji Shimada authored and Jesse Barnes committed Apr 6, 2009
1 parent 50fd761 commit 6463d2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 5446a6bdb51e71da7a203e395b0b4c668d559a3a
refs/heads/master: 0cdbe30f0b04466a1fee11b81b3667bd1b982549
14 changes: 9 additions & 5 deletions trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ EXPORT_SYMBOL(pcie_mch_quirk);

#ifdef CONFIG_PCI_QUIRKS
/*
* This quirk function disables the device and releases resources
* which is specified by kernel's boot parameter 'pci=resource_alignment='.
* This quirk function disables memory decoding and releases memory resources
* of the device specified by kernel's boot parameter 'pci=resource_alignment='.
* It also rounds up size to specified alignment.
* Later on, the kernel will assign page-aligned memory resource back
* to that device.
* to the device.
*/
static void __devinit quirk_resource_alignment(struct pci_dev *dev)
{
int i;
struct resource *r;
resource_size_t align, size;
u16 command;

if (!pci_is_reassigndev(dev))
return;
Expand All @@ -58,8 +59,11 @@ static void __devinit quirk_resource_alignment(struct pci_dev *dev)
return;
}

dev_info(&dev->dev, "Disabling device and release resources.\n");
pci_disable_device(dev);
dev_info(&dev->dev,
"Disabling memory decoding and releasing memory resources.\n");
pci_read_config_word(dev, PCI_COMMAND, &command);
command &= ~PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, command);

align = pci_specified_resource_alignment(dev);
for (i=0; i < PCI_BRIDGE_RESOURCES; i++) {
Expand Down

0 comments on commit 6463d2b

Please sign in to comment.