Re: [PATCH] [RFC] Advanced TCA SCSI Disk Hotswap

From: Steven Dake (sdake@mvista.com)
Date: Thu Oct 24 2002 - 18:48:09 EST


Montavista has discussed at length Compact PCI hotswap using surprise
removal events.

The key feature of any hotswap operation that happens in a surprise
fashion is that
the device driver might want a hint that the hardware is no longer
present so it can
immediatly dump its buffers/io maps/etc and totally stop accessing the
device. An
expected removal, on the other hand, would give the device driver time
to flush its
buffers (for example a scsi driver could dump its outstanding queued
scsi messages).
Once the driver is done accessing the device, the blue led on the
CompactPCI board
can be lit and it can be removed.

This is the main difference. Since the driver model of Linux doesn't
support a surprise
extract method call for drivers, I don't think its been implemented
here. Further the
drivers must be modified to actually use the hint instead of doing its
normal shutdown
operation.

Surprise extraction is not a simple problem especially to ensure the
device drivers exit
cleanly without dumping more data on the PCI bus to a PCI device that
may not
exist.

Thanks!
-steve

Greg KH wrote:

>On Thu, Oct 24, 2002 at 07:00:23PM -0400, Scott Murray wrote:
>
>
>>I've not implemented it yet, but I'm pretty sure I can detect surprise
>>extractions in my cPCI driver. The only thing holding me back at the
>>moment is that there's no clear way to report this status change via
>>pcihpfs without doing something a bit funky like reporting "-1" in the
>>"adapter" node.
>>
>>
>
>Why would you need to report anything other than if the card is present
>or not? What would a "supprise" removal cause you to do differently?
>Hm, well I guess we should be extra careful in trying to shut down any
>driver bound to that card...
>
>thanks,
>
>greg k-h
>
>
>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:25 EST