Skip site navigation (1)Skip section navigation (2)
Date:      09 Jun 2002 15:56:25 +0100
From:      "S. Roberts" <sroberts@dsl.pipex.com>
To:        freebsd_mail@myrealbox.com
Cc:        FreeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   parallel port problems
Message-ID:  <1023634586.318.8.camel@Demon.Strobe.org>

next in thread | raw e-mail | index | archive | help

--=-nan4GC5wjPf1Xx/GOSMH
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Greg,
   I followed the suggestions with respect to placing additions to
/boot/kernel.conf in your last e-mail and managed some progress:
~ $ dmesg | grep ppc0
config> ir ppc0 7
config> dr ppc0 3
config> po ppc0 0x3bc
ppc0     0x3bc      7     3     0       0        0     0          Yes =20
ppc0: <Parallel port> at port 0x3bc-0x3bf irq 7 drq 3 on isa0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
~ $ dmesg | grep lpt=20
~ $ cd /usr/src/sys/i386/conf
<snip> /usr/src/sys/i386/conf $ su
Password:
# grep lpt <kernel>
device		lpt		# Printer
device		ulpt		# Printer
#

So I now can see ppc config in dmesg on boot-up.

However, nothing is returned for lpt in dmesg as above
# grep lpt* dmesg.boot
grep: No match.
#

What's could be the problem now? I do have lpt defined in my kernel:
# grep lpt <kernel>
device		lpt		# Printer
device		ulpt		# Printer
#

Am I missing / neglecting something here?

Thanks again for all your help (and patience), hope to hear from you
soon.

Stacey

From: "Greg Smith" <freebsd_mail@myrealbox.com>
Reply-To: freebsd_mail@myrealbox.com
To: sroberts84@hotmail.com
Subject: Re: parallel port
Date: Thu, 06 Jun 2002 08:29:18 -0700
Received: from [192.108.102.143] by hotmail.com (3.2) with ESMTP id
MHotMailBEC8CB1B005F40042A1AC06C668FB3890; Thu, 06 Jun 2002 08:30:35
-0700
Received: from gregs freebsd_mail@smtp-send.myrealbox.com
[63.195.114.87]by smtp-send.myrealbox.com with NetMail SMTP Agent
$Revision:   3.9  $ on Novell NetWare;Thu, 06 Jun 2002 09:29:18 -0600
From freebsd_mail@myrealbox.com Thu, 06 Jun 2002 08:31:27 -0700
Message-ID: <200206060829180182.0015607A@smtp.myrealbox.com>
In-Reply-To: <F46Yb17TWSEVU29AhsF000057ae@hotmail.com>
References: <F46Yb17TWSEVU29AhsF000057ae@hotmail.com>
X-Mailer: Calypso Version 3.30.00.00 (4)

Stacey,

Actually, you would use options PNPBIOS (one word) without enabling PnP
OS in the BIOS.  PnP OS usually does screw up FreeBSD, because FreeBSD
is not smart enough to work with a BIOS that sets all the device
resources.

options PNPBIOS will make the kernel try to find all ISA and PCI
devices on your machine.  This option can be very useful for certain
devices, e.g. some sound cards, but can also screw up other devices
which are not PNPBIOS compatible, e.g. mwave modem port.

I recommend not using options PNPBIOS unless you know you need it, or
just for fun.  It's a great idea in theory, but can screw up some
drivers in practice.

If you would like to learn to make a change to a device without
recompiling the kernel, here is a method which works for most devices
which have unit numbers in the kernel, i.e. sio0 and sio1, but not sio.

1) update /boot/loader.conf with

userconfig_script_load=3D"YES"

2) update /boot/kernel.conf with

ir ppc0 7
dr ppc0 3
po ppc0 0x3bc
ls
q

This method assumes your kernel has device ppc0 and not just device
ppc.  This is true in GENERIC kernels.

[The userconfig solution is generalizable to the various devices (with
unit numbers) in the kernel, with at least the following commands:

  di sio1            (disable)
  en pcic1           (enable)
  po pcm0 0x530      (set port)
  ir pcic0 9         (set IRQ)
  dr pcm0 1          (set DRQ)
  iom pcic0 0xd8000  (set iomem)
  ios ata2 16        (set iosize)
  f pcm0 0x10        (set flags)
  ls                 (list all configurable devices)
  q                  (last line)

This is very handy on those older machines where it takes a long time
to rebuild the kernel.  Try boot -c to get the whole picture.]

Greg

-----Original Message-----

