• Ondrej Zary's avatar
    libata-sff: Fix controllers with no ctl port · fa6709b9
    Ondrej Zary authored
    commit 6d8ca28fa688a9354bc9fbc935bdaeb3651b6677 upstream.
    
    Currently, ata_sff_softreset is skipped for controllers with no ctl port.
    But that also skips ata_sff_dev_classify required for device detection.
    This means that libata is currently broken on controllers with no ctl port.
    
    No device connected:
    [    1.872480] pata_isapnp 01:01.02: activated
    [    1.889823] scsi2 : pata_isapnp
    [    1.890109] ata3: PATA max PIO0 cmd 0x1e8 ctl 0x0 irq 11
    [    6.888110] ata3.01: qc timeout (cmd 0xec)
    [    6.888179] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   16.888085] ata3.01: qc timeout (cmd 0xec)
    [   16.888147] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   46.888086] ata3.01: qc timeout (cmd 0xec)
    [   46.888148] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   51.888100] ata3.00: qc timeout (cmd 0xec)
    [   51.888160] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   61.888079] ata3.00: qc timeout (cmd 0xec)
    [   61.888141] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   91.888089] ata3.00: qc timeout (cmd 0xec)
    [   91.888152] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x5)
    
    ATAPI device connected:
    [    1.882061] pata_isapnp 01:01.02: activated
    [    1.893430] scsi2 : pata_isapnp
    [    1.893719] ata3: PATA max PIO0 cmd 0x1e8 ctl 0x0 irq 11
    [    6.892107] ata3.01: qc timeout (cmd 0xec)
    [    6.892171] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   16.892079] ata3.01: qc timeout (cmd 0xec)
    [   16.892138] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   46.892079] ata3.01: qc timeout (cmd 0xec)
    [   46.892138] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
    [   46.908586] ata3.00: ATAPI: ACER CD-767E/O, V1.5X, max PIO2, CDB intr
    [   46.924570] ata3.00: configured for PIO0 (device error ignored)
    [   46.926295] scsi 2:0:0:0: CD-ROM            ACER     CD-767E/O        1.5X PQ: 0 ANSI: 5
    [   46.984519] sr0: scsi3-mmc drive: 6x/6x xa/form2 tray
    [   46.984592] cdrom: Uniform CD-ROM driver Revision: 3.20
    
    So don't skip ata_sff_softreset, just skip the reset part of ata_bus_softreset
    if the ctl port is not available.
    
    This makes IDE port on ES968 behave correctly:
    
    No device connected:
    [    4.670888] pata_isapnp 01:01.02: activated
    [    4.673207] scsi host2: pata_isapnp
    [    4.673675] ata3: PATA max PIO0 cmd 0x1e8 ctl 0x0 irq 11
    [    7.081840] Adding 2541652k swap on /dev/sda2.  Priority:-1 extents:1 across:2541652k
    
    ATAPI device connected:
    [    4.704362] pata_isapnp 01:01.02: activated
    [    4.706620] scsi host2: pata_isapnp
    [    4.706877] ata3: PATA max PIO0 cmd 0x1e8 ctl 0x0 irq 11
    [    4.872782] ata3.00: ATAPI: ACER CD-767E/O, V1.5X, max PIO2, CDB intr
    [    4.888673] ata3.00: configured for PIO0 (device error ignored)
    [    4.893984] scsi 2:0:0:0: CD-ROM            ACER     CD-767E/O        1.5X PQ: 0 ANSI: 5
    [    7.015578] Adding 2541652k swap on /dev/sda2.  Priority:-1 extents:1 across:2541652k
    Signed-off-by: 's avatarOndrej Zary <linux@rainbow-software.org>
    Signed-off-by: 's avatarTejun Heo <tj@kernel.org>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    fa6709b9
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
acard-ahci.c Loading commit data...
ahci.c Loading commit data...
ahci.h Loading commit data...
ahci_platform.c Loading commit data...
ata_generic.c Loading commit data...
ata_piix.c Loading commit data...
libahci.c Loading commit data...
libata-acpi.c Loading commit data...
libata-core.c Loading commit data...
libata-eh.c Loading commit data...
libata-pmp.c Loading commit data...
libata-scsi.c Loading commit data...
libata-sff.c Loading commit data...
libata-transport.c Loading commit data...
libata-transport.h Loading commit data...
libata-zpodd.c Loading commit data...
libata.h Loading commit data...
pata_acpi.c Loading commit data...
pata_ali.c Loading commit data...
pata_amd.c Loading commit data...
pata_arasan_cf.c Loading commit data...
pata_artop.c Loading commit data...
pata_at32.c Loading commit data...
pata_at91.c Loading commit data...
pata_atiixp.c Loading commit data...
pata_atp867x.c Loading commit data...
pata_bf54x.c Loading commit data...
pata_cmd640.c Loading commit data...
pata_cmd64x.c Loading commit data...
pata_cs5520.c Loading commit data...
pata_cs5530.c Loading commit data...
pata_cs5535.c Loading commit data...
pata_cs5536.c Loading commit data...
pata_cypress.c Loading commit data...
pata_efar.c Loading commit data...
pata_ep93xx.c Loading commit data...
pata_hpt366.c Loading commit data...
pata_hpt37x.c Loading commit data...
pata_hpt3x2n.c Loading commit data...
pata_hpt3x3.c Loading commit data...
pata_icside.c Loading commit data...
pata_imx.c Loading commit data...
pata_isapnp.c Loading commit data...
pata_it8213.c Loading commit data...
pata_it821x.c Loading commit data...
pata_ixp4xx_cf.c Loading commit data...
pata_jmicron.c Loading commit data...
pata_legacy.c Loading commit data...
pata_macio.c Loading commit data...
pata_marvell.c Loading commit data...
pata_mpc52xx.c Loading commit data...
pata_mpiix.c Loading commit data...
pata_netcell.c Loading commit data...
pata_ninja32.c Loading commit data...
pata_ns87410.c Loading commit data...
pata_ns87415.c Loading commit data...
pata_octeon_cf.c Loading commit data...
pata_of_platform.c Loading commit data...
pata_oldpiix.c Loading commit data...
pata_opti.c Loading commit data...
pata_optidma.c Loading commit data...
pata_palmld.c Loading commit data...
pata_pcmcia.c Loading commit data...
pata_pdc2027x.c Loading commit data...
pata_pdc202xx_old.c Loading commit data...
pata_piccolo.c Loading commit data...
pata_platform.c Loading commit data...
pata_pxa.c Loading commit data...
pata_radisys.c Loading commit data...
pata_rb532_cf.c Loading commit data...
pata_rdc.c Loading commit data...
pata_rz1000.c Loading commit data...
pata_samsung_cf.c Loading commit data...
pata_sc1200.c Loading commit data...
pata_scc.c Loading commit data...
pata_sch.c Loading commit data...
pata_serverworks.c Loading commit data...
pata_sil680.c Loading commit data...
pata_sis.c Loading commit data...
pata_sl82c105.c Loading commit data...
pata_triflex.c Loading commit data...
pata_via.c Loading commit data...
pdc_adma.c Loading commit data...
sata_dwc_460ex.c Loading commit data...
sata_fsl.c Loading commit data...
sata_highbank.c Loading commit data...
sata_inic162x.c Loading commit data...
sata_mv.c Loading commit data...
sata_nv.c Loading commit data...
sata_promise.c Loading commit data...
sata_promise.h Loading commit data...
sata_qstor.c Loading commit data...
sata_rcar.c Loading commit data...
sata_sil.c Loading commit data...
sata_sil24.c Loading commit data...
sata_sis.c Loading commit data...
sata_svw.c Loading commit data...
sata_sx4.c Loading commit data...
sata_uli.c Loading commit data...
sata_via.c Loading commit data...
sata_vsc.c Loading commit data...
sis.h Loading commit data...