Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 7 Nov 2002 11:10:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 7 Nov 2002 11:10:55 -0500 Received: from chaos.analogic.com ([204.178.40.224]:21889 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id ; Thu, 7 Nov 2002 11:10:53 -0500 Date: Thu, 7 Nov 2002 11:19:30 -0500 (EST) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: Fernando Fraga e Silva cc: linux-kernel@vger.kernel.org Subject: Re: Parallel port misbehavior using kernel 2.4.19 and pcchips M810 In-Reply-To: <200211081038.21291.fernando.fraga@poli.usp.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 53 On Fri, 8 Nov 2002, Fernando Fraga e Silva wrote: > Hi Guys > I'm working for 4 days on a parallel port misbehavior problem without having > any sucess. I have to control a device with SPP mode using a pcchips M810, a > Duron processor and a kernel 2.4.19. > So I made the following simple code : > -- > #include //i've tried too > int main () > { > ioperm( 0x378, 3, 1); > outb (0x01, 0x378 ); > ioperm (0x378, 3, 0); > return 0; > } > -- I modified your code to check some things an to easily change the port: #include #include //i've tried too #define PORT 0x378 int main () { ioperm( PORT, 3, 1); outb (0xaa, PORT ); printf("%02x\n", inb(PORT)); outb (0x55, PORT ); printf("%02x\n", inb(PORT)); ioperm (PORT, 3, 0); return 0; } It works here. You need to make sure that no printer-driver is loaded since you are using the printer port. If you have two or more printer ports, the port you use may be 0x278, 0x378, or 0x3bc. You may need to try them all to see what one actually goes to your connector. Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). Bush : The Fourth Reich of America - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/