sane irq initialization in sedlbauer hisax
The interrupts schould be disabled until the driver is ready and the IRQ function was registered. Thanks to Bastian Friedrich and Thomas Voegtle for spotting this. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Bastian Friedrich <bastian@bastian-friedrich.de> Signed-off-by: Thomas Voegtle <tv@lio96.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2b7c30292a
commit
c713f57ed5
|
@ -451,6 +451,9 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
||||||
spin_unlock_irqrestore(&cs->lock, flags);
|
spin_unlock_irqrestore(&cs->lock, flags);
|
||||||
return(0);
|
return(0);
|
||||||
case CARD_RELEASE:
|
case CARD_RELEASE:
|
||||||
|
if (cs->hw.sedl.bus == SEDL_BUS_PCI)
|
||||||
|
/* disable all IRQ */
|
||||||
|
byteout(cs->hw.sedl.cfg_reg+ 5, 0);
|
||||||
if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
|
if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
|
||||||
spin_lock_irqsave(&cs->lock, flags);
|
spin_lock_irqsave(&cs->lock, flags);
|
||||||
writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx,
|
writereg(cs->hw.sedl.adr, cs->hw.sedl.hscx,
|
||||||
|
@ -468,6 +471,9 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
||||||
return(0);
|
return(0);
|
||||||
case CARD_INIT:
|
case CARD_INIT:
|
||||||
spin_lock_irqsave(&cs->lock, flags);
|
spin_lock_irqsave(&cs->lock, flags);
|
||||||
|
if (cs->hw.sedl.bus == SEDL_BUS_PCI)
|
||||||
|
/* enable all IRQ */
|
||||||
|
byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
|
||||||
reset_sedlbauer(cs);
|
reset_sedlbauer(cs);
|
||||||
if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
|
if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
|
||||||
clear_pending_isac_ints(cs);
|
clear_pending_isac_ints(cs);
|
||||||
|
@ -667,7 +673,7 @@ setup_sedlbauer(struct IsdnCard *card)
|
||||||
byteout(cs->hw.sedl.cfg_reg, 0xff);
|
byteout(cs->hw.sedl.cfg_reg, 0xff);
|
||||||
byteout(cs->hw.sedl.cfg_reg, 0x00);
|
byteout(cs->hw.sedl.cfg_reg, 0x00);
|
||||||
byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd);
|
byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd);
|
||||||
byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
|
byteout(cs->hw.sedl.cfg_reg+ 5, 0); /* disable all IRQ */
|
||||||
byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
|
byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
|
||||||
mdelay(2);
|
mdelay(2);
|
||||||
byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
|
byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
|
||||||
|
|
Loading…
Reference in New Issue