public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh7760mmc: host driver for SH7760 MMC interface
Date: Sat, 19 Jul 2008 07:04:09 +0000	[thread overview]
Message-ID: <488191E9.6020904@roarinelk.homelinux.net> (raw)
In-Reply-To: <20080717110119.GA14949@roarinelk.homelinux.net>

Pierre Ossman wrote:
> On Thu, 17 Jul 2008 13:03:53 +0200
> Manuel Lauss <mano@roarinelk.homelinux.net> wrote:
> 
>> From: Manuel Lauss <mano@roarinelk.homelinux.net>
>>
>> Host driver for SH7760 on-chip MMCIF interface.
>>
>> Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
>> ---
> 
> Just some minor things:
> 
>> +static void shmmc_cmd(struct shmmc_host *host, struct mmc_command *cmd)
>> +{
>> +	unsigned char cmdtyr, rsptyr, i;
>> +
>> +	shmmc_clock(host, 0);
>> +	host->cmd = cmd;
>> +
>> +	/* enable MMCIF and "cmd xfer timeout" irqs */
>> +	host->ien1 |= INTCR1_IRQEN | INTCR1_CTERIE;
>> +
>> +	/* setup command type */
>> +	cmdtyr = 0;
>> +	if (cmd->opcode = 12)
>> +		cmdtyr = CMDTYR_CMD12;
>> +
> 
> Seems more likely that this flag should be set on any stop command.

There are other stop commands?
Anyway, changed to a check for the "mrq->stop" command.


>> +
>> +	blksz_bits = ffs(data->blksz) - 1;
>> +	BUG_ON((1 << blksz_bits) != data->blksz);
> 
> This is not a bug. You should fail the request with -EINVAL if you
> cannot handle it.

Actually this is just a test of ffs() on SH ;-)
Gone now.


>> +static int __devexit shmmc_remove(struct platform_device *dev)
>> +{
>> +	struct mmc_host *mmc = platform_get_drvdata(dev);
>> +	struct shmmc_host *host = mmc_priv(mmc);
>> +	struct resource *r;
>> +
>> +	MMC_OUTB(host, INTCR0, 0);
>> +	MMC_OUTB(host, INTCR1, 0);
>> +	MMC_OUTB(host, INTCR2, 0);
>> +	shmmc_clrirq(host);
>> +	tasklet_disable(&host->done_task);
>> +	mmc_remove_host(mmc);
> 
> Don't free up any resources needed to handle requests before
> mmc_remove_host() has returned.

Okay, done.


> Also, remember to run the mmc_test test suite on the driver. It tends
> to find a lot of problems.

Will do.

I'll resend a new and tested patch after the weekend.

Thanks Pierre!
	Manuel Lauss


  parent reply	other threads:[~2008-07-19  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 11:01 [PATCH] sh7760mmc: host driver for SH7760 MMC interface Manuel Lauss
2008-07-17 11:03 ` Manuel Lauss
2008-07-17 23:09 ` Paul Mundt
2008-07-18  1:25 ` Nobuhiro Iwamatsu
2008-07-18  5:12 ` Manuel Lauss
2008-07-18 23:49 ` Pierre Ossman
2008-07-19  7:04 ` Manuel Lauss [this message]
2008-07-19 12:02 ` Pierre Ossman

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=488191E9.6020904@roarinelk.homelinux.net \
    --to=mano@roarinelk.homelinux.net \
    --cc=linux-sh@vger.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