Re: ata_std_qc_defer not good enough for FIS-based switching ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Mark.

Mark Lord wrote:
Are there controllers which *can* handle such a mix (ahci, sil24 ?)

Yeap, sil24 can. ahci can currently only do device based switching but ahci 2.0 can do it too.

So it looks like a I need a .qc_defer() function which examines all links
from the common host port for activity, and then asks for command deferral when the new command has a different protocol than those that are outstanding.

Weird that none of the other LLDs need this.  Or do they?

So, none of the others needs this.

This seems (below) to work for sata_mv. But I still wonder about other LLDs.


static int mv_qc_defer (struct ata_queued_cmd *qc)
{
    struct ata_link *link = qc->dev->link;
    struct ata_port *ap = link->ap;
    struct mv_port_priv *pp;
    int port_is_using_ncq;

    if (ap->nr_active_links == 0)
        return 0;
    pp = ap->private_data;
    port_is_using_ncq = ((pp->pp_flags & MV_PP_FLAG_NCQ_EN) != 0);
    if (qc->tf.protocol == ATA_PROT_NCQ) {
        if (port_is_using_ncq)
            return ata_std_qc_defer(qc);
    } else {
        if (!port_is_using_ncq)
            return sata_pmp_qc_defer_cmd_switch(qc);
    }
    return ATA_DEFER_LINK;
}

Looks good to me.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux