public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Adrian McMenamin" <lkmladrian@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Subject: Hot unplugging a device in the middle of a read
Date: Mon, 12 Jan 2009 22:01:48 +0000	[thread overview]
Message-ID: <8b67d60901121401o752dd888m70d3e2bcaffc170d@mail.gmail.com> (raw)

I am working on a map driver for the virtual memory unit (VMU) flash
on the SEGA Dreamcast. I have a specifc concurrency issue which maybe
somebody here could help with.

The VMUs are pluggable devices - users can just push them in and pull
them out when they like.

It would be a perverse way to behave but it does mean users can whack
the thing in and pull it out straight away.

With the block translation layer turned on this results in a crash -
how do I tell the mtd/translation/block layer that the device has
gone?

(The ouput below has some additional debug messages I have added)

[  184.105630] mtdblock: read on "vmu1.1.0" at 0x7400, size 0x200
[  184.122698] mtdblock: read on "vmu1.1.0" at 0x7600, size 0x200
[  184.139001] mtdblock: read on "vmu1.1.0" at 0x7800, size 0x200
[  184.156062] mtdblock: read on "vmu1.1.0" at 0x7a00, size 0x200
[  184.172359] mtdblock: read on "vmu1.1.0" at 0x7c00, size 0x200
[  184.189424] mtdblock: read on "vmu1.1.0" at 0x7e00, size 0x200
[  184.206051] mtdblock: read on "vmu1.1.0" at 0x8000, size 0x200
[  184.222790] mtdblock: read on "vmu1.1.0" at 0x8200, size 0x200
[  184.239093] mtdblock: read on "vmu1.1.0" at 0x8400, size 0x200
[  184.256158] mtdblock: read on "vmu1.1.0" at 0x8600, size 0x200
[  184.268478] Maple bus device detaching at (1, 1) busy is 1
[  184.275221] In vmu_disconnect
[  184.277538] Removing MTD device #0 (vmu1.1.0) with use count 1
[  184.302421] releasing device at (1, 1) and address 0x8C8B1980 with
queue at 0x8C5C8180
[  185.570107] end_request: I/O error, dev mtdblock0, sector 64
[  185.575136] Buffer I/O error on device mtdblock0, logical block 8
[  185.584332] Unable to handle kernel paging request at virtual
address 6b6b6b6b
[  185.590955] pc = 8c1511e8
[  185.593649] *pde = 00000000
[  185.596531] Oops: 0000 [#1]
[  185.599395] Modules linked in:
[  185.602626]
[  185.604072] Pid : 824, Comm:                 mtdblockd
[  185.608210] CPU : 0                  Not tainted
(2.6.28-06142-ga079e18-dirty #188)
[  185.608240]
[  185.617027] PC is at strnlen+0x8/0x60
[  185.620791] PR is at string+0x2e/0xc0

             reply	other threads:[~2009-01-12 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 22:01 Adrian McMenamin [this message]
2009-01-13 21:18 ` Hot unplugging a device in the middle of a read Adrian McMenamin
2009-01-14  0:52   ` Adrian McMenamin

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=8b67d60901121401o752dd888m70d3e2bcaffc170d@mail.gmail.com \
    --to=lkmladrian@gmail.com \
    --cc=adrian@newgolddream.dyndns.info \
    --cc=linux-mtd@lists.infradead.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