Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2002 00:12:32 +0100
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        freebsd-scsi@freebsd.org
Subject:   ATAPI/CAM boot-time hang
Message-ID:  <20020309001232.A96693@melusine.cuivre.fr.eu.org>

next in thread | raw e-mail | index | archive | help
Some users of the ATAPI/CAM patches (available from
http://www.cuivre.fr.eu.org/~thomas/atapicam/) have let me know that
using the patch would hang their machine at boot time.

From first investigation, it was determined that there was a problem
with the inquiry commands that are performed during the CAM probe,
and that disabling the PROBE_FULL_INQUIRY phase altogether resolved
the problem for these users.

Analysis of debug traces from the ATAPI/CAM code seems to indicate
that, for these users, one of the ATAPI devices always responds
with a UNIT ATTENTION condition to the 'full' INQUIRY CDB. In that
case, the retry_count for the ccb is never decremented (per the
following code in scsi_interpret_sense:
                case SSD_KEY_UNIT_ATTENTION:
[...]
                        if ((sense_flags & SF_RETRY_UA) != 0) {
                                /* don't decrement retry count */
                                error = ERESTART;
                                print_sense = FALSE;
and so the kernel loops forever trying to send INQUIRY commands.

There are now several options to address this issue:
  1. consider that the device's behaviour is abnormal (ATAPI does
     always perform autosense, so UNIT ATTENTION should be cleared
     on the 2nd attempt) and create quirk entries for it;
  2. decrement the retry count when receiving UNIT ATTENTION (but in
     that case, the probe machinery should not consider failure of
     full inquiry as an indication that the device has disappeared);
  3. get rid of the full inquiry altogether (anything besides
     SHORT_INQUIRY_LENGTH is vendor-specific anyway -- do we actually
     use it?)
  4. other solution?

I'd like others' opinion on this problem...

Thomas.

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020309001232.A96693>