From owner-freebsd-hackers Fri Sep 13 20:37:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A7CD37B401; Fri, 13 Sep 2002 20:37:06 -0700 (PDT) Received: from hotmail.com (f92.pav1.hotmail.com [64.4.31.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CC4443E6A; Fri, 13 Sep 2002 20:37:06 -0700 (PDT) (envelope-from evantd@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 13 Sep 2002 20:37:05 -0700 Received: from 12.229.158.71 by pv1fd.pav1.hotmail.msn.com with HTTP; Sat, 14 Sep 2002 03:36:58 GMT X-Originating-IP: [12.229.158.71] From: "Evan Dower" To: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org Subject: Printer (lpt0) Device Busy Date: Fri, 13 Sep 2002 20:36:58 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 14 Sep 2002 03:37:05.0948 (UTC) FILETIME=[FF366DC0:01C25B9F] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am trying to install a printer (Epson Stylus Color 740), but FreeBSD claims that the device (/dev/lpt0) is busy. I began with 4.6-RELEASE but upgrade to -STABLE to see if that would fix the problem (it didn't). My system is: $ uname -a FreeBSD lojak.u.washington.edu 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #0: Thu Sep 12 00:21:06 PDT 2002 root@lojak.u.washington.edu:/usr/obj/usr/src/sys/CUSTOM i386 I even tried using the GENERIC kernel to no avail. I'm fairly certain my kernel is set up properly anyway since the printer is detected at startup. $ dmesg ... ppc0: at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/9 bytes threshold ppbus0: IEEE1284 device found /NIBBLE Probing for PnP devices on ppbus0: ppbus0: PRINTER ESCPL2,BDC,D4 lpt0: on ppbus0 lpt0: Interrupt-driven port ... Yet still, if I try to do a test print, nothing happens. # echo test > /dev/lpt0 /dev/lpt0: Device busy. In fact, even just trying to get status info does the same thing. # cat /dev/lpt0 cat: /dev/lpt0: Device busy So the device is busy. Certainly, a program must be bogarting it. Yet fstat begs to differ. $ fstat /dev/lpt0 USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME That's an empty list of open files named /dev/lpt0. So maybe fstat is not working as I would expect. So I'll stat /dev/lpt0 to get its INODE and grep fstat for it. $ stat /dev/lpt0 File: "/dev/lpt0" Size: 0 Allocated Blocks: 0 Filetype: Character Device Mode: (0600/crw-------) Uid: (0/root) Gid: (0/wheel) Device: 160768 Inode: 753 Links: 1 Device Type: 4096 Access: Thu Sep 12 01:01:20 2002 Modify: Thu Sep 12 10:44:59 2002 Change: Thu Sep 12 10:44:59 2002 $ fstat | grep 753 I swear fstat really does list open files! $ fstat | wc 557 5040 38580 $ fstat /dev/dsp USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME evantd esd 32539 8 / 738 crw-rw-rw- dsp0.0 w /dev/dsp $ fstat | grep 738 evantd esd 32539 8 / 738 crw-rw-rw- dsp0.0 w So fstat does work (both ways), but I still see no reason for lpt0 to be busy. Does anyone have any ideas? What else can make a device busy? Could this have something to do with ECP+EPP (whatever that means)? Please respond with just about anything that could possibly be helpful. Thanks in advance, Evan Dower _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message