From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 22 05:46:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D182716A4DD for ; Sat, 22 Jul 2006 05:46:56 +0000 (UTC) (envelope-from george@m5p.com) Received: from mailhost.m5p.com (209-162-215-52.dq1sn.easystreet.com [209.162.215.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E46C43D49 for ; Sat, 22 Jul 2006 05:46:56 +0000 (GMT) (envelope-from george@m5p.com) Received: from m5p.com (ssh.m5p.com [IPv6:2001:418:3fd::fb]) by mailhost.m5p.com (8.13.7/8.13.7) with ESMTP id k6M5ktIf063294 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Jul 2006 22:46:55 -0700 (PDT) Received: (from george@localhost) by m5p.com (8.13.7/8.13.7/Submit) id k6M5kq59001314; Fri, 21 Jul 2006 22:46:52 -0700 (PDT) Date: Fri, 21 Jul 2006 22:46:52 -0700 (PDT) Message-Id: <200607220546.k6M5kq59001314@m5p.com> From: george+freebsd@m5p.com To: freebsd-hackers@freebsd.org X-Spam-Score: -2.168 () AWL,BAYES_00,NO_RELAYS X-Scanned-By: MIMEDefang 2.56 on IPv6:2001:418:3fd::f7 Subject: FreeBSD 6.0/6.1: open ("/dev/lpt0" ...) hangs up X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jul 2006 05:46:56 -0000 A couple of days ago, I upgraded from FreeBSD 5.3 to 6.1 (installed on a previously unused disk partition). Happiness ensued for the most part, but I could not get printing to work at all with the generic kernel. I played around for a while and eventually found that open ("/dev/lpt0" ...) would hang up. But if I tried it in single user mode, it worked fine. I could even "cat foo.txt >/dev/lpt0" in single user mode and print. But as soon as I went multi-user, no joy. I compiled a custom kernel, kicking out all sorts of stuff I didn't need, and then everything started working. But I could make it go bad again by putting "device plip" back in. With that kernel, as before, I could open /dev/lpt0 in single-user mode but not in multi- user mode. Specifically, it's hanging up when it tries to request the ppbus (line 478 of lpt.c) (as determined from the printfs I sprinkled in). I'm guessing that if_plip.c has requested it and not released it, which apparently happens when there's been an ioctl on the plip. There's no plausible reason why anythhing should be happeneing on plip, as far as I can tell. What can I call in lpioctl (if_plip.c line 302) to print out some identifying information about the process doing the ioctl? This problem is also present in 6.0. Why haven't a whole bunch of people already run into it? Am I the only person still using a parallel port printer and (at first) a generic kernel? -- George Mitchell