From owner-freebsd-current@FreeBSD.ORG Sat Aug 23 13:33:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D316A16A4BF for ; Sat, 23 Aug 2003 13:33:21 -0700 (PDT) Received: from purge.bash.sh (purge.bash.sh [193.178.223.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1A9043FE0 for ; Sat, 23 Aug 2003 13:33:20 -0700 (PDT) (envelope-from stu@ipng.org.uk) Received: from acbe42aa.ipt.aol.com ([172.190.66.170] helo=stu.ipng.org.uk) by purge.bash.sh with asmtp (Exim 4.20 #2 ) id 19qf4Y-00020l-Ao for ; Sat, 23 Aug 2003 21:33:18 +0100 Received: from baal.stu ([192.168.2.2] helo=icecold.stu.ipng.org.uk) by stu.ipng.org.uk with esmtp (Exim 4.10) id 19qf6j-000OYN-00 for freebsd-current@freebsd.org; Sat, 23 Aug 2003 21:35:33 +0100 Received: from icecold.stu.ipng.org.uk (localhost [127.0.0.1]) h7NKWtPU000619 for ; Sat, 23 Aug 2003 21:32:55 +0100 (BST) (envelope-from stu@ipng.org.uk) Received: (from stu@localhost) by icecold.stu.ipng.org.uk (8.12.7/8.12.7/Submit) id h7NKWq16000618 for freebsd-current@freebsd.org; Sat, 23 Aug 2003 21:32:52 +0100 (BST) X-Authentication-Warning: icecold.stu: stu set sender to stu@ipng.org.uk using -f Date: Sat, 23 Aug 2003 21:32:51 +0100 From: Stuart Walsh To: freebsd-current@freebsd.org Message-ID: <20030823203251.GA607@icecold.stu.ipng.org.uk> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.4i X-SA-Exim-Mail-From: stu@ipng.org.uk Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, hits=1.3 required=7.5 tests=FORGED_RCVD_TRAIL version=2.55 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-SA-Exim-Version: 3.0 (built Tue Jul 1 14:25:23 BST 2003) X-SA-Exim-Scanned: Yes Subject: panic when unplugging a mounted usb camera X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 20:33:22 -0000 Hi, A somewhat annoying occurance in -current; I get a panic if I leave the camera device mounted when I unplug it and subsequently try to unmount the device or reboot the system. I did some digging and it seems the dacleanup() function isnt being called because periph->refcount is 1. I spoke to another person who uses the da driver for their camera and their's cleans up fine when mounted. Aug 23 21:15:29 icecold kernel: umass0: Fuji Photo Film USB Mass Storage, rev 1.10/10.00, addr 2 Aug 23 21:15:29 icecold kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Aug 23 21:15:29 icecold kernel: da0: Removable Direct Access SCSI-0 device Aug 23 21:15:29 icecold kernel: da0: 1.000MB/s transfers Aug 23 21:15:29 icecold kernel: da0: 31MB (64000 512 byte sectors: 64H 32S/T 31C) Thats the camera, for reference. Aug 23 21:15:31 icecold kernel: umass0: at uhub1 port 2 (addr 2) disconnected Aug 23 21:15:31 icecold kernel: invalidate called... Aug 23 21:15:31 icecold kernel: (da0:umass-sim0:0:0:0): lost device Aug 23 21:15:31 icecold kernel: returned from inval Aug 23 21:15:31 icecold kernel: refcount is 0, freeing Aug 23 21:15:31 icecold kernel: periph not null, calling..0xc0159bd0 Aug 23 21:15:31 icecold kernel: we got to dacleanup.. Aug 23 21:15:31 icecold kernel: (da0:umass-sim0:0:0:0): removing device entr Thats what I get when I remove the device and it is unmounted(with my debugging additions). Aug 23 21:16:12 icecold kernel: umass0: at uhub1 port 2 (addr 2) disconnected Aug 23 21:16:12 icecold kernel: invalidate called... Aug 23 21:16:12 icecold kernel: (da0:umass-sim0:0:0:0): lost device Aug 23 21:16:12 icecold kernel: returned from inval Aug 23 21:16:12 icecold kernel: refcount is 1 Thats what I get when I remove the device and it is mounted. Please do let me know if I can provide any further information. Regards, Stuart Walsh