Re: [Bug 11603] Re: ACPI PnP on Intel MU440EX

From: matthieu castet
Date: Tue Sep 23 2008 - 17:29:41 EST


Bjorn Helgaas wrote:
Your logs are perfect, which makes me happy because it's the first
time I've successfully used the byzantine ACPI debug infrastructure.

Log with parport set to auto/bidirectional in BIOS for comparison. PNPBIOS does
detect it in this setting, ACPI doesn't. Same with auto/EPP which I used until
now.

I think this is a BIOS defect.

When you set the port to "enabled" in the BIOS, Linux finds and uses
the parallel port with no problem.

When you set the port to "auto/bidirectional" or "auto/EPP" in the BIOS,
the _STA methods on all the parallel devices return 0:

bus-0117 [00] bus_get_status : Device [LPT] status [00000000]
bus-0117 [00] bus_get_status : Device [EPP] status [00000000]
bus-0117 [00] bus_get_status : Device [ECP] status [00000000]

A zero _STA means the device is not present at all, so I think Linux
is right to ignore the devices.

If you want you could try to run the attached program on your pc in "auto/bidirectional" or "auto/EPP" mode.

This program does what _STA methods do.


Matthieu #include <sys/io.h>

#define S707 0x0370
#define INDX S707
#define DATA S707+1


int R707(int Arg0)
{
int ret;
outb(0x55,INDX);
outb(0x55,INDX);
outb(Arg0,INDX);
ret = inb(DATA);
outb(0xAA,INDX);
return ret;
}
void W707(int Arg0, int Arg1)
{
outb(0x55,INDX);
outb(0x55,INDX);
outb(Arg0,INDX);
outb(Arg1, DATA);
outb(0xAA,INDX);
}



int GSTA()
{
int ret;
W707 (0x07, 0x03);
ret = R707 (0xF0);
printf("raw %d\n", ret);
printf("LPT %d\n", (ret & 0x7) == 0);
printf("EPP %d\n", (ret & 0x3) == 1);
printf("ECP %d\n", (ret & 0x2) == 2);
return ret;
}

int main()
{
iopl(3);
GSTA();
return 0;
}