Deleted Added
full compact
34c34
< __FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc.c 153072 2005-12-04 02:12:43Z ru $");
---
> __FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc.c 158041 2006-04-26 06:05:16Z sobomax $");
155a156,159
> #if defined(__i386__)
> volatile int i;
> register_t flags;
> #endif
221a226,245
>
> #if defined(__i386__)
> /*
> * Check if we really have AT keyboard controller. Poll status
> * register until we get "all clear" indication. If no such
> * indication comes, it probably means that there is no AT
> * keyboard controller present. Give up in such case. Check relies
> * on the fact that reading from non-existing in/out port returns
> * 0xff on i386. May or may not be true on other platforms.
> */
> flags = intr_disable();
> for (i = 0; i != 65535; i++) {
> if ((bus_space_read_1(tag, h1, 0) & 0x2) == 0)
> break;
> }
> intr_restore(flags);
> if (i == 65535)
> return ENXIO;
> #endif
>