Re: [PATCH v1 2/4] ata: libata-scsi: Generate ATA PT sense data when ATA ERR/DF are set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 17, 2024 at 01:29:25PM +0200, Niklas Cassel wrote:
> 
> However, if there is any bits set in cmd->result,
> scsi_io_completion_nz_result() will be called:
> https://github.com/torvalds/linux/blob/v6.10-rc4/drivers/scsi/scsi_lib.c#L1052-L1053

If forgot to say that, if ATA_ERR and Sense Data Available bit is set:
ata_eh_analyze_tf() will call scsi_check_sense() which will set the
SCSI ML bit for many ASC/ASCQ codes.


If Sense Data Available bit is set, but ATA_ERR is not set:
-For non-NCQ commands, ata_eh_read_sense_success_non_ncq() will call
scsi_check_sense() which will set the SCSI ML bit for many ASC/ASCQ codes.

-For NCQ commands, ata_eh_read_sense_success_ncq_log() will call
scsi_check_sense() which will set the SCSI ML bit for many ASC/ASCQ codes.



The SCSI ML bit is stored in cmd->result, so if scsi_check_sense() did
set the SCSI ML bit, cmd->result will be non-zero, which means that once
scsi_io_completion() is called, it will call scsi_io_completion_nz_result().


Kind regards,
Niklas




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux