Commit Graph

5973 Commits

Author SHA1 Message Date
markd 5dc269fc53 Use more meaningful names for AD1984 widgets.
Select dac as default input for internal mono speaker.
Handle jack pin detect for headphones and lineout on Dell Optiplex 755.
2008-01-31 18:58:57 +00:00
jmcneill 89cbafc849 AD1984: Create a dummy outputs.master mixer knob that mirrors inputs.dac,
since AD1984 doesn't have a traditional master volume control.
2008-01-30 23:03:09 +00:00
jmcneill 77c34d4c1c AD1984: Use the same DAC for speaker and headphones, so the headphone jack
works as expected on Thinkpad T61 (and probably others).
2008-01-30 22:09:00 +00:00
simonb a4c23df6ce Add a simple resume hook that just calls bce_reset(), and register
this with pmf_device_register().

Makes suspend/resume with bce happy.  Much thanks to Jared for help here.
2008-01-30 12:00:35 +00:00
simonb fb673d9599 WextraRemove unused DPRINTF/DPRINTFN macros.
Remove NetBSD 1.6 compatibility checks (way out of date).
Be somewhat consistent (and closer to KNF) with whitespace.
Use uintN_t instead of u_intN_t.

No functional changes.
2008-01-30 11:54:08 +00:00
tls 16a9229cf8 Sigh. What was meant here was an ITR register value of 1500, for 2604
interrupts/sec -- not the other way around.  Caught by yamt.

When I can confirm that it won't lock the chip up on the models claimed
to be problematic, I'll probably adjust the packet timers a bit further
to see if I can get latency down under low load.  But this should be
better.
2008-01-29 20:24:41 +00:00
jmcneill ab245e294e PCI Power Management 1.2 says that system software should wait 10ms after
transitioning a device to or from D3hot, 200us to or from D2, and no wait
for D1 transitions. Update pci_set_powerstate_int to match the spec,
rather than naively waiting 1ms after every state transition.
2008-01-28 22:48:43 +00:00
dyoung 37b0eea62f Remove dead code and associated comments. 2008-01-28 18:18:37 +00:00
macallan 671b15c8ef get rid of the shutdown hook, add suspend and resume handlers instead
XXX: ahc_suspend panics here so suspend calls ahc_shutdown and resume does
nothing.
This fixes a hangup and subsequent panic which occured when the shutdown hooks
were called and /afterwards/ the sd suspend handler tried to flush caches
through an already shut down ahc.
2008-01-28 16:08:37 +00:00
jmcneill 515d26c53b Release ownership of EHCI to the BIOS when we suspend or detach the
device driver.
2008-01-28 00:44:17 +00:00
jmcneill 31646d87c2 Don't attempt to claim ownership from the BIOS if the OS already holds
the HC OS Owned semaphore. Unconditionally clear SMIs as long as the
USB legacy capability is present.
2008-01-27 20:09:14 +00:00
jmcneill cdbea784c7 On resume, ensure that esa is powered up, and ensure we power the
AC97 codec once the host controller is up and running.
2008-01-27 01:57:03 +00:00
jmcneill d66b2b71eb Fixup PCI_COMMAND_STATUS_REG on attach. 2008-01-27 01:56:02 +00:00
tsutsui 9e319fb40f Wakeup some newer chips from powerdown mode. From FreeBSD/Linux driver
via OpenBSD.

Tested by wiz@ in PR kern/37868.
2008-01-26 14:13:06 +00:00
jmmv 7660ca07d8 Now that the driver goes through the mii_ifmedia_change indirection
instead of directly calling the pcn_79c970_mediachange function, we
must initialize sc->sc_mii.mii_ifp so that this last function is
passed a valid parameter.

