Commit Graph

17629 Commits

Author SHA1 Message Date
Sam Leffler
e6e547d57b Crypto api changes:
o don't use the key index to identify when the driver has been
  asked to allocate a key slot, use an explicit flag; allows
  drivers to force s/w fallback for entries in the global table
o change callback api to allocate driver resources for a crypto key:
  - de-const the key parameter so drivers can muck with the flags
  - on callback failure don't automatically try to setup s/w crypto;
    instead the driver must now mark the key entry for s/w crypto and
    the caller will re-attach the cipher module

NB: api change permits drivers more control over fallback to s/w
    crypto (e.g. based on a limited number of h/w key slots)
2008-09-21 23:16:19 +00:00
Sam Leffler
3627e32112 fix compilation on 64-bit platform w/ ATH_DEBUG 2008-09-21 00:30:33 +00:00
Sam Leffler
90dce2467e fix memory smash on lp64 platforms; mostly noticeable in user mode
as being unable to associate
2008-09-21 00:28:54 +00:00
Kip Macy
023d231918 Fix issue with tom loading by moving cxgb_log_tcb in to tom
MFC after:	3 days
2008-09-19 21:12:19 +00:00
Robert Noland
6be0323d97 pci_setup_intr() will only enable MSI/MSI-X for direct children. Add methods
to vga_pci.c to request on behalf of it's children.  This causes vgapci to show
up as the interrupt owner in vmstat -i, rather than the child device.

Approved by:	jhb(mentor)
2008-09-19 19:11:35 +00:00
Jung-uk Kim
d1dfacc2c8 Clean up DSDT and XSDT correctly instead of FADT when the tables are bad.
Submitted by:	jhb
Tested by:	olli
MFC after:	3 days
2008-09-19 15:25:13 +00:00
Ed Schouten
873da6a7fa Even though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.
kib@ and I have decided we will MFC the bpf(4)/snp(4) fixes after we've
released 7.1. Make sure the code in HEAD doesn't refer to a flag we
don't need anyway.

snp(4) in the MPSAFE TTY P4 branch already works, but still needs some
polishing before it can be integrated to SVN.
2008-09-19 10:21:30 +00:00
Kevin Lo
2024887d2f Add a vendor ID for 3G Green Green Globe Co., Ltd, found in
D-Link DPG-1200 remote control.
2008-09-19 09:04:06 +00:00
Weongyo Jeong
ed2d4b5f13 fix a another driver bug related with tsleep() during detaching that
this also can be happened if we pull the USN stick out forcibly.

Currently the ZyDAS driver uses tsleep() when it try to query a read
command to the device and it'd make a timeout if the device doesn't
response within about 1 sec.

In a case of that the USB stick is gone by hand and the driver's
scanning with changing the channel numbers, the thread which is sleeping
until a command requested is responded can be waked up after all
detaching routines finished that means the zyd softc already freed.
Tring to touch the softc freed by the wakeup thread makes a panic.

So make sure that all sleeping threads should be waken up before the
detach is completed and any other new requests to the device should be
prevented.
2008-09-19 07:40:30 +00:00
Weongyo Jeong
e6be242b0a clear pending callbacks when the driver try to change the state
Pointed by:	sam
2008-09-19 05:10:33 +00:00
Kip Macy
7c2bd2b9e2 Fix two panics:
1. panic: rtalloc1_fib: bad fibnum

2. panic: Lock tcpinp not exclusively locked
@ /usr/src/sys/netinet/in_pcb.c:1284

Submitted by:	Chelsio Inc.
MFC after:	3 days
2008-09-18 23:56:42 +00:00
Søren Schmidt
7aab7e054f Cleanup the AHCI code a bit.
Add suspend/resume for AHCI, general methods added.

Inspired by: Andrey V. Elsukov
2008-09-18 12:12:34 +00:00
Attilio Rao
cecd8edba5 Remove the suser(9) interface from the kernel. It has been replaced from
years by the priv_check(9) interface and just very few places are left.
Note that compatibility stub with older FreeBSD version
(all above the 8 limit though) are left in order to reduce diffs against
old versions. It is responsibility of the maintainers for any module, if
they think it is the case, to axe out such cases.

This patch breaks KPI so __FreeBSD_version will be bumped into a later
commit.

This patch needs to be credited 50-50 with rwatson@ as he found time to
explain me how the priv_check() works in detail and to review patches.

Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reviewed by:    rwatson
2008-09-17 15:49:44 +00:00
Alexander Motin
4d423c805b Hide some of driver's internal debugging.
Left only parts surely required for basic troubleshooting and configuration
purposes. There is still very long output, but further shrinking makes it
less informative.

Original debugging can be enabled with hw.snd.verbose=4.
2008-09-16 20:03:34 +00:00
John Baldwin
e7e2941b81 Allow child devices of vgapci(4) to query VPD strings and use MSI/MSI-X
interrupts.  For the MSI/MSI-X case, we only allow 1 child device to use
MSI or MSI-X at a time.

Tested by:	rnoland
2008-09-16 19:52:02 +00:00
Kip Macy
c5f0f48581 Further whitespace and copyright cleanups to minimize the
delta with RELENG_7.
2008-09-16 02:28:08 +00:00
Kip Macy
aa819acf89 White space cleanups to bring closer to RELENG_7 2008-09-16 02:03:28 +00:00
Kip Macy
af9b081c37 Remove some dead code along with gratuitous differences between HEAD and 7 2008-09-16 01:02:17 +00:00
Sam Leffler
39297ba455 Make ddb command registration dynamic so modules can extend
the command set (only so long as the module is present):
o add db_command_register and db_command_unregister to add and remove
  commands, respectively
o replace linker sets with SYSINIT's (and SYSUINIT's) that register
  commands
o expose 3 list heads: db_cmd_table, db_show_table, and db_show_all_table
  for registering top-level commands, show operands, and show all operands,
  respectively

While here also:
o sort command lists
o add DB_ALIAS, DB_SHOW_ALIAS, and DB_SHOW_ALL_ALIAS to add aliases
  for existing commands
o add "show all trace" as an alias for "show alltrace"
o add "show all locks" as an alias for "show alllocks"

Submitted by:	Guillaume Ballet <gballet@gmail.com> (original version)
Reviewed by:	jhb
MFC after:	1 month
2008-09-15 22:45:14 +00:00
John Baldwin
ca3d37955c Rework the handling of interrupt handlers for children of ppc and ppbus:
- Retire IVARs for passing IRQs around.  Instead, ppbus and ppc now allow
  child devices to access the interrupt by via a rid 0 IRQ resource
  using bus_alloc_resource_any().
- ppc creates its own interrupt event to manage the interrupt handlers of
  child devices.  ppc does not allow child devices to use filters.  It
  could allow this if needed, but none of the current drivers use them
  and it adds a good bit of complication.  It uses
  intr_event_execute_handlers() to fire the child device interrupt handlers
  from its threaded interrupt handler.
- Remove the ppbus_dummy_intr() hack.  Now the ppc device always has an
  interrupt handler registered and we no longer bounce all the way up to
  nexus to manage adding/removing ppbus child interrupt handlers.  Instead,
  the child handlers are added and removed to the private interrupt event
  in the ppc device.
2008-09-15 22:26:32 +00:00
Joseph Koshy
d0d0192f83 Correct a callchain capture bug on the i386.
On the i386 architecture, the processor only saves the current value
of `%esp' on stack if a privilege switch is necessary when entering
the interrupt handler.   Thus, `frame->tf_esp' is only valid for
an entry from user mode.  For interrupts taken in kernel mode, we
need to determine the top-of-stack for the interrupted kernel
procedure by adding the appropriate offset to the current frame
pointer.

