Re: RFC: ACPI/scsi/libata integration and hotswap

Jeff Garzik
2005-12-09T11:49:44Z

On Fri, Dec 09, 2005 at 11:42:46AM +0000, Christoph Hellwig wrote:
> On Thu, Dec 08, 2005 at 05:19:01PM +0000, Matthew Garrett wrote:
> > This turns out to be quite difficult, and I can't see a clean way of
> > doing it without touching scsi or rewriting chunks of the ACPI glue
> > code.
> >
> > The basic flow of code required here is:
> >
> > 1) scsi layer registers a new device
> > 2) platform_notify is called, which is (in this case)
> > acpi_platform_notify
> > 3) acpi_platform_notify checks whether it knows dev->bus. If so, it
> > calls appropriate callbacks.
> >
> > Without touching scsi, there doesn't seem to be any way for (3) to work
> > if scsi is a module. Would a simple
> >
> > #ifdef CONFIG_ACPI
> > acpi_scsi_init(&scsi_bus_type)
> > #endif
> >
> > in the scsi code be acceptable? If not, then we have some difficulty.
> > The acpi glue code has to be statically linked in, so it can't rely on
> > anything that directly references the scsi code.
>
> As a concept it's _much_ better. Although it should be platform_scsi_init
> and every architecture would provide an, in most cases noop, implementation.

If this is just for libata, it's still at the wrong level.

libata will eventually make the SCSI simulator optional, which means
any acpi_scsi_init() or whatnot won't work for libata.

Jeff

-------------------------------------------------------
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!