About pm8001 NCQ error handling

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

 



Hi Damien, Hannes,

I want to remove usage of sas_alloc_slow_task() outside libsas as prep work for SCSI reserved command handling. The pm8001 driver uses sas_alloc_slow_task() for dealing with NCQ error handling, which was added in commit c6b9ef5779c3 ("[SCSI] pm80xx: NCQ error handling changes"). So it seems a good opportunity to fix that code so that it does not send read log ext from the LLDD and we can drop those sas_alloc_slow_task() calls.

That NCQ error handling in that driver consists of 2x main steps:

1. send read log ext page 10 to analyze/clear the error
- I do note the crazy code to alloc a domain device there cf. pm8001_send_read_log() 2. send special pm8001 SATA_ABORT command to abort any pending IO in the drive/host

I actually have to solve a very similar NCQ disk error problem for hisi_sas driver.

As for improving this, an idea is to set link->eh_info>err_mask |= AC_ERR_DEV and call ata_std_sched_eh() when IO_XFER_ERROR_ABORTED_NCQ_MODE occurs and take advantage of the libata fastdrain feature to abort all the outstanding IO. This calls the SCSI error handler, in which we could send the SATA_ABORT in the libsas abort task or LU reset handler LLDD callback.

The problem here is where to call the read log ext page 10 happens in this handling - when we finally get around to it in ata_eh_autopsy() -> ata_eh_link_autopsy() -> ata_eh_link_autopsy(), the port is frozen and all qc are already mark failed. So we need it earlier. Do you have any ideas on this or whether this approach is sensible?

Thanks,
John



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux