aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2009-12-15 07:25:25 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-12-16 16:37:50 -0500
commit2820f333e3b4ad96590093efbed7b3400bcf492b (patch)
tree47a9e4ebacfc0df5c070a1f70cc68a9f9af4e164 /drivers/pci
parentdc1a94ae1749d14c55f8b54e9d92bd89df82d51a (diff)
PCI: Handle case when no pci device can provide cache line size hint
Prior to this patch, if pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, ...) returns 0 for all dev, pci_cache_line_size ends up set to zero (instead of pci_dfl_cache_line_size). This patch ensures the pci_cache_line_size = pci_dfl_cache_line_size setting in the above scenario. This happens in case of a kvm-88 guest (where, consequently, the rtl8139 NIC failed to initialize). Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/quirks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7cfa7c38d318..f70f4e23225c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2629,7 +2629,7 @@ static int __init pci_apply_final_quirks(void)
2629 if (!pci_cache_line_size) { 2629 if (!pci_cache_line_size) {
2630 printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n", 2630 printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n",
2631 cls << 2, pci_dfl_cache_line_size << 2); 2631 cls << 2, pci_dfl_cache_line_size << 2);
2632 pci_cache_line_size = cls; 2632 pci_cache_line_size = cls ? cls : pci_dfl_cache_line_size;
2633 } 2633 }
2634 2634
2635 return 0; 2635 return 0;