Re: [PATCH] shutdown processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Randy Dunlap wrote:
On Thu, 16 Feb 2006 09:58:33 +0100
Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> wrote:
Why are you calling these from SCSI? Wouldn't ahci_pci_driver.remove() and piix_pci_driver.remove() be a proper place to perform what you are doing in ata_device_shutdown?

Mostly to have the scsi_device pointers available.

Note that roughly as long a scsi_device exists, SCSI high-level drivers expect to be able to send commands to them. In particular, when scsi_remove_device is called, (or scsi_remove_host, which calls scsi_remove_device for all still existing devices of a host), the SCSI high-level drivers' shutdwon methods get executed. Some of them send SCSI commands. The upshot is, a SCSI low-level driver has to be able to handle newly enqueued command while it is calling scsi_remove_{device,host}. Moreover it must not block a SCSI host at this moment.

IOW the most natural order for layers to shut down would be first SCSI, then ATA. (But then, I don't really comprehend whether your shutdown code would actually collide with that of the SCSI subsystem at all.)
--
Stefan Richter
-=====-=-==- --=- =----
http://arcgraph.de/sr/
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux