[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] hw-detect: Do not attempt to load ide-generic if paravirt is active.



The lguest and Xen paravirt_ops implementations both reserve all IO
ports in the 0-65535 range which prevents ide-generic from loading and
leads to an error dialog being presented to the user.
---
 packages/hw-detect/debian/changelog |    4 ++++
 packages/hw-detect/hw-detect.sh     |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/packages/hw-detect/debian/changelog b/packages/hw-detect/debian/changelog
index a3eeb4c..a44076e 100644
--- a/packages/hw-detect/debian/changelog
+++ b/packages/hw-detect/debian/changelog
@@ -22,6 +22,10 @@ hw-detect (1.74) UNRELEASED; urgency=low
   * Remove code to wait for initialization of megaraid_mbox driver. Should
     no longer be needed with current kernels.
 
+  [ Ian Campbell ]
+  * Do not attempt to load ide-generic if paravirt has reserved all ioport
+    regions.
+
  -- Gaudenz Steilin <gaudenz@debian.org>  Sat, 25 Jul 2009 13:02:53 +0200
 
 hw-detect (1.73) unstable; urgency=low
diff --git a/packages/hw-detect/hw-detect.sh b/packages/hw-detect/hw-detect.sh
index 43a39aa..a39f082 100755
--- a/packages/hw-detect/hw-detect.sh
+++ b/packages/hw-detect/hw-detect.sh
@@ -310,7 +310,8 @@ fi
 # that have an ISA bus, but that seems like a good start; it could also
 # be done unconditionally.
 if [ -z "$LOAD_IDE" ] && is_not_loaded ide-generic && \
-   [ -e /sys/bus/isa ] && is_available ide-generic; then
+   [ -e /sys/bus/isa ] && is_available ide-generic && \
+   ! grep -q paravirt-ioport /proc/ioports; then
 	update-dev --settle
 	blockdev_count=$(ls /sys/block | wc -w)
 
-- 
1.6.3.3


-- 
Ian Campbell

QOTD:
	"It was so cold last winter that I saw a lawyer with his
	hands in his own pockets."

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: