linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Viresh Kumar <viresh.kumar@st.com>
Cc: jgarzik@pobox.com, linux-ide@vger.kernel.org,
	shiraz.hashim@st.com, amit.goel@st.com, armando.visconti@st.com,
	viresh.linux@gmail.com
Subject: Re: [PATCH V3 2/2] pata_arasan_cf: Adding support for arasan compact flash host controller
Date: Tue, 22 Feb 2011 10:14:49 +0100	[thread overview]
Message-ID: <20110222091449.GS31267@htj.dyndns.org> (raw)
In-Reply-To: <53bc03306736e6069737aa6344d71d639cea4912.1298358936.git.viresh.kumar@st.com>

On Tue, Feb 22, 2011 at 02:32:39PM +0530, Viresh Kumar wrote:
> The Arasan CompactFlash Device Controller has three basic modes of
> operation: PC card ATA using I/O mode, PC card ATA using memory mode, PC card
> ATA using true IDE modes.
> 
> Currently driver supports only True IDE mode.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>

Looks mostly good to me now but just few more things.

> +static inline void dma_complete(struct arasan_cf_dev *acdev)
> +{
> +	struct ata_queued_cmd *qc = acdev->qc;
> +
> +	acdev->qc = NULL;
> +	ata_sff_interrupt(acdev->irq, acdev->host);
> +
> +	if (unlikely(qc->err_mask) && ata_is_dma(qc->tf.protocol))
> +		ata_ehi_push_desc(&qc->ap->link.eh_info, "DMA Failed: Timeout");
> +}

ata_ehi_push_desc() needs to be called under host lock.  In case I
missed other places, all functions which modify port/host states need
to be called under host lock.  Please make sure they are.

> +void arasan_cf_error_handler(struct ata_port *ap)
> +{
> +	struct arasan_cf_dev *acdev = ap->host->private_data;
> +
> +	cancel_work_sync(&acdev->work);
> +	cancel_delayed_work_sync(&acdev->dwork);
> +	return ata_sff_error_handler(ap);
> +}

Please add some comments explaining what's going on with DMA
processing as this driver is quite unusual.  Here and in the issue
path.

> +static int __devinit arasan_cf_probe(struct platform_device *pdev)
> +{
...
> +	ap->flags |= ATA_FLAG_PIO_POLLING;

Maybe ATA_FLAG_NO_ATAPI too?

Thanks.

-- 
tejun

  reply	other threads:[~2011-02-22  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  9:02 [PATCH V3 0/2] add pata_arasan_cf support Viresh Kumar
2011-02-22  9:02 ` [PATCH V1 resend 1/2] libata-sff: add ata_sff_queue_work() & ata_sff_queue_delayed_work() Viresh Kumar
2011-03-14  6:54   ` Jeff Garzik
2011-02-22  9:02 ` [PATCH V3 2/2] pata_arasan_cf: Adding support for arasan compact flash host controller Viresh Kumar
2011-02-22  9:14   ` Tejun Heo [this message]
2011-02-22  9:43     ` viresh kumar

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=20110222091449.GS31267@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=amit.goel@st.com \
    --cc=armando.visconti@st.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    --cc=viresh.kumar@st.com \
    --cc=viresh.linux@gmail.com \
    /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).