Mercurial > illumos > illumos-gate
changeset 3953:f116008e2db3
6502750 px driver must enable, disable, and redistribute its hotplug interrupt
author | scarter |
---|---|
date | Mon, 02 Apr 2007 18:37:19 -0700 |
parents | e932b8e8ca41 |
children | 01e658eeea5a |
files | usr/src/uts/sun4/io/px/px_ib.c usr/src/uts/sun4/io/px/px_lib.h usr/src/uts/sun4u/io/px/px_lib4u.c usr/src/uts/sun4v/io/px/px_lib4v.c |
diffstat | 4 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sun4/io/px/px_ib.c Mon Apr 02 18:15:26 2007 -0700 +++ b/usr/src/uts/sun4/io/px/px_ib.c Mon Apr 02 18:37:19 2007 -0700 @@ -305,6 +305,8 @@ px_ib_intr_dist_en(dip, intr_dist_cpuid(), px_p->px_inos[PX_INTR_PEC], B_FALSE); mutex_exit(&ib_p->ib_intr_lock); + + px_hp_intr_redist(px_p); } /* Redistribute device interrupts */
--- a/usr/src/uts/sun4/io/px/px_lib.h Mon Apr 02 18:15:26 2007 -0700 +++ b/usr/src/uts/sun4/io/px/px_lib.h Mon Apr 02 18:37:19 2007 -0700 @@ -206,6 +206,7 @@ */ extern int px_lib_hotplug_init(dev_info_t *dip, void *regops); extern void px_lib_hotplug_uninit(dev_info_t *dip); +extern void px_hp_intr_redist(px_t *px_p); extern boolean_t px_lib_is_in_drain_state(px_t *px_p); extern pcie_req_id_t px_lib_get_bdf(px_t *px_p);
--- a/usr/src/uts/sun4u/io/px/px_lib4u.c Mon Apr 02 18:15:26 2007 -0700 +++ b/usr/src/uts/sun4u/io/px/px_lib4u.c Mon Apr 02 18:37:19 2007 -0700 @@ -2519,6 +2519,9 @@ VERIFY(add_ivintr(sysino, PX_PCIEHP_PIL, (intrfunc)px_hp_intr, (caddr_t)px_p, NULL, NULL) == 0); + + px_ib_intr_enable(px_p, intr_dist_cpuid(), + px_p->px_inos[PX_INTR_HOTPLUG]); } return (ret); @@ -2542,10 +2545,25 @@ return; } + px_ib_intr_disable(px_p->px_ib_p, + px_p->px_inos[PX_INTR_HOTPLUG], IB_INTR_WAIT); + VERIFY(rem_ivintr(sysino, PX_PCIEHP_PIL) == 0); } } +/* + * px_hp_intr_redist() - sun4u only, HP interrupt redistribution + */ +void +px_hp_intr_redist(px_t *px_p) +{ + if (px_p && (px_p->px_dev_caps & PX_HOTPLUG_CAPABLE)) { + px_ib_intr_dist_en(px_p->px_dip, intr_dist_cpuid(), + px_p->px_inos[PX_INTR_HOTPLUG], B_FALSE); + } +} + boolean_t px_lib_is_in_drain_state(px_t *px_p) {