linux-stable/drivers/ata
Zheyu Ma 2b949663e8 ata: pata_marvell: Check the 'bmdma_addr' beforing reading
commit aafa9f9583 upstream.

Before detecting the cable type on the dma bar, the driver should check
whether the 'bmdma_addr' is zero, which means the adapter does not
support DMA, otherwise we will get the following error:

[    5.146634] Bad IO access at port 0x1 (return inb(port))
[    5.147206] WARNING: CPU: 2 PID: 303 at lib/iomap.c:44 ioread8+0x4a/0x60
[    5.150856] RIP: 0010:ioread8+0x4a/0x60
[    5.160238] Call Trace:
[    5.160470]  <TASK>
[    5.160674]  marvell_cable_detect+0x6e/0xc0 [pata_marvell]
[    5.161728]  ata_eh_recover+0x3520/0x6cc0
[    5.168075]  ata_do_eh+0x49/0x3c0

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-27 14:41:11 +02:00
..
acard-ahci.c ata: libata: remove pointless debugging messages 2022-01-04 20:00:35 +09:00
ahci.c ata: ahci: Add support for AMD A85 FCH (Hudson D4) 2022-01-14 15:17:17 +09:00
ahci.h scsi: ata: Switch to attribute groups 2021-10-16 21:45:52 -04:00
ahci_brcm.c ata: libata: Rename link flag ATA_LFLAG_NO_DB_DELAY 2022-01-14 15:17:17 +09:00
ahci_ceva.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
ahci_da850.c
ahci_dm816.c
ahci_imx.c
ahci_mtk.c
ahci_mvebu.c
ahci_octeon.c
ahci_platform.c
ahci_qoriq.c ata: libata: add reset tracepoints 2022-01-04 20:00:57 +09:00
ahci_seattle.c
ahci_st.c
ahci_sunxi.c ata: ahci_sunxi: Disable DIPM 2021-06-14 08:26:54 -06:00
ahci_tegra.c
ahci_xgene.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
ata_generic.c
ata_piix.c ata: libata: tracepoints for bus-master DMA 2022-01-05 19:32:51 +09:00
Kconfig ata: pata_samsung_cf: add compile test support 2022-01-14 15:17:17 +09:00
libahci.c ata: ahci: Drop pointless VPRINTK() calls and convert the remaining ones 2022-01-05 19:33:01 +09:00
libahci_platform.c ata: libahci_platform: Get rid of dup message when IRQ can't be retrieved 2022-01-04 20:00:12 +09:00
libata-acpi.c ata: libata: drop ata_msg_probe() 2022-01-05 19:33:02 +09:00
libata-core.c ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs 2022-04-20 09:36:21 +02:00
libata-eh.c ata: libata: drop ata_msg_drv() 2022-01-05 19:33:02 +09:00
libata-pata-timings.c
libata-pmp.c ata: libata: add tracepoints for ATA error handling 2022-01-05 19:33:01 +09:00
libata-sata.c ata: libata: Rename link flag ATA_LFLAG_NO_DB_DELAY 2022-01-14 15:17:17 +09:00
libata-scsi.c ata: libata-scsi: simplify __ata_scsi_queuecmd() 2022-01-14 15:17:17 +09:00
libata-sff.c ata: libata: remove debug compilation switches 2022-01-05 19:33:02 +09:00
libata-trace.c ata: libata-sff: tracepoints for HSM state machine 2022-01-05 19:33:01 +09:00
libata-transport.c ata: libata: Add ata_port_classify() helper 2022-01-04 20:00:45 +09:00
libata-transport.h
libata-zpodd.c
libata.h ata: libata: remove pointless VPRINTK() calls 2022-01-05 19:33:01 +09:00
Makefile
pata_acpi.c
pata_ali.c ata: pata_ali: remove redundant return statement 2022-01-14 15:17:17 +09:00
pata_amd.c pata_amd: fix checking of DMA state 2021-10-12 17:46:55 +09:00
pata_arasan_cf.c ata: libata: tracepoints for bus-master DMA 2022-01-05 19:32:51 +09:00
pata_artop.c
pata_atiixp.c ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' 2021-06-16 06:50:25 -06:00
pata_atp867x.c ata: pata_atp867x: convert printk() calls 2022-01-05 19:33:02 +09:00
pata_bk3710.c
pata_buddha.c
pata_cmd64x.c ata: pata_cmd64x: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_cmd640.c ata: pata_cmd640: convert printk() calls 2022-01-05 19:33:02 +09:00
pata_cs5520.c ata: pata_cs5520: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_cs5530.c ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' 2021-06-16 06:50:25 -06:00
pata_cs5535.c
pata_cs5536.c ata: pata_cs5536: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_cypress.c ata: pata_cypress: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_efar.c
pata_ep93xx.c ata: libata: remove debug compilation switches 2022-01-05 19:33:02 +09:00
pata_falcon.c pata_falcon: Avoid type warnings from sparse 2021-11-29 20:28:13 +09:00
pata_ftide010.c
pata_gayle.c
pata_hpt3x2n.c ata: pata_hpt3x2n: convert pr_XXX() calls 2022-01-05 19:33:03 +09:00
pata_hpt3x3.c
pata_hpt37x.c ata: pata_hpt37x: disable primary channel on HPT371 2022-02-23 09:39:37 +09:00
pata_hpt366.c ata: pata_hpt366: convert pr_warn() calls 2022-01-05 19:33:03 +09:00
pata_icside.c
pata_imx.c
pata_isapnp.c
pata_it821x.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
pata_it8213.c
pata_ixp4xx_cf.c ata: libata: move ata_{port,link,dev}_dbg to standard pr_XXX() macros 2022-01-05 19:33:01 +09:00
pata_jmicron.c
pata_legacy.c pata_legacy: fix a couple uninitialized variable bugs 2021-10-12 09:52:35 +09:00
pata_macio.c scsi: ata: Switch to attribute groups 2021-10-16 21:45:52 -04:00
pata_marvell.c ata: pata_marvell: Check the 'bmdma_addr' beforing reading 2022-04-27 14:41:11 +02:00
pata_mpc52xx.c
pata_mpiix.c
pata_netcell.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
pata_ninja32.c
pata_ns87410.c
pata_ns87415.c
pata_octeon_cf.c ata: pata_octeon_cf: fix call to trace_ata_bmdma_stop() 2022-01-21 18:39:16 +09:00
pata_of_platform.c ata: pata_of_platform: Use platform_get_irq_optional() to get the interrupt 2022-01-14 15:17:17 +09:00
pata_oldpiix.c
pata_opti.c
pata_optidma.c pata_optidma: fix checking of DMA state 2021-10-12 17:46:59 +09:00
pata_palmld.c
pata_pcmcia.c
pata_pdc202xx_old.c ata: libata: tracepoints for bus-master DMA 2022-01-05 19:32:51 +09:00
pata_pdc2027x.c ata: pata_pdc2027x: Replace PDPRINTK() with standard ata logging 2022-01-05 19:33:01 +09:00
pata_piccolo.c
pata_platform.c ata: pata_platform: Fix a NULL pointer dereference in __pata_platform_probe() 2022-01-27 11:22:43 +09:00
pata_pxa.c
pata_radisys.c pata_radisys: fix checking of DMA state 2021-10-12 17:47:02 +09:00
pata_rb532_cf.c ata: rb532_cf: remove redundant codes 2021-06-24 18:49:01 -06:00
pata_rdc.c
pata_rz1000.c ata: pata_rz1000: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_samsung_cf.c
pata_sc1200.c ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' 2021-06-16 06:50:25 -06:00
pata_sch.c
pata_serverworks.c ata: pata_serverworks: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_sil680.c ata: pata_sil680: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_sis.c
pata_sl82c105.c
pata_triflex.c
pata_via.c ata: pata_via: Drop pointless VPRINTK() calls 2022-01-05 19:33:01 +09:00
pdc_adma.c ata: pdc_adma: Drop pointless VPRINTK() calls and remove disabled NCQ debugging 2022-01-05 19:33:01 +09:00
sata_dwc_460ex.c ata: sata_dwc_460ex: Fix crash due to OOB write 2022-04-13 19:27:38 +02:00
sata_fsl.c ata: sata_fsl: fix sscanf() and sysfs_emit() format strings 2022-02-08 15:31:20 +09:00
sata_gemini.c ata: sata_gemini: convert pr_err() calls 2022-01-05 19:33:03 +09:00
sata_gemini.h
sata_highbank.c ata: sata_highbank: Remove unnecessary print function dev_err() 2021-11-11 10:55:32 +09:00
sata_inic162x.c ata: sata_inic162x: Drop pointless VPRINTK() calls 2022-01-05 19:33:02 +09:00
sata_mv.c ata: sata_mv: convert remaining printk() to structured logging 2022-01-05 19:33:03 +09:00
sata_nv.c ata: sata_nv: drop pointless VPRINTK() calls and convert remaining ones 2022-01-05 19:33:02 +09:00
sata_promise.c ata: sata_promise: Drop pointless VPRINTK() calls and convert the remaining ones 2022-01-05 19:33:01 +09:00
sata_promise.h
sata_qstor.c ata: sata_qstor: Drop pointless VPRINTK() calls 2022-01-05 19:33:02 +09:00
sata_rcar.c ata: libata: remove debug compilation switches 2022-01-05 19:33:02 +09:00
sata_sil.c ata: sata_sil: Drop pointless VPRINTK() calls 2022-01-05 19:33:02 +09:00
sata_sil24.c ata: libata: add reset tracepoints 2022-01-04 20:00:57 +09:00
sata_sis.c
sata_svw.c
sata_sx4.c ata: sata_sx4: convert printk() calls 2022-01-05 19:33:03 +09:00
sata_uli.c
sata_via.c
sata_vsc.c
sis.h