except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.
As usual, it comes with related cosmetic changes.
since the driver must acknowledge some interrupts while it leaves
the suspended state. This protects against an interrupt storm that
will hang the system while I resume rtw0 at cardbus1.
use the quick_init member in the ARC_FW_CREATE_VOLUME command code.
You can now create RAID 1/1+0 volumes through bioctl(8), but only one
volume will be initialized; the other ones that need initialization will
wait until the first is done.
- Add a lot of missing selinit() and seldestroy() calls.
- Merge selwakeup() and selnotify() calls into a single selnotify().
- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.
Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
and put it on another bus and print "disk missing"... the OpenBSD driver
does that but I forgot to re-add it.
Also save some values provided by the firmware in the softc and use them
in the bio(4) ioctls, this speeds up considerably bioctl(8) and avoids
so many firmware commands every time we want the current status.
can get more details if state on a disk or volume has changed,
previously only state about the volume was available.
You'll see something like this with envstat(8) now:
$ envstat -darcmsr0
RAID 5 volume0 (sd0): building
disk0 volume0 (sd0): online
disk1 volume0 (sd0): online
disk2 volume0 (sd0): online
disk3 volume0 (sd0): online
$
Convert the driver to use pmf(9) and register a shutdown power handler
via pmf_device_register1() that was added recently.
Misc cosmetics tweaks while I'm here.
can register a shutdown handler explicitely.
Install a pci bus shutdown handler which disables bus master accesses
for all childs, so the drivers don't need to care.
This will hopefully be sufficient to replace the shutdownhooks
(together with the powerhooks). (It has been suggested to use some
general event notification framework for shutdown handlers, but there
might be cases where shutdown handlers must be run in an order following
the device hierarchy, which wouldn't be easy with event handlers
not tied to drivers.)
approved by David Young
This is OK because wscons detaches the X server before devices are
suspended, and the X server closes the drm device on detach.
(We could install a suspend handler which just double-checks, but
atm its return value is ignored anyway.)
a couple of typos so that it will work as I think that it was
intended to: delay for 10000us or 200us on transitions to/from D3
or D2 state, respectively. Discussed this with jmcneill@.
allocated by the AGP driver in the case of Intel chipset graphics.
This is different from the patch by Yorick Hardy circulated a while ago
in that it doesn't change the semantics of reference counting within
the (3rd-party) DRM code -- it just bypasses it.
Needless to say that it is uglier, but it eases future updates to
the DRM code because the change there is just 2 LOC.
Imo, a cleaner solution for all that would be to attach "agp" to "vga"
in the intel chipset graphics case, which better reflects how the hardware
is structured. This would still need a hack to the DRM code, but
it would be confined to childs of the "vga" device, without need for
global variables.
Since there is a variety of intel chipsets with AGP and/or builtin
graphics options, this would need a considerable testing effort.
-use an aligned pci config space address as everyone else -- I'm sorry
about that because I like gson's way a lot -- it keeps the address
offset due to alignment visually close to the data shift --, but since
aligned addresses are used everywhere else in definitions, this
causes confusion
-the mask applied to the data didn't make much sense, a look at the
FreeBSD code where this code originates from suggests that there
was just a mistake -- one trailing zero missing --
anyway, the datasheet tells that the error bits are all write-one-
to-clear, so just write back the value and we are done