tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: drvctl rescan for atabus
On Fri, Oct 09, 2009 at 11:47:09PM +0200, Manuel Bouyer wrote:
> On Tue, Oct 06, 2009 at 11:48:06AM -0500, David Young wrote:
> > [...]
> > I think the reason is that you use atabusconfig() to re-probe the bus
> > and attach the devices:
> >
> > > @@ -384,6 +385,10 @@
> > > if (chp->ch_flags & ATACH_SHUTDOWN) {
> > > break;
> > > }
> > > + if (chp->ch_flags & ATACH_TH_RESCAN) {
> > > + atabusconfig(sc);
> > > + chp->ch_flags &= ~ATACH_TH_RESCAN;
> > > + }
> > > if (chp->ch_flags & ATACH_TH_RESET) {
> > > /*
> > > * ata_reset_channel() will freeze 2 times, so
> >
> > atabusconfig() assumes that neither drives nor an atapibus are attached.
> > I think that if you check in atabusconfig() whether there is a non-NULL
> > device_t at chp->atapibus or at chp->ata_drives[i] before trying to
> > attach a driver, then you can do without the EBUSY's above.
>
> there's another reason to do request all devices to be detached before
> rescan: in ATA the master and slave devices are probed at the same
> time, they can't really be probed independantly ...
> This probably could be fixed by doing the probe without attach, but this
> adds complexity to the driver (you have to stall I/Os while doing
> this) and I'm not sure it's worth it.
I think that if the devices are hotpluggable, then it is definitely
worth it to attach/detach the disks independently. Think of four SATA
ports, each attached to a disk in a RAID5 configuration. (Perhaps the
code under discussion will not be involved in SATA hotplug?)
If the devices are not hotpluggable, however, it is not necessary to
re-probe, is it? We can use the last probe results, which should not
have changed since boot. Maybe I am mistaken about that.
Let me know what you think.
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933
Home |
Main Index |
Thread Index |
Old Index