Commit Graph

15266 Commits

Author SHA1 Message Date
Jung-uk Kim
0da90eb878 Fix style nits. No md5 changes in .o's. ;-) 2006-09-08 21:46:01 +00:00
Matt Jacob
167197ae8e Support for PCI-Express 4Gb Cards. 2006-09-08 05:27:04 +00:00
Pyun YongHyeon
baa1277289 Make 8139C+ work again which was broken since rev 1.68.
Ever since rev 1.68 re(4) checks the validity of link in re_start.
But rlphy(4) got a garbled data due to a different bit layout used on
8139C+ and it couldn't report correct link state. To fix it, ignore
BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+.
I think this also make dhclient(8) work on 8139C+.

Reported by:	Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de>
Tested by:	Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de>
2006-09-08 00:58:02 +00:00
Matt Jacob
a7303be1a8 Create a 'ready' handler for each personality. The purpose of this handler
is to able to be called after *all* attach and enable events are done.

We establish a SYSINIT hook to call this handler. The current usage for it
is to add scsi target resources *after* all enables are done. There seems
to be some dependencies between different halves of a dual-port with respect
to target mode.

Put in more meaningful event messages for some events- in particular
QUEUE FULL events so we can see what the queue depth was when the
IOC sent us this message.

MFC after:	1 week
2006-09-07 23:08:21 +00:00
Eric Anholt
90e545e597 Merge from DRM upstream:
- Add support for Intel 965 Express chipsets.
- Add support for R200 vertex programs, along with minor bugfixes.
- Add support for vblank synchronization to pipe B of Intel hardware
  (laptop screens).
2006-09-07 23:04:47 +00:00
Doug Ambrisko
765ca1d3d2 Change the class from uint8_t to int8_t so people can filter on >0
events.
2006-09-07 19:32:05 +00:00
Doug Ambrisko
47b470b9e3 Change the event log dump on initial boot to use get_event versus
AEN.  This makes the boot messages cleaner.  I now know how this
structure works so I can implement it versus guessing.  Remove the
not ready type code since it is ready now.

I added the time stamp/locale/class so people can parse messages better.
Create a sysctl so that we can set the locale/class level.
2006-09-07 18:40:49 +00:00
Matt Jacob
656cedd455 Static -> static. 2006-09-07 06:00:03 +00:00
Tom Rhodes
2ae23ece2d Catch up with USB changes, device_ptr_t was removed, we need device_t here. 2006-09-07 05:34:04 +00:00
Scott Long
448ddd747f Catch up to USB changes. 2006-09-07 05:21:52 +00:00
Scott Long
6459155f67 Remove old debugging code from the interrupt handler. 2006-09-07 05:05:41 +00:00
Warner Losh
2deae8fa2f More removing compatibility macros.
md5 still the same.

"Dave, stop.  I feel my mind slipping away." -- hal
2006-09-07 00:06:42 +00:00
Warner Losh
730503190d Only include FreeBSD defines. This file is slated to go to the happy
hunting ground in the sky.

Also, remove the #defines OBE.
2006-09-06 23:49:36 +00:00
Warner Losh
56635f6bd3 s/Static/static/g
s/device_ptr_t/device_t/g

No md5 changes in the .o's

# Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit
# so you need to checkout -kk to get $FreeBSD$ instead of the actual value
# of the keyword.
2006-09-06 23:44:25 +00:00
Warner Losh
f455418269 More antideclarification.
md5 still the same after all these years (and after -g was removed).
2006-09-06 23:29:53 +00:00
Warner Losh
da271ed509 Remove the portibility layer goo.
Produces the same .o as before.

md5 by: /sbin/md5
2006-09-06 21:53:28 +00:00
Warner Losh
ec2b5cd830 jhb points out that these mallocs don't need to be checked because
of M_WAITOK.
2006-09-06 20:22:43 +00:00
Warner Losh
14ca3cd6ff MFp4: check the return value of malloc and report an error when invalid. 2006-09-06 19:46:02 +00:00
Matt Jacob
b2d24734cd The poison pill of death: adding a target mode reply handler and target
resources to a non-FC card killed us dead. Sorry for the breakage since
last July 12.
2006-09-05 23:53:07 +00:00
Matt Jacob
9af877a146 Coverity: initialize some variables before potential use. 2006-09-05 20:28:28 +00:00
Marcel Moolenaar
1d860a7ee5 Add SIIG 4 port serial card based on the Oxford OX16PCI954. 2006-09-04 18:27:14 +00:00
Michael Reifenberger
592777f6b6 Add locking to vge_ifmedia_upd().
With this WD-timeouts for vge(4) got reduced signifficantly.
Testet on -stable.

Submitted by:	Oleg Bulyzhin
MFC after:	1 day
2006-09-04 13:14:44 +00:00
Doug White
9aeef36608 Avoid an infinite loop in empty_both_buffers() by adding a timeout.
This helps systems that don't actually have atkbd controllers, such as the Intel
SBX82 blade, boot without device.hints hacks.

Hardware for this fix provided by iXsystems.

PR:		94822
Submitted by:	Devon H. O'Dell <devon.odell@coyotepoint.com>
MFC After:	3 days
2006-09-04 00:19:31 +00:00
Hajimu UMEMOTO
d45564dcfe Support Celsius (nn.nC), Fahrenheit (nn.nF) and Kelvin (nnnn) to
specify temperature.

Reviewed by:	njl
MFC after:	3 days
2006-09-03 15:10:04 +00:00
Matt Jacob
198b33587b Restore multi-version cleanliness. 2006-09-03 01:26:55 +00:00
John-Mark Gurney
378f231e7d add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there
are seperate IOMMU's for each PCI bus...  For all other arches, it will
end up returning NULL, which makes it a no-op...

Convert a few drivers (the ones we've been working w/ on sun4v) to the
new convection...  Eventually all drivers will need to replace the parent
tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for
each driver, and will require hand inspection...

Reviewed by:	scottl (earlier version)
2006-09-03 00:27:42 +00:00
Søren Schmidt
adf1bdac4f Add support for VIA 8237A. 2006-09-02 12:55:42 +00:00
David Christensen
21c9e4077a /tmp/cvsleYf6y 2006-09-01 22:30:56 +00:00
Marius Strobl
55d3a2fcc5 Fix spelling in a status message.
MFC after:	1 day
2006-09-01 20:14:06 +00:00
Marius Strobl
e70415b38e Fix spelling and wording in a comment. 2006-09-01 20:12:12 +00:00
John Baldwin
7269aec456 Comment tweaks. 2006-09-01 16:11:50 +00:00
John Baldwin
acda5dd92a - Use pci_enable_busmaster() and pci_enable_io() to update the command
register.  This really shouldn't be using pci_enable_io() directly as
  bus_alloc_resource() does it already, but the cached copy of the
  command word needs to be correct so the enable/disable mwi functions
  work properly.
- Use pci bus accessors to read revision ID and subvendor IDs.

Reviewed by:	jvogel
2006-09-01 16:11:12 +00:00
John Baldwin
34de220dcf Add locking to the ifmedia callouts.
Reviewed by:	jvogel, yongari
2006-09-01 16:08:36 +00:00
Gleb Smirnoff
824d7cd2cc Fix my error in rev. 1.109.
Submitted by:	jhb
Pointy hat to:	glebius
2006-09-01 09:56:24 +00:00
Matt Jacob
8070de6398 More ispfwfunc definitions funnies which break pre-7.0 builds. 2006-09-01 05:03:42 +00:00
Matt Jacob
784ed7076c Add missing pre-7.0 firmware pointer. Oops. 2006-09-01 04:57:14 +00:00
Matt Jacob
54256b0109 fix bug in 2322 receive sequencer f/w load 2006-09-01 04:18:17 +00:00
Eric Anholt
c88bc907e7 Add support for another ATI IGP 340M (RS200M) AGP bridge.
PR:		kern/100958
Submitted by:	Kazuo Dohzono <dohzono@axion-software.com>
MFC after:	1 week
2006-09-01 02:22:17 +00:00
John Baldwin
9555b0e2fc Just foward declare 'struct adapter' instead of declaring an actual
'adapter' structure.
2006-08-31 18:50:16 +00:00
John Baldwin
7f0875cc0f Compare the correct field against NULL when determining whether or not to
do bus_teardown_intr().
2006-08-31 18:49:41 +00:00
Pyun YongHyeon
73810ef739 Add PHY support for BCM5752.
Tested by:	delphij, Ganbold < ganbold AT micom DOT mng DOT net >
2006-08-31 11:15:18 +00:00
Pyun YongHyeon
d58d1737d6 Add Broadcom BCM5752 PHY id. 2006-08-31 11:13:51 +00:00
Ralf S. Engelschall
43109e5833 Fix typos: s/rebulid/rebuild/
Submitted by: Christoph Schug <chris@schug.net>
2006-08-31 08:45:44 +00:00
Søren Schmidt
4f991fd676 Properly initialize the nVidia MCP5X interrupts etc.
Suggested by:	nVidia
2006-08-30 11:50:22 +00:00
Jung-uk Kim
19a388e651 Restore Digital Outpur Register (DOR) for enhanced controller after reset. 2006-08-29 18:19:39 +00:00
Matt Jacob
9b2027cec5 Add QLogic 2400 (4Gb) firmware. 2006-08-26 18:39:18 +00:00
Søren Schmidt
9e34f8233b Properly initialize and destroy the RAID lock.
Also dont mess with RAID's thats not attached yet and avoid panic.
2006-08-25 09:33:56 +00:00
Marius Strobl
2afacffb3a Remove the DPMS code in creator_blank_display(), as it causes some
LCDs to blink in the V_DISPLAY_ON case, at least in combination with
some 13W3-VGA-adaptors (what's exactly going on is unclear though,
as it happens when all of H-sync, V-sync and video output are enabled
and not touching the sync bits from the preset fixes it). Thus
creator_blank_display() now is reduced to turning the video output
on/off.
Although that DPMS code did what the XFree86/Xorg sunffb(4x) does,
it was questionable in the first place, as both implementations
also turn(ed) off the video output on standby and suspend, thus most
likely causing the monitor to turn off instead of entering standby
or suspend as intended (at least my monitors don't).

Reported and tested by:	Patrick Reich
MFC after:		3 days
2006-08-24 22:00:24 +00:00
Oleg Bulyzhin
67d5e043d2 Properly lock ifmedia callbacks. This should prevent concurrent access to PHY.
Following issues should be resolved:
- random watchdog timeouts (caused by concurrent phy access)
- some link state issues
- non working TX if media type was set explicitly

PR:		kern/98738
Approved by:	glebius (mentor)
MFC after:	2 weeks
2006-08-24 14:41:16 +00:00
Gleb Smirnoff
42953da8a7 Pack several boolean fields into single bge_flags field. 2006-08-23 15:37:07 +00:00
Gleb Smirnoff
652ae483f8 Pack several boolean fields into single bge_flags field. 2006-08-23 11:32:54 +00:00
Pyun YongHyeon
c68ea28fe1 It seems that em(4) misses Tx completion interrupts under certain
conditions. The cause of missing Tx completion interrupts comes from
Tx interrupt moderation mechanism(delayed interrupts) or chipset bug.
If Tx interrupt moderation mechanism is the cause of false watchdog
timeout error we should have to fix all device drivers that have Tx
interrupt moderation capability. We may need more investigation
for this issue. Anyway, the fix is the same for both cases.

This should fix occasional watchdog timeout errors seen on a few
systems.

Reported by:	-net, Patrick M. Hausen < hausen AT punkt DOT de >
Tested by:	Patrick M. Hausen < hausen AT punkt DOT de >
2006-08-22 02:32:48 +00:00
Jung-uk Kim
668e25a26c Use aperture base address from north bridge. Some BIOS does not encode
misc. control registers correctly and it is inconsistent with north bridge.
In fact, there are too many broken BIOS implementations out there and we
cannot fix every possible combination but at least it is consistent with
what we advertise with ioctl(2).
2006-08-21 19:10:58 +00:00
Warner Losh
2c3538b83a Minor style(9) treatment to make things a little more consistant
within iicbus code.
2006-08-21 17:32:50 +00:00
Matt Jacob
2298c14c62 Fix RELENG_4 code version- isp_roles wasn't getting initialized so
it ended up defaulting to ISP_ROLE_NONE. My testing hadn't caught it
because I was deliberatly setting role via ioctl.

Thanks to user Toni for lending me an alpha to test this on.

MFC after:	0 days
2006-08-21 00:46:10 +00:00
Gleb Smirnoff
6909dc43c5 bge_cksum_pad() can modify the mbuf, thus call it before bus_dmamap_load().
Submitted by:	yongari
2006-08-18 13:53:53 +00:00
Søren Schmidt
97c9f9ff21 Update JMicron support to also work with chips where the PATA and SATA
parts are on individual PCI functions.

HW donated by: JMicron
2006-08-18 09:56:12 +00:00
Warner Losh
39926f1ff3 Appened ull to a really large integer constant to fix build on i386 2006-08-18 00:01:29 +00:00
Warner Losh
1a3c917f9d while (0); -> while (0) in multi-line macros 2006-08-17 22:50:33 +00:00
Warner Losh
5657c870dc Don't put a ; after while (0)
Submitted by:	jmg
2006-08-17 22:42:56 +00:00
Gleb Smirnoff
676ad2c9ef Rewrite bge_encap() so that it takes mbuf ** argument. In this case if
m_defrag(9) changes pointer we can show this to our caller.

Reviewed by:	yongari
2006-08-17 09:53:04 +00:00
Pyun YongHyeon
0c3e46f4eb Don't update Rx descriptor status in two different functions.
Suggested by:	pdeuskar
Reviewed by:	pdeuskar
2006-08-16 23:55:34 +00:00
Pyun YongHyeon
03923cd3d2 Add inverted amplifier sense quirks for Compaq Presario B3800
Reported by:	Nick Withers < nick AT nickwithers DOT com >
Tested by:	Nick Withers < nick AT nickwithers DOT com >
No objection from:	ariff
MFC after:	1 week
2006-08-15 07:37:41 +00:00
Julian Elischer
772b4799a4 Remove extra '*/' comment close. In code not normally compiled but a bug never the less. 2006-08-15 04:56:29 +00:00
Søren Schmidt
e7de1a3978 Add support for the ICH8 and ESB2 chips, also add a few other missing ICH7 parts.
HW donated by:	JMicron
2006-08-14 19:39:33 +00:00
Takanori Watanabe
b98a0eca16 Improve exception string format.
PR:100671
MFC after: 3 days
2006-08-14 18:38:56 +00:00
Takanori Watanabe
924ede2031 Remove debug messages on notify handler.
PR:100671
2006-08-14 18:24:22 +00:00
Ruslan Ermilov
d0220c83e1 Fix alignment of RX bufs DMA map to be realistic. Maybe it works on
i386 (I don't know) but on amd64 at hand here, it paniced early at
boot.

(I'm pretty sure that PAGE_SIZE here was miscopied from another place
during porting, where in OpenBSD bus_dmamem_alloc() is used, but there
PAGE_SIZE means completely different thing.)
2006-08-14 15:35:43 +00:00
Gleb Smirnoff
974067b161 Change hardcoded and incorrect number with correct define. This change is a
nop, since E1000_FDX_COLLISION_DISTANCE == E1000_HDX_COLLISION_DISTANCE.

PR:		kern/101000
Submitted by:	Doug Havir
2006-08-14 09:52:35 +00:00
Matt Jacob
1e6fdb7e32 Fix 2KLOGIN code to specify *ibits* (not *obits*) so that the
options field in register 10 will be deterministic, not random.

Correct the number of input bits for EXECUTE_FIRMWARE 0..1 to
0..2- the 2322 and 24XX cards use mailbox register 2 to specify
whether the f/w being executed is freshly loaded or not.

Correct the number of input bits for {READ,WRITE}_RAM_WORD_EXTENDED
so that register 8 gets picked up.

Fix the indexing and offset for the 2322 f/w download so that it
correctly puts the different code segments where they belong.

Move VERIFY_CHECKSUM to be the 'else' clause to 2322 f/w downloads-
the EXECUTE_FIRMWARE command for 2322 and 24XX cards will tell you
if the f/w checksum is incorrect and VERIFY_CHECKSUM only works for
RISC SRAM address < 64K so you can only do a VERIFY_CHECKSUM on the
first of the 3 f/w segments for the 2322.

Shorten the delay for the continuation mailbox commands- 1ms is
ridiculous (100us is more likely).

All of the more or less is really only for the 2322/6322 cards.
2006-08-14 05:42:46 +00:00
Matt Jacob
4cc9e3e7cc The register offset is within 4K, not 256 bytes, for some QLogic cards. 2006-08-14 05:36:26 +00:00
Matt Jacob
6322f5abb7 The macro IS_23XX should not mistakenly include 24XX cards. 2006-08-14 05:35:41 +00:00
Pyun YongHyeon
4f74b4e080 Make em(4) handle too many fragmented frame with m_defrag(9).
Previously em(4) requeued the failed mbuf chains from
bus_dmamap_load_mbuf_sg(9) failure to resend it later. However,
bus_dmamap_load_mbuf_sg(9) may never complete its request as the
fragmented frames can have more than EM_MAX_SCATTER segments.
To handle the above EFBIG case, defragment the frame with m_defrag(9)
and free the mbuf chain if it can't deframent the chain due to
resource shortage.

Reviewed by	glebius (with improvements)
2006-08-14 02:21:26 +00:00
Pyun YongHyeon
f1909c6f53 Overhaul Rx path to recover from mbuf cluster allocation failure.
o Create one more spare DMA map for Rx handler to recover from
   bus_dmamap_load_mbuf_sg(9) failure.
 o Make sure to update status bit in Rx descriptors even if we failed
   to allocate a new buffer. Previously it resulted in stuck condition
   and em_handle_rxtx task took up all available CPU cycles.
 o Don't blindly unload DMA map. Reuse loaded DMA map if received
   packet has errors. This would speed up Rx processing a bit under
   heavy load as it does not need to reload DMA map in case of error.
   (bus_dmamap_load_mbuf_sg(9) is the most expensive call in driver
    context.)
 o Update if_iqdrops counter if it can't allocate a mbuf cluster.
   With this change it's now possible to see queue dropped packets
   with netstat(1).
 o Update mbuf_cluster_failed counter if fixup code failed to
   allocate mbuf header.
 o Return ENOBUFS instead of ENOMEM in case of Rx fixup failure.
 o Make adapter->lmp NULL in case of Rx fixup failure. Strictly
   specking it's not necessary for correct operation but it makes
   the intention clear.
 o Remove now unused dropped_pkts member in softc.

With these changes em(4) should survive mbuf cluster allocation
failure on Rx path.

Reviewed by:	pdeuskar, glebius (with improvements)
2006-08-14 01:50:54 +00:00
Pyun YongHyeon
1ad7bca7e9 Apply alignment fixup only when programmed frame size is greater than
MCLBYTES - ETHER_ALIGN. Previously it applied the alignment fixup code
for oversized frames which would result in reduced performance on
strict alignment archs.
2006-08-14 00:36:53 +00:00
Warner Losh
673c9ca931 Batch of changes:
o when turning off the socket for a 16-bit card, write 0 to INTR register
  rather than just tying to just clear the rest bit.  this seems to fix
  card insert detection after an eject on TI bridges (ricoh bridges work
  either way, apparently).  This is a MFp4.
o Cope better with TOPIC95 bridges on powerup.  According to NetBSD driver,
  these bridges don't set POWER_STATE, so cope accordingly in our power
  code.  They also need a little extra time to settle, so do that as well.
o It appears that we need to turn on/off one of the clocks to the card
  when we power up/down that socket on a TOPIC97, also from NetBSD.
o TOPIC97 bridges need to specifically enable LV card support.  Unconditionally
  do this in the hopes that all laptops that have these chips support LV
  voltages (they should, since they are required for CardBus).
o TOPIC register name regularization.  Registers specific to models of TOPIC
  are now called out as such.

# I need a machine with a TOPIC95 for testing.
2006-08-12 09:06:55 +00:00
Warner Losh
3c48d33eec The TOPIC97 and TOPIC100 seem to have a special register in the exca
space that enables low voltage operation (and maybe other stuff).
Enable the bits in this register so low voltage 16-bit cards may work.

Existance noticed in NetBSD driver.
2006-08-12 08:53:54 +00:00
Pyun YongHyeon
4eb561d2e8 Due to the poor PHY documentation from RealTek I can't sure but I
think the RealTek PHY needs driver to set RGEPHY_BMCR_AUTOEN bit of
RGEPHY_MII_BMCR register and proper ANAR register setting for manual
media type selection.
This fixes long standing manual media type selection bug in rgephy(4).

Reported by:	Jelte Jansen <jelte AT NLnetLabs DOT nl>
Tested by:	Jelte Jansen <jelte AT NLnetLabs DOT nl>
2006-08-12 01:38:49 +00:00
Pyun YongHyeon
329532e54e Fix invalid reference of mbuf chains.
Use proper pointer dereference to inform modified mbuf chains to
caller.

While I'm here perform checksum offload setup after loading DMA
maps.

In collaboration with:  glebius
2006-08-12 01:30:38 +00:00
Pyun YongHyeon
ff9c95a4d0 Fix invalid reference of mbuf chains.
Use proper pointer dereference to inform modified mbuf chains to
caller.

In collaboration with:	glebius
2006-08-12 01:24:37 +00:00
Pyun YongHyeon
d13bfc93ea Fix invalid reference of mbuf chains.
Use proper pointer dereference to inform modified mbuf chains to
caller.

While I'm here perform checksum offload setup after loading DMA
maps as m_defrag(9) can return new mbuf chains.

In collaboration with:	glebius
2006-08-12 01:19:37 +00:00
Søren Schmidt
d7cd375c47 Unbreak nForce4 SATA support.
Hopefully I dont break something else this time.....
2006-08-11 21:19:29 +00:00
John Baldwin
7e9f73f3ed First pass at allowing memory to be mapped using cache modes other than
WB (write-back) on x86 via control bits in PTEs and PDEs (including making
use of the PAT MSR).  Changes include:
- A new pmap_mapdev_attr() function for amd64 and i386 which takes an
  additional parameter (relative to pmap_mapdev()) specifying the cache
  mode for this mapping.  Note that on amd64 only WB mappings are done with
  the direct map, all other modes result in a private mapping.
- pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached)
  mappings rather than WB.  Previously we relied on the BIOS setting up
  MTRR's to enforce memio regions being treated as UC.  This might make
  hw.cbb_start_memory unnecessary in some cases now for example.
- A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places
  that used pmap_mapdev() to map non-device memory (such as ACPI tables)
  to do so using WB as before.
- A new pmap_change_attr() function for amd64 and i386 that changes the
  caching mode for a range of KVA.

Reviewed by:	alc
2006-08-11 19:22:57 +00:00
Jung-uk Kim
98935c581c Explicitly set v3 mode only when it is requested. Don't bother otherwise. 2006-08-11 19:16:50 +00:00
Dag-Erling Smørgrav
819b32eea5 Raise the quality of the HPET timer to 2000 so it will be the preferred
choice on systems which support it.

No objection by:	phk
2006-08-11 17:12:16 +00:00
Gleb Smirnoff
0d2a3b0c47 Merge in new driver from Intel, version 6.1.4. It adds support for
82571EB quad port copper NIC and has few minor fixes.

Details:
  - if_em.c. Merged manually, viewing diff between new vendor
    driver and previous one.
  - if_em_hw.c. Dropped in from vendor, and then restored
    revision 1.15.
2006-08-11 10:58:24 +00:00
Sam Leffler
6bf62dd1de o add noise floor to stats
o include current tx rate in stats so athstats gets a consistent
  snapshot and doesn't have to make an extra ioctl
o record tx rate for raw frames

MFC after:	3 weeks
2006-08-10 16:31:37 +00:00
Bruno Ducrot
48411a171a Improve the way we'll detect video devices as per ACPI 3.0.
PR:		100271
Requested by:	john AT utzweb DOT net
Submitted by:	hrs
Reviewed by:	njl
Approved by:	njl
MFC after:	3 days
2006-08-10 13:18:02 +00:00
Prafulla Deuskar
c3b36c8f05 10/100 PHY shouldn't support gigabit media types.
Submitted by:	brad (brad@comstyle.com)
Obtained from:	OpenBSD
MFC after:	1 week
2006-08-09 20:10:35 +00:00
Warner Losh
ab649fd4d2 Most platforms map the actual drive geometry to the firmware's notion
of geometry.  However, some platforms have a more complicated mapping
of the firmware values to the actual values.  pc98 is the only
platform that currently does this.  This mapping is necessary for
large disks connected to pc98 boxes, as the firmware labels require do
special hacks to the actual geometry for interoperability.  We cannot
do this all in the geom layer because of initialization issues (geom
looks for an already initialized pc98 label, but we need the geometry
information prior to initialization, classic chicken and egg problem).
We pass the disk and the device_t to this function because the
geometry mapping depends on what kind of controller is used.

This hook allows platforms that want to override things to do so, and
has 0 overhead on all other platforms.  These patches have been in use
locally for a long time, and received good feedback from the pc98
community and sos@ at various times during their development.

MFC After: 1 week
2006-08-09 18:23:47 +00:00
Warner Losh
9500ad1d7d Thomas Wintergerst reports that when this tsleep went away, certain
cards stopped working.  Specifically the AVM B1 PCMCIA Card no longer
detected.  Its CIS chain read back as all FF's.  Putting the delay
back solves those problems.  I've opted to put in a much shorter delay
because as far as I can tell, no delay is really needed here.  We'll
see how well this works in practice.
2006-08-09 00:05:54 +00:00
Sam Leffler
05680ab622 check return value of ath_tx_dmasetup
Noticed by:	yongari
2006-08-08 16:42:01 +00:00
Nate Lawson
7d2498889f Remove the global dock variable. Each dock device should be able to
function independently.  This change is not only load-tested since I don't
have hardware that supports acpi_dock.  Clean up comments and a name a
few constants.
2006-08-08 01:33:03 +00:00
Alexander Leidinger
04d895e8a4 Use a low probe-priority to ensure that the emu10kx driver has a higher
priority than this one when both are available.
2006-08-07 23:00:36 +00:00
Alexander Leidinger
507ec6d5c5 "Fix typos in volume control DSP code."
Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-08-07 22:56:41 +00:00
Alexander Leidinger
0c115520f1 "Fixe playback of mono files on stereo outputs. In previous version
mono files are played only on left channel."

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-08-07 22:55:21 +00:00
Alexander Leidinger
feaa7fe133 "Change type for flags bitmap to let use 1 as flag value without
overflow (to -1)."

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-08-07 22:50:26 +00:00
Alexander Leidinger
e4c87b14fd "Workaround for sound lag in current snd_emu10kx driver. Real problem
is interaction between in-kernel sound buffer handling and hardware.
 With small buffer, there are times when both harwdare reads and
 kernel writes to the same buffer (it is only visible on slow machines, i
 think). I'm digging in channel.c and buffer.c to find a solution that
 allow use of large hardware buffers without sound lags - hardware can
 handle buffers up to 32Mb."

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-08-07 22:44:01 +00:00
John Baldwin
0cdba3b7e5 When a user uses a hint to specify the IRQ for a link device, accept IRQs
that aren't listed as valid in the link device's set of possible IRQs.
This allows the hints to be used to work around broken BIOSes that don't
specify the correct ste of possible IRQs.  A warning is issued in the
dmesg in this case to be consistent with the $PIR handling code.

MFC after:	1 week
2006-08-07 19:52:30 +00:00
Gleb Smirnoff
42787b76b6 Recognize the 5750 C2.
Obtained from:	OpenBSD (brad)
2006-08-07 12:51:50 +00:00