Commit Graph

5951 Commits

Author SHA1 Message Date
dyoung
81f7f6b3f2 Use device_t and its accessors. In uhci_{pci,cardbus}_attach, use
`self' instead of casting the softc to void *.
2008-03-07 21:57:56 +00:00
dyoung
347c1a2644 Use device_t and accessors.
In ohci_{pci,cardbus}_attach, do not get the device_t by casting
the softc to void *, but use `self' instead.
2008-03-07 21:48:46 +00:00
dyoung
2e3b67d337 Register the shutdown hook using pmf_device_register1(). 2008-03-07 21:36:51 +00:00
cube
8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
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.
2008-03-07 17:15:51 +00:00
xtraeme
e75fa1bd1d Split device_t/softc and other related cosmetic changes. 2008-03-05 15:42:07 +00:00
xtraeme
3294fa721e Split device_t/softc, and other related cosmetic changes. 2008-03-05 15:03:36 +00:00
dyoung
11e3712cc6 Check device_has_power() instead of device_is_active() in pccbbintr(),
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.
2008-03-04 22:15:16 +00:00
cube
7cad7e5ad3 Split device_t/softc, and other related cosmetic changes. 2008-03-04 22:12:55 +00:00
drochner
1f41b0e499 -map 64-bit PCI BARs
-integrate some bits from upstream to support i965
from Yorick Hardy per PM
2008-03-04 11:52:38 +00:00
xtraeme
0dd978c139 Detect and initialize correctly RAID 1+0 levels. 2008-03-03 14:57:22 +00:00
xtraeme
a9191491be RAID 1/1+0 volumes may only be created with foreground initialization,
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.
2008-03-01 16:33:29 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- 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>
2008-03-01 14:16:49 +00:00
xtraeme
d66a6e73bb arc_create_sensors: if there are no valid volumes (all passthru volumes),
just exit from the kthread.
2008-03-01 13:56:46 +00:00
xtraeme
e0b2280d73 arc_bio_inq: ask the firmware only once for the ARC_FW_SYSINFO
command code and use the softc values on the next bio requests.
2008-02-29 18:15:41 +00:00
xtraeme
5b41531f32 If a disk has been disconnected in a volume set, mark it as offline
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.
2008-02-29 17:45:04 +00:00
xtraeme
c0ed3b3e87 arc_refresh_sensors: show rebuilding status. 2008-02-29 12:56:03 +00:00
xtraeme
3e450e962a arc_bio_disk_novol: don't forget to free diskinfo if arc_msgbuf
returns an error.
2008-02-29 12:37:43 +00:00
dyoung
f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
xtraeme
9ec5a8145c If pmf_device_register1() fails for some reason, make it panic(9)
rather than printing an error. The shutdown handler is mandatory on
this driver to flush controller's cache or stopping background
rebuilds.
2008-02-28 21:08:45 +00:00
xtraeme
43b696d498 Register a sensor per disk connected to a valid volume, so that we
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.
2008-02-28 16:47:53 +00:00
drochner
0e748e633e Extend the pmf suspend/resume hooks by a shutdown method, so drivers
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
2008-02-28 14:25:12 +00:00
macallan
d15719537b switch to PCI_MAGIC_IO_RANGE 2008-02-28 00:21:38 +00:00
macallan
ee03e6b4fb get rid of the last #ifdef macppc and use PCI_MAGIC_IO_RANGE to select
at which offset we mmap PCI IO space
2008-02-27 23:59:37 +00:00
drochner
ee2a294e04 Register a NULL pmf handler, so that the system can suspend.
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.)
2008-02-27 18:01:49 +00:00
drochner
d1cb76fad4 -Now that the address space conflict is solved, we can re-enable that old
workaround for some VESA BIOS which overwrites PGTBL_CTL. Pointed out
 by Yorick Hardy.
-make two variables introduced in the last commit static
2008-02-26 20:44:15 +00:00
xtraeme
22e6b6b586 Make it follow the standard convention of autoconf printing:
mfi0 at pci0 ...
mfi0: interrupting at ...

and only print the model string if it was matched.

