Don't call disable_intr() when interrupts are already disabled, since
disable_intr() does non-recursive locking in the SMP case. This should fix cy-driver-related panics when SMP is configured. Broken in: rev.1.73 (3.1 and -current)
This commit is contained in:
parent
74171e7d70
commit
7e52c731df
@ -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 <machine/lock.h>
|
||||
#endif
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <i386/isa/isa_device.h>
|
||||
#include <i386/isa/cyreg.h>
|
||||
@ -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);
|
||||
|
@ -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 <machine/lock.h>
|
||||
#endif
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <i386/isa/isa_device.h>
|
||||
#include <i386/isa/cyreg.h>
|
||||
@ -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);
|
||||
|
@ -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 <machine/lock.h>
|
||||
#endif
|
||||
#include <machine/psl.h>
|
||||
|
||||
#include <i386/isa/isa_device.h>
|
||||
#include <i386/isa/cyreg.h>
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user