On 10-08-19 09:40 PM, Mark Lord wrote:
Fix DSM/TRIM commands in sata_mv (v2). These need to be issued using old-school "BM DMA", rather than via the EDMA host queue. Since the chips don't have proper BM DMA status, we need to be more careful with setting the ATA_DMA_INTR bit, since DSM/TRIM often has a long delay between "DMA complete" and "command complete".
.. Speaking of which.. it appears that BM DMA support for sata_mv is intentionally broken by 2.6.35 kernels, with the addition of this code in libata-sff.c: unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; /* see ata_dma_blacklisted() */ BUG_ON((ap->flags & ATA_FLAG_PIO_POLLING) && qc->tf.protocol == ATAPI_PROT_DMA); Is that BUG_ON even necessary?? It really should be looking only at tf.flags, not qp->flags there, as it actually does redundantly further on: WARN_ON_ONCE(qc->tf.flags & ATA_TFLAG_POLLING); sata_mv has ATA_FLAG_PIO_POLLING set for all ports, but doesn't set ATA_TFLAG_POLLING when doing BM DMA. ??? -- 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