Commit Graph

14961 Commits

Author SHA1 Message Date
Alexander Leidinger
ce356b7017 - fix compatibility with newer versions of FreeBSD
- fix all warnings during compilation
- fix obvious bugs
- add support for more cards

Now supported:
 - M-Audio Delta Dio 2496
 - M-Audio Audiophile 2496
 - Terratec DMX 6fire

Known bugs (detected by Nokolas and Stefan):
 - $ kldunload snd_ak452x.ko
   Warning: memory type ak452x leaked memory on destroy (1 allocations,
   64 bytes leaked).
 - No sound in KDE: Everything works fine at the console but when I load KDE
   (3.5.3) the sound stutters and plays at less then 1/2 speed.
 - 'mixer: WRITE_MIXER: Device not configured' The message repeats x
   times at system startup, x = whatever hw.snd.maxautovchans is set to.
   (this is because only vol, pcm and line are supported, but the driver
   shows more than those mixer devices and setting those additional mixers
   results in this error message)
 - vchans don't work
 - 24 bit playback not supported (only 16/32 bit)
 - after kld(un)loading some times, the card fails to be probed until reboot

Datasheets are available from:
	http://www.nbritton.org/uploads/envy24/
	http://www.asahi-kasei.co.jp/akm/en/product/ak4528/ak4528_f01e.pdf
	http://www.asahi-kasei.co.jp/akm/en/product/ak4528/ekd4528-01.pdf
	http://www.asahi-kasei.co.jp/akm/en/product/ak4524/ak4524_f03e.pdf
	http://www.asahi-kasei.co.jp/akm/en/product/ak4524/ekd4524.pdf
	http://www.wolfson.co.uk/uploads/documents/en/WM8728.pdf
	http://www.richtech.co.kr/down/richtek/RT9131.pdf
	http://xkodi.svobodno.com/xkodi/space71.html
	http://people.freebsd.org/~lofi/envy24.pdf
	http://people.freebsd.org/~lofi/4524.pdf

Submitted by:	Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Tested by:	Nikolas Britton <nikolas.britton@gmail.com>
		Stefan Ehmann <shoesoft@gmx.net>
2006-06-17 15:11:36 +00:00
Alexander Leidinger
12ab72d345 dd the envy24 driver as is to the tree. It's not connected to the build
yet. More commits to follow.

I got no response from the author, but since the driver is BSD licensed
I don't think he will complain. :-)

I got it from http://people.freebsd.org/~lofi/envy24.tar.gz

Written by:	Katsurajima Naoto <raven@katsurajima.seya.yokohama.jp>
2006-06-17 14:36:44 +00:00
Alexander Leidinger
f42d246896 Remove the snd_es1888 module now that it isn't build anymore.
Noticed by:	Neil Short <neshort@yahoo.com>
2006-06-17 09:38:08 +00:00
Gleb Smirnoff
4c0da0ff4f Possess some work from OpenBSD, with some local additions.
- Add more device IDs, ASIC revisions and chip IDs.
- Rewrite a bit code that picks the description for device.
- Introduce several macros to shorten quirks for bugs and
  features.[*]
- Use some magic values, that OpenBSD has successfully
  possessed from Linux (Broadcom supplied) driver.
- Remove disabled code that tried to access VPD.

[*] The macro that matches Jumbo capable NICs is
    rewritten to preserve our current behavior. I
    need clarify whether our or theirs is correct.

PR:		68351 (and may be others)
Obtained from:	OpenBSD, brad@ mostly
2006-06-15 14:31:49 +00:00
Andrew Gallatin
6d914a32ff Much to my surprise, IFQ_DRV_DEQUEUE() can return a null mbuf even if
!IFQ_DRV_IS_EMPTY().  Taking this into account,  I re-structured the
transmit routine so as to avoid adding another if/then in the
critical path.

Thanks to brueffer for showing my how to test with altq/pf.
2006-06-14 19:32:00 +00:00
Andrew Gallatin
76bb9c5edb Replace a sc->ifp->if_snd.ifq_drv_maxlen with IFQ_SET_MAXLEN(),
and call IFQ_SET_READY().

Submitted by: brueffer
2006-06-14 17:52:30 +00:00
Andrew Gallatin
89d098f8dd Remove the initial myri10ge driver, now that it has been
renamed mxge.
2006-06-14 17:07:21 +00:00
Andrew Gallatin
5e7d85418b Update the mxge driver.
- Update the firmware to the latest released firmware
  (1.4.3), which corresponds to the firmware in the
  latest shipping drivers from Myricom.  This firmware
  fixes several bugs in the firmware's PCI-e implementation,
  and it also changes the driver/firmware interface:

  o TSO was added, and changed the format of the transmit
    descriptors.
  o The firmware no longer counts transmits descriptors,
    but frames.  So the driver needs to keep a count
    of the number of frames sent.
  o The weird interrupt strategy changed to a normal receive
    return ring.  This ring is much bigger, and we may be
    able to support DEVICE_POLLING.
  o Myricom's header files changed the name of firmware
    related #define's and enums (s/_MCP_/FW_).

- Stopped spamming the console with lots of printfs unless
  mxge_verbose (or bootverbose) is set.

- Made additional information available via sysctl, including
  the results of a PCI-e DMA benchmark run at device reset.

- Decreased the excessively long timeouts when sending commands
  from 2 seconds to 20ms.

Sponsored by: Myricom Inc.
2006-06-14 16:23:17 +00:00
Doug Ambrisko
c3a252361a Fix missing \n and when there are no arg's that means just print out
the description so we don't have to do any more queries.  Disable the
event query code until it figured out since but it is similar to the
AEN detail so we should be able to get that working.
2006-06-13 14:27:52 +00:00
Andrew Gallatin
6d87a65da4 - Complete the myri10ge -> mxge name change by doing a mechanical
s/myri10ge/mxge/g replacement in the myri10ge files.  A few contuation
  lines were joined because of the regained columns.
- Hook the mxge driver back to the build.
2006-06-13 13:53:52 +00:00
Warner Losh
ed0b0e826e Need machine/bus.h here too 2006-06-12 19:22:44 +00:00
Nate Lawson
4c452688a9 Check in file missed in last commit. It made it into the MFC properly
though.
2006-06-12 17:13:57 +00:00
Warner Losh
f58c578b36 MFp4: need machine/bus.h here since we use bus space macros. It used to
be brought in by name-space polluted sys/rman.h.

Pointy hat to: imp
2006-06-12 14:46:44 +00:00
Warner Losh
4710853aac MFp4:
o Implement a bunch of sysctl's to report the information
	  that's now always reported.  Mvoe reporting of that info
	  to bootverbose, but maybe it can go away entirely.
	  	dev.ed.X.type: string name
	  	dev.ed.X.TxMem: amount of memory used for tx side of the card
	  	dev.ed.X.RxMem: amount of memory used for rx side of the card
		dev.ed.X.Mem: Total amount of mem on card.
	o Better comments about where NE-2000 (and clones) gets their MAC
	  address from.
2006-06-12 04:30:42 +00:00
Warner Losh
d47f76464a Better printf 2006-06-12 04:00:33 +00:00
Warner Losh
1acd1e20a1 Minor cleanup of CIS parsing. 2006-06-12 03:28:42 +00:00
Warner Losh
9dfcc6624c Better error message when the CIS is a non-standards conforming '0'. 2006-06-12 03:20:44 +00:00
Warner Losh
a63eba960f When we can't parse the CIS, note with a warning that the bogus CIS
was ignored, rather than freaking out.  In the past, it wasn't possible
to not parse the CIS, so this changes no behavior.
2006-06-12 03:17:24 +00:00
Max Khon
5349526518 Make cm(4) driver MPSAFE. 2006-06-11 22:25:01 +00:00
Nate Lawson
d85e6785c5 By default, don't disable ACPI during reboot. This appears to hang some
systems.  Introduce a new sysctl "hw.acpi.disable_on_reboot" that allows
users to re-enable the old behavior in case it's needed for some systems.
We never disable in the power-off path.

