Re: [PARPORT] Some Basic Questions on Parport driver

From: Tim Waugh (
Date: Mon Apr 23 2001 - 07:31:23 EDT

  • Next message: Eric Tang: "Re: [PARPORT] Some Basic Questions on Parport driver"

    On Sun, Apr 22, 2001 at 11:50:16PM +0800, Eric Tang wrote:

    > 1. If i use inb/outb (both in kernel or user space), what the kernel actually do?? say , if i set
    > the parallel port operate in EPP in BIOS, so when i call inb/outb, the kernel will do all
    > the low-level handshaking for EPP???

    Yes and no. All the _kernel_ will do is the IO instruction you tell
    it to. But the _hardware_ will do the handshaking for you, if the
    parallel port chipset has EPP hardware in the place you are doing IO

    > 2. Any disadvantage of writing kernel module using inb/outb to access parport device? As
    > I have read the API Documentation of this homepage, it seems that it is better to use the
    > API you provided to access parallel port??

    The disadvantages of using inb/outb rather than the parport API are:

    a) For machines that don't have EPP hardware, or on which it is
       disabled, inb/outb won't work. The parport API attempts to
       implement the handshake in software for this case.

    b) For machines with parallel ports at IO addresses you don't expect
       (i.e. most PCI add-on cards), or entirely different types of
       parallel port altogether (not PC-style), inb/outb won't be able to
       use those ports.

    > 3. Do i need to disable the parallel port support in the kernel in order to make my driver work
    > prefectly?? as some people said the normal parallel port module may conflict with my module.

    No, but you do need to mark the IO region you are using as in-use,
    using request_region. You also need to check the return value from
    request_region to see if the IO region is already occupied.


    -- To unsubscribe, send mail to: --
    -- with the single word "unsubscribe" in the body of the message. --

    This archive was generated by hypermail 2b29 : Mon Apr 23 2001 - 07:33:58 EDT