linux-esx always had an issue with IDE probing reporting error message:
"ata_piix 0000:00:07.1: BMDMA: BAR4 is zero, failing back to PIO"
It was caused by initial pci probe optimization which skipped initial
pci_read_bases() for IDE PCI class devices before legacy IDE quirk code.
Restoring it back fixed the problem.
Change-Id: I381c1c27ccd3e47749772e7d21747612e711f329
Fixes: #788
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6275
Tested-by: michellew <michellew@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
... | ... |
@@ -3,7 +3,24 @@ From: Alexey Makhalov <amakhalov@vmware.com> |
3 | 3 |
Date: Tue, 29 Sep 2015 15:55:49 -0700 |
4 | 4 |
Subject: [PATCH] pci/probe.c: Hardcodded pci probe. |
5 | 5 |
|
6 |
-Added pci=scan_all cmdline parameter to verify hardcodded pci values |
|
6 |
+PCI probing takes a long time to scan resources for all devices |
|
7 |
+on PCI bus. Idea of this patch is to hardcode known resources |
|
8 |
+for known devices. In VMware hypervisor we do not have much |
|
9 |
+virtual PCI devices. |
|
10 |
+ |
|
11 |
+is_known_device() has list of known devices and available |
|
12 |
+resources (BARs) for them. |
|
13 |
+It returns: 0 if BAR not available for the given device |
|
14 |
+ 1 if available and sz parameter will have BAR size |
|
15 |
+ |
|
16 |
+guess_bar_count() returns maximum number of BARs for the given |
|
17 |
+class to do not probe for all 6 bars |
|
18 |
+ |
|
19 |
+has_rom() returns 0 if given class does not have any ROM BARs, |
|
20 |
+which allows to skip ROM probing |
|
21 |
+ |
|
22 |
+Added pci=scan_all cmdline parameter verifies hardcodded pci |
|
23 |
+values at runtime. |
|
7 | 24 |
--- |
8 | 25 |
drivers/pci/pci.c | 2 + |
9 | 26 |
drivers/pci/pci.h | 2 + |
... | ... |
@@ -458,10 +475,10 @@ index d266d800f246..11544ddd6e5c 100644 |
458 | 458 |
+ |
459 | 459 |
+ if (pci_scan_and_verify) |
460 | 460 |
+ pci_read_bases(dev, 6, PCI_ROM_ADDRESS); |
461 |
-+ else if (class != PCI_CLASS_STORAGE_IDE) |
|
461 |
++ else |
|
462 | 462 |
+ pci_read_bases(dev, |
463 |
-+ guess_bar_count(dev->class), |
|
464 |
-+ has_rom(dev->class, PCI_ROM_ADDRESS)); |
|
463 |
++ guess_bar_count(dev->class), |
|
464 |
++ has_rom(dev->class, PCI_ROM_ADDRESS)); |
|
465 | 465 |
+ |
466 | 466 |
pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &dev->subsystem_vendor); |
467 | 467 |
pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-esx |
4 | 4 |
Version: 4.9.140 |
5 |
-Release: 1%{?dist} |
|
5 |
+Release: 2%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
... | ... |
@@ -233,6 +233,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg |
233 | 233 |
/usr/src/linux-headers-%{uname_r} |
234 | 234 |
|
235 | 235 |
%changelog |
236 |
+* Mon Dec 03 2018 Alexey Makhalov <amakhalov@vmware.com> 4.9.140-2 |
|
237 |
+- Fix BAR4 is zero issue for IDE devices |
|
236 | 238 |
* Mon Nov 26 2018 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 4.9.140-1 |
237 | 239 |
- Update to version 4.9.140 |
238 | 240 |
* Fri Nov 16 2018 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 4.9.137-1 |