Fixes a panic in pcn_79c970_mediachange that arose immediately when
trying to use this interface due to a NULL pointer dereference.
Hi dyoung@!
2008-01-20 11:28:12 +00:00
dyoung da15c1a71e Let ether_ioctl() handle default SIOCSIFMEDIA/SIOCGIFMEDIA actions. 2008-01-19 22:23:35 +00:00
dyoung b480b62270 Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
2008-01-19 22:10:14 +00:00
dyoung ad45c434e8 Use the common code for ethernet media handling. Compiles on i386. 2008-01-19 20:25:44 +00:00
aymeric 8a162df73e recognize (again) the Intrepid 2 gem adapter in the Powerbook5,8 2008-01-19 15:56:52 +00:00
simonb 741ec49962 Use M_80211_NODE as malloc type for a 80211 node as rest of net80211
code does, instead of M_DEVBUF.  Fixes panics if KMEMSTATS are enabled.
Also use M_ZERO instead of memset on malloc()'s results.
2008-01-19 03:45:08 +00:00
joerg 4ef3261d7c Add power management support. Untested due to lack of feedback. 2008-01-18 01:33:40 +00:00
jklos 740cd1ea87 More Chelsio 10 gigabit driver files to complete the ones checked in
yesterday.
2008-01-17 15:54:35 +00:00
jklos 0123f42896 10 gigabit Chelsio cards now compile and work, although not very well yet. 2008-01-17 06:03:21 +00:00
jmcneill f4e9b2430e Don't assume that sizeof(long) == sizeof(int); makes bktr work on amd64. 2008-01-16 13:08:54 +00:00
christos 9d6619f2e6 Remove ricoh hack; FreeBSD does not seem to do it, and it was a remnant from
the branch. Things should work properly now.
2008-01-15 21:55:24 +00:00
jmcneill cdd511a2fb For WSDISPLAY_GINFO, depth should be sc->bits_per_pixel, not
sc->color_depth. While we're here, implement WSDISPLAYIO_LINEBYTES.
2008-01-15 02:00:49 +00:00
drochner 69ac8d9d9e fix some PCI config space offsets to be 32-bit aligned, the code
did already do the right bit shifting
2008-01-15 00:27:58 +00:00
drochner 98da2f9c50 fix some unaligned PCI config space accesses in suspend/resume functions 2008-01-15 00:24:47 +00:00
martin e91d982a78 Make sure pci config space access only happens on 32bit aligned addresses. 2008-01-14 21:33:04 +00:00
xtraeme 7e8220d319 Fix the BARs on nForce 430, which failed to attach. Reported by
atsushi fukumoto in PR kern/37756.
2008-01-14 20:30:10 +00:00
tsutsui e88df705a1 Use htole32() to write parameters to DMA descriptors for big endian machines.
Tested on Pegasos by mrg@ on port-ofppc.
2008-01-14 06:32:10 +00:00
dyoung b6c0385fe0 Use device_t, device_private(). 2008-01-14 06:12:13 +00:00
dyoung 132fca675f In pccbbdetach(), panic if interrupt handlers are still registered
after detaching children.

Use PCI_CB_MEMBASE0, PCI_CB_MEMLIMIT0, PCI_CB_IOBASE0, PCI_CB_IOLIMIT0
instead of magic numbers.
2008-01-14 03:01:41 +00:00
tnn 103f966e33 regen (add ServeRAID 6/7) 2008-01-11 20:49:14 +00:00
tnn 2abb4192af Add ServeRAID 6/7 2008-01-11 20:47:21 +00:00
ragge 1d93d6da72 Add entry to match the "Intel® PRO/1000 PT Quad Port Server Adapter". 2008-01-11 13:04:39 +00:00
ragge 9360a7471b Regen 2008-01-11 12:01:20 +00:00
ragge 5f5a2ae52a Add Intel quad 1000baseT copper PCI express card. 2008-01-11 11:31:25 +00:00
dyoung b0b0d490fb Straggler: change generic ifmedia_X names to lmc_ifmedia_X. 2008-01-10 08:50:52 +00:00
dyoung 49df706f87 Re-use ether_mediachange(), ether_mediastatus(). Stop using
shutdownhook_establish(9).
2008-01-10 07:25:33 +00:00
degroote 94aebeb732 Add some sysctl to retrieve the radio state (and the debug level).
While here, fixe the return value in case where radio is off (suggested by
joerg@).
2008-01-09 20:15:40 +00:00
ad b439191858 Remove vestiges of simplelock debugging. 2008-01-07 00:27:35 +00:00
kent 9602a50eb5 recognized the names of Sigmatel STAC9227-9230 2008-01-06 13:33:21 +00:00
kent 86e51d72d1 fix a bug of S/PDIF audio format selection
PR/36493 by Arcady Antipin
2008-01-06 12:56:20 +00:00
jdc 6055efa604 Add support for Sun PCI X1141A (SX fibre) cards.
Add support for GEM cards on non-OFW machines.
2008-01-05 20:30:22 +00:00
ad 0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
kent e93ecba847 shorten mixer-input names by mixer-name automatic generation
PR/37273
2008-01-04 17:00:05 +00:00
kent 16504b27b0 simplify conversion rule between device volume values and userland
volume values.  Some mixer values never be 255 by this change.

PR#37274
2008-01-04 12:18:00 +00:00
joerg e6f452fd65 Allow saving of up to 4 PCI registers in the IDE code. 2008-01-04 00:27:27 +00:00
dyoung 17b65ff15d Disable pci_disable_retry() and cardbus_disable_retry(), with a
long comment on pci_disable_retry() (cross-referenced at
cardbus_disable_retry()) that explains why.
2008-01-03 23:15:43 +00:00
xtraeme 98d660f7bb Fix indentation. 2008-01-03 21:28:11 +00:00
tron 4ee524a917 Fix perfomance problems for old revisions of the Symbios 53c1030.
Patch supplied by Patrick Welche in PR kern/30531.
2008-01-03 18:16:20 +00:00
kent f8415b4922 code cleanup
- use __arraycount
- remove unnecessary M_ZERO flags
2008-01-03 18:00:43 +00:00
kent c89324c85e - add initialization for ATI HDMI audio
- add custom mixer table for AD1986A by scw@
PR: kern/36140
2008-01-03 17:39:03 +00:00
jnemeth 87a13edaae regen -- Symbios Logic 0x0030 is used for both 53c1020/53c1030 from Dave Huang 2008-01-03 03:40:24 +00:00
jnemeth 28cdc331fe Symbios Logic 0x0030 is used for both 53c1020/53c1030 from Dave Huang 2008-01-03 03:38:32 +00:00
xtraeme 68d02b93e3 New functionality for arcmsr(4) native management via bioctl(8):
Added support to create/remove hot-spare, pass-through disks.
Added support to create/remove volume sets.
Added support to show information about physical disks, even if they
are marked unused, hot-spares or pass-through.

sd(4) devices are attached/detached automagically when a pass-through
disk or volume set is created/removed... thanks scsipi(9) and cube@
for hints.
2008-01-02 23:48:05 +00:00
dyoung e9596bf19e Introduce a struct cardbus_chipset_tag, and make cardbus_chipset_tag_t
a pointer to that struct, so that we cannot assign pointers of
arbitrary type to cardbus_chipset_tag_t.  Tweak cbb(4) to accomodate
this change.

Make Cardbus_conf_read() and Carbus_conf_write() pass the right
arguments to cardbus_functions->cardbus_conf_{read,write}() for a
change.

Let's hope this stops the crash in cardbus_function_enable() that
macallan@ reported to me.
2008-01-02 23:11:34 +00:00
chris 736004cf1c Add property to aceride to allow the forcing of compat mode.
This allows cats to override the BIOS (aka ABLE) settings, which enable
native mode, but doesn't route the interrupts correctly.

Discussed last year on tech-kern and port-cats.
2008-01-01 14:57:05 +00:00
dyoung 73a1d6fbf5 Don't buffer packets while the link is down, but drop them on the
floor like most other ethernet drivers do.

bnx(4) has "vanilla" MII media-handling, so use ether_mediachange
and ether_mediastatus.
2007-12-31 22:52:14 +00:00
jdc 7d55a9be13 Regenerate for "Add Apple Shasta GMAC (From FreeBSD)". 2007-12-30 09:30:02 +00:00
jdc 1e2c6ece4c Add Apple Shasta GMAC (From FreeBSD). 2007-12-30 09:28:28 +00:00
dyoung 7be7d500af For consistency with other softc members, s/ethercom/bnx_ec/. 2007-12-30 00:56:45 +00:00
dyoung 66c8374872 Get rid of bnx_suspend_resume(), it did redundant resets.
Merge bnx_if_stop() and bnx_stop().  Handle bnx_stop(, 1) by doing
a reset.

Protect the bnx_stop() call in bnx_detach() with splnet().

Thanks to joerg@ for suggesting the above.

In bnx_stop(), deactivate the PHYs with mii_down().  Return right
away if !IFF_RUNNING.

Use LIST_EMPTY().

In bnx_ifmedia_upd(), propagate all mii_mediachg() return codes to
the caller except for ENXIO, which just means that the PHY is
suspended.  In bnx_init(), propagate bnx_ifmedia_upd() return codes
to the caller.

In bnx_intr(), replace a common subexpression with a variable,
'sblk'.

In bnx_tick(), let the MII bus keep ticking after the link is up:
check link status and exit after calling mii_tick(), not before.
2007-12-29 19:51:38 +00:00
dholland 9784aa9aba Regen. 2007-12-28 00:35:23 +00:00
dholland 45274b234f typo fix: brige -> bridge 2007-12-28 00:34:00 +00:00
ws 92c079bdac Change cacheline fixup for 3114's second set of channels, too.
Fix provided by Masanori Kanaoka in PR 37519.
Fixed differently to avoid code duplication.
2007-12-27 15:14:23 +00:00
dyoung d2a6fcd7d7 Add device suspend/resume/detach. (Tested with drvctl -S bnx0,
drvctl -Q bnx0, drvctl -d bnx0.)

Separate device_t storage from softc storage and use CFATTACH_DECL_NEW().
2007-12-26 04:06:29 +00:00
perry b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
joerg 9a98cd19ff Add initial version of calling VGA POST from vga_resume. This is the
equivalent to "vbetool post" using x86emu in the kernel.
2007-12-25 14:22:25 +00:00
hamajima e56b5e9499 Match on board ethernet controller on VGN-TX91PS. 2007-12-24 17:07:40 +00:00
hamajima 2b65bf0e5d regen. 2007-12-24 17:05:52 +00:00
hamajima e4fcdf9886 Add Intel 82801GB Ethernet Controller 2007-12-24 17:03:20 +00:00
dyoung eafb0f479a Initialize and destroy the ATH_LOCK. 2007-12-21 18:26:13 +00:00
dyoung 1d18d8049c Do not embed a struct device in rtw_softc any longer. Register
both pci and cardbus attachments with CFATTACH_DECL_NEW().  Access
the softc through the device_t using device_private().

While I'm here, change a couple of KASSERT()s about the Rx buffer
length to a warning.
2007-12-21 18:22:43 +00:00
macallan 48d017a9d1 only enable the fb mapping at offset 0 after attempting to mmap page 0
This way we avoid a conflict with PCI resources on some Sun graphics cards
which have firmware that likes to put memory resources at low addresses.
For instance, if we have 1MB framebuffer and registers at 0x30000 we'll
get the registers when mmap()ing 0x30000 until someone tries to mmap(0),
then we'll get framebuffer memory for the entire 1st MB.
This needs an ioctl() to switch between fb-at-0 and PCI ranges.
2007-12-21 05:32:09 +00:00
phx d2a9b2ff83 VT8231 IDE workaround for native mode with "compatibility" interrupts 14/15.
This time done right by calling pciide_machdep_compat_intr_establish() to
get a MD interrupt handler.
Verified that it compiles for XEN again.
2007-12-20 22:24:40 +00:00
dyoung 6f3852fab4 Constify struct ifnet->if_sadl and every use throughout the tree.
Add if_set_sadl() that both sets the link-layer address length and
replaces the current link-layer address with a new one, and use it
throughout the tree.
2007-12-20 21:08:17 +00:00
dyoung 9f5c1f09f7 Use LIST_FOREACH(). 2007-12-20 20:48:24 +00:00
phx 86c26b70d7 xen did no longer build.
Temporarily reverted to 1.47. Will need some time to find a good solution.
2007-12-17 22:01:12 +00:00
tsutsui 4e3d8b015c Handle a quirk of newer MCP6x chips on reading MAC address.
Fix from Richy Kim in PR kern/36576.
2007-12-17 12:41:06 +00:00
dyoung cf784f4497 Improve pci, cbb, cardslot, cardbus, and pcmcia to support detachment
of this entire device tree:

pci0 at mainbus0
        elansc0 at pci0
                gpio0 at elansc0
        cbb0 at pci0
                cardslot0 at cbb0
                        cardbus0 at cardslot0
                        pcmcia0 at cardslot0
        cbb1 at pci0
                cardslot1 at cbb1
                        cardbus1 at cardslot1
                                rtw0 at cardbus1
                        pcmcia1 at cardslot1
        sip0 at pci0
                nsphyter0 at sip0
        sip1 at pci0
                nsphyter1 at sip1

Whew!
2007-12-16 21:28:30 +00:00
dyoung 84e05249e0 Collect garbage. All of this code is in pci/if_sip.c, now. 2007-12-16 21:17:44 +00:00
dyoung 59b1a7d60b Convert many macros to inline subroutines. Some of the subroutines
probably should not be inline.
2007-12-16 21:17:00 +00:00
phx c6d327a8be At least under certain (mis)configurations (e.g. on the "Pegasos" board)
the VT8231-IDE's native mode only works with irq 14/15, and cannot be
programmed to use a single native PCI irq alone. So we install an interrupt
handler for each channel, as in compatibility mode.
This behaviour has to be activated by the "use-compat-native-irq" property,
otherwise the driver works as before.
2007-12-16 16:41:01 +00:00
dyoung 868758b808 In ath_pci_detach(), unmap bus memory. 2007-12-15 23:56:54 +00:00
dyoung fca36f8a1a sip_copy_small and gsip_copy_small should not be static any longer.
Make it so.
2007-12-15 23:04:57 +00:00
he 2ffc7d4a2b Only declare sip_copy_small under __NO_STRICT_ALIGNMENT, to afoid
a "defined but not used" warning turned into error by compiler options.
2007-12-15 21:51:45 +00:00
tsutsui 61126beefc Rename a device property name: "override_ultra" -> "aic7xxx-override-ultra" 2007-12-15 14:23:14 +00:00
dyoung f4438e4673 Take care to release all resources. Now I can 'drvctl -d sip0;
drvctl -r pci0' to to detach / re-attach a sip0.
2007-12-15 07:05:57 +00:00
dyoung eb6813e870 Finish making the sip(4) and gsip(4) drivers share compiled code. 2007-12-15 05:46:21 +00:00
dyoung 88d046abe2 Attach sip to 10/100 variants, gsip to gigabit variants. Thanks
Izumi Tsutsui for the bug report.
2007-12-15 01:27:13 +00:00
dyoung f1dc0ca9a4 Convert some #ifdef DP83820 to comments /* DP83820 only */ where
that will neither make a functional difference nor cause a name
collision.
2007-12-15 01:25:12 +00:00
perry 9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
dogcow 5c1631600c fix KDASSERTs by defining ifp 2007-12-14 08:14:27 +00:00
dogcow d494e60340 caddr_t -> void * 2007-12-14 08:14:26 +00:00
dogcow df396ec4f3 remove typedef for caddr_t 2007-12-14 08:14:26 +00:00
dyoung 0aff5df9de Simplify suspend/resume using device_has_power(). 2007-12-14 03:38:19 +00:00
dyoung 9a075a9c73 Comment-out calls to pci_disable_retry() and cardbus_disable_retry().
They do not seem well-justified according to anyone's understanding
of what they really do, and it seems especially inappropriate to
call them at attach- and resume-time.
2007-12-14 03:18:46 +00:00
mjf 84f60004f0 Reorder the previous commit so we remember to disestablish pci interrupts
if we fail to attach ath(4).

Thanks dyoung!
2007-12-14 02:57:22 +00:00
dyoung 0c96975093 Take a step toward sharing compiled code between sip(4) and gsip(4):
get rid of SIP_DECL() and reduce #ifdef DP83820 code.  Next step
is to move a bunch of shared code to a new file (if_sipcom.c, say)
and compile it *once*.

While I am here, add suspend/resume handling to sip(4) and to
gsip(4).

Tested with the NatSemi sip(4) on the Soekris net4521.  I don't
have any gsip(4) to test with, and it seems that the few holders
of gsip(4) in the world keep them in their attic, anyway.
2007-12-14 01:55:35 +00:00
mjf 003edc95d6 Fix a crash at shutdown/reboot that was caused by ath(4) registering with
pmf's network class even though the ath device may not have attached
properly.

OK jmcneill
2007-12-14 00:55:52 +00:00
tls 9fcd272fb5 Adjust interrupt moderation for newer chips to be saner according to the
82571 manual and Intel Application Note 450.  Previously, we were setting
RADV and TIDV/TADV values that didn't make any sense given the enormous
ITR value we were setting (well outside the range recommended by Intel
and quite possibly rejected silently by the chip as junk) and setting
RADV without setting RDTR, which is explicitly documented as having no
effect.

A considerable performance improvement is achieved for TCP and UDP at
gigabit speed.  I need to revisit this to deal with the timer ticks
being 4X as long when the chip's in 100mbit mode, and to set values
for the older chips' interrupt timers that are more like what the
appnote recommends.  This should help for 82543 and newer, though.
2007-12-14 00:23:49 +00:00
jmcneill 61d17f24ea Make this compile again. 2007-12-13 16:53:28 +00:00
jmcneill 2399e8e84e Restore the native mode PCI conf register on select chipsets on resume,
in case it was lost when power was removed.
2007-12-13 15:11:31 +00:00
lukem e3899b9e67 NetBSD RCSID love 2007-12-11 11:48:40 +00:00
lukem 388339aa58 use __KERNEL_RCSID() 2007-12-11 11:25:46 +00:00
martin 6cdfaa0c8f As a stopgap fix: disable a pci_conf_ access at offset 0x82 on archs
that would mind ;-) IMHO this access violates the PCI spec, so this
should be solved differently.
2007-12-11 11:11:22 +00:00
degroote 087fae3d54 Register fxp @ pci to the pmf framework
Kill reference to old powerhook framework.
2007-12-10 16:15:02 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
xtraeme 6797f052ff Erm fix some defines in previous... 2007-12-09 00:24:46 +00:00
xtraeme 1e1bd31956 Add some more firmware command/status codes from the freebsd driver. 2007-12-08 16:53:19 +00:00
xtraeme 10f7c0a4da Add BIOC_SVMIGRATING to bio(4) and bioctl(8) to report if a volume
is migrating currently showing the percentage.

Update arcmsr(4) to report this, like:

$ sudo ./bioctl -h arcmsr0
    Volume Status     Size Device
 arcmsr0 0 Migrating  698G ARC-1210-VOL#00 RAID 5 7% done
	 0 Online     234G 0:0.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 1 Online     234G 0:1.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 2 Online     234G 0:2.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 3 Online     234G 0:3.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
$
2007-12-07 11:51:21 +00:00
xtraeme 2a8e937fbd - Improve the locking based in comments from ad@.
- malloc(9) -> kmem(9) now that most of the bio code doesn't need to run
  on interrupt context.
- Reduce code that runs in interrupt context to a small part in
  arc_msgbuf() and is protected by arc_lock()/arc_unlock().

Reviewed and help by ad@.
2007-12-07 08:50:36 +00:00
bjs 2e1c69e6e8 Bring in some modest fixes from GIT that seemed appropriate to me and did not
break functionality.  I've tested this on a PCIE R423 (X800).

- In drm_drv.c, check that the requested context lock matches the holder
of the lock.

- Unify radeon offset checking.  (r300_cmdbuf.c, radeon_drv.h, radeon_state.c)
[Replace r300_check_offset() with generic radeon_check_offset(), which doesn't
reject valid offsets when the framebuffer area is at the very end of the card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697]

NOTE: There is another AGP fix that I didn't have time to merge
that I thought might help with getting this to work on macppc.
Contact me if you're interested. Hi macallan@! ;)

radeon_cp.c, radeon_drv.h: (GIT id: bb5f2158dbd30dbbffa3881fac75b71d71ecaaf9)
- set the address to access the aperture on the CPU side correctly
[This code relied on the CPU and GPU address for the aperture being the same,
On some r5xx hardware I was playing with I noticed that this isn't always true.
I wonder if this will fix some of those r4xx DRI issues we've seen in the past.]

- Commit the ring after earch partial texture. (radeon_state.c)
(GIT ID: ac8406420ea80ffe5ccaadc1ff0124f95709a23d)
[Commit the ring after each partial texture upload blit.
This makes sure each blit starts as early as possible, which may improve
texture upload performance in some cases.]

If anyone's having any issues in particular--especially those which
can be _teased apart from AGP driver issues--please let me know
and I'll investigate.  Thanks.  There are also tons of fixes for the i915,
but I don't want to change too much at once.
2007-12-07 08:02:48 +00:00
gmcgarry 11f250300f Fix locking botch. 2007-12-05 23:20:27 +00:00
xtraeme 21d75f870d Boh! I spoke too soon before, without the rwlock(9) sometimes
arc_wait() waits forever, so put it back until I figure any other way
to remove the rwlock(9).
2007-12-05 18:58:00 +00:00
xtraeme 1b48221099 Use SCSIPI_CHAN_NOSETTLE... the driver doesn't have to wait. 2007-12-05 18:25:53 +00:00
xtraeme dc5ade8ebb Make it use mutex(9) and condvar(9), bye bye spl(9) and tsleep(9).
Fully stable with all debugging options turned on, unless someday any
problem appears :-)
2007-12-05 18:07:34 +00:00
pooka 4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
xtraeme 220ed74e1e - arc_msgbuf: free wbuf and rbuf with the correct type (M_TEMP vs M_DEVBUF)
this fixes a panic with debugging options.
- Do not use a callout to refresh sensor data, and make it available
  every time someone requests it.
- Enable ENVSYS_FMONSTCHANGED for notifications in the volumes.
2007-12-05 16:02:25 +00:00
ad 598ab03ad0 Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.
2007-12-05 07:06:50 +00:00
xtraeme 11b3a747bd Rename the Areca RAID driver (known as arc(4) to arcmsr(4) to avoid
namespace conflict with NetBSD/arc.

Found by tsutsui@.
2007-12-05 00:18:06 +00:00
xtraeme e505e7cc51 Use a rwlock(4) for arc_lock/unlock. arc_msgbuf() is too fragile and
we want to be sure that only one consumer is using it at a time.
2007-12-04 21:09:56 +00:00
xtraeme 8e6cf74867 Areca Technology Corporation SATA RAID controller driver, ported
from OpenBSD.

arc0 at pci2 dev 14 function 0: interrupting at ioapic0 pin 18 (irq 5)
arc0: Areca ARC-1210 Host Adapter RAID controller
arc0: 4 ports, 256MB SDRAM, firmware <V1.43 2007-4-17>
scsibus0 at arc0: 16 targets, 8 luns per target
[...]
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <Areca, ARC-1210-VOL#00, R001> disk fixed
sd0: 465 GB, 56514 cyl, 36 head, 480 sec, 512 bytes/sect x 976562176 sectors
sd1 at scsibus0 target 0 lun 1: <Areca, ARC-1210-VOL#01, R001> disk fixed
sd1: 465 GB, 56514 cyl, 36 head, 480 sec, 512 bytes/sect x 976562176 sectors

bioctl(4) output with two RAID0 volumes:

Volume  Status               Size Device
 arc0 0 Online               466G ARC-1210-VOL#00 RAID0
      0 Online               234G 0:0.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
      1 Online               234G 0:1.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
 arc0 1 Online               466G ARC-1210-VOL#01 RAID0
      0 Online               234G 0:2.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
      1 Online               234G 0:3.0   noencl <WDC WD2500YS-01SHB1 20.06C06>

The driver still needs changes related to locking and talking to the
firmware, which sometimes is unable to answer...

Raid card donated by Areca Technology Corporation via Trent George.
Disks used for testing were contributed by TNF.

Thank you very much.
2007-12-04 18:47:50 +00:00
xtraeme 05237843cf Newer nForce MCP SMBus devices use different PCI BARs than the old ones
(nForce 2/3/4).

nfsmb(4) is now properly working on newer MCPs, tested by wiz@ on MCP55:

nfsmbc0 at pci0 dev 1 function 1: NVIDIA nForce MCP55 SMBus Controller (rev. 0xa2)
nfsmb0 at nfsmbc0 SMBus 1
iic0 at nfsmb0: I2C bus
spdmem0 at iic0 addr 0x51
spdmem0: DDR2 SDRAM memory, data ECC, 1024MB, 667MHz, PC2-5300
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
nfsmb1 at nfsmbc0 SMBus 2
iic1 at nfsmb1: I2C bus
2007-12-04 15:58:11 +00:00
dyoung 2fae21685a Reprogram multicast filter after SIOCADDMULTI / SIOCDELMULTI.
Fixes IPv6 stateless address configuration problems reported on
tech-net@.  Patch tested and found to work by Martti Kuparinen.
2007-12-04 09:22:05 +00:00
jmcneill 490542edae aprintify, on behalf of xtraeme 2007-12-01 23:40:28 +00:00
jmcneill ce3286d7bc Prefix the regulatory domain and address output with the device name. 2007-12-01 18:02:42 +00:00
ad 976457d5d6 Back out previous. 2007-12-01 17:00:41 +00:00
ad 0136093bcb Noisy printfs. 2007-12-01 16:54:28 +00:00
ad b4214e6788 Empty vessels make the most noise 2007-12-01 16:46:18 +00:00
jmcneill 1b940a02fa aprintify 2007-12-01 06:05:18 +00:00
jmcneill 4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
degroote db9d3119cf In wpi_init, check for the status of radio switch and print a useful message
in this case.
2007-11-28 22:51:49 +00:00
briggs 75b18122f2 Correct a typo. To create the command/status word, shift the components
left, not right.
2007-11-28 04:03:16 +00:00
christos 1b601e0085 Add dell latitude 420 in the list of machines that need special treatment
to silence speakers when headphones are plugged in. From Marcin Michal Jessa
2007-11-26 15:47:36 +00:00
bjs 759a913b44 Add PCI_PRODUCT_ATI_RADEON_R430_554F to the R420 chip class.
This will not work until (at the very least) we map the memory properly
(MMIO/VRAM BARs are 64-bit)--some of the values in the configuration
space may be different.  I will discuss this with others, and maybe
it will work someday.
2007-11-26 09:39:50 +00:00
bjs 24e9564be9 Add PCI IDs for the ATI Radeon X800 GTO (R430). Most sources I have
consulted indicated that this ID is an R430 (including xf86-video-ati).

PCI_PRODUCT_ATI_RADEON_R430_554F (primary)
PCI_PRODUCT_ATI_RADEON_R430_556F (secondary)

vga0 at pci1 dev 0 function 0: ATI Technologies product 0x554f (rev. 0x00)
ATI Technologies product 0x556f (miscellaneous display) at pci1 dev 0 function 1 not configured
2007-11-26 09:36:28 +00:00
dsainty e92d81422b Minor typos in comments, no functional change. 2007-11-25 02:46:54 +00:00
dyoung b6c284d2c6 Use TAILQ_FOREACH() to search window lists. Do not insert/remove
windows inside the loop.
2007-11-24 07:59:21 +00:00
dyoung f8fd941eed Use the PCI #define for the secondary bridge reset instead of using
the duplicate Cardbus #define.  Write a note to self: pccbb interrupts
need more work.  No functional change intended.
2007-11-24 07:53:52 +00:00
markd 769813d901 Add agp support for Intel Q35/G33/Q33. 2007-11-24 02:19:37 +00:00
gavan 33bf6486d0 Be paranoid about disabling interrupts and acknowledging any pending
interrupts while attaching uhci. Fixes recent problems with uvm_fault
during uhci attach, which appear to be caused by a pending interrupt
left over from the device while it was operating in legacy support mode
under the control of the BIOS.

Patch by joerg@ because his was better than mine.
2007-11-24 02:13:49 +00:00
markd b79e2bcb32 regen. 2007-11-24 01:45:38 +00:00
markd 5579145ce1 Add INTEL Q33 and Q35 chipsets 2007-11-24 01:44:55 +00:00
markd 8ddb7f418e s/product\tINTEL/product INTEL/ 2007-11-24 01:42:09 +00:00
plunky 1abda57e11 when using CFATTACH_DECL_NEW(), we must remember to record the
device_t if we wish to use it.

	sc->sc_dev = self;
2007-11-23 22:27:02 +00:00
macallan 9d020f5bdb make this compile on sparc64 2007-11-23 20:12:54 +00:00
xtraeme b2bb4b77b8 regen 2007-11-23 20:08:47 +00:00