Date: Mon, 19 Apr 1999 06:27:56 -0400 (EDT) From: Luoqi Chen <luoqi@watermarkgroup.com> To: current@FreeBSD.ORG, jhay@mikom.csir.co.za Subject: Re: newbus and isa auto irq Message-ID: <199904191027.GAA02468@lor.watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> Hi, > > I ave found one more thing that seems to be broken. I have used the > irq "autodetect" feature of the ed(4) for a long time, but it seems > that the newbus compatability shim is not doing the right thing > with it. My kernel config file have a line like this: > > device ed0 at isa? port 0x280 net irq ? iomem 0xd8000 > > The card gets probed but you just get device timeouts and there is no > mention of an irq for that device in the probe output. Booting with > -c and specifying the irq there also didn't work. Rebuilding the kernel > with a config file which specified the irq did work though. > > John > -- > John Hay -- John.Hay@mikom.csir.co.za > I had the same problem. Here's a fix: Index: isa_compat.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/isa_compat.c,v retrieving revision 1.3 diff -u -r1.3 isa_compat.c --- isa_compat.c 1999/04/19 08:42:39 1.3 +++ isa_compat.c 1999/04/19 10:07:41 @@ -131,12 +131,14 @@ } } +#define irqmask(x) ((x) < 0 ? 0 : (1 << (x))) + static int isa_compat_probe(device_t dev) { struct isa_device *dvp = device_get_softc(dev); struct isa_compat_resources res; - + bzero(&res, sizeof(res)); /* * Fill in the isa_device fields. @@ -144,7 +146,7 @@ dvp->id_id = isa_compat_nextid(); dvp->id_driver = device_get_driver(dev)->priv; dvp->id_iobase = isa_get_port(dev); - dvp->id_irq = (1 << isa_get_irq(dev)); + dvp->id_irq = irqmask(isa_get_irq(dev)); dvp->id_drq = isa_get_drq(dev); dvp->id_maddr = (void *)isa_get_maddr(dev); dvp->id_msize = isa_get_msize(dev); @@ -171,7 +173,7 @@ isa_set_portsize(dev, portsize); if (dvp->id_iobase != isa_get_port(dev)) isa_set_port(dev, dvp->id_iobase); - if (dvp->id_irq != (1 << isa_get_irq(dev))) + if (dvp->id_irq != irqmask(isa_get_irq(dev))) isa_set_irq(dev, ffs(dvp->id_irq) - 1); if (dvp->id_drq != isa_get_drq(dev)) isa_set_drq(dev, dvp->id_drq); -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904191027.GAA02468>