Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Sep 2009 13:16:27 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Attilio Rao <attilio@freebsd.org>
Cc:        arch@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: NEWBUS states (was Re: svn commit: r196779 - in head/sys: kern sys)
Message-ID:  <200909091316.28063.jhb@freebsd.org>
In-Reply-To: <3bbf2fe10909090239r519ae737t56ddd7ca36e5f84d@mail.gmail.com>
References:  <200909031340.n83Defkv034013@svn.freebsd.org> <200909080936.37603.jhb@freebsd.org> <3bbf2fe10909090239r519ae737t56ddd7ca36e5f84d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 09 September 2009 5:39:39 am Attilio Rao wrote:
> 2009/9/8 John Baldwin <jhb@freebsd.org>:
> > On Friday 04 September 2009 6:46:03 pm Attilio Rao wrote:
> >> We all agreed the one-state was the better option but it can't be done
> >> in this way because of the device_is_attached() used in the detach
> >> virtual functions. Using just one transition state will break
> >> device_is_attached() in those parts.
> >> The right fix, as pointed out in other e-mails, is to not use
> >> device_is_attached() in detach virtual functions. The better fix, in
> >> my idea would involve:
> >> - replace the device_is_attached() usage in detach virtual functions,
> >> with a more functional support
> >> - use one-state transition
> >>
> >> But that is just too much job to push in before then 8.0-REL and if
> >> that would mean to not commit a patch and make impossible a future
> >> MFC, I prefer to go with a lesser-perfect-but-still-working-approach.
> >
> > Wait, all you need to MFC is the change to the enum.  Fixing the various
> > detach routines does _not_ have to be in 8.0.  That could be merged after 
the
> > release.
> 
> That's not what I mean.
> What I mean is that in order to have a perfect job right now (and have
> single-state transition usable *right now* by both STABLE_8 and HEAD)
> that what should happen, which is impractical.
> I was just explaining to Warner why we didn't go with the single-state
> in the end.

But we don't need it usable right now.  All you need for 8.0 is to reserve the 
slot in the enum so that the ABI of the enum values doesn't change.  Making 
the state usable is something that can happen after the release and it can 
include all the changes to make the single state usable.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909091316.28063.jhb>