From owner-freebsd-usb@FreeBSD.ORG Tue Apr 29 06:59:54 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DA88106566B for ; Tue, 29 Apr 2008 06:59:54 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swipnet.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id E295D8FC2C for ; Tue, 29 Apr 2008 06:59:53 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.156] (account mc467741@c2i.net [62.113.132.156] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 747308895; Tue, 29 Apr 2008 08:59:52 +0200 From: Hans Petter Selasky To: "Xiaofan Chen" Date: Tue, 29 Apr 2008 09:01:08 +0200 User-Agent: KMail/1.9.7 References: <200804281035.30155.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804290901.08874.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB Mass Storage Device with HPS Stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 06:59:54 -0000 On Monday 28 April 2008, Xiaofan Chen wrote: > On Mon, Apr 28, 2008 at 4:35 PM, Hans Petter Selasky wrote: > > > > Then try to mount again. You can also try loading ata-usb instead > > > > of umass. ata-usb will query the disk size regularly. > > > > > > Hmm, I do not see any thing similar to ata-usb module in the kernel > > > and I can not load ata-usb. > > > > Do you have: > > > > /sys/modules/ata/atausb ? > > Hmm yes I have the module. > > [mcuee@freebsd7 /sys/modules/ata/atausb]$ sudo make > [mcuee@freebsd7 /sys/modules/ata/atausb]$ sudo make install > install -o root -g wheel -m 555 atausb.ko /boot/kernel > kldxref /boot/kernel > [mcuee@freebsd7 /sys/modules/ata/atausb]$ sudo kldload atausb > > After plugging in the USB disk, I got the following: > [mcuee@freebsd7 ~]$ dmesg > umass0: on usb2 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:0:0:-1: Attached to scbus0 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Removable Direct Access SCSI-2 device > da0: 40.000MB/s transfers > da0: 477MB (976896 512 byte sectors: 64H 32S/T 477C) > cd0 at umass-sim0 bus 0 target 0 lun 1 > cd0: Removable CD-ROM SCSI-2 device > cd0: 40.000MB/s transfers > cd0: Attempt to query device size failed: NOT READY, Medium not present > GEOM_LABEL: Label for provider da0s1 is msdosfs/NATIONAL. > > [mcuee@freebsd7 ~]$ sudo cat /dev/null > /dev/cd0 > bash: /dev/cd0: Permission denied > [mcuee@freebsd7 ~]$ su - > freebsd7# bash > [root@freebsd7 ~]# cat /dev/null > /dev/cd0 > [root@freebsd7 ~]# mount_cd9660 /dev/cd0 /media/usbcd > mount_cd9660: /dev/cd0: Invalid argument > > [root@freebsd7 ~]# kldunload umass > kldunload: can't find file umass > > So it seems that umass is still claiming the device. How do > I unload umass without rebuilding the kernel? > > Xiaofan If umass is in the kernel you need to rebuild. Else you "kldunload umass". --HPS