diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 6947d095f7bb..93e820049617 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.86 1999/02/04 15:54:02 bde Exp $ + * $Id: cy.c,v 1.87 1999/04/27 11:14:54 phk Exp $ */ #include "opt_compat.h" @@ -89,6 +89,7 @@ #ifndef SMP #include #endif +#include #include #include @@ -2835,7 +2836,8 @@ cd_getreg(com, reg) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); val = cd_inb(iobase, reg, cy_align); @@ -2860,7 +2862,8 @@ cd_setreg(com, reg, val) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); cd_outb(iobase, reg, cy_align, val); diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 6947d095f7bb..93e820049617 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.86 1999/02/04 15:54:02 bde Exp $ + * $Id: cy.c,v 1.87 1999/04/27 11:14:54 phk Exp $ */ #include "opt_compat.h" @@ -89,6 +89,7 @@ #ifndef SMP #include #endif +#include #include #include @@ -2835,7 +2836,8 @@ cd_getreg(com, reg) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); val = cd_inb(iobase, reg, cy_align); @@ -2860,7 +2862,8 @@ cd_setreg(com, reg, val) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); cd_outb(iobase, reg, cy_align, val); diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 6947d095f7bb..93e820049617 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.86 1999/02/04 15:54:02 bde Exp $ + * $Id: cy.c,v 1.87 1999/04/27 11:14:54 phk Exp $ */ #include "opt_compat.h" @@ -89,6 +89,7 @@ #ifndef SMP #include #endif +#include #include #include @@ -2835,7 +2836,8 @@ cd_getreg(com, reg) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); val = cd_inb(iobase, reg, cy_align); @@ -2860,7 +2862,8 @@ cd_setreg(com, reg, val) cy_align = com->cy_align; iobase = com->iobase; ef = read_eflags(); - disable_intr(); + if (ef & PSL_I) + disable_intr(); if (basecom->car != car) cd_outb(iobase, CD1400_CAR, cy_align, basecom->car = car); cd_outb(iobase, reg, cy_align, val);