Display more meaningful message on SCSI `unit attention'.
This commit is contained in:
parent
530132e407
commit
c2f7555fda
|
@ -1560,7 +1560,7 @@ struct scsi_xfer *xs;
|
|||
unit);
|
||||
return(EINVAL);
|
||||
case 0x6:
|
||||
if(!silent)printf("cd%d: Unit attention.\n", unit);
|
||||
if(!silent)printf("cd%d: media change\n", unit);
|
||||
if (cd_data[unit]->openparts)
|
||||
cd_data[unit]->flags &= ~(CDVALID | CDHAVELABEL);
|
||||
{
|
||||
|
|
|
@ -879,7 +879,7 @@ struct scsi_xfer *xs;
|
|||
sense->ext.extended.info[13] ;
|
||||
return(EINVAL);
|
||||
case 0x6:
|
||||
if(!silent) printf("st%d: Unit attention.\n ", unit);
|
||||
if(!silent)printf("st%d: media change\n", unit);
|
||||
ch_data[unit].lsterr=(sense->ext.extended.info[12]<<8)|
|
||||
sense->ext.extended.info[13] ;
|
||||
ch_info_valid[unit] = FALSE;
|
||||
|
|
|
@ -1178,7 +1178,7 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
|
|||
* sure that we don't have any residual state
|
||||
*/
|
||||
if(!silent)
|
||||
printf("sd%d: Unit attention.\n ", unit);
|
||||
printf("sd%d: reset\n", unit);
|
||||
sd->flags &= ~(SDVALID | SDHAVELABEL);
|
||||
if (sd->openparts)
|
||||
return EIO;
|
||||
|
|
|
@ -1317,7 +1317,7 @@ st_interpret_sense(int unit, struct scsi_xfer *xs)
|
|||
return EINVAL;
|
||||
case 0x6:
|
||||
if(!silent)
|
||||
printf("st%d: Unit attention.\n", unit);
|
||||
printf("st%d: media change\n", unit);
|
||||
st->flags &= ~(ST_AT_FILEMARK|ST_AT_EOM);
|
||||
st->info_valid = FALSE;
|
||||
if (st->flags & ST_OPEN) /* TEMP!!!! */
|
||||
|
|
|
@ -1560,7 +1560,7 @@ struct scsi_xfer *xs;
|
|||
unit);
|
||||
return(EINVAL);
|
||||
case 0x6:
|
||||
if(!silent)printf("cd%d: Unit attention.\n", unit);
|
||||
if(!silent)printf("cd%d: media change\n", unit);
|
||||
if (cd_data[unit]->openparts)
|
||||
cd_data[unit]->flags &= ~(CDVALID | CDHAVELABEL);
|
||||
{
|
||||
|
|
|
@ -879,7 +879,7 @@ struct scsi_xfer *xs;
|
|||
sense->ext.extended.info[13] ;
|
||||
return(EINVAL);
|
||||
case 0x6:
|
||||
if(!silent) printf("st%d: Unit attention.\n ", unit);
|
||||
if(!silent)printf("st%d: media change\n", unit);
|
||||
ch_data[unit].lsterr=(sense->ext.extended.info[12]<<8)|
|
||||
sense->ext.extended.info[13] ;
|
||||
ch_info_valid[unit] = FALSE;
|
||||
|
|
|
@ -1178,7 +1178,7 @@ sd_interpret_sense(int unit, struct scsi_xfer *xs)
|
|||
* sure that we don't have any residual state
|
||||
*/
|
||||
if(!silent)
|
||||
printf("sd%d: Unit attention.\n ", unit);
|
||||
printf("sd%d: reset\n", unit);
|
||||
sd->flags &= ~(SDVALID | SDHAVELABEL);
|
||||
if (sd->openparts)
|
||||
return EIO;
|
||||
|
|
|
@ -1317,7 +1317,7 @@ st_interpret_sense(int unit, struct scsi_xfer *xs)
|
|||
return EINVAL;
|
||||
case 0x6:
|
||||
if(!silent)
|
||||
printf("st%d: Unit attention.\n", unit);
|
||||
printf("st%d: media change\n", unit);
|
||||
st->flags &= ~(ST_AT_FILEMARK|ST_AT_EOM);
|
||||
st->info_valid = FALSE;
|
||||
if (st->flags & ST_OPEN) /* TEMP!!!! */
|
||||
|
|
Loading…
Reference in New Issue