diff options
| author | Irene Zubarev <zubarev@us.ibm.com> | 2002-09-09 00:39:59 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-09-09 00:39:59 -0700 |
| commit | 9adaeddf526a83c4ad09b33588f20679bec85e22 (patch) | |
| tree | ccb944d9142c99f7aa926e54f9220fc4b3144112 /drivers/hotplug/ibmphp_ebda.c | |
| parent | af6e9e0779ac113bec6fab4aa4808475c897a8fe (diff) | |
[PATCH] IBM PCI Hotplug driver update for ISA based controllers
Diffstat (limited to 'drivers/hotplug/ibmphp_ebda.c')
| -rw-r--r-- | drivers/hotplug/ibmphp_ebda.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/hotplug/ibmphp_ebda.c b/drivers/hotplug/ibmphp_ebda.c index 4ef1b21cc76f..3fba419e7d07 100644 --- a/drivers/hotplug/ibmphp_ebda.c +++ b/drivers/hotplug/ibmphp_ebda.c @@ -815,6 +815,7 @@ static int __init ebda_rsrc_controller (void) struct ebda_hpc_slot *slot_ptr; struct bus_info *bus_info_ptr1, *bus_info_ptr2; int rc; + int retval; struct slot *slot_cur; struct list_head *list; @@ -933,6 +934,10 @@ static int __init ebda_rsrc_controller (void) case 0: hpc_ptr->u.isa_ctlr.io_start = readw (io_mem + addr); hpc_ptr->u.isa_ctlr.io_end = readw (io_mem + addr + 2); + retval = check_region (hpc_ptr->u.isa_ctlr.io_start, (hpc_ptr->u.isa_ctlr.io_end - hpc_ptr->u.isa_ctlr.io_start + 1)); + if (retval) + return -ENODEV; + request_region (hpc_ptr->u.isa_ctlr.io_start, (hpc_ptr->u.isa_ctlr.io_end - hpc_ptr->u.isa_ctlr.io_start + 1), "ibmphp"); hpc_ptr->irq = readb (io_mem + addr + 4); addr += 5; break; @@ -949,9 +954,9 @@ static int __init ebda_rsrc_controller (void) return -ENODEV; } - /* following 3 line: Now our driver only supports I2c ctlrType */ - if ((hpc_ptr->ctlr_type != 2) && (hpc_ptr->ctlr_type != 4)) { - err ("Please run this driver on ibm xseries440\n "); + /* following 3 line: Now our driver only supports I2c/ISA ctlrType */ + if ((hpc_ptr->ctlr_type != 2) && (hpc_ptr->ctlr_type != 4) && (hpc_ptr->ctlr_type != 0)) { + err ("Please run this driver on IBM xSeries440 or xSeries 235\n "); return -ENODEV; } @@ -1211,6 +1216,8 @@ void ibmphp_free_ebda_hpc_queue (void) list_for_each_safe (list, next, &ebda_hpc_head) { controller = list_entry (list, struct controller, ebda_hpc_list); + if (controller->ctlr_type == 0) + release_region (controller->u.isa_ctlr.io_start, (controller->u.isa_ctlr.io_end - controller->u.isa_ctlr.io_start + 1)); free_ebda_hpc (controller); } } |
