public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew de Quincey <adq@lidskialf.net>
To: linux1394-devel@lists.sourceforge.net
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>, linux-scsi@vger.kernel.org
Subject: Re: linux kernel panic when ejecting ieee1394 ipod
Date: Thu, 8 Dec 2005 01:57:29 +0000	[thread overview]
Message-ID: <200512080157.29179.adq@lidskialf.net> (raw)
In-Reply-To: <200512072358.15398.adq_dvb@lidskialf.net>

(resent to include other lists)

On Wednesday 07 December 2005 23:58, Andrew de Quincey wrote:
> Reposting to the -devel list since there was no response on -user.
>
> Hi, I'm using linux kernel 2.6.14 with an generation 1 ipod connected via
> ieee1394/sbp2.
>
> I can mount/unmount it and use it fine. It even works with HAL now.
>
> The problem comes when I want to remove it. If I do:
>
> eject /dev/sdb
>
> The kernel panics with the following error:
> Kernel panic - not syncing: PCI-DMA: high address but no IOMMU
>
> I'm using an nforce 4 motherboard (Asus A8N-SLI Deluxe). The ipod is
> attached to the ieee1394 port on a creative labs Audigy2 sound card (uses
> OHCI-1394).

More info (I'm on an AMD64 in 64 bit mode BTW):

eject sends a CDROMEJECT ioctl first of all. It is this IOCTL that kills my 
system. If I hack/tell it to just use a "SCSI eject", it works and actually 
makes my ipod show that tick thing showing it is safe to remove it.


Tracing through the kernel for the CDROMEJECT shows:
drivers/scsi/sd.c/sd_ioctl() 
	-- calls scsi_cmd_ioctl()

drivers/block/scsi_ioctl.c/scsi_cmd_ioctl()
	-- emulates the CDROMEJECT ioctl as a START_STOP unit SCSI packet command

... then that passes through the blockdev/scsi layers until:

drivers/ieee1394/sbp2.c/sbp2scsi_queuecommand()
	-- this function actually works fine - it must be either in the callback 
handler when the command completes (?) or sometime afterwards.

The last SCSI command received by sbp2 before the crash is:

1b 00 00 02 00

Which is definitely what scsi_cmd_ioctl() is setting up.


CDROMEJECT works on other scsi devices - e.g. my USB storage pendrive appears 
as a SCSI drive, and can be "safely removed" by simply calling a CDROMEJECT 
ioctl.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

  parent reply	other threads:[~2005-12-08  1:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200512072358.15398.adq_dvb@lidskialf.net>
2005-12-08  1:17 ` linux kernel panic when ejecting ieee1394 ipod Stefan Richter
2005-12-08  1:57 ` Andrew de Quincey [this message]
     [not found] ` <200512080119.48740.adq@lidskialf.net>
2005-12-08  1:59   ` Andrew de Quincey
2005-12-08  2:09     ` Andrew de Quincey
2005-12-08  2:44       ` Stefan Richter
2005-12-08  3:19         ` Andrew de Quincey
2005-12-08  7:52           ` Stefan Richter
2005-12-08 19:27             ` Stefan Richter
2005-12-08 17:34         ` Patrick Mansfield
2005-12-08 19:25           ` Stefan Richter
2005-12-09 13:37           ` Jens Axboe
2005-12-09 13:42             ` Jens Axboe
2005-12-09 18:39               ` Stefan Richter
2005-12-09 19:35                 ` Stefan Richter
2005-12-09 22:45                   ` James Bottomley
2005-12-10 18:20                     ` Christoph Hellwig
2005-12-13 20:44                     ` Stefan Richter
2005-12-13 20:54                       ` Jens Axboe
2005-12-10  8:48                   ` Jens Axboe
2005-12-10  9:28                     ` Christoph Hellwig
2005-12-10 10:55                       ` Stefan Richter

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=200512080157.29179.adq@lidskialf.net \
    --to=adq@lidskialf.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /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