Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jun 1995 07:11:12 -0700
From:      David Greenman <davidg@Root.COM>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        fenner@parc.xerox.com, freebsd-bugs@FreeBSD.org, gibbs@freefall.cdrom.com
Subject:   Re: FTP install is *almost* there... 
Message-ID:  <199506061411.HAA00434@corbin.Root.COM>
In-Reply-To: Your message of "Tue, 06 Jun 95 19:14:23 %2B1000." <199506060914.TAA00354@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>>The driver sees (1 << irq_number), or 0 for none/unspecified/auto.
>
>>   Gack, you're right. Userconfig has brokeness in this area. Specifying -1
>>will result in shifting the bit all the way off the end, resulting in "0".
>
>No, it handles -1 specially.


   Ahh, I forgot that "irq" was unsigned...so the test:

    parms[0].parm.dparm->id_irq = (irq < 16 ? 1 << irq : 0);

   Treats irq as 0xffffffff, not -1, and thus ends up with 0.


>-1 is converted to 0 in mkioconf().  irq numbers are exponentiated more
>machine-independently by converting them to a string and prefixing "IRQ".
>isa.h somewhat confusingly defines IRQ0 as 0x0001 etc.  I can't see where
>`?' and `none' are distinguished in config.y.  lang.l converts `?' to -1
>which is the same as the default (`none') value.  Anyway, the drivers
>apparently get it right by always dealing with the mask.  -1 isn't a
>valid mask and drivers apparently don't set id_irq to it.

   Huh? How could drivers deal with anything other than the mask? ...anyway,
you appear to be correct - '?' gets converted to 0 before it is output to
ioconf.c.
   So this brings us full circle and I'm not sure what we've accomplished by
this exercise. :-)  ...other than my test in if_ed.c for the irq should be
changed to irq == 0 rather than irq <= 0.

-DG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506061411.HAA00434>