Date: Sun, 6 Aug 2000 20:40:52 +0100 From: Brian Candler <B.Candler@pobox.com> To: freebsd-mobile@freebsd.org Cc: shigeru@iij.ad.jp Subject: Re: Ricoh RL5C475 PCI-PCMCIA adaptor and interrupts Message-ID: <20000806204051.A805@linnet.org>
next in thread | raw e-mail | index | archive | help
--vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > MELCO PC Card Adapter(PCI type) does not have an ISA interupt line. Yep, that's the card I have. > Please check 'IREQ/INT Enable' bit in Bridge Control Register. > It must be cleared if you want to use 'PCI interrupt mode'. > #Offset of Bridge Control Register is 0x3E, bit number of IREQ/INT > #Enable is bit 7. Yep, that fixes it - see attached patch (against 5.0-CURRENT from a couple of weeks ago). My Melco airconnect card (WLI-PCM-L11) works fine in it now, and I didn't have to make any other changes to PCI interrupt routing. However, I'm not sure that the attached method is the right way to go about it: (1) Why was the ISA interrupt bit previously being set, instead of cleared? Presumably some PCI cards do need it that way. It would be good to work out which ones don't, like mine, and which ones do. (2) Worse, what if there are other boards based on the Ricoh RL5C475 which need the bit to be set? It would be hard or impossible to determine this from the PCI ID, so you'd have to make it a user-settable flag :-( Thanks for pointing me in the right direction though. I hope that somebody more familiar with these sorts of cards will pick this up and apply a suitable fix. Cheers, Brian. --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=ricoh-pcic-patch --- pcic_p.c.orig Sun Aug 6 19:08:10 2000 +++ pcic_p.c Sun Aug 6 19:22:07 2000 @@ -182,7 +182,7 @@ } static void -generic_cardbus_attach(device_t dev) +generic_cardbus_attach(device_t dev, int isa_irq) { u_int16_t brgcntl; u_int32_t iobase; @@ -192,7 +192,10 @@ /* Output ISA IRQ indicated in ExCA register(0x03). */ brgcntl = pci_read_config(dev, CB_PCI_BRIDGE_CTRL, 2); - brgcntl |= CB_BCR_INT_EXCA; + if (isa_irq) + brgcntl |= CB_BCR_INT_EXCA; + else + brgcntl &= ~CB_BCR_INT_EXCA; pci_write_config(dev, CB_PCI_BRIDGE_CTRL, brgcntl, 2); /* 16bit Legacy Mode Base Address */ @@ -350,8 +353,13 @@ ti1xxx_pci_init(dev); /* FALLTHROUGH */ default: - generic_cardbus_attach(dev); + generic_cardbus_attach(dev, 1); break; + case PCI_DEVICE_ID_RICOH_RL5C475: + /* Note: This card definitely needs the ISA interrupt bit + set to 0 for interrupts to work; maybe others do too */ + generic_cardbus_attach(dev, 0); + break; case PCI_DEVICE_ID_PCIC_CLPD6832: pd6832_legacy_init(dev); break; --vkogqOf2sHV7VnPd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000806204051.A805>