*** uhci.c.orig 2003-06-13 23:51:36.000000000 +0900 --- uhci.c 2006-12-21 18:51:54.000000000 +0900 *************** *** 2642,2647 **** --- 2642,2666 ---- free_uhci(uhci); } + // XXX + #define MAX_DISABLE_UHCI 16 + static unsigned int disable_uhci[MAX_DISABLE_UHCI] = {0}; + MODULE_PARM(disable_uhci, "0-" __MODULE_STRING(MAX_DISABLE_UHCI) "i"); + MODULE_PARM_DESC(disable_uhci, "I/O address to disable UHCI"); + + static unsigned int is_disable_uhci(unsigned int io_addr) + { + int i; + + for (i = 0; i < MAX_DISABLE_UHCI; i++) { + if (disable_uhci[i] && + disable_uhci[i] == io_addr) return 1; + } + + return 0; + } + // XXX + /* * Allocate a frame list, and then setup the skeleton * *************** *** 2671,2676 **** --- 2690,2701 ---- #endif retval = -ENODEV; + // XXX + if (is_disable_uhci(io_addr)) { + err("this UHCI (at I/O 0x%x) is disabled", io_addr); + goto err_enable_device; + } + // XXX if (pci_enable_device(dev) < 0) { err("couldn't enable PCI device"); goto err_enable_device;