From: Mark Lord <kernel@teksavvy.com>
To: linux-ide@vger.kernel.org
Cc: tj@kernel.org, jeff@garzik.org
Subject: Re: [PATCH] sata_mv: fix broken DSM/TRIM support (v2)
Date: Fri, 20 Aug 2010 09:56:56 -0400 [thread overview]
Message-ID: <4C6E89A8.2000600@teksavvy.com> (raw)
In-Reply-To: <1282268444.9628.4.camel@corey>
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.
???
next prev parent reply other threads:[~2010-08-20 13:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 1:19 [PATCH] sata_mv: fix broken DSM/TRIM support Mark Lord
2010-08-20 1:40 ` [PATCH] sata_mv: fix broken DSM/TRIM support (v2) Mark Lord
2010-08-20 13:56 ` Mark Lord [this message]
2010-08-20 14:13 ` [PATCH] libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue Mark Lord
2010-08-23 8:17 ` Tejun Heo
2010-08-23 8:22 ` [PATCH] sata_mv: fix broken DSM/TRIM support (v2) Tejun Heo
2010-08-23 13:41 ` Mark Lord
2010-08-23 13:47 ` Tejun Heo
2010-08-23 13:54 ` Mark Lord
2010-08-23 13:59 ` Tejun Heo
2010-08-23 13:50 ` Mark Lord
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C6E89A8.2000600@teksavvy.com \
--to=kernel@teksavvy.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).