Subject: Re: External HDD not getting recognized
To: Rakhesh Sasidharan <rakheshster@gmail.com>
From: Quentin Garnier <cube@cubidou.net>
List: netbsd-users
Date: 05/24/2006 18:38:04
--jdM5ZcN/ZcXXVwZs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, May 24, 2006 at 04:17:42PM +0000, Rakhesh Sasidharan wrote:
> Hi,
>=20
> 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.
>=20
> 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.
>=20
> I went back to the kernel config file. I found lines like the ones below =
--
>=20
> # USB Mass Storage
> umass*  at uhub? port ? configuration ? interface ?
> scsibus* at umass?
> wd*     at umass?
>=20
> -- 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.
>=20
> 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.

--=20
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.

--jdM5ZcN/ZcXXVwZs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRHSL7NgoQloHrPnoAQKaZAgAgByZ4C6pIElABLGKNC+ft6ut6g433aom
P36/K10XM+kXiROhUpZup0m1WFEBhr4EF0LzqGn4XrqcVD8mn243zxQQ8fV8pfOl
wZeQj26A37yaSMJYwjAMBWTmcV7n6eKx5CNf1cAucG68Rvi/ObTjufA1kXkQgztV
HQnoJULjO2gqonp1W7PrtoMesIC30ennv1+P7f1TTKBPnzMNq1oqJgUuBCURDOO6
dmeb079PuKjvGaU1wcKDivV6ZCYJ9ZaoAdvLohpgRT9JVD0JWnOYEfJLIvdg/WF6
ZB6JYIQVvoJK6//xlRQmSg8bx3vbkofhPrNit4GbEO4ZceEWfHhI/w==
=6udV
-----END PGP SIGNATURE-----

--jdM5ZcN/ZcXXVwZs--