Original approach submitted by Alexander Logvinov <abuse@akavia.ru> with
reworking by Jung-uk Kim and myself.
2006-06-11 20:31:41 +00:00
Matt Jacob
5b405b07b2 Add PCI ids for the FC919X
MFC after:	1 week
2006-06-10 23:45:31 +00:00
Ian Dowse
cbe2bd55ad Hold on to firmware images until the interface detaches since
firmware_get() will not work while resuming. Note that we can't
simply drop the FIRMWARE_UNLOAD flag, because that will result in
a firmware image that can never be unloaded by the user since the
firmware subsystem will hold a linker reference to it (it's not
clear that firmware_put() without FIRMWARE_UNLOAD ever does quite
what you'd want).
2006-06-10 17:29:40 +00:00
Nate Lawson
197b4dcc64 Minor sysctl cleanup. The RW flag means read|write and so it is redundant
to add the RD flag.  Also, the debug node does not need to be writable.
2006-06-10 08:04:38 +00:00
Jung-uk Kim
672e707a61 Add ability to reset individual devices and fix SCSI speed negotiation.
Reviewed by:	mjacob (initial version)
2006-06-09 23:11:43 +00:00
David Christensen
e6c54ad9d7 Log:
- Removed updates to if_ibytes, if_obytes, if_imcasts, and if_omcasts.
  These should not be handled by the driver.
- Add code to handle excessively fragmented mbufs when mapping TX frames.

Reviewed by:	ps
Approved by:	ps (mentor)
MFC after:	1 week
2006-06-08 18:31:21 +00:00
Gleb Smirnoff
953c72a48f Whitespace. 2006-06-08 10:19:16 +00:00
Gleb Smirnoff
a6c2137176 u_intXX -> uintXX 2006-06-08 09:35:02 +00:00
Gleb Smirnoff
177625694d Fix the last commit.
Submitted by:	jhb
Pointy hat to:	glebius
2006-06-08 08:15:21 +00:00
Gleb Smirnoff
3f74909a86 - style(9) cleanup.
- Fix comments and printf()s about allocating jumbo buffers.
2006-06-07 21:03:20 +00:00
Sam Leffler
465c8d6787 bandaid type coercion for ia64
Submitted by:	marcel
2006-06-07 20:37:14 +00:00
Gleb Smirnoff
f67dea8260 Add device IDs for Linksys PCMPC200 Cardbus card.
PR:		kern/75582
Submitted by:	Gary Palmer
2006-06-07 12:26:23 +00:00
Pyun YongHyeon
ad25ff2b43 Fix watchdog timeout errors seen on a few systems.
SK-NET GENESIS document says reading SK_ISSR should stop generating
further interrupts(Since we drop a driver lock before invoking
ifp->if_input handler we should disable interrupts in ISR in order
to protect integrity of softc from subsequent interrupts). But it
seems that there is possibility of loosing interrupts between
reading SK_ISSR and determining which interrupts are reported.
To cope with the situation we continuously read SK_ISSR register
until there are no interrupts. However, it seems that the above
work around doesn't fix all cases. To protect watchdog handler
from triggering false alarm add a work around code which try to
reclaim pending Tx descriptors before resetting hardware. This
should fix occasional watchdog timeout errors seen on this driver.

Reported by:	Frank Behrens <frank AT pinky dot sax dot de >
Tested by:	Frank Behrens <frank AT pinky dot sax dot de >
2006-06-07 09:05:20 +00:00
Yoshihiro Takahashi
d6da5e88de Use the acpi_event_sleep_button_sleep() function instead of
the acpi_SetSleepState().

Submitted by:	njl
2006-06-06 15:20:06 +00:00
Pawel Jakub Dawidek
7a61da9984 Handle errors in the same way it is done in safe(4). 2006-06-06 13:58:12 +00:00
Pawel Jakub Dawidek
e8e715f669 Don't increase hst_obytes field twice - it is already done at the begining
of the function.
It was wrong anyway, because we also support uio's structures, not only
mbufs.
2006-06-06 13:32:26 +00:00
Gleb Smirnoff
9297f2a72e The procedure of raceless switching between polling mode and
taskqueued interrupt mode is going to be quite complex. Since
the polling mode is considered legacy feature for em(4) driver,
the decision is made to make polling and new interrupt handler
mutually exclusive, selected at compile time.

If kernel is compiled with DEVICE_POLLING, the fast taskqueued
interrupt handler code is disabled and the em_poll() and legacy
em_intr() functions are enabled. Otherwise, legacy functions
are disabled and only em_intr_fast() code is compiled.

Discussed with:		scottl
2006-06-06 08:03:49 +00:00
Tai-hwa Liang
334ee2771b Really fix the typo this time: it should be sc->sc_drvbpf to be verified,
not ic->ic_drvbpf.
2006-06-05 23:06:03 +00:00
Tai-hwa Liang
edc428baef Fixing a typo in rev1.196. 2006-06-05 22:59:14 +00:00
Matt Jacob
fcd9a16b1f Do some source && comment cleanup.
Clean out the abortive start to homegrown, per-mpt,
Domain Validation. This should really be done at a
higher level.

Use the PIM_SEQSCAN flag for U320- this seems to correct
cases of being unable to consistently negotiate U320 in
the cases where I'd seen this before.

Between this and other recent checkins, this driver is
pretty close to being ready for MFC.

Reviewed by:	scottl, ken, scsi@
MFC after:	1 week
2006-06-05 22:25:49 +00:00
Max Khon
3da2dc0763 Fix kernel panic in rt2661_tx_intr() if no frames has been sent.
Obtained from:	OpenBSD (sys/dev/ic/rt2661.c rev. 1.15)
2006-06-05 20:06:29 +00:00
Christian Brueffer
9522f75aea Add altq(4) support.
Reviewed by:	mlaier
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2006-06-05 17:59:46 +00:00
Sam Leffler
f9fc583f17 move hal bus+tag externalization to the bus glue code where it belongs;
this is a noop on all current freebsd architectures

MFC after:	1 month
2006-06-05 17:51:20 +00:00
Marius Strobl
3a225e0b62 Revert the part of rev. 1.3 which changed the software style to be
set to ILACC rather than PCnet-PCI as VMware doesn't implement ILACC
compatibility, resulting in the VMware virtual machine to crash if
enabled. Add a comment regarding usage of ILACC vs. PCnet-PCI mode.

Reported and tested by:	gnn, wsalamon
2006-06-05 15:14:14 +00:00
Ian Dowse
c62502d1f6 Fix a number of cases where ugen would panic, especially when the
device went away while open or if you tried to change the config
number while devices were open. Based on the patch from the PR with
a number of changes as discussed with the submitter.

PR:		usb/97271
Submitted by:	Anish Mistry
2006-06-05 14:44:39 +00:00
Yoshihiro Takahashi
14ecccda0e Add Fn+F7 hotkey (suspend) support.
Tested by:	nork
2006-06-05 11:55:20 +00:00
Pawel Jakub Dawidek
f34a967b01 Use newly added functions to simplify the code. 2006-06-04 22:17:25 +00:00
Pawel Jakub Dawidek
1dc8d404ae Use defines from cryptodev.h. 2006-06-04 15:00:52 +00:00
Pawel Jakub Dawidek
082a4bab02 - Remove HMAC_BLOCK_LEN, it serves no purpose.
- Use defines of used algorithm instead of HMAC_BLOCK_LEN.
2006-06-04 14:49:34 +00:00
Ian Dowse
a48ddf5b85 Add a sleep lock that protects access to sequences of blocking
axe_cmd() calls. Without this the device can get confused if multiple
threads attempt these operations concurrently. The problem was
easily reproducible by running "ifconfig axe0" in a loop because
eventually it would conflict with axe_tick_task().

A similar approach is probably required in all USB ethernet drivers.
2006-06-04 14:42:38 +00:00
Pawel Jakub Dawidek
9a2f606177 Add support for the CRD_F_KEY_EXPLICIT flag for both encryption and
authentication operations.

Unfortunately I've no hardware, so I only compiled-tested it.
2006-06-04 14:14:35 +00:00