All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Randy Dunlap <randy_d_dunlap@linux.intel.com>,
	Jeff Garzik <jgarzik@pobox.com>
Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] shutdown processing
Date: Fri, 17 Feb 2006 20:15:28 +0100	[thread overview]
Message-ID: <43F620D0.7050502@s5r6.in-berlin.de> (raw)
In-Reply-To: <20060216111208.2367829b.randy_d_dunlap@linux.intel.com>

Randy Dunlap wrote:
> On Thu, 16 Feb 2006 19:56:52 +0100
> Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
...
>>Note that roughly as long a scsi_device exists, SCSI high-level drivers 
>>expect to be able to send commands to them.
...
> OK, now it seems like you just told me why I shouldn't use
> the pci_driver.remove() interface.

:-) Really? Depends on what you are trying to solve. From what I 
understood, the function you require does not interact with a scsi_device.

You could also have a look into scsi_host_template.slave_destroy. This 
is called from SCSI core when a scsi_device is being removed. In 
particular, it is called _after_ the upper SCSI layers finished all 
their business with your device.

BTW, ata_scsi_release looks suspicious WRT what I said above. I see

	ap->ops->port_disable(ap);
	ata_host_remove(ap, 0);

there. Since libata apparently never uses scsi_remove_device, 
ata_host_remove's call to scsi_remove_host will call scsi_remove_device 
which will cause SCSI high-level drivers to run their shutdown methods. 
It looks wrong to me to place something like ata_port_disable before 
that, judging from what the comment at the definition of 
ata_port_disable says.

Another suspicious code: ahci_remove_one calls free_irq before 
ata_scsi_release.

I never looked at this code before, never even used it --- am I missing 
something fundamental?
-- 
Stefan Richter
-=====-=-==- --=- =---=
http://arcgraph.de/sr/

      reply	other threads:[~2006-02-17 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 19:46 [PATCH] shutdown processing Randy Dunlap
2006-02-16  8:58 ` Stefan Richter
2006-02-16 18:40   ` Randy Dunlap
2006-02-16 18:56     ` Stefan Richter
2006-02-16 19:12       ` Randy Dunlap
2006-02-17 19:15         ` Stefan Richter [this message]

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=43F620D0.7050502@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=randy_d_dunlap@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.