Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > f688fb39cfed0426a20c0bac7361c521 > files > 2

systemd-253.7-1.mga9.src.rpm

From 51cda725533a217fd194c26a90e9c8c72a7e8c4d Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@mandriva.com>
Date: Sun, 1 Jul 2012 17:44:41 +0100
Subject: [PATCH 502/509] Disable modprobe pci devices on coldplug for storage
 and display

Signed-off-by: Frederic Crozat <fcrozat@mandriva.com>
---
 rules.d/80-drivers.rules | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/rules.d/80-drivers.rules b/rules.d/80-drivers.rules
index 16fa5d8e3..f99b99425 100644
--- a/rules.d/80-drivers.rules
+++ b/rules.d/80-drivers.rules
@@ -1,6 +1,16 @@
 # do not edit this file, it will be overwritten on update
 
 ACTION!="add", GOTO="drivers_end"
+
+# modprobe pci devices on cold plug except for:
+#  PCI_BASE_CLASS_STORAGE          0x01
+SUBSYSTEM=="pci", ENV{STARTUP}=="1", ATTR{class}=="0x01*", GOTO="drivers_end"
+
+# for display (0x03) devices
+# - use a special conflict-filtering script when not in initrd
+SUBSYSTEM=="pci", ATTR{class}=="0x03*", DRIVER!="?*", TEST=="/initrd", RUN+="/sbin/display_driver_helper --load $env{MODALIAS}", GOTO="drivers_end"
+# - skip loading if in initrd (i.e. no /initrd) and nokmsboot or failsafe is specified
+SUBSYSTEM=="pci", ATTR{class}=="0x03*", DRIVER!="?*", PROGRAM="/bin/grep -qFw -e nokmsboot -e failsafe /proc/cmdline", GOTO="drivers_end"
 
 ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load"
 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd"