Subject: Re: powerhooks and SCSI disks
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 12/16/2005 14:51:14
--Signature_Fri__16_Dec_2005_14_51_14_-0500_kPTqWL/UDEiuIlMB
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> > > > Looks like I just lucked out and my drives spun up on their
> > > > own ( see other mail, I could reproduce the panic on macppc ).
> > > > Anyway, sending a START in this case should be more or less
> > > > trivial.
> > >=20
> > > Yes, just insert the appropriate code into the error callback.
> >=20
> > Ok, there's this in sd.c / sd_interpret_sense():
> >=20
> > 	/*
> > 	 * If it isn't a extended or extended/deferred error, let
> > 	 * the generic code handle it.
> > 	 */
> > 	if (SSD_RCODE(sense->response_code) !=3D SSD_RCODE_CURRENT &&
> > 	    SSD_RCODE(sense->response_code) !=3D SSD_RCODE_DEFERRED)
> > 		return (retval);
> >=20
> > 	if (SSD_SENSE_KEY(sense->flags) =3D=3D SKEY_NOT_READY &&
> > 	    sense->asc =3D=3D 0x4) {
> >=20
> > what follows is code to check if the disk needs to get started and
> > if so starts it. My uneducated guess is that sd_interpret_sense()
> > either bails out too early here or isn't called at all.
>=20
> I just tested on a current kernel with esiop, this code works fine for
> me:
> sd0: pack is stopped, restarting...
>=20
> So we'll have to check why it's not being triggered in Pavel's case.

Exactly. Is your disk a Seagate, IBM or something else?

have fun
Michael

--Signature_Fri__16_Dec_2005_14_51_14_-0500_kPTqWL/UDEiuIlMB
Content-Type: application/pgp-signature

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

iQEVAwUBQ6MasspnzkX8Yg2nAQJaRQgAhaVEuEqQzoligrXv6kw7MedWI5yaD8/l
9aOnE8R6cGKC+Q72lZcT24DfcGoxcTykKsXBmWiBcVzgag933l9230L7vhbEq+4W
HQUkVwEXR5vI9HRVuD57PSV55zvwy70gifmwddga7dxARFj21kzTJ6PjwgoAcay/
BKH0+YEJK8UcpIa/WusviAtFqYAwhUK08UC1jiysUUToLlHDfHGBoqZeW3C5ynbN
d1vpOb8BiZJLk2txIotkW5l0hMajgppyMo5IrTmeXMwdWWOzJ/jxRxtWIwIYtBVU
oF6fZ8gJrvrmfUdQPcBJNwUvnvsk/uFQMeipeOpXNBxAyGd/g/9q0w==
=u2po
-----END PGP SIGNATURE-----

--Signature_Fri__16_Dec_2005_14_51_14_-0500_kPTqWL/UDEiuIlMB--