Commit 08adefd4 authored by Brent Casavant's avatar Brent Casavant Committed by Linus Torvalds

ioc4: automatically load sgiioc4 subordinate module

Modify ioc4 to always load the sgiioc4 IDE module if the board carrying
the IOC4 hardware actually implements the IDE interface (not all boards
bring this functionality off the IOC4 chip).  A drive hosted on the IDE
interface may contain the root filesystem, and sgiioc4 doesn't load
automatically as ioc4 owns the PCI device ID, not sgiioc4.

[ coding-style fixes]
Signed-off-by: default avatarMichael Reed <>
Signed-off-by: default avatarBrent Casavant <>
Cc: Bartlomiej Zolnierkiewicz <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent bfa0b1c3
......@@ -269,6 +269,16 @@ ioc4_variant(struct ioc4_driver_data *idd)
static void
ioc4_load_modules(struct work_struct *work)
/* arg just has to be freed */
/* Adds a new instance of an IOC4 card */
static int
ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
......@@ -378,6 +388,30 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
/* Request sgiioc4 IDE driver on boards that bring that functionality
* off of IOC4. The root filesystem may be hosted on a drive connected
* to IOC4, so we need to make sure the sgiioc4 driver is loaded as it
* won't be picked up by modprobes due to the ioc4 module owning the
* PCI device.
if (idd->idd_variant != IOC4_VARIANT_PCI_RT) {
struct work_struct *work;
work = kzalloc(sizeof(struct work_struct), GFP_KERNEL);
if (!work) {
"%s: IOC4 unable to allocate memory for "
"load of sub-modules.\n", __func__);
} else {
/* Request the module from a work procedure as the
* modprobe goes out to a userland helper and that
* will hang if done directly from ioc4_probe().
printk(KERN_INFO "IOC4 loading sgiioc4 submodule\n");
INIT_WORK(work, ioc4_load_modules);
return 0;
......@@ -462,6 +496,8 @@ ioc4_init(void)
static void __devexit
/* Ensure ioc4_load_modules() has completed before exiting */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment