Commit Graph

15060 Commits

Author SHA1 Message Date
Pyun YongHyeon
fa799a4e7e Honor IFF_DRV_OACTIVE in em_start_locked(). 2006-07-20 03:57:58 +00:00
John Baldwin
9c2dc11465 Whitespace fix after s/dev_t/struct cdev */. 2006-07-19 18:52:33 +00:00
John Baldwin
a02f5c6204 Initialize svr4_head during MOD_LOAD rather than on demand. 2006-07-19 18:26:09 +00:00
Pyun YongHyeon
4425fc9453 Convert sk(4) to use the new bus_alloc_resources() API and
bus_{read,write}_* macros.

Submitted by:	Antoine Brodin <antoine.brodin AT laposte DOT net>
Reviewed by:	imp (initial version)
2006-07-19 04:12:59 +00:00
John Baldwin
0c6d6356ba Remove unnecessary locking for td_dupfd (it requires no locks). 2006-07-18 22:31:33 +00:00
Andrew Gallatin
4da0d523f9 Firmware loading improvements:
- Copy ethernet firmware down in small chunks so as to avoid bugs
  in early versions of the bootstrap firmware.
- Attempt to "adopt" the running firmware if we cannot load a suitable
  firmware image via firmware(9).
- Separate firmware validation into its own routine, and check the
  major/minor driver/firmware ABI version.
2006-07-17 22:17:05 +00:00
Olivier Houchard
4e9e16ed7e Fix comments. 2006-07-17 21:18:03 +00:00
John Baldwin
44daafbccc Chain the bus_dmamap_load() calls when mapping a command with a data CCB
instead of doing the first load with the BUS_DMA_NOWAIT flag.  On 4.x with
PAE and > 4gb of RAM this proved disastrous if there weren't enough bounce
pages as amr_mapcmd() would return failure but the callback would later
fire once enough bounce pages were available and would then overwrite
another command's S/G list.

MFC after:	3 days
Submitted by:	scottl (4.x version)
Reviewed by:	scottl (port from 4.x to HEAD)
2006-07-17 19:45:47 +00:00
Alexander Leidinger
d55d96f617 Rename some variables. This fixes some (but not all) problems on the way
for WARNS > 2 cleanlyness.

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-07-17 17:43:06 +00:00
Alexander Leidinger
4002c39216 Prepend temporary sysctls with an underscore.
Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-07-17 17:28:44 +00:00
Warner Losh
aab9226995 Restore the status quo before my last commit. Prior to it, sio took
precedence uart.  With my last change, it became a tie, and uart seems
to always win on my amd64.  This was not my intention, so have sio be
just a tiny bit more preferred than uart.

Note: I'm not making any judgement on the merits of uart winning.  I'm
just saying that if we want to change it, we do it on purpose.
2006-07-17 03:47:18 +00:00
Matt Jacob
799881e094 Some rearrangement of headers to minimize diffs with outside of
FreeBSD repository and to clean up the license header so as to
not pollute the license with file function.

Zero all mailbox structures prior to use (just in case). Change
the outgoing mailbox count for INIT_FIRMWARE to be correct.
2006-07-16 20:11:50 +00:00
Alexander Leidinger
ca23ff1987 Fix a compile time problem on amd64. I'm not sure if the fix is correct
from a semantic point of view, but I notified the author of the driver
for confirmation. So far it at least fixes the build and should only
lead to not identifying or wrongly identifying a soundcard in the worst
case.
2006-07-16 20:10:08 +00:00
Matt Jacob
970043d7cd Add sysctl information about things like WWNN/WWPN.
MFC after:	2 weeks
2006-07-16 06:05:44 +00:00
Matt Jacob
6621d786eb If we're in mpt_wait_req and the command times out,
mark it as timed out. Don't try and free the config
request for read_cfg_header that times out because
it's still active. Put in code for the config reply
handler that will then free up timed out requests.

Fix the FC_PRIMITIVE_SEND completion to not try
and free a command twice. Dunno how this possibly
could have been working for awhile.

MFC after:	2 weeks
2006-07-16 03:34:55 +00:00
Matt Jacob
784880db25 Define out unused and incomplete raid quiesce functions.
The code never could be called, so we might as well not
compile it for now.
2006-07-16 03:31:01 +00:00
Matt Jacob
73651fd1ef If the card has target mode enabled, and we hang
out ELS buffers but *don't* hang out commands,
we hang folks on the SAN because the LSI-Logic
f/w apparently sends back BUSY or QFULL or some
darn thing.

If we add command buffers, we have to respond to
them sensibly even if we don't have any upstream
listeners (scsi_targ or scsi_targ_bh), so put in
some local command reponse stuff.

MFC after:	2 weeks
2006-07-15 22:58:09 +00:00
Alexander Leidinger
0fa7ab6a31 - Connect the snd_emu10kx driver to the build. [1]
- Bump __FreeBSD_version, no need to build the port now.

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> [1]
2006-07-15 20:22:40 +00:00
Alexander Leidinger
d66551806b Make the mixer kobj class static. This brings it inline with the channel or
ac97 classes.

Tested with:	es137x based sound hardware
2006-07-15 20:11:16 +00:00
Alexander Leidinger
75d7240e18 Make the MIDI kobj class static. This brings it inline with the channel or
ac97 classes.

This allows to link emu10k1 and emu10kx into the same kernel (LINT).
2006-07-15 20:08:32 +00:00
Alexander Leidinger
d056fa046c Add snd_emu10kx driver for Creative SoundBlaster Live! and Audigy series
sound cards with optional pseudo-multichannel playback.

It's based on snd_emu10k1 sound driver. Single channel version is available
from audio/emu10kx port since some time.

The two new ALSA header files (GPLed), which contain Audigy 2 ("p16v") and
Audigy 2 Value ("p17v") specific interfaces, are latest versions from ALSA
Mercurial repository.

This is not connected to the build yet.

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-07-15 19:36:28 +00:00
Alexander Leidinger
53f4fb1109 - Update ALSA emu10k1.h (it was imported as emu10k1-alsa.h) header file to
latest version from Mercurial repository. It brings definition of some
  additional Audigy 2 / Audigy 2 Value registers.
- Use new #defines from ALSA emu10k1.h
- Remove unused include files:
  + emu10k1-ac97.h was imported from ALSA and never used,
  + emu10k1.h was imported from Creative Linux emu10k1 driver, but only
    AUDIGY_CODEBASE was used from it.

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2006-07-15 19:19:54 +00:00
Bruno Ducrot
2880646d24 Eliminate duplicate p-states entries
Reported and tested by:	ales dot rom at kabelnet dot net
Reviewed by:	njl
Approved by:	njl, imp (mentor)
MFC after:	3 days
2006-07-15 17:34:03 +00:00
Brooks Davis
e9a404fffd Cleanup: Use if_initname to set if_dname, if_dunit, and if_xname instead
of doing it by hand.
2006-07-15 02:07:38 +00:00
Warner Losh
d7fac9732b Allow iic bridges to support a generalized transfer, rather than
forcing all transfers to do the start read/write stop by hand.  Some
smart bridges prefer this sort of operation, and this allows us to
support their features more easily.  When bridges don't support it, we
fall back to using the old-style opertaions.  Expand the ioctl
interface to expose this function.  Unlike the old-style interface,
this interface is thread safe, even on old bridges.
2006-07-14 23:15:06 +00:00
Warner Losh
9a795dfa02 MFp4:
Initial spibus support.  Seems to be OK, but needs some polish.

	# someone should write a bit-bang spi parallel port interface :-)
2006-07-14 22:47:07 +00:00
Xin LI
cf82f20057 Unlock aac_io_lock before returning, thus eliminates a mutex
leak.

Submitted by:	Beyond Luo <fedora ercist iscas ac cn>
PR:		kern/100046
Reviewed by:	scottl
2006-07-14 13:55:56 +00:00
Matt Jacob
a887f1a657 Don't attach 2422's yet. It just confuses everyone. 2006-07-14 05:16:00 +00:00
Matt Jacob
ddf6c7dadd Add some missing braces.
Add MEMORY_BARRIER for the few scratch dma ops that were missing
them plus add a couple of hi 32 bit dma ops (we could probably
allow 64 bit scratch and request/response queue dma now).
2006-07-14 05:14:48 +00:00
Warner Losh
7ba3492e4a Fix a few cis entries that were separated with spaces, not with commas.
This caused drivers for the cards they matched to not probe.
2006-07-14 04:39:29 +00:00
Warner Losh
de7e7f76b4 no need to print unload anymore 2006-07-14 04:36:57 +00:00
Warner Losh
2e30bd12d7 no need to print unload anymore. 2006-07-14 04:35:59 +00:00
Michael Reifenberger
42936f9334 Now even more style(9)ish.
Submitted by:	pjd
2006-07-13 11:47:36 +00:00
Michael Reifenberger
4fd58e10b2 Use the already stored VIA RNG probe information
instead of probing again.
Adjust style(9) somewhat in probe.c

Reviewed by:	pjd
MFC after:	1 week
2006-07-13 09:15:14 +00:00
Doug Ambrisko
4b14416350 Fix ifconfig up when the HW was down. If the driver isn't running
then we need to call init otherwise just start the rx.

Interestingly dhclient seemed to work but ifconfig <IP> didn't
for me.

Reviewed by:	jhb
2006-07-12 23:13:09 +00:00
John Baldwin
19e9205a23 Simplify the pager support in DDB. Allowing different db commands to
install custom pager functions didn't actually happen in practice (they
all just used the simple pager and passed in a local quit pointer).  So,
just hardcode the simple pager as the only pager and make it set a global
db_pager_quit flag that db commands can check when the user hits 'q' (or a
suitable variant) at the pager prompt.  Also, now that it's easy to do so,
enable paging by default for all ddb commands.  Any command that wishes to
honor the quit flag can do so by checking db_pager_quit.  Note that the
pager can also be effectively disabled by setting $lines to 0.

Other fixes:
- 'show idt' on i386 and pc98 now actually checks the quit flag and
  terminates early.
- 'show intr' now actually checks the quit flag and terminates early.
2006-07-12 21:22:44 +00:00
Michael Reifenberger
243d8ac855 Use the already stored VIA RNG probe information
instead of probing again.

MFC after:	1 week
2006-07-12 20:29:11 +00:00
Matt Jacob
b4c618c099 Fix config page writes to not strip out the attributes when you
actually go write the config page. This fixes the long standing
problem about updating NVRAM on Fibre Channel cards and seems
so far to not break SPI config page writes.

Put back role setting into mpt. That is, you can set a desired role
for mpt as a hint. On the next reboot, it'll pick that up and redo
the NVRAM settings appropriately and warn you that this won't take
effect until the next reboot. This saves people the step of having
to find a BIOS utilities disk to set target and/or initiator role
for the MPT cards.
2006-07-12 07:48:50 +00:00
Nate Lawson
888965d6f9 Move debug printfs under the proper macro. 2006-07-12 06:29:59 +00:00
Jung-uk Kim
b31da03fd8 Assume floppy disk is not inserted when we have exhausted retries. This
significantly reduces booting time when there is broken floppy disk drive,
controller, cable, BIOS, etc.
When the floppy controller interface is correctly implemented, disk change
signal (DSKCHG) is reflected in the Digital Input Register (DIR) at 0x3f7.
However, there are many cases that the signal is unusable.  Moreover, some
BIOS does not reserve the port at all.  In those cases, the register may not
function.
2006-07-12 00:49:46 +00:00
Matt Jacob
99ece8d676 Put in some missing target mode for 2KLOGIN f/w spots.
MFC after:	1 month
2006-07-10 22:40:21 +00:00
Matt Jacob
02e2b2d961 Clean up the ioctl to not process nonsense on SCSI isp cards.
MFC after:	1 month
2006-07-10 22:39:32 +00:00
Matt Jacob
9a5af41076 Convert isp(4) and ispfw(4) to use firmware(9) to manage firmware
loading for the QLogic cards.

Because isp(4) exists before the root is mounted, it's not really
possible for us to use the kernel's linker to load modules directly
from disk- that's really too bad.

However, the this is still a net win in in that the firmware has
been split up on a per chip (and in some cases, functionality)
basis, so the amount of stuff loaded *can* be substantially less
than the 1.5MB of firmware images that ispfw now manages. That is,
each specific f/w set is now also built as a module. For example,
QLogic 2322 f/w is built as isp_2322.ko and Initiator/Target 1080
firmware is built as isp_1080_it.ko.

For compatibility purposes (i.e., to perturb folks the least), we
also still build all of the firmware as one ispfw.ko module.

This allows us to let 'ispfw_LOAD' keep on working in existing
loader.conf files. If you now want to strip this down to just
the firmware for your h/w, you can then change loader.conf to
load the f/w you specifically want.

We also still allow for ispfw to be statically built (e.g., for
PAE and sparc64).

Future changes will look at f/w unloading and also role switching
that then uses the kernel linker to load different ips f/w sets.
MFC after:	2 months
2006-07-09 17:50:20 +00:00
Mark Murray
67ef9ba623 Remove stale MAINTAINER
OK'd by: scottl
2006-07-09 16:31:53 +00:00
Jung-uk Kim
50d99d1a52 Enhanced floppy controllers have Data Rate Select Register (DSR) at 0x3f4.
Use it to reset controller and to select data rate.  According to Intel
80277AA datasheet, software reset behaves the same as DOR reset except
that it is self clearing.  National Semiconductor PC8477B datasheet says
the same.  As a side effect, we no longer use Configuration Control
Register (CCR) at 0x3f7 for these controllers, which is often missing
in modern hardware.
2006-07-06 21:12:18 +00:00
Pyun YongHyeon
8d934d5005 Fix a missing unlock operation in interrupt handler.
PR:		kern/99205
Submitted by:	Alexey Illarionov <littlesavage AT rambler DOT ru>
MFC after:	1 week
2006-07-06 10:39:58 +00:00
Pyun YongHyeon
a1e4f25700 Fix typo in comment.
Submitted by:	brad AT OpenBSD DOT org
2006-07-05 04:56:50 +00:00
Andrew Thompson
3bdf75a5ca Change the multicast calculation to be the same as the other usb drivers and
avoid calling into the usb code with the lock held. This doenst fix the
fundamental usb sleeping problem but at least the adapter can be used.
2006-07-05 00:49:26 +00:00
Søren Schmidt
891abbfa12 Add preliminary support for the Serverworks HT1000 chip.
HW sponsored by:	Yahoo!
2006-07-04 20:36:03 +00:00
Jung-uk Kim
100656ed4e Make sure command/data port (0x60) and status port (0x64) are in correct
order.  Some brain-damaged ACPI BIOS has reversed resources.
2006-07-03 23:40:58 +00:00