Subject: Re: External HDD not getting recognized
To: NetBSD-users <netbsd-users@netbsd.org>
From: Rakhesh Sasidharan <rakheshster@gmail.com>
List: netbsd-users
Date: 05/24/2006 16:54:08
Thank you Quentin. That made some sense to me. So basically as long as
I have "atapibus* at atapi?" defined, there's no need to define
"atapibus* at umass?" coz atapi and umass etc are devices that are
exported from other places and so can get attached to by others. Ok.

Thing is, in my case, I didnt uncomment the "atapibus* at atapi?"
line. That was already there. And yet the HDD wasn't getting
recognized. :(

Actually, after I wrote that last mail, I did some snooping around myself:

1) I booted with the GENERIC kernel, and checked if the HDD gets
detected. Since it was able to do so yest nite (before I built the new
kernel), I assumed it would still detect. Turns out I was wrong. The
GENERIC kernel wasn't detecting my HDD.

2) Next I booted to Windows XP. (I dual boot Windows XP and NetBSD).
Strangely, even Windows wasn't detecting the external HDD. No error
messages, nothing!! The HDD was getting power -- I could see that --
but nothing after that.

3) I have 3 USB ports in my HDD. Two of them are what I usually use,
and with which I was tryhing so far. Upon a whim, I tried plugging the
HDD into the 3rd port. Voila, Windows detected it, the drives
appeared, etc etc.

4) I rebooted to NetBSD. Plugged the HDD into the 3rd port of above.
Nopes, nothing happens.

5) I rebooted back to Windows XP. Plug the HDD into the 3rd port,
nothing happens. All 3 ports are unable to detect the external HDD. :(
In Windows XP as well as NetBSD!

I know the ports are fine. I can plug a flash disk in, it gets
detected (in both OSes). And I know my HDD and cable etc too are fine.
Any ideas what could be going wrong? The only thing I know is that
till yest, with the GENERIC kernel, I was able to use the external HDD
on all my ports, and in both OSes. Yest onwards, after compiling the
new kernel, I have been unable to use the HDD. And worse, I plug it
into a port, that port doesnt detect the HDD in Windows too.  :(

Thanks,
Rakhesh

On 5/24/06, Quentin Garnier <cube@cubidou.net> wrote:
> On Wed, May 24, 2006 at 04:17:42PM +0000, Rakhesh Sasidharan wrote:
> > Hi,
> >
> > I have an external HDD. With the default (GENERIC) kernel it was
> > getting detected whenever I'd plug the thing to one of the USB ports.
> >
> > May 23 16:59:54 take2 /netbsd: umass0: Myson Century, Inc. USB Mass
> > Storage Device, rev 2.00/b0.07, addr 2
> > May 23 16:59:54 take2 /netbsd: umass0: using ATAPI over Bulk-Only
> > May 23 16:59:54 take2 /netbsd: atapibus1 at umass0: 2 targets
> > May 23 16:59:54 take2 /netbsd: sd0 at atapibus1 drive 0: <TOSHIBA,
> [...]
> > Yesterday I compiled a kernel of my own. I took care to make sure
> > nothing that popped up in "dmesg" was commented out by me, but I
> > dunno, I guess I goofed up somewhere -- the HDD doesn't get detected
> > any more! :( I plug it into the USB port, I get no messages.
> >
> > I went back to the kernel config file. I found lines like the ones belo=
w --
> >
> > # USB Mass Storage
> > umass*  at uhub? port ? configuration ? interface ?
> > scsibus* at umass?
> > wd*     at umass?
> >
> > -- but I didnt find anything that said "atapibus* at umass?" or
> > something. (The reason I checked for that is coz of the line
> > "atapibus1 at umass0: 2 targets" in my GENERIC kernel dmesg output).
> > So I even added a line like that and compiled -- but nopes, the kernel
> > doesn't recognize the HDD still.
> >
> > Ofcourse, I know I can use the HDD with the GENERIC kernel. But I am
> > curious -- any pointers on what I might have commented out by mistake
> > to stop the HDD from getting detected? I suppose more ppl have faced
> > similar problems before ...? Looking forward to any suggestions ...
>
> Look at GENERIC.  See what 'atapibus' attaches to:
>
> atapibus* at atapi?
>
> Now, where do you see 'atapi' declared?  Nowhere.  That is, nowhere
> directly.  However, some devices export that attribute, meaning that
> they can attach whatever attaches to that attribute.  It is the case
> of 'atabus' itself, but also 'uamss':
>
> (from sys/dev/usb/files.usb)
>
> # Mass storage
> device  umass: scsi, atapi, ata_hl
>
> 'scsi', 'atapi' and 'ata_hl' are three so-called 'interface attributes'
> that allow respectively 'scsibus', 'atapibus' and 'wd' to attach.
>
> In conclusion, what you need is to keep 'atapibus* at atapi?', or,
> alternatively, add 'atapibus* at umass?' if you're confident that you
> will never have an atapibus device attaching to something that is not
> a umass device.
>
> Yes, sometimes it can be confusing.
>
> --
> Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
> "When I find the controls, I'll go where I like, I'll know where I want
> to be, but maybe for now I'll stay right here on a silent sea."
> KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
>
>
>