Commit Graph

24050 Commits

Author SHA1 Message Date
cegger 0fbcab6ee4 add some ATI products (SB600 modem, RD790 and RS690) 2008-05-20 16:55:28 +00:00
cegger 256cdaf669 correct wrong comment: envsys(4) wants uK 2008-05-20 14:46:31 +00:00
jmcneill 6a440044e9 Module depends on drm. 2008-05-20 14:20:21 +00:00
oster fcd3b36217 Add in a missing "bp->b_resid = bp->b_bcount" in the EIO case.
Spotted by Juergen Hannken-Illjes.  Thanks!
2008-05-20 00:29:54 +00:00
jmcneill bbfbae40ef Don't use MALLOC_DECLARE / MALLOC_DEFINE if building as a module. 2008-05-19 21:05:37 +00:00
jmcneill f26579137a Don't build as module if _RUMPKERNEL is defined. 2008-05-19 19:52:09 +00:00
oster 396f9f4598 Re-work some of the guts of the reconstruction code.
Reconmap used to have one pointer for every reconstruction unit.  This
does not scale well in the land of 1TB disks, where some 100MB+ of
"status pointers" are required for typical configurations.  Convert
the reconstruction code to use a "sliding status window" which will
scale nicely regardless of the number of stripes/reconstruction units
in the RAID set.  Convert the main reconstruction loop to rebuild the
array in chunks rather than in one big lump.

As part of these changes, introduce a function to kick any waiters on
the head separation callback list, and use that in the main
reconstruction event queue to wake up the waiters if things have
stalled.  (I believe this may fix a race condition that could occur at
at least at the very end of a disk during reconstruction under heavy
IO load.)

Thanks to Brian Buhrow for all his help, support, and patience in
testing these changes.
2008-05-19 19:49:54 +00:00
ad f767e4c920 Return result of devsw_detach(). 2008-05-19 17:15:34 +00:00
jmcneill 382e2c82b5 Support building putter as a module. 2008-05-19 16:59:55 +00:00
bjs 06031773dc NOTE: this commit message accompnies the last one for sys/dev/pci/drm.
Revert condvar changes; there seem to be other locking issues
(independent of these changes insofar as I can tell), and it will
only complicate things for now to introduce more changes.

