No subject


Sat Dec 3 12:15:27 GMT 2022


> unsigned int timeout;       /* [i] MAX_UINT->no timeout (unit: millisec) */
>     This value is used to timeout the given command. The units of this
>     value are milliseconds. The time being measured is from when a command
>     is sent until when sg is informed the request has been completed. A
>     following read() can take as long as the user likes. When a timeout
>     is exceeded the command is aborted and DID_TIME_OUT is set in the
>     'host_status' and DRIVER_TIMEOUT is set in the 'driver_status'.
[...]
> unsigned short host_status; /* [o] errors from host adapter */
>     These codes potentially come from the firmware on a host adapter
>     or from one of several hosts that an adapter driver controls.
>     The 'host_status' field has the following values whose #defines mimic
>     those which are only visible within the kernel (with the "SG_ERR_"
>     removed from the front of each define). A copy of these defines can be
>     found in sg_err.h (see the utilities section):
>      SG_ERR_DID_OK          0x00 /* NO error                                */
>      SG_ERR_DID_NO_CONNECT  0x01 /* Couldn't connect before timeout period  */
>      SG_ERR_DID_BUS_BUSY    0x02 /* BUS stayed busy through time out period */
>      SG_ERR_DID_TIME_OUT    0x03 /* TIMED OUT for other reason              */
>      SG_ERR_DID_BAD_TARGET  0x04 /* BAD target, device not responding?      */
>      SG_ERR_DID_ABORT       0x05 /* Told to abort for some other reason     */
>      SG_ERR_DID_PARITY      0x06 /* Parity error                            */
>      SG_ERR_DID_ERROR       0x07 /* Internal error [DMA underrun on aic7xxx]*/
>      SG_ERR_DID_RESET       0x08 /* Reset by somebody.                      */
>      SG_ERR_DID_BAD_INTR    0x09 /* Got an interrupt we weren't expecting.  */
>      SG_ERR_DID_PASSTHROUGH 0x0a /* Force command past mid-layer            */
>      SG_ERR_DID_SOFT_ERROR  0x0b /* The low level driver wants a retry      */

Since driver_status is 0, we don't have the "regular" command time out
of 1 minute, so something else went wrong. The docs I know don't tell
what that could be; but as a guess, the driver might have "seen" a SCSI
bus that was occupied by some other device than the scanner for a too
long time.

Abel



More information about the sane-devel mailing list