Reported by:	kris, Fabien Thomas
Tested by:	Fabien Thomas <fabien.thomas at netasq dot com>
2008-09-15 06:47:52 +00:00
Alexander Motin
a6371849d1 Small addition to the previous commit. Sorry. 2008-09-14 17:40:53 +00:00
Alexander Motin
ac14b5ee5c Add some missing Realtek codec IDs. Just for reference.
Fix small typo in error message.
2008-09-14 17:37:34 +00:00
Takanori Watanabe
0c888aa9f7 Recover handsfree port support.(Almost all changes are done on previous commit).
Don't send serial line emulation request for OBEX port.
2008-09-14 16:49:51 +00:00
Andrew Thompson
441a61a08f Add a bunch of Novatel and Sierra 3G wireless product ids.
Obtained from:	Hobnob, Inc
2008-09-14 15:21:22 +00:00
Alexander Motin
c7edbd9d92 Remove one unneeded printf from non-verbose output.
Submitted by:	Artem Naluzhnyy
2008-09-14 15:10:53 +00:00
Alexander Motin
859159d164 My massive snd_hda driver update.
Because of using more clear and same time more functional codec parser
new driver is able to handle more codecs, use them better then before and
without most of previous quirks. All of tested codecs itself manage playback,
record, input mixing and monitoring quite fine. In all of investigated
trouble cases problem was found or in nonstandard codec usage or incorrect
codec configuration made by BIOS. Most of that cases could be fixed using
device hints, some of which are already included to the driver.

New driver supports multiple codecs per HDA bus, multiple audio function
groups per codec and multiple logical sound devices per audio function group.
So don't worry when you get several PCM devices instead of one, it is normal.
It is usual situation with powerful codecs to provide, for example, 3 PCM
devices: one for 7.1 playback and main recording, one for headset and one
for digital SPDIF I/O.

New driver implements Universal Audio Architecture (UAA) much better then
previous one. Most information about recommended codec usage now taken from
the codec configuration registers initialized by BIOS. User may alter that
configuration using device hints to reconfigure logical audio devices to
his needs in a very broad range up to the limits of the codec functionality.

New driver supports digital PCM playback and AC3 pass-through. I am not sure
about completeness of this implementation, but I have several success stories
including my own. Vchans subsystem does not support AC3 pass-through so it
had to be disabled for that devices at this moment.

New driver is ready for multichannel playback, but until our OSS is unable
to use this it will just duplicate same stereo stream into all channel
pairs.

New driver supports suspend/resume. I am unable to really test this part
myself, but I have got several success stories.

Driver has very informative verbose boot messages. So if you have any
questions or problems - enable and read them first.

Discussed on:	freebsd-multimedia@
Tested by:	many
2008-09-13 16:56:03 +00:00
Takanori Watanabe
e6ee371743 Don't issue CDC request before negotiate the interface role. 2008-09-12 20:34:12 +00:00
Ed Maste
c7e44c9ac1 Whitespace cleanup. 2008-09-12 18:15:12 +00:00
Stephane E. Potvin
29e6fa3a7f Make mlxcontrol work with more than one system drive:
- When searching for the next system drive, return the next one instead
  of always returning the first one.
- Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called
  on the controller fd, not the disk's one.

While there, fix a cut-n-pase error in a warning.

Reviewed by:	jhb
Approved by:	kan (mentor)
MFC after:	1 month
2008-09-12 17:40:17 +00:00
John Baldwin
3d0f3248ea Use the parent device's DMA tag when creating our own DMA tags. This fixes
a panic on sparc64.

Reviewed by:	Florian Smeets  flo kasimir.com
2008-09-12 14:41:53 +00:00
Takanori Watanabe
6ac5bf9062 Connect ufoma(4) to build and,
disable handsfree interface that is not yet ported to newtty.
2008-09-12 03:45:08 +00:00
John Baldwin
ceee59fa5a Disable the inline assembly crc32 routine and use the C version instead.
The assembly version is reported to be broken on 5.x+.

PR:		kern/100425
Submitted by:	Rashid N. Achilov  shelton www.granch.ru
MFC after:	1 week
2008-09-10 18:42:19 +00:00
John Baldwin
26e4688329 Resurrect the sbni(4) driver. Someone finally tested the MPSAFE patches and
the driver worked ok with them.