>Hi greg,
>    Thanks for getting back to me.
>
>I haven't actually tried this, but I appreciate the info, and will try
>this
>asap!
>
>I've not got "OPTIONS PNP BIOS" set in the kernel, because I've
disabled
>Plug 'n Play OS settings in the MoBo bios (this was due to my
>understanding
>that its best to have this setting when running FreeBSD - am I wrong
in
>this?).
>
>But clarify for me, if I wanted to use this kernel option, is it a
case of
>my performing the follwoing:-
>
>1] Enable Plug 'n Play OS settings in MoBo bios
>2] Include OPTIONS PNP BIOS in the kernel
>3] Recompile kernel
>
>Thanks again for your suggestions. I'll anxiously await your reply and

>thoughts on what I have asked here!
>
>Stacey
>
>
>>From: "Greg Smith" <freebsd_mail@myrealbox.com>
>>Reply-To: freebsd_mail@myrealbox.com
>>To: sroberts84@hotmail.com
>>Subject: parallel port
>>Date: Wed, 05 Jun 2002 21:31:38 -0700
>>Received: from [192.108.102.143] by hotmail.com (3.2) with ESMTP id
>>MHotMailBEC83A0800CC4004320EC06C668FB23D0; Wed, 05 Jun 2002 22:11:36
-0700
>>Received: from gregs freebsd_mail@smtp-send.myrealbox.com
>[63.195.114.87]by
>>smtp-send.myrealbox.com with NetMail SMTP Agent $Revision:   3.9  $
on
>>Novell NetWare;Wed, 05 Jun 2002 22:31:37 -0600
>>From freebsd_mail@myrealbox.com Wed, 05 Jun 2002 22:12:26 -0700
>>Message-ID: <200206052131380107.0308C9DB@smtp.myrealbox.com>
>>X-Mailer: Calypso Version 3.30.00.00 (4)
>>
>>Stacey,
>>
>>I saw your query on daemon news.  Did you try explicitly setting the
>>port and drq, e.g.
>>
>>device ppc0 at isa? port IO_LPT3 irq 7 drq 3
>>
>>where IO_LPT3 is a constant for 3bc I believe?  Or you could use
0x3bc
>>to be sure.
>>
>>I think you ought to do this since you don't have options PNPBIOS in
>>your kernel.
>>
>>Greg
>>
>>
>
>
>

--=20
Stacey Roberts B.Sc. (HONS) Computer Science
Network Systems Engineer

--=-nan4GC5wjPf1Xx/GOSMH
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Greg,
   I followed the suggestions with respect to placing additions to
/boot/kernel.conf in your last e-mail and managed some progress:
~ $ dmesg | grep ppc0
config> ir ppc0 7
config> dr ppc0 3
config> po ppc0 0x3bc
ppc0     0x3bc      7     3     0       0        0     0          Yes =20
ppc0: <Parallel port> at port 0x3bc-0x3bf irq 7 drq 3 on isa0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
~ $ dmesg | grep lpt=20
~ $ cd /usr/src/sys/i386/conf
<snip> /usr/src/sys/i386/conf $ su
Password:
# grep lpt <kernel>
device		lpt		# Printer
device		ulpt		# Printer
#

So I now can see ppc config in dmesg on boot-up.

However, nothing is returned for lpt in dmesg as above
# grep lpt* dmesg.boot
grep: No match.
#

What's could be the problem now? I do have lpt defined in my kernel:
# grep lpt <kernel>
device		lpt		# Printer
device		ulpt		# Printer
#

Am I missing / neglecting something here?

Thanks again for all your help (and patience), hope to hear from you
soon.

Stacey

From: "Greg Smith" <freebsd_mail@myrealbox.com>
Reply-To: freebsd_mail@myrealbox.com
To: sroberts84@hotmail.com
Subject: Re: parallel port
Date: Thu, 06 Jun 2002 08:29:18 -0700
Received: from [192.108.102.143] by hotmail.com (3.2) with ESMTP id
MHotMailBEC8CB1B005F40042A1AC06C668FB3890; Thu, 06 Jun 2002 08:30:35
- -0700
Received: from gregs freebsd_mail@smtp-send.myrealbox.com
[63.195.114.87]by smtp-send.myrealbox.com with NetMail SMTP Agent
$Revision:   3.9  $ on Novell NetWare;Thu, 06 Jun 2002 09:29:18 -0600
>From freebsd_mail@myrealbox.com Thu, 06 Jun 2002 08:31:27 -0700
Message-ID: <200206060829180182.0015607A@smtp.myrealbox.com>
In-Reply-To: <F46Yb17TWSEVU29AhsF000057ae@hotmail.com>
References: <F46Yb17TWSEVU29AhsF000057ae@hotmail.com>
X-Mailer: Calypso Version 3.30.00.00 (4)

