Commit 58768b0
ata: libata-scsi: Fix CDL control
Delete extra checks for the ATA_DFLAG_CDL_ENABLED flag that prevent
SET FEATURES command from being issued to a drive when NCQ commands
are active.
ata_mselect_control_ata_feature() sets / clears the ATA_DFLAG_CDL_ENABLED
flag during the translation of MODE SELECT to SET FEATURES. If SET FEATURES
gets deferred due to outstanding NCQ commands, the original MODE SELECT
command will be re-queued. When the re-queued MODE SELECT goes through
the ata_mselect_control_ata_feature() translation again, SET FEATURES
will not be issued because ATA_DFLAG_CDL_ENABLED has been already set or
cleared by the initial translation of MODE SELECT.
The ATA_DFLAG_CDL_ENABLED checks in ata_mselect_control_ata_feature()
are safe to remove because scsi_cdl_enable() implements a similar logic
that avoids enabling CDL if it has been enabled already.
Fixes: 17e897a ("ata: libata-scsi: Improve CDL control")
Cc: stable@vger.kernel.org
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>1 parent 35f6bed commit 58768b0
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3904 | 3904 | | |
3905 | 3905 | | |
3906 | 3906 | | |
3907 | | - | |
3908 | | - | |
3909 | | - | |
| 3907 | + | |
3910 | 3908 | | |
3911 | 3909 | | |
3912 | 3910 | | |
3913 | 3911 | | |
3914 | 3912 | | |
3915 | 3913 | | |
3916 | | - | |
3917 | | - | |
3918 | | - | |
| 3914 | + | |
| 3915 | + | |
3919 | 3916 | | |
3920 | | - | |
3921 | | - | |
3922 | 3917 | | |
3923 | 3918 | | |
3924 | 3919 | | |
| |||
0 commit comments