Argh!
2008-05-19 00:17:39 +00:00
bjs f790bea856 drm 2008-05-19 00:15:44 +00:00
cegger 33e33b567c acpidalb(4): Driver for PNP0C32 Hotkeys aka "Direct Application Launch Buttons".
"awesome" jmcneill
2008-05-18 22:05:59 +00:00
jmcneill 4f4434d528 Support building as a module. 2008-05-18 21:12:44 +00:00
jmcneill 235a59361f Support building as a module. 2008-05-18 20:02:34 +00:00
jmcneill 4db90e1f38 Add 'rescan' function for vga. 2008-05-18 19:54:11 +00:00
jmcneill a8685978bd Allow building as a module. 2008-05-18 19:53:22 +00:00
bjs c15e1f4356 Oops, did not compile. Fix it. 2008-05-18 03:49:08 +00:00
bjs 52c6ca762a Use cv(9) instead of mtsleep/wakeup. Also, define drm_hz as
mstohz(333) (this seems to eliminate lockups for me using the r300
driver).  Tested with i915 and radeon on amd64.
2008-05-18 02:45:17 +00:00
bjs da04fccfd8 atomic_add_32 -> atomic_and_32. For atomic_read/atomic_write, cast
to volatile uint32_t *.
2008-05-18 02:42:43 +00:00
jmcneill 9709f2afe2 Add support for PCI_BUS_FIXUP and PCI_ADDR_FIXUP on amd64. 2008-05-18 02:06:14 +00:00
macallan 84e564d335 device_t 2008-05-17 18:09:03 +00:00
macallan dcb185e70d unbork previous by actually using CFATTACH_DECL_NEW(). Doh. 2008-05-17 17:55:50 +00:00
jmcneill 86acf021ce For device nodes that we handle internally, do not bother calling
config_found_ia on the node to save a bunch of useless 'device NNN
not configured' messages at startup. While here, condense ACPI printfs
at attach time.
2008-05-17 15:42:25 +00:00
macallan a4e1a9b84e magic number reduction - no functional change 2008-05-17 02:00:08 +00:00
macallan f0f02f069c don't map more video memory than we really need 2008-05-17 00:22:31 +00:00
dyoung d825f046e4 Remove some #ifdef __FreeBSD__ code. 2008-05-16 22:11:51 +00:00
jnemeth 1075255134 added Corega LAPCCTXT FastEthernet 2008-05-16 20:27:20 +00:00
jnemeth c00c7bde7b regen for Corega LAPCCTXD FastEthernet 2008-05-16 20:21:59 +00:00
jnemeth 277e8636af add Corega LAPCCTXD FastEthernet 2008-05-16 20:21:12 +00:00
macallan 0c74b4e4a7 struct device * -> device_t 2008-05-16 15:57:21 +00:00
macallan e3c6619b77 struct device * -> device_t 2008-05-16 15:38:20 +00:00
macallan f2769c0b12 Let ADB button devices send PMF events instead of pretending to be keyboards. 2008-05-15 19:19:50 +00:00
dholland 880d196c7a fix typo in error message 2008-05-14 19:32:18 +00:00
dyoung c288de686c Match printf argument type (uintmax_t) to format string (PRIuMAX). 2008-05-14 19:24:48 +00:00
tsutsui b87210fa51 Normalize my licenses. 2008-05-14 13:29:27 +00:00
jmcneill 05f909b7fa Fix memory leak on attach/resume. 2008-05-14 12:15:47 +00:00
christos 5b61e403a2 don't play with timevals directly, use the macros. From OpenBSD 2008-05-13 22:16:27 +00:00
mjf cedc21b1f9 Do not dereference this->intr if it's NULL. 2008-05-13 20:21:19 +00:00
jmcneill e8535e3b85 Hook hardware volume buttons into pmf. 2008-05-13 19:24:06 +00:00
rjs a05db5ae83 Regen. 2008-05-13 10:44:02 +00:00
rjs a82c71d83a Add SIS 756 Host Bridge. 2008-05-13 10:43:21 +00:00
jnemeth c93b478e9f add support for drvctl properties 2008-05-12 21:39:56 +00:00
tron 4f712549a9 Fix SSP kernel builds. 2008-05-12 09:41:02 +00:00
ad bf21e0a741 Noisy printf. 2008-05-11 22:16:45 +00:00
ad 107b551a56 Include machine/cputypes.h explicitly. 2008-05-11 14:25:48 +00:00
cegger 31dfb0cf52 regen. 2008-05-11 06:44:16 +00:00
cegger 6cc82eadea add Garmin Forerunner 305, GPS clock device 2008-05-11 06:42:47 +00:00
mlelstv 8944a89578 Use NODOORLOCK quirk to make iBead MP3 players work.
Fixes PR kern/23875.
2008-05-11 05:20:33 +00:00
mlelstv 42e9b7252f Reintroduce the NODOORLOCK quirk. Helps with PR kern/23875. 2008-05-11 05:17:23 +00:00
mjacob 9ce916ad92 Make fc scratch acquisition something that can fail. Remove in_intr flag.
Otherwise synchronize with changes made due to other platforms.
2008-05-11 02:08:11 +00:00
mjacob 49ad2f42b2 Update 2400 f/w to something more akin to what is current. 2008-05-11 02:04:33 +00:00
martin 5d1469bd77 Backout previous: the license sweep touched these files in error, so
restore the old license.
2008-05-10 15:31:03 +00:00
simonb dc15915150 Fix a tyop in a comment. 2008-05-10 14:52:55 +00:00
joerg 27acbcf978 Remove #if 0'd code for flashing firmware. It was never active and even
the FreeBSD version of the driver removed it.
2008-05-10 14:36:02 +00:00
jmcneill 688f4b6b9c Cleanup aprint messages, remove unnecessary usage of aprint_error. 2008-05-10 14:27:20 +00:00
jmcneill 11830b6203 Don't use aprint_error in the success path. 2008-05-10 14:08:15 +00:00
jmcneill 0b59054580 Use aprint when reporting AC adapter status. 2008-05-10 14:01:32 +00:00
jmcneill 2b7bb9303a Use aprint 2008-05-10 13:56:54 +00:00
degroote d6c75ad916 Fix error handling after m_pullup 2008-05-10 12:56:28 +00:00
martin d6c07702bb Years in license are four digits 2008-05-10 11:52:20 +00:00
jmcneill e1557cc154 Use 2-clause license. 2008-05-09 03:44:51 +00:00
macallan 042c09add2 move to 2 clause license 2008-05-09 03:12:49 +00:00
sborrill b3f8753a81 Regen 2008-05-08 15:34:15 +00:00
sborrill cfe5fff059 Add support for IBM ServeRAID 8k (and 8k-l) 2008-05-08 15:33:34 +00:00
reinoud ffc24fca06 Implement write support for the MMC framework. This consists of a setting
up of write parameters call and a call to perform a series of operations on
these devices.

Note that the MMC framework interface is still not exposed to userland
unless the expose_mmc flag is set. This is to prevent applications to build
on a possibly still moving target. This flag will eventually be removed.
2008-05-08 12:57:19 +00:00
joerg 1fe12cbbc8 Add support for 3ware 9650 and 9690 based on patches contributed by
Wasabi Systems.

Fix bus_dma usage to fix write operations in the light of bounce buffers.
Use the 64bit bus_dma tag for 9550+ to avoid bouncing buffers.
2008-05-08 11:27:54 +00:00
macallan 1da90a4ef8 nuke clause 3 2008-05-08 02:32:48 +00:00
macallan 92b89da10e nuke clause 3 2008-05-08 02:03:22 +00:00
macallan 346d21c906 nuke clause 3 2008-05-08 01:43:17 +00:00
joerg d72a9bc7fd First part of twa(4) improvements:
- more/better diagnostic messages
- dynamically allocate units in preparation for 9650+ support
- better distribute queue slots over disks according to size
- drain large request queue on 9550
- keep track of resets, will be needed for 9650.

This changes have been contributed by Wasabi Systems.
2008-05-07 17:47:20 +00:00
bouyer a868052c66 Wait 100ms after we resseting the PHY and found that a device is preent.
Some device seems to need a bit of delay before being ready to accept a
command (such as my SATA cdrom drive)  May fix port-i386/38548.
As a bonus this makes the dmesg output prettier, by not mixing PHY
status with ATA/ATAPI probe.
2008-05-07 13:52:12 +00:00
yamt 4a30ae1037 tprof_start: fix workqueue's IPL. 2008-05-07 08:48:11 +00:00
jdc fd15456f57 Correct Sbus register definitions. 2008-05-07 06:36:48 +00:00
jdc 93d3122a7c Add more initialisation steps (read reset register; pause; set burst size
in config register).

This fixes the continuous interrupt stream previously seen.  It is now
possible to run `ifconfig gem0 up`.  However, "gem0: device timeout"
messages appear and we don't appear to receive any interrupts.
2008-05-06 21:24:40 +00:00
jdc cde723377a Add some Sbus-specific definitions (more registers and more values in the
Sbus Config register).
2008-05-06 21:09:34 +00:00
tsutsui 2925cedf26 - use RTK_IDR[0-5] registers to get MAC address on RTL8168C
- change sc_rev numbers to match quirk numbers used in Realtek's driver
- tweak some register definitions
Taken from Realtek's FreeBSD driver.

Untested yet on 8168C, but no bad sideeffect on older chips.
2008-05-06 11:45:00 +00:00
tsutsui b127908947 Rename some softc variables for readability. 2008-05-06 11:35:38 +00:00
yamt c331e3e5e9 getiobuf(false, NULL) -> getiobuf(NULL, false) 2008-05-06 11:08:19 +00:00
yamt bb127cf870 ata_raid_config_block_rw: getiobuf(vp, NULL) -> getiobuf(vp, false) 2008-05-06 11:07:24 +00:00
bjs e28a3e014b Revert all the changes this time. 2008-05-06 01:51:00 +00:00
bjs 829081eaa7 Revert last commit -- breaks i915. 2008-05-06 01:45:47 +00:00
bjs a65a4adb77 A few steps down the yellow brick road toward bus_dma-ification:
- Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up
   the bus_dma API.

 - Start using the above in drm_pci.c.

 - Add DRM_NETBSD_DMA_ADDR/DRM_NETBSD_DMA_VADDR macros.

 Locking:

 - Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM.

 - Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's
   sake. These two changes seem to eliminate the presistent lockups I was
   having (NetBSD-current/amd64 r300).

 - Start getting rid of DRM_SPININIT/DRM_SPINUNINIT and DRM_SPINLOCK/
   DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they
   locks may or may not be spinlocks!  It's a linux frob, really.
   We're way beyond merging any useful bsd-core code on a large scale, which
   was the only good reason to keep them around.

 Memory allocation:

  - Change drm_memory.c so that it contains generally useful, memory
    allocation functions using kmem(9) (mostly used by the drivers
    themselves).  However, I expect to use this more in the future
    in the "bsd core".  These functions always use KM_NOSLEEP.
    The new drm_dmamem_alloc function has a wait argument which
    takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma
    counterparts), and honors this hint in its calls to kmem(9)
    and bus_dma(9) functions.

  - Got rid of these functions' "area" argument--it's been deprecated for
    ages.  Provide macros in drmP.h to deal with the os-independent code.

  - Declare these functions inline -- I believe they're used enough
    by the i915 and radeon drivers to justify it.  Please let me know
    if I am mistaken.

    NOTE: With these changes, a glxgears score which was previously
    ~3900fps is now ~4400fps (same setup as mentioned above).  I realize
    that using kmem(9) could cause problems, but I can't seem to run into
    any with my test setup.  If anyone smells regression, please let me
    know.
