Messages in this thread | | | Date | Mon, 18 Jan 1999 21:08:42 +0100 (CET) | From | Tom Björkholm <> | Subject | lp1 oddity on Compaq |
| |
Hi,
I ran into the strange behaviour that linux did not recognize my printer port. A bit of kernel debugging showed me that it was the outb_p/inb_p test with LP_DUMMY that failed.
I fixed it by faking that the test succeed (see code diff below).
Computer: Compaq Presario 5670 Processor: Intel Pentium II, 450 MHz RAM: 128 MB Distribution: SuSE Linux 5.3 Kernel: linux-2.0.35.SuSE
I thought that you would like to know about the problem on the Compaq Presario 5670. I would also appriciate it if you have a better idea for the workaround.
Thanx,
/Tom
** linux/drivers/char/lp.c Sun Jan 17 19:43:44 1999 --- linux-2.0.35.SuSE/drivers/char/lp.c Wed Jul 29 17:32:40 1998 *************** *** 557,583 **** { int base, size; unsigned int testvalue; ! printk(KERN_INFO "probing for lp%d\n", offset); base = LP_B(offset); - printk(KERN_INFO "probing for lp%d at base=0x%x, irq=%d\n", - offset, base, LP_IRQ(offset) ); if (base == 0) return -1; /* de-configured by command line */ if (LP_IRQ(offset) > 15) return -1; /* bogus interrupt value */ size = (base == 0x3bc)? 3 : 8; ! if (check_region(base, size) < 0) { ! printk(KERN_INFO "check_region(0x%x, %d) failed\n", base, size); return -1; - } /* write to port & read back to check */ outb_p(LP_DUMMY, base); ! udelay(LP_DELAY*10); testvalue = inb_p(base); - if (testvalue != LP_DUMMY) { - printk(KERN_WARNING "lp%d at 0x%04x, not OK faking\n", offset, base); - testvalue = LP_DUMMY; - } if (testvalue == LP_DUMMY) { LP_F(offset) |= LP_EXIST; lp_reset(offset);
--------------------------------------------------------------- Tom Bjorkholm Serenadvagen 36, 3tr email: tom.bjorkholm@swipnet.se Tel/Fax: 131 40 Nacka tom.bjorkholm@ebc.ericsson.se 08-7166894 Sweden
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |