Date: Tue, 29 Apr 2008 09:01:08 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: "Xiaofan Chen" <xiaofanc@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: USB Mass Storage Device with HPS Stack Message-ID: <200804290901.08874.hselasky@c2i.net> In-Reply-To: <a276da400804280646g43924cc9id1f83c3510d2e2f1@mail.gmail.com> References: <a276da400804250733v1e8db234x75265d7cfca915c@mail.gmail.com> <200804281035.30155.hselasky@c2i.net> <a276da400804280646g43924cc9id1f83c3510d2e2f1@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 28 April 2008, Xiaofan Chen wrote: > On Mon, Apr 28, 2008 at 4:35 PM, Hans Petter Selasky <hselasky@c2i.net> 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: <USB Mass Storage, class 0/0, rev 2.00/2.00, addr 2> 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: <NATIONAL FLASH DISK 2.00> 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: <NATIONAL FLASH DISK 2.00> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804290901.08874.hselasky>