From owner-freebsd-questions@FreeBSD.ORG Tue Apr 13 07:49:58 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 961BB16A4CE for ; Tue, 13 Apr 2004 07:49:58 -0700 (PDT) Received: from mail1.panix.com (mail1.panix.com [166.84.1.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id D199943D49 for ; Tue, 13 Apr 2004 07:49:57 -0700 (PDT) (envelope-from jester@panix.com) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mail1.panix.com (Postfix) with ESMTP id 2E3C348B07 for ; Tue, 13 Apr 2004 10:49:40 -0400 (EDT) Received: (from jester@localhost) by panix2.panix.com (8.11.6p2-a/8.8.8/PanixN1.1) id i3DEneT27485 for freebsd-questions@freebsd.org; Tue, 13 Apr 2004 10:49:40 -0400 (EDT) Date: Tue, 13 Apr 2004 10:49:39 -0400 From: Jesse Sheidlower To: freebsd-questions@freebsd.org Message-ID: <20040413144939.GA27295@panix.com> References: <20040413023413.GA2071@panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040413023413.GA2071@panix.com> User-Agent: Mutt/1.4.2.1i Subject: Re: USB via module instead of kernel? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2004 14:49:58 -0000 On Mon, Apr 12, 2004 at 10:34:13PM -0400, Jesse Sheidlower wrote: > > I'm new to this kernel-module thing, so I hope this isn't > a silly question. > > I'm using FreeBSD 5.2 on a laptop running ACPI, and like > many others have had suspend/resume problems with the > USB dying on resume. I saw a suggestion somewhere that > you could remove USB support from the kernel, and add it > in via a .ko file at boot time; this way, you could have > an rc.suspend and rc.resume that unloads/loads the USB > module appropriately and perhaps avoid the problems. > > I'm not entirely sure how to do this. First, I note > that the "device usb" line in the kernel configuration > file has a "Required" note in it, and I'm nervous about > removing something that says "Required". > > Second, while I have a usb.ko file under /boot/kernel/, if I > type "kldload usb", I get a "can't load usb: File exists" > message, but if I try "kldunload usb", I get "can't find file > usb: No such file or directory". I might have expected a > different message if usb is loaded as part of the kernel. If I > want to enable it at boot, do I just add "usb_load="YES"" to > /boot/loader.conf ? > > So to summarize, I guess my questions are: > > 1) Can I comment out "device usb" from my kernel config and > then rebuild the kernel, without causing some big problem? Responding to myself, the answer is "no"; removing "device usb" from the kernel config causes errors at "make", so I had to go back. I still can't seem to load or unload usb as a module. Any suggestions welcome. Jesse Sheidlower > 2) To load at boot, do I just add "usb_load="YES"" to > /boot/loader.conf ? > > 3) Will doing what I described help with the USB problems > on suspend/resume?