Add the Dell PERC 5/i integraded subproduct ID.
2008-02-26 18:16:51 +00:00
xtraeme
54880c4f00 Added support for the mfi(4) controllers with powerpc IOPs such as
LSI SAS1078 or Dell PERC 6, from OpenBSD.

Tested by Akira Kato on current-users@.
2008-02-25 10:46:02 +00:00
xtraeme
0554960b0b Do not attach on Symbios SAS1078, doesn't work and it will be matched
soon by the mfi(4) driver.
2008-02-25 10:38:39 +00:00
xtraeme
56d9394d91 regen 2008-02-24 16:02:01 +00:00
xtraeme
f0667e8c53 + Dell PERC 6. 2008-02-24 16:01:46 +00:00
isaki
d540dc1cd1 Minor style fix. 2008-02-24 05:34:01 +00:00
mlelstv
69b2d26ed9 make this less verbose 2008-02-23 16:25:35 +00:00
mlelstv
6b959e1dfc Always attach AHCI_SATA devices, even when not configured for AHCI mode.
Fixes PR kern/38081.
2008-02-23 14:53:31 +00:00
rafal
c1fc4aa545 Request DMA-coherent memory for the rx/tx descriptors. Makes this work on
sgimips (tested on my O2).  Hint re: descriptor size << cacheline size from
Tsutsui-san; thanks!
2008-02-23 06:12:30 +00:00
dyoung
932264266e Detach self and children. Make some functions static. Use device_t
and accessors.  Use PMF_FN_*.
2008-02-23 02:17:16 +00:00
dyoung
d0f117b7d2 Detach self and children. Use device_t and accessors. Use PMF_FN_*. 2008-02-23 01:54:44 +00:00
dyoung
9aa9ebb999 Add a method to detach children. Use device_t and accessors. Use
PMF_FN_*.
2008-02-23 01:11:12 +00:00
dyoung
86fcf72f67 Simplify the switch-statement in pci_set_powerstate_int(), and fix
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@.
2008-02-23 00:27:53 +00:00
dyoung
b982c25441 Use device_t and accessors. Use aprint_*_dev(). Use PMF_FN_*. 2008-02-22 23:24:07 +00:00
dyoung
aea7bb1ab3 use device_t and accessors. Use aprint_*_dev(). Do not cast the
softc to 'struct device *', but use &sc->bce_dev instead.  Use
PMF_FN_*.
2008-02-22 23:21:01 +00:00
dyoung
cd44c43b28 Add a method to detach child.
Cosmetic: use device_t and accessors.  Use aprint_*_dev().  Use
PMF_FN_{ARGS,CALL,PROTO}.
2008-02-22 23:04:52 +00:00
dyoung
1fa24f5705 Add method to detach children.
Temporary: use PMF_FN_PROTO, PMF_FN_ARGS.
2008-02-22 22:22:27 +00:00
dyoung
22e9cad833 Add methods for detaching self and for detaching children.
Use device_t and accessors.  Use aprint_*_dev().
2008-02-22 22:19:36 +00:00
dyoung
941db428bc Add methods for detaching self and for detaching children.
Use device_t and accessors.  Use aprint_*_dev().
2008-02-22 22:15:31 +00:00
drochner
d9ffad8652 Add a horrible hack to allow the DRM driver to get at the bus_space_handle
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.
2008-02-22 19:47:06 +00:00
tsutsui
4c7dba7079 Add an entry for I-O DATA RSA-PCI 2-port serial board.
(works only on 16550A compatible mode)
2008-02-22 14:51:38 +00:00
tsutsui
5f46094d00 Regen from pcidevs rev 1.930:
> Add I-O DATA RSA-PCI 2 port serial board.
2008-02-22 14:49:46 +00:00
tsutsui
6a37ffc123 Add I-O DATA RSA-PCI 2 port serial board. 2008-02-22 14:48:50 +00:00
oster
06f0c8e418 Make outputs.master and inputs.dac show up in mixerctl output for the ALC888. Patch from, and much thanks to, jmcneill @. 2008-02-22 02:59:31 +00:00
drochner
569b8a258b clean up the error bit clear code:
-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
2008-02-21 22:26:35 +00:00