On Wed, Dec 29, 2010 at 11:01 +1000, David Gwynne wrote:
> ive had no takers on testing.
>
> i cant see how raid and sas events will race in the current code,
> so i think the 1second sleep to avoid confusion is unecessary. i
> will put it in and deal with fallout if it comes up.
>
i didn't look thru the diff yet, sorry for that.
the race you're talking about is that for IR enabled setups
you first get an event for SAS and then for IR, and the purpose
of the IR event handler is to set the MPII_DF_HIDDEN flag.
as you can see handling for SAS drives and volume drives is
different:
if (!ISSET(dev->flags, MPII_DF_HIDDEN)) {
if (ISSET(dev->flags, MPII_DF_ATTACH))
scsi_probe_target(sc->sc_scsibus, dev->slot);
else if (ISSET(dev->flags, MPII_DF_DETACH))
scsi_detach_target(sc->sc_scsibus, dev->slot,
DETACH_FORCE);
}
if (ISSET(dev->flags, MPII_DF_DETACH)) {
mpii_sas_remove_device(sc, dev->dev_handle);
free(dev, M_DEVBUF);
return;
}
we're not supposed to call scsi_detach_target on volume disks.
so your change looks wrong to me, iirc how it works.