Stacey,

Actually, you would use options PNPBIOS (one word) without enabling PnP
OS in the BIOS.  PnP OS usually does screw up FreeBSD, because FreeBSD
is not smart enough to work with a BIOS that sets all the device
resources.

options PNPBIOS will make the kernel try to find all ISA and PCI
devices on your machine.  This option can be very useful for certain
devices, e.g. some sound cards, but can also screw up other devices
which are not PNPBIOS compatible, e.g. mwave modem port.

I recommend not using options PNPBIOS unless you know you need it, or
just for fun.  It's a great idea in theory, but can screw up some
drivers in practice.

If you would like to learn to make a change to a device without
recompiling the kernel, here is a method which works for most devices
which have unit numbers in the kernel, i.e. sio0 and sio1, but not sio.

1) update /boot/loader.conf with

userconfig_script_load=3D"YES"

2) update /boot/kernel.conf with

ir ppc0 7
dr ppc0 3
po ppc0 0x3bc
ls
q

This method assumes your kernel has device ppc0 and not just device
ppc.  This is true in GENERIC kernels.

[The userconfig solution is generalizable to the various devices (with
unit numbers) in the kernel, with at least the following commands:

  di sio1            (disable)
  en pcic1           (enable)
  po pcm0 0x530      (set port)
  ir pcic0 9         (set IRQ)
  dr pcm0 1          (set DRQ)
  iom pcic0 0xd8000  (set iomem)
  ios ata2 16        (set iosize)
  f pcm0 0x10        (set flags)
  ls                 (list all configurable devices)
  q                  (last line)

This is very handy on those older machines where it takes a long time
to rebuild the kernel.  Try boot -c to get the whole picture.]

Greg

- -----Original Message-----

>Hi greg,
>    Thanks for getting back to me.
>
>I haven't actually tried this, but I appreciate the info, and will try
>this
>asap!
>
>I've not got "OPTIONS PNP BIOS" set in the kernel, because I've
disabled
>Plug 'n Play OS settings in the MoBo bios (this was due to my
>understanding
>that its best to have this setting when running FreeBSD - am I wrong
in
>this?).
>
>But clarify for me, if I wanted to use this kernel option, is it a
case of
>my performing the follwoing:-
>
>1] Enable Plug 'n Play OS settings in MoBo bios
>2] Include OPTIONS PNP BIOS in the kernel
>3] Recompile kernel
>
>Thanks again for your suggestions. I'll anxiously await your reply and

>thoughts on what I have asked here!
>
>Stacey
>
>
>>From: "Greg Smith" <freebsd_mail@myrealbox.com>
>>Reply-To: freebsd_mail@myrealbox.com
>>To: sroberts84@hotmail.com
>>Subject: parallel port
>>Date: Wed, 05 Jun 2002 21:31:38 -0700
>>Received: from [192.108.102.143] by hotmail.com (3.2) with ESMTP id
>>MHotMailBEC83A0800CC4004320EC06C668FB23D0; Wed, 05 Jun 2002 22:11:36
- -0700
>>Received: from gregs freebsd_mail@smtp-send.myrealbox.com
>[63.195.114.87]by
>>smtp-send.myrealbox.com with NetMail SMTP Agent $Revision:   3.9  $
on
>>Novell NetWare;Wed, 05 Jun 2002 22:31:37 -0600
>>From freebsd_mail@myrealbox.com Wed, 05 Jun 2002 22:12:26 -0700
>>Message-ID: <200206052131380107.0308C9DB@smtp.myrealbox.com>
>>X-Mailer: Calypso Version 3.30.00.00 (4)
>>
>>Stacey,
>>
>>I saw your query on daemon news.  Did you try explicitly setting the
>>port and drq, e.g.
>>
>>device ppc0 at isa? port IO_LPT3 irq 7 drq 3
>>
>>where IO_LPT3 is a constant for 3bc I believe?  Or you could use
0x3bc
>>to be sure.
>>
>>I think you ought to do this since you don't have options PNPBIOS in
>>your kernel.
>>
>>Greg
>>
>>
>
>
>

- --=20
Stacey Roberts B.Sc. (HONS) Computer Science
Network Systems Engineer

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBPQNsmPdn4A8qiCO5EQIIMwCg5QhIewH88COt0TbfHPVXAs5Hz0IAoIwM
tgIJfxneCMko9mGy0Q1SI13v
=VkRV
-----END PGP SIGNATURE-----

--=-nan4GC5wjPf1Xx/GOSMH--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1023634586.318.8.camel>