My motherboard happens to have a sata controller on it who's pci ids arent in the AHCI driver by default (a marvell chipset of one flavour or another), and so requires that ID to be added before it'll work. The workaround being to write those IDs in via "echo 1b4b 917a > /sys/bus/pci/drivers/ahci/new_id", the two strings being the vendor ID and device ID.
What I cannot work out is an elegant way to have this happen correctly on boot, short of editing init scripts. It needs to happen before filesystems are mounted, which rules out putting a script in /etc/local.d as that's not loaded in the boot runlevel. I *think* the correct way to do this is to make an appropriate udev rule, but I havent got that working right, possibly I'm approaching it wrong or something. What I've attempted is:
Code: Select all
SUBSYSTEM=="pci", SYSFS{idVendor}=="1b4b", SYSFS{idProduct}=="917a", RUN=="/bin/echo 1b4b 917a >/sys/bus/pci/drivers/ahci/new_id"
The relevant line for the controller from lspci:
Code: Select all
01:00.0 IDE interface: Marvell Technology Group Ltd. Device 917a (rev 11)
EDIT - Fixed a typo and some missing info

