From: Adrian McMenamin <adrian@newgolddream.dyndns.info>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: dwmw2@infradead.org, greg@kroah.com, lethal@linux-sh.org,
linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
linux-mtd@vger.kernel.org
Subject: Re: [PATCH] 2/2 mtd: Add support for the Dreamcast VMU flash
Date: Thu, 20 Mar 2008 22:34:02 +0000 [thread overview]
Message-ID: <1206052442.6274.26.camel@localhost.localdomain> (raw)
In-Reply-To: <20080320141018.34127f0d.akpm@linux-foundation.org>
On Thu, 2008-03-20 at 14:10 -0700, Andrew Morton wrote:
> If this error is taken, vmu_flash_write() (at least) will not call
> maple_vmu_write_block() and hence mdev->mq->sem never gets up()ed. As far
> as I can tell.
>
> Also, when this function is called from vmu_flash_read_char() I can't see
> where mdev->mq->sem gets up()ed ever. But I didn't look too hard.
>
It's not an issue - the bus will report "a no reply" at the end of the
bus read and that will result in an automatic up.
<snip>
> > +
> > + for (x = 0; x < card->writecnt; x++) {
> > + /* take the lock to protect the contents of sendbuf */
> > + locking = down_interruptible(&mdev->mq->sem);
> > + if (locking) {
> > + error = -EBUSY;
> > + goto fail_nolock;
> > + }
>
> Confused. Where within this loop does the up(&mdev->mq->sem) happen?
>
It's in the bus code.
> > + ((unsigned long *)sendbuf)[1] > > + cpu_to_be32(partition << 24 | x << 16 | num);
> > + memcpy(sendbuf + 8, buf + phaselen * x, phaselen);
> > + mdev->mq->sendbuf = sendbuf;
> > + /* wait for the mutex to be available */
> > + maple_add_packet(mdev->mq);
>
> Within here, I guess, via a workqueue or timer function?
It's handled in a workqueue in the main bus code, yes.
next prev parent reply other threads:[~2008-03-20 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 22:30 [PATCH] 0/2 Add support for maple "Visual Memory Unit" on SEGA Adrian McMenamin
2008-03-18 22:49 ` [PATCH] 1/2 Maple: Update bus driver to allow support of VMU device Adrian McMenamin
2008-03-18 22:56 ` [PATCH] 2/2 mtd: Add support for the Dreamcast VMU flash Adrian McMenamin
2008-03-20 21:10 ` Andrew Morton
2008-03-20 22:34 ` Adrian McMenamin [this message]
2008-03-20 20:56 ` [PATCH] 1/2 Maple: Update bus driver to allow support of VMU Andrew Morton
2008-03-20 22:23 ` Adrian McMenamin
2008-03-20 22:39 ` Andrew Morton
2008-03-20 22:52 ` Adrian McMenamin
2008-03-21 5:11 ` [PATCH] 1/2 Maple: Update bus driver to allow support of VMU device Paul Mundt
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=1206052442.6274.26.camel@localhost.localdomain \
--to=adrian@newgolddream.dyndns.info \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=greg@kroah.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@vger.kernel.org \
--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