linux/drivers/ata
Niklas Cassel 3ac873c76d ata: libata-core: fix when to fetch sense data for successful commands
The condition to fetch sense data was supposed to be:
ATA_SENSE set AND either
1) Command was NCQ and ATA_DFLAG_CDL_ENABLED flag set (flag
   ATA_DFLAG_CDL_ENABLED will only be set if the Successful NCQ command
   sense data supported bit is set); or
2) Command was non-NCQ and regular sense data reporting is enabled.

However the check in 2) accidentally had the negation at the wrong place,
causing it to try to fetch sense data if it was a non-NCQ command _or_
if regular sense data reporting was _not_ enabled.

Fix this by removing the extra parentheses that should not be there,
such that only the correct return (ata_is_ncq()) is negated.

Fixes: 18bd7718b5 ("scsi: ata: libata: Handle completion of CDL commands using policy 0xD")
Reported-by: Borislav Petkov <bp@alien8.de>
Closes: https://lore.kernel.org/linux-ide/20230722155621.GIZLv8JbURKzHtKvQE@fat_crate.local/
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Tested-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
2023-07-28 11:30:34 +09:00
..
pata_parport ata: pata_parport: Add missing protocol modules description 2023-07-17 08:30:41 +09:00
acard-ahci.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
ahci_brcm.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_ceva.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_da850.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_dm816.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_dwc.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_imx.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_mtk.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_mvebu.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_octeon.c ata: ahci_octeon: Remove unnecessary include 2023-06-23 09:33:53 +09:00
ahci_platform.c driver core changes for 6.5-rc1 2023-07-03 12:56:23 -07:00
ahci_qoriq.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_seattle.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_st.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_sunxi.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_tegra.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci_xgene.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
ahci.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
ahci.h scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
ata_generic.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
ata_piix.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
Kconfig ahci: qoriq: Add platform dependencies 2023-03-23 10:29:26 +09:00
libahci_platform.c SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
libahci.c ata: ahci: Cleanup ahci_reset_controller() 2023-06-14 08:49:18 +09:00
libata-acpi.c ata: make use of ata_port_is_frozen() helper 2022-10-18 13:53:27 +09:00
libata-core.c ata: libata-core: fix when to fetch sense data for successful commands 2023-07-28 11:30:34 +09:00
libata-eh.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
libata-pata-timings.c ata: separate PATA timings code from libata-core.c 2020-03-26 10:28:19 -06:00
libata-pmp.c ata: libata: add tracepoints for ATA error handling 2022-01-05 19:33:01 +09:00
libata-sata.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
libata-scsi.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
libata-sff.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
libata-trace.c ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH 2023-01-04 13:36:26 +09:00
libata-transport.c ata: libata-transport: fix error handling in ata_tdev_add() 2022-11-11 17:26:05 +09:00
libata-transport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
libata-zpodd.c libata: zpodd: Fix small read overflow in zpodd_get_mech_type() 2019-07-29 16:00:14 -06:00
libata.h scsi: ata: libata: Set read/write commands CDL index 2023-05-22 17:05:20 -04:00
Makefile ATA changes for 6.3-rc1 2023-02-22 13:35:51 -08:00
pata_acpi.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ali.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_amd.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_arasan_cf.c ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() 2023-07-26 08:20:22 +09:00
pata_artop.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_atiixp.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_atp867x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_buddha.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cmd64x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cmd640.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cs5520.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cs5530.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cs5535.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cs5536.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_cypress.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_efar.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ep93xx.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_falcon.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ftide010.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_gayle.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_hpt3x2n.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_hpt3x3.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_hpt37x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_hpt366.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_icside.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_imx.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_isapnp.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_it821x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_it8213.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ixp4xx_cf.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
pata_jmicron.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_legacy.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_macio.c SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
pata_marvell.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_mpc52xx.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_mpiix.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_netcell.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ninja32.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ns87410.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_ns87415.c ata: pata_ns87415: mark ns87560_tf_read static 2023-07-28 08:52:42 +09:00
pata_octeon_cf.c ata: pata_octeon_cf: fix error return code in octeon_cf_probe() 2023-07-26 08:32:21 +09:00
pata_of_platform.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
pata_oldpiix.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_opti.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_optidma.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_pcmcia.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_pdc202xx_old.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_pdc2027x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_piccolo.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_platform.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
pata_pxa.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_radisys.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_rb532_cf.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_rdc.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_rz1000.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_sc1200.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_sch.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_serverworks.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_sil680.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_sis.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_sl82c105.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_triflex.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pata_via.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
pdc_adma.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_dwc_460ex.c SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
sata_fsl.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_gemini.c ata: sata_gemini: Remove dependency on OF for compile tests 2022-10-18 08:04:46 +09:00
sata_gemini.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sata_highbank.c ata: libata: Make ata_platform_remove_one return void 2023-05-15 06:49:39 +09:00
sata_inic162x.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_mv.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_nv.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_promise.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_promise.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 18 2019-05-21 11:28:46 +02:00
sata_qstor.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_rcar.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_sil24.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_sil.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_sis.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_svw.c ata: Use of_property_read_reg() to parse "reg" 2023-06-13 15:38:48 +09:00
sata_sx4.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_uli.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_via.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sata_vsc.c scsi: ata: Declare SCSI host templates const 2023-03-24 19:19:19 -04:00
sis.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00