2008-05-06 01:26:14 +00:00
dyoung 5e40785deb Make PCI power re-activation DTRT: pass pci_activate_null instead
of NULL to pci_activate()

Call the variable where we store the PCI Command & Status Register
'csr' instead of 'pmreg'.

In sipcom_intr(), get out if the device is inactive.  Otherwise
sip(4) may inadvertently try to handle a shared interrupt before
the driver state is completely set up.
2008-05-05 20:19:09 +00:00
dyoung f05735da97 Restore PCI devices to a state that is closer to the state that
NetBSD finds them in: save and restore power management state
(D0..D3) and PCI Configuration Registers 0x0 through 0x40 during
device attachment and detachment, respectively.  Among other things,
this will fix sip(4) detachment and re-attachment.
2008-05-05 20:14:30 +00:00
ad e071d39c84 - Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
2008-05-05 17:11:16 +00:00
jmcneill ad9936b335 Use aprint instead of DRM_INFO macro to cleanup attachment messages. 2008-05-05 14:00:10 +00:00
xtraeme f14b65c700 device_t/softc split and other related cosmetic changes. 2008-05-05 13:58:58 +00:00
ad 2bbb14eaa4 Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
jmcneill 1a53395e7e Change autoconf message 'direct rendering on dev unsupported' to
the more accurate 'drm at dev not configured'.
2008-05-05 11:42:45 +00:00
tsutsui 44b2bb4cfa Use device_private() where appropriate. 2008-05-05 01:37:56 +00:00
jmcneill 729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
ad b68bfe3ffa A couple of dumb utilities:
array2bin: take array[] from array.h and spit it out as a binary.
bin2blob: take a binary file and output a compressed image as a C array.
2008-05-04 23:50:32 +00:00
ad b407147f14 Move zlib out of net/ and into kern/. It would probably be better to use
the reachover Makefiles and libz, but this is already here and it works.
2008-05-04 23:07:09 +00:00
jmcneill dc2a8d24fc Ugh, unbreak _DRM_SHM on amd64 again. 2008-05-04 21:43:01 +00:00
oster 5a9093cfac Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
2008-05-04 20:57:23 +00:00
jmcneill 63b0503310 Fix compilation on i386. 2008-05-04 20:27:50 +00:00
jmcneill 2b4fd7dc0e For _DRM_SHM allocations, do not use the VA as drm_map handle on x86_64
since udv_attach will not accept a larger offset than signed 64-bit will
provide. Not the best fix, but good enough for now -- at least an X server
will now startup and get proper mappings.
2008-05-04 20:09:32 +00:00
rumble 6d44774c77 If a device transmit timeout occurs and sc_txintrperiod is greater than
one, throttle it down before the reset. This way the user need not know
the magic `hw.ath0.txintrperiod=1' fix if the default value is too high
for their machine.
2008-05-04 20:02:06 +00:00
martin 637bc2e71d Move TNF licenses to 2 clause form 2008-05-04 19:43:05 +00:00
jmcneill 7380b7991e Returning EINVAL from drm_mmap isn't a smart thing to do. 2008-05-04 19:19:40 +00:00