Commit 6c816ad1 authored by Ben Collins's avatar Ben Collins

IEEE1394(r1141): Add an "ignore_drivers" global default.

parent 40f0e2b8
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/moduleparam.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include "ieee1394_types.h" #include "ieee1394_types.h"
...@@ -28,6 +29,10 @@ ...@@ -28,6 +29,10 @@
#include "csr.h" #include "csr.h"
#include "nodemgr.h" #include "nodemgr.h"
static int ignore_drivers = 0;
module_param(ignore_drivers, int, 0444);
MODULE_PARM_DESC(ignore_drivers, "Disable automatic probing for drivers.");
struct nodemgr_csr_info { struct nodemgr_csr_info {
struct hpsb_host *host; struct hpsb_host *host;
nodeid_t nodeid; nodeid_t nodeid;
...@@ -370,9 +375,29 @@ static ssize_t fw_get_rescan(struct bus_type *bus, char *buf) ...@@ -370,9 +375,29 @@ static ssize_t fw_get_rescan(struct bus_type *bus, char *buf)
} }
static BUS_ATTR(rescan, S_IWUSR | S_IRUGO, fw_get_rescan, fw_set_rescan); static BUS_ATTR(rescan, S_IWUSR | S_IRUGO, fw_get_rescan, fw_set_rescan);
static ssize_t fw_set_ignore_drivers(struct bus_type *bus, const char *buf, size_t count)
{
int state = simple_strtoul(buf, NULL, 10);
if (state == 1)
ignore_drivers = 1;
else if (!state)
ignore_drivers = 0;
return count;
}
static ssize_t fw_get_ignore_drivers(struct bus_type *bus, char *buf)
{
return sprintf(buf, "%d\n", ignore_drivers);
}
static BUS_ATTR(ignore_drivers, S_IWUSR | S_IRUGO, fw_get_ignore_drivers, fw_set_ignore_drivers);
struct bus_attribute *const fw_bus_attrs[] = { struct bus_attribute *const fw_bus_attrs[] = {
&bus_attr_destroy_node, &bus_attr_destroy_node,
&bus_attr_rescan, &bus_attr_rescan,
&bus_attr_ignore_drivers,
NULL NULL
}; };
...@@ -854,6 +879,7 @@ static struct unit_directory *nodemgr_process_unit_directory ...@@ -854,6 +879,7 @@ static struct unit_directory *nodemgr_process_unit_directory
memset (ud, 0, sizeof(struct unit_directory)); memset (ud, 0, sizeof(struct unit_directory));
ud->ne = ne; ud->ne = ne;
ud->ignore_driver = ignore_drivers;
ud->address = ud_kv->offset + CSR1212_CONFIG_ROM_SPACE_BASE; ud->address = ud_kv->offset + CSR1212_CONFIG_ROM_SPACE_BASE;
ud->ud_kv = ud_kv; ud->ud_kv = ud_kv;
ud->id = (*id)++; ud->id = (*id)++;
......
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