Tested by:	friends of yar
2008-09-10 18:36:58 +00:00
Weongyo Jeong
d8cabb0b9e rename flags and add a ZYD_FLAG_DETACHING flag to indicate we're
detaching that when the USB is pulled out forcibly during the driver is
running background scan, a page fault can be occurred even if we called
usb_rem_task() when detaching.  It looks like a kind of races.
2008-09-10 03:40:51 +00:00
Remko Lodder
e2d3226b4c Add support for the CyberPower CP1500AVRLCD.
PR:		126845
Submitted by:	gavin
Approved by:	imp (mentor, implicit)
MFC after:	1 week
2008-09-09 19:59:51 +00:00
Rui Paulo
3a6fcf1067 Update for new HAL.
Reviewed by:	sam
2008-09-09 16:21:25 +00:00
Pyun YongHyeon
8de8f265b6 Add workaround for CRC errors seen at 100Mbps on JMC250 A2.
While here update chip revision number of JMC250/JMC260 from the
latest datasheet.
2008-09-09 10:19:48 +00:00
Pyun YongHyeon
9b45b70125 Fix typo. 2008-09-09 10:10:03 +00:00
Robert Noland
275d30b973 IGP based radeon cards such as the rs485 and rs690 require that the GART table
be un-cached.  Our previous memory barrier was not sufficient.  This patch
allocates the IGP GART tables using the BUS_DMA_NOCACHE flag to get these
cards working.

Approved by:	kib
2008-09-09 02:18:37 +00:00
Robert Noland
0020a2cded We should never call drm_pci_alloc() while holding locks, due the the
calls to bus_dma.  There were multiple paths that held different locks or
no locks at all. This patch ensures that all of the calling paths drop
their lock(s) before calling drm_pci_alloc().

Reviewed by:	kib
2008-09-09 02:05:03 +00:00
Kip Macy
d5e2c3dd04 Fix issue with recovering from transient jumbo mbuf shortage.
Submitted by:	Chelsio Inc.
MFC after:	3 days
2008-09-09 01:36:02 +00:00
Marius Strobl
85de9f54f8 o Move the MODULE_DEPEND() for cam(4) from the esp_sbus.c front-end to
the ncr53c9x.c core where it actually belongs so future front-ends
  don't need to add it.
o Use the correct OFW property when looking for the initiator ID of the
  SBus device.
o Don't specify an alignment when creating the parent DMA tag for
  SUNW,fas; their DMA engine doesn't require an alignment constraint
  and it's no inherited by the child DMA tags anyway (which probably
  is a bug though).
o Drop the superfluous sc_maxsync and use sc_minsync instead. The
  former apparently was added due to a confusion with the maximum
  frequency used in cam(4), which basically corresponds to the
  inverse of minimum sync period.
o Merge ncr53c9x.c from NetBSD:
  1.116: NCRDMA_SETUP() should be called before NCR_SET_COUNT() and
         NCRCMD_DMA command in ncr53c9x_select().
  1.125: free allocated resources on detach.
o Static'ize ncr53c9x_action(), ncr53c9x_init() and ncr53c9x_reset()
  as these are not required outside of ncr53c9x.c.
o In ncr53c9x_attach() don't leak the device mutex in case attaching
  fails.
o Register an asynchronous notification handler so in case cam(4)
  reports a lost device we can cancel outstanding commands and
  restore the default parameters for the target in question.
o For FAS366 correctly support 16-bit target IDs and let it know
  that we use 32-bit transfers.
o Overhaul the negotiation of transfer settings. This includes
  distinguishing between current and goal transfer settings of the
  target so we can renegotiate their goal settings when necessary
  and correcting the order in which tagged, wide and synchronous
  transfers are negotiated.
o If we are requesting sense, force a renegotiation if we are
  currently using anything different from asynchronous at 8 bit
  as the target might have lost our transfer negotiations.
