Re: [PATCH v8 05/11] libata-eh: allow defer in ata_exec_internal
From: Aaron Lu <hidden>
Date: 2012-10-30 03:00:16
Also in:
linux-acpi, linux-ide, linux-scsi
From: Aaron Lu <hidden>
Date: 2012-10-30 03:00:16
Also in:
linux-acpi, linux-ide, linux-scsi
On 10/29/2012 11:20 PM, Tejun Heo wrote:
On Mon, Oct 29, 2012 at 05:01:32PM +0800, Aaron Lu wrote:quoted
ata_exec_internal will preempt the ata link's active_tag and ata port's qc_active flags, this is OK for error recovery, but if normal code path wants to use ata_exec_internal, there is a problem: we need to check if it is OK to issue a new command with the help of port_ops->defer. In ZPODD, I'll need to find out the loading mechanism of the ODD by issuing a GET_CONFIGURATION command. And this command may very well race with commands issued from SCSI layer. So instead of preempt the current command, defer the new command if it's not OK to issue it, as it is always wrong to issue a non-NCQ command when there is command(s) in processing.Why not do the discovery from EH?
Do you mean set a device level EH flag and then schedule EH to do the discovery? Thanks, Aaron