linux-yocto/drivers/ata
Damien Le Moal 5b7912d839 ata: libata-scsi: Return aborted command when missing sense and result TF
Commit d2be9ea9a7 upstream.

ata_gen_ata_sense() is always called for a failed qc missing sense data
so that a sense key, code and code qualifier can be generated using
ata_to_sense_error() from the qc status and error fields of its result
task file. However, if the qc does not have its result task file filled,
ata_gen_ata_sense() returns early without setting a sense key.

Improve this by defaulting to returning ABORTED COMMAND without any
additional sense code, since we do not know the reason for the failure.
The same fix is also applied in ata_gen_passthru_sense() with the
additional check that the qc failed (qc->err_mask is set).

Fixes: 816be86c79 ("ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:28:42 +02:00
..
pata_parport ata: pata_parport: fit3: implement IDE command set registers 2023-10-10 14:42:22 +09:00
acard-ahci.c
ahci_brcm.c
ahci_ceva.c ata: ahci_ceva: fix error handling for Xilinx GT PHY support 2024-03-01 13:35:07 +01:00
ahci_da850.c
ahci_dm816.c
ahci_dwc.c ata: Explicitly include correct DT includes 2023-08-02 17:37:05 +09:00
ahci_imx.c
ahci_mtk.c ata: Explicitly include correct DT includes 2023-08-02 17:37:05 +09:00
ahci_mvebu.c ata: Explicitly include correct DT includes 2023-08-02 17:37:05 +09:00
ahci_octeon.c ata: ahci_octeon: Convert to devm_platform_ioremap_resource() 2023-08-02 17:37:06 +09:00
ahci_platform.c driver core changes for 6.5-rc1 2023-07-03 12:56:23 -07:00
ahci_qoriq.c ata: fix debounce timings type 2023-08-02 17:37:06 +09:00
ahci_seattle.c ata: ahci_seattle: Convert to devm_platform_ioremap_resource() 2023-08-02 17:37:06 +09:00
ahci_st.c
ahci_sunxi.c ata: Explicitly include correct DT includes 2023-08-02 17:37:05 +09:00
ahci_tegra.c ata: ahci_tegra: Convert to devm_platform_ioremap_resource() 2023-08-02 17:37:06 +09:00
ahci_xgene.c ata: ahci_xgene: fix parameter types of xgene_ahci_poll_reg_val() 2023-08-02 17:37:07 +09:00
ahci.c ahci: add PCI ID for Marvell 88SE9215 SATA Controller 2025-04-25 10:45:15 +02:00
ahci.h ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers 2024-03-01 13:34:49 +01:00
ata_generic.c
ata_piix.c
Kconfig ata: Fix SATA_MOBILE_LPM_POLICY description in Kconfig 2025-08-28 16:28:42 +02:00
libahci_platform.c ata: Explicitly include correct DT includes 2023-08-02 17:37:05 +09:00
libahci.c ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() 2025-02-01 18:37:52 +01:00
libata-acpi.c ata: libata-acpi: Do not assume 40 wire cable if no devices are enabled 2025-07-10 16:03:15 +02:00
libata-core.c ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() 2025-02-01 18:37:52 +01:00
libata-eh.c ata: libata-eh: Do not use ATAPI DMA for a device limited to PIO mode 2025-04-25 10:45:15 +02:00
libata-pata-timings.c
libata-pmp.c
libata-sata.c ata: libata-sata: Disallow changing LPM state if not supported 2025-08-28 16:28:15 +02:00
libata-scsi.c ata: libata-scsi: Return aborted command when missing sense and result TF 2025-08-28 16:28:42 +02:00
libata-sff.c ata: libata-sff: Ensure that we cannot write outside the allocated buffer 2025-02-17 09:40:35 +01:00
libata-trace.c
libata-transport.c ata: libata-core: Do not register PM operations for SAS ports 2023-09-28 21:23:14 +09:00
libata-transport.h
libata-zpodd.c
libata.h ata: libata-core: Do not register PM operations for SAS ports 2023-09-28 21:23:14 +09:00
Makefile
pata_acpi.c
pata_ali.c
pata_amd.c
pata_arasan_cf.c ata: pata_arasan_cf: Convert to platform remove callback returning void 2023-08-02 17:53:09 +09:00
pata_artop.c
pata_atiixp.c
pata_atp867x.c
pata_buddha.c ata: pata_buddha: Remove #include <asm/ide.h> 2023-08-24 08:09:59 +09:00
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c ata: pata_cs5536: fix build on 32-bit UML 2025-07-10 16:03:15 +02:00
pata_cypress.c
pata_efar.c
pata_ep93xx.c ata: pata_ep93xx: use soc_device_match for UDMA modes 2023-08-25 22:09:43 +09:00
pata_falcon.c ata: pata_falcon: add data_swab option to byte-swap disk data 2023-08-28 19:14:41 +09:00
pata_ftide010.c ata: pata_ftide010: Add missing MODULE_DESCRIPTION 2023-08-25 08:21:03 +09:00
pata_gayle.c ata: pata_gayle: Remove #include <asm/ide.h> 2023-08-24 08:09:59 +09:00
pata_hpt3x2n.c
pata_hpt3x3.c
pata_hpt37x.c
pata_hpt366.c
pata_icside.c
pata_imx.c ata: pata_imx: Use helper function devm_clk_get_enabled() 2023-08-17 07:45:32 +09:00
pata_isapnp.c ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-03 07:33:03 +01:00
pata_it821x.c
pata_it8213.c
pata_ixp4xx_cf.c ata: pata_ixp4xx: Remove unnecessary return value check 2023-08-02 17:37:06 +09:00
pata_jmicron.c
pata_legacy.c ata: pata_legacy: make legacy_exit() work again 2024-06-16 13:47:33 +02:00
pata_macio.c ata: pata_macio: Use WARN instead of BUG 2024-09-12 11:11:39 +02:00
pata_marvell.c
pata_mpc52xx.c ata: pata_mpc52xx: Convert to platform remove callback returning void 2023-08-02 17:55:49 +09:00
pata_mpiix.c
pata_netcell.c
pata_ninja32.c
pata_ns87410.c
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
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_pcmcia.c
pata_pdc202xx_old.c
pata_pdc2027x.c
pata_piccolo.c
pata_platform.c
pata_pxa.c ata: pata_pxa: Fix potential NULL pointer dereference in pxa_ata_probe() 2025-04-25 10:45:05 +02:00
pata_radisys.c
pata_rb532_cf.c ata: pata_rb532_cf: Convert to platform remove callback returning void 2023-08-02 17:55:52 +09:00
pata_rdc.c
pata_rz1000.c
pata_sc1200.c
pata_sch.c
pata_serverworks.c ata: pata_serverworks: Do not use the term blacklist 2024-10-10 11:57:32 +02:00
pata_sil680.c
pata_sis.c
pata_sl82c105.c ata: libata: remove deprecated EH callbacks 2023-08-02 17:45:42 +09:00
pata_triflex.c
pata_via.c ata: libata-acpi: Do not assume 40 wire cable if no devices are enabled 2025-07-10 16:03:15 +02:00
pdc_adma.c
sata_dwc_460ex.c ata: sata_dwc_460ex: Convert to platform remove callback returning void 2023-08-02 17:55:52 +09:00
sata_fsl.c ata: sata_fsl: Convert to platform remove callback returning void 2023-08-02 17:55:52 +09:00
sata_gemini.c ata: sata_gemini: Check clk_enable() result 2024-05-17 12:02:13 +02:00
sata_gemini.h
sata_highbank.c ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys() 2024-12-19 18:11:22 +01:00
sata_inic162x.c ata: fix debounce timings type 2023-08-02 17:37:06 +09:00
sata_mv.c ata: sata_mv: Fix PCI device ID table declaration compilation warning 2024-04-10 16:36:01 +02:00
sata_nv.c ata: fix debounce timings type 2023-08-02 17:37:06 +09:00
sata_promise.c
sata_promise.h
sata_qstor.c
sata_rcar.c ata: sata_rcar: Convert to platform remove callback returning void 2023-08-02 17:55:52 +09:00
sata_sil.c ata: sata_sil: Rename sil_blacklist to sil_quirks 2024-10-10 11:57:32 +02:00
sata_sil24.c ata: sata_sil24: fix parameter type of sil24_exec_polled_cmd() 2023-08-02 17:37:07 +09:00
sata_sis.c
sata_svw.c ata: Use of_property_read_reg() to parse "reg" 2023-06-13 15:38:48 +09:00
sata_sx4.c ata: sata_sx4: Add error handling in pdc20621_i2c_read() 2025-04-25 10:45:08 +02:00
sata_uli.c
sata_via.c
sata_vsc.c
sis.h