o In case of an XPT_RESET_BUS just directly call ncr53c9x_init()
  instead of issuing a NCRCMD_RSTSCSI, which in turn will issue an
  interrupt that is treated as an unexpected SCSI bus reset by
  ncr53c9x_intr() and thus calls ncr53c9x_init(). Remove the now
  no longer used ncr53c9x_scsi_reset().
o Correct an off-by-one error when setting cpi->max_lun.
o In replace printf(9) with device_printf(9) calls where appropriate
  and in ncr53c9x_action() remove some unnecessarily verbose messages.
o In ncr53c9x_sched() use TAILQ_FOREACH() instead of reimplementing
  it and consolidate two tagging-related target info checks into one.
o In ncr53c9x_done() set the CAM status to CAM_SCSI_STATUS_ERROR when
  appropriate, respect CAM_DIS_AUTOSENSE and teach it to return SCSI
  status information.
o In ncr53c9x_dequeue() ensure the tags are cleared.
o Use ulmin() instead of min() where appropriate.
o In ncr53c9x_msgout() consistently use the reset label.
o When we're interrupted during a data phase and the DMA engine is
  still active, don't panic but reset the core and the DMA engine as
  this should be sufficient. Also, the typical problem for triggering
  this was the lack of renegotiation when requesting sense.
o Correctly handle DEVICE RESETs.
o Adapt the locking of esp(4) to MPSAFE cam(4). This includes moving
  the calls of lsi64854_attach() to the bus front-ends so it can pass
  the esp(4) mutex to bus_dma_tag_create(9).
o Change the LSI64854 driver to not create a DMA tag and map for the
  Ethernet channel as le(4) will handle these on its own as well as
  sync and unload the DMA maps for the SCSI and parallel port channel
  after a DMA transfer.
o Cam(4)'ify some NetBSD-centric comments.
o Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
  and take advantage of rman_get_rid(9) in order to save some softc
  members.

Reviewed by:	scottl
MFC after:	1 month
2008-09-08 20:20:44 +00:00
Oleg Bulyzhin
82b67c0132 bge_tick(): do not touch PHY if link is up. This should solve problem with
extra input errors for some BCM57XX chips.

PR:		kern/122295
2008-09-08 18:10:15 +00:00
Rafal Jaworowski
53917bdbd9 Streamline #include sections in ds133x and ds1672 drivers. This unbreaks the
LINT build.
2008-09-08 15:49:07 +00:00
Peter Wemm
434cb98901 Pass 1 of mpsafetty-ifying si(4). It compiles and has basic functionality,
but needs a lot more work.  In particular, it has no flow control and has
a tendency to race when giving commands.  It still uses Giant for the
tty and driver lock, but this is a keep-it-simple feature for now.
Some of the [temporary] proliferation of messages lines are way too long.
2008-09-08 11:41:20 +00:00
Rafal Jaworowski
286fa44565 ds133x: Introduce device_identify method; update NOTES.
Obtained from:	Semihalf
2008-09-08 10:40:48 +00:00
Ed Schouten
d172be1fd0 Fix a typo in a comment in the ACPI Fujitsu driver.
The word "hotkys" should read "hotkeys".

Submitted by:	Jille Timmermans <jille quis cx>
2008-09-08 06:29:24 +00:00
Joel Dahl
bbe9d8cba9 Fix deactivation of speakers while plugging in headphones on Fujitsu
U1010, Lenovo 3k N200 and Acer Aspire 4715Z.

Reviewed by:	attilio
PR:		126216, 126244, 127034
Submitted by:	Anton E. Kartashev <amokk@mirahost.ru>,
		Ganael Laplanche <ganael.laplanche@martymac.com>,
		Dennis Generaloff <giantlock@gmail.com>
2008-09-07 20:25:19 +00:00
Rui Paulo
941f9f10b2 Add support for MacBook Air. (not tested)
Obtained from:	mactel-linux
2008-09-07 18:15:34 +00:00