So if userspace gets the event that a button was pressed, it can decide
to light up the led after is spins the disk down, right?
> In this case, the hotswap button on the front panel is used to indicate
> a hotswap event. There is talk of making the removal of the board
> indicate a hotswap event (surprise extraction) because the technicians
> don't wait for the blue led to remove the boards occasionally and the
> system should be able to handle this use case.
Hotplug PCI works much the same way. A user could just walk up, pop the
slot, and pull out the card without waiting for the LED to go out. We
don't care about that, as the user was obviously stupid in doing such a
thing. The spec even states something like this :)
> >>For legacy systems such as SAFTE hotswap, polling through sg at 10 msec
> >>intervals would be extremely painful because of all the context
> >>switches. A timer scheduled every 10 msec to send out a SCSI message
> >>and handle a response if there is a hotswap event is a much better course.
> >>
> >>
> >
> >What generates the hotswap event?
> >
> >
> In the case of SAFTE, a SCSI processor (ASIC) is polled by some polling
> interval about the state of the SAFTE (SCSI) backplane. When the state
> changes, software generates a hotswap event and removes the device.
So polling can be done within the kernel, right? Then notify userspace
of the event, which can decide what to do. Sound ok?
Or do you think this should be like the pci hotplug code, in that when a
slot is opened (or button pressed, depending on the hardware), the
kernel should scramble as fast as possible to unload the driver, and
shut down the power to the card? Then when it is finished, notify
userspace of what just happened.
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/