Re: [PATCH] shutdown processing

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

 



Randy Dunlap wrote:
On Thu, 16 Feb 2006 19:56:52 +0100
Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> 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/
-
: 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