Commit Graph

14792 Commits

Author SHA1 Message Date
Matt Jacob
179162e836 Gratuitous tag alignment. It bugged me. 2006-05-04 00:34:07 +00:00
Scott Long
2ea698312b Hide another common print under bootverbose. 2006-05-03 21:08:39 +00:00
Doug Ambrisko
d279e43442 Make amr_linux work as a module by avoiding calling amr_linux_ioctl_int
from the amr_linux.  This simplifies the amr_linux shim and puts the
smarts into amr.c.

I tested this with 2 amr controllers in one box.  It seems to work
okay with them.
2006-05-03 16:45:15 +00:00
Scott Long
b07d272da4 Only print the driver name and version if bootverbose is set. 2006-05-02 03:46:59 +00:00
Pyun YongHyeon
cb24e15186 Type.
Submitted by:	brad@OpenBSD
2006-05-02 02:12:42 +00:00
Ariff Abdullah
14055d2a09 Add inverted amplifier sense quirks for Sony VAIO VGN B1VP/B1XP.
Reported by:	Stan Behrens <s.behrens at kon.de>
2006-05-01 09:28:28 +00:00
Maxim Sobolev
6cd0bab5d5 Don't attach to Marvell 88E805X (Yukon-II) by default, the driver is not
functional yet.

Requested by:	bz
2006-05-01 05:16:36 +00:00
Scott Long
bdba4eb2d7 Remove header pollution. 2006-04-30 16:46:11 +00:00
Scott Long
648b922789 Remove some header polution. 2006-04-30 16:44:41 +00:00
Marcel Moolenaar
64220a7e28 Rewrite of puc(4). Significant changes are:
o  Properly use rman(9) to manage resources. This eliminates the
   need to puc-specific hacks to rman. It also allows devinfo(8)
   to be used to find out the specific assignment of resources to
   serial/parallel ports.
o  Compress the PCI device "database" by optimizing for the common
   case and to use a procedural interface to handle the exceptions.
   The procedural interface also generalizes the need to setup the
   hardware (program chipsets, program clock frequencies).
o  Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
   default and non-serdev devices are handled by the bus.
o  Use the serdev I/F to collect interrupt status and to handle
   interrupts across ports in priority order.
o  Sync the PCI device configuration to include devices found in
   NetBSD and not yet merged to FreeBSD.
o  Add support for Quatech 2, 4 and 8 port UARTs.
o  Add support for a couple dozen Timedia serial cards as found
   in Linux.
2006-04-28 21:21:53 +00:00
John Baldwin
f088002825 The nvidia binary blob sometimes defers tx completion notification to the
OS dependent layer.  Thus, the watchdog timer can go off when the tx
engine is working fine but the OS dependent layer just hasn't been called
to cleanup finished tx transactions.  To workaround this, when the watchdog
fires, poke the binary blob to force it to flush any pending tx
completions.  If this drops the pending tx count to zero then just return
without logging a message or resetting the chip.

This reportedly fixes the 'device timeout()' errors with at least several
NF4 nve(4) parts.

Submitted by:	Nathan Alexander Whitehorn <nathanw@uchicago.edu> (code)
Submitted by:	dg (inspiration for comment and explanation)
MFC after:	1 week
2006-04-28 20:08:16 +00:00
Marcel Moolenaar
a31f91a061 Implement the ipend() method of the serdev I/F. 2006-04-28 18:29:23 +00:00
Mike Silbersack
981b2dea6b Tweak the DMA limit from rev 1.33, it was off by one byte.
Submitted by:	scottl
2006-04-28 05:38:12 +00:00
Mike Silbersack
cff1362221 Switch all bus_dmamap_sync calls that used PREREAD to PREWRITE and all
POSTWRITE to POSTREAD.

No guarantee that all busdma is usage is perfect, but this change (in
addition to scott's last two commits) makes if_bfe work with > 1GB of
memory in my laptop.
2006-04-28 05:27:27 +00:00
Maxim Sobolev
8dcfaef0a0 Add some incomplete support for Marvell Yukon EC controllers based on
OpenBSD changes. With these changes, PHY part of the driver becomes
functional (it senses media changes and negotiates speed just fine),
previously it just hang with no PHY message, but no data goes through
interface (error message is "can not stop transfer of Tx/Rx descriptor).

Hopefully somebody with more clue/free time will be able to pick up
after me.
2006-04-28 03:17:37 +00:00
Scott Long
a6456c02ba The alignment parameter to busdma must be a power of two, while the if_bfe
driver was trying to use an arbitrary rx/tx ring size of the value.  Change
to using unrestricted values for alignment and boundary instead.
2006-04-27 23:03:00 +00:00
Max Laier
c10b140011 MFp4: reworked iwi-driver
Changelog towards if_iwi.c 1.26 (some changes have been committed separately
in the mean time):

- add led support
- add firmware loading on demand
 - auto-restart firmware when it crashes
 - serialize operations sent to the firmware to reduce firmware crashes
- add power save operation support
 - remove incorrect specification of tx power control capability
- add radio on/off switch support

- improve net80211 state machine operation
 - recognize and handle beacon miss
 - handle authentication and association failures better
 - add shared key authentication
 - fix ibss mode (many changes)
 - fix wme (many changes)
- correct radiotap support (many changes)
- correct bus dma setup of s/g
- correct various locking issues
- fix monitor mode
- fix scanning (many changes)
 - recover from wedged scan requests
 - respect active channel list
- eliminate cases where interface was marked down on error
- don't treat parity errors as fatal
- reclaim mgt frames immediately from tx queue
- correct interrupt handling, ack early (from NetBSD)
- fix short/long preamble handling

Committed with RELENG_6 compat #if's, should compile in RELENG_6.  Requires
net/iwi-firmware-kmod to function.

Much work done by:	sam
Tested by:		many (freebsd-net), ume, luigi
MFC after:		4 weeks
2006-04-27 21:43:37 +00:00
Warner Losh
c171ec35b6 When pccard_safe_quote is passed NULL for src, it shouldn't panic.
Someone sent me this a while ago, but I can't find who to give them
proper credit...
2006-04-27 20:47:13 +00:00
Scott Long
9bcb275009 Add the 'rr232x' driver for the HighPoint RocketRAID 2320 series of cards.
This driver was generously developed and donated by Highpoint.

It is enabled for i386 only at the moment.  I will enable it for amd64
shortly.

Obtained from: HighPoint Technologies, Inc.
2006-04-27 20:22:46 +00:00
Warner Losh
f4d167bdda Don't use ", but instead use ' instead. I suppose I could have also
used \".  When compiling with USB_VERBOSE, this causes syntax issues.

Noticed by:  Hans Petter Selasky
2006-04-27 17:33:25 +00:00
Marcel Moolenaar
ab2b8832cb o Add 5 Timedia single port serial cards.
o  While here, break long lines.
2006-04-27 17:08:30 +00:00
Scott Long
9171a12bcd Fix problem with having more than 1GM of RAM. Also fix a nearby busdma
problem.

Submitted by: silby
2006-04-27 14:02:58 +00:00
Pyun YongHyeon
919133a8ef Bring busdmafied sk(4) to all architectures.
- MPSAFE. No more recursive lock required.
- bus_dma(9) conversion. I think it should work on all architectures.
- optimized Rx handler for each normal and jumbo frames. Previously
  sk(4) used jumbo frame management code to handle normal sized
  frames. As the handler needs an additional lock to protect jumbo
  frame management structure from races, it used two lock operations
  for each received packet. Now sk(4) uses single lock operation for
  normal frame.(Jumbo frame still needs two lock operations as before.)
  The hardware supports DMA scatter operations for Rx descriptors such
  that it's possible to take advantagee of m_cljget(9) for jumbo frames.
  However, due to a unknown reasons it resulted in poor performance on
  sparc64. So I dropped m_cljget(9) approach. This should be revisited
  since it would reduce one lock operation for jumbo frame handling.
- Tx TCP/Rx IP checksum offload support. According to the data sheet
  of SK-NET GENESIS the hardware supports Rx IP/TCP/UDP offload.
  But I couldn't make it work on my Yukon hardware. So Rx TCP/UDP was
  disabled at the moment. It seems that newer Yukon chips can support
  Tx UDP checksum offload too. But I need more documentation first.
- Added more wait time in reading VPD data. It seems that ASUS LOM
  takes a very long time to respond VPD read signal.
- Added an additional lock for MII register access callbacks.
- Added more strict received packet validation routine. Previously it
  passed corrupted packets to upper layers under certain conditions.
- A new function sk_yukon_tick() to handle auto-negotiation properly.
- Interrupt handler now checks shared interrupt source and protects
  the interrupt handler from NULL pointer dereference which was caused
  by odd status word value. The status word can returns 0xffffffff if
  cable is unplugged while Rx/Tx/auto-negotiation is in progress.
- suspend/resume support(not tested).
- Added Rx/Tx FIFO flush routine for Yukon
- Activate Tx descriptor poll timer in order to protect possible loss
  of SK_TXBMU_TX_START command. Previously the driver continuously issued
  SK_TXBMU_TX_START when it notices pending Tx descriptors not processed
  yet in interrupt handler. That approach would add additional PCI
  write access overhead under high Tx load situations and it might fail
  if the first SK_TXBMU_TX_START was lost and no interrupt is generated
  from the first SK_TXBMU_TX_START command.
- s/printf/if_printf/, s/printf/device_printf/, Axe sk_unit in softc.
- Setting multicast/station address is now safe on strict-alignment
  architectures.
- Fix long standing bug in VLAN header length setup.
- Added/corrected register definitions for Yukon.
  (Register information from Linux skge driver.)
- Added Rx status definition for Marvell Yukon/XaQti XMAC.
  (Rx status register information from Linux skge driver.)
- Update if_oerrors if we encounter watchdog error.
- callout(9) conversion

Special thanks to jkim who let me know RX status differences between
Yukon and XaQti XMAC.
It seems that there is still occasional watchdog timeout error but I
couldn't reproduce it and need more information to analyze it from
users.

Tested by:	bz(amd64), me(i386, sparc64), current ML
		Frank Behrens frank ! pinky ( sax $ de
2006-04-27 05:59:09 +00:00
Marcel Moolenaar
d902fb71da Use 115200 and not 9600 as the initial baudrate. This speeds up
detection of the FIFO size. Especially for large FIFOs.
2006-04-27 05:43:10 +00:00
Marcel Moolenaar
d95bd0c34a The size of I/O ranges can be anything from 16 bytes to 2G bytes.
Lower the minimum for memory mapped I/O from 32 bytes to 16 bytes.
This fixes bus enumeration on ia64 now that the Diva auxiliary
serial port is attached to.
2006-04-27 04:53:18 +00:00
Pyun YongHyeon
b16affc0ac Correct DRIVER_MODULE declaration.
skc does attach to pci bus instead of sk.

Submitted by:	jmg
2006-04-27 04:39:58 +00:00
Marcel Moolenaar
51841e9df9 o Add 2 HP Diva single port UARTs. 2006-04-27 03:17:39 +00:00
Pyun YongHyeon
288292463f The sk(4) driver has moved to /sys/dev/sk 2006-04-27 00:14:02 +00:00
Marcel Moolenaar
24f9da031c o Add 2 NEC cards
o  Add 2 Dell cards
o  Add Quatech card
o  Add support for non-standard rclk values.
o  Update descriptions to match PCI id database.
2006-04-26 21:31:31 +00:00
Marcel Moolenaar
df5fea7cad o Use __FBSDID
o  Whitespace fixes
o  Non-K&R functions
2006-04-26 21:25:13 +00:00
Paul Saab
262af1c828 Only use the low address for stats collection. 2006-04-26 16:33:58 +00:00
Sam Leffler
ae2734b68c intercept public safety channels and do explicit mapping of freq->ieee
channel number since we're not ready at the net80211 layer to deal with them;
note this mapping has to match what's done in ieee80211_mhz2ieee

MFC after:	3 days
2006-04-26 16:02:36 +00:00
Maxim Sobolev
6621aa5cc7 Use the same method for detecting actual presence of AT-style keyboard
controller as we use in boot blocks (querying status register until
bit 1 goes off). If that doesn't happed during reasonable period assume
that the hardware doesn't have AT-style keyboard controller. This makes
FreeBSD working almost OOB on MacBook Pro (still there are issues with
putting second CPU core on-line, but since installation CD comes with
UP kernel with this change one should be able to install FreeBSD without
playing tricks with hints). Other legacy-free hardware (e.g. IBM NetVista
S40) should benefit from this as well, but since I don't have any I can't
verify.

It should make no difference on the ordinary i386 hardware (since in
that case that hardware already would be having an issues with A20
routines in boot blocks). I don't know much about AT-style keyboard
controller on other platforms (and don't have dedicated access to one),
therefore, the code is restricted to i386 for now. I suspect that amd64
may need this as well, but I would rather leave this decision to someone
who knows better about the platform(s) in question.

I have tested this change on as many "ordinary i386 boxes" as I can get
my hands on, and it doesn't create any false negatives on hardware with
AT-style keyboard present.

MFC after:	1 month
2006-04-26 06:05:16 +00:00
Sam Leffler
df4d04af01 honor fixed tx antenna when sending beacon frames
Submitted by:	Michael Stevens (from netbsd)
MFC after:	1 week
2006-04-25 22:52:28 +00:00
John Baldwin
75231ae311 Fix half of the current i386 tinderbox failure. max_bus_addr should be a
bus_addr_t rather than a bus_size_t.
2006-04-25 19:18:48 +00:00
Matt Jacob
fe401a7a9a If one removes the option from conf/options, one should
remove the include of the derived file opt_bge.h as well.
2006-04-25 17:54:42 +00:00
Michael Reifenberger
c4529f4161 make BGE_FAKE_AUTONEG a tunable.
This allows one to change the behavior of the driver pre-boot.

NOTE: This patch was made for DragonFly BSD by Sepherosa Ziehau.

PR:		kern/94833
Submitted by:	Devon H. O'Dell
Obtained from:	DragonFly
MFC after:	1 month
2006-04-25 15:56:52 +00:00
Marcel Moolenaar
cea4d8752f o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
end for isa(4).
o  Add a seperate bus frontend for acpi(4) and allow ISA DMA for
   it when ISA is configured in the kernel. This allows acpi(4)
   attachments in non-ISA configurations, as is possible for ia64.
o  Add a seperate bus frontend for pci(4) and detect known single
   port parallel cards.
o  Merge PC98 specific changes under pc98/cbus into the MI driver.
   The changes are minor enough for conditional compilation and
   in this form invites better abstraction.
o  Have ppc(4) usabled on all platforms, now that ISA specifics
   are untangled enough.
2006-04-24 23:31:51 +00:00
Marcel Moolenaar
a4facdd68b Remove the sab(4) driver. It is superseded by scc(4). 2006-04-24 21:40:58 +00:00
Marcel Moolenaar
63f8efd314 MFp4: Calculate the divisor before setting the DLAB bit. This
prevents that there's a control flow that leaves the DLAB
	bit set.
2006-04-23 21:15:07 +00:00
Ariff Abdullah
ee8e8d867e Add support for (latest) VIA VT8251 (rev. 0x07) audio controller.
A slight difference of this chip from its previous siblings is that
it need a gentle "wake up" on every (full) DMA buffer completion to
avoid stalled interrupt handler.

Thanks to George Hartzell for permission on doing remote debugging.

Prime MFC candidate for 6.1-RELEASE. Please reply to this commit if
there are any objections  (so I won't bug re@),  since the  changes
are too small and only specific to VT8251.

PR:		i386/95949
Tested by:	[1] George Hartzel
          	myself (remotely)
MFC after:	3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-April/004003.html
2006-04-22 09:44:00 +00:00
Jung-uk Kim
1def0ca64d Free allocated environment variables after use.
Coverity ID:	366
Found by:	Coverity Prevent
2006-04-21 19:35:03 +00:00
Jung-uk Kim
2237f11344 Remove unnecessary assignment.
Coverity ID:	553
Found by:	Coverity Prevent
2006-04-21 19:06:29 +00:00
Matt Jacob
8c4e89e249 Redo some code based upon issues found by Coverity. 2006-04-21 18:46:35 +00:00
Matt Jacob
54302f8e50 Change some order of the way we do some target mode ops.
Found by Coverity.
2006-04-21 18:31:21 +00:00
Matt Jacob
9cd7268e5a Some more gratuitous format and name changes.
Pull in some target mode changes from a private branch.
Pull in some more RELENG_4 compilation changes.

A lot of lines changed, but not much content change yet.
2006-04-21 18:30:01 +00:00
Warner Losh
c3f861f491 Set the rid for the resoruce obtained from rman_reserve_resource. 2006-04-20 04:21:27 +00:00
Paul Saab
c1885ab8c5 Free another memory leak when dealing with disk notification. 2006-04-20 03:05:02 +00:00
Matt Jacob
4f9f0449c6 Remove debounce code in mpt_intr. After some reflection
and watching a debounce followed by a timeout, I think
I'm forced to conclude that it was not a good idea.
2006-04-19 21:17:33 +00:00
Paul Saab
ee626b40c0 Free some previously leaked memory on module unload. 2006-04-19 19:56:10 +00:00