]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoremove stray ;
sam [Sat, 14 Mar 2009 17:54:58 +0000 (17:54 +0000)]
remove stray ;

15 years agoRework MAC Framework synchronization in a number of ways in order to
rwatson [Sat, 14 Mar 2009 16:06:06 +0000 (16:06 +0000)]
Rework MAC Framework synchronization in a number of ways in order to
improve performance:

- Eliminate custom reference count and condition variable to monitor
  threads entering the framework, as this had both significant overhead
  and behaved badly in the face of contention.

- Replace reference count with two locks: an rwlock and an sx lock,
  which will be read-acquired by threads entering the framework
  depending on whether a give policy entry point is permitted to sleep
  or not.

- Replace previous mutex locking of the reference count for exclusive
  access with write acquiring of both the policy list sx and rw locks,
  which occurs only when policies are attached or detached.

- Do a lockless read of the dynamic policy list head before acquiring
  any locks in order to reduce overhead when no dynamic policies are
  loaded; this a race we can afford to lose.

- For every policy entry point invocation, decide whether sleeping is
  permitted, and if not, use a _NOSLEEP() variant of the composition
  macros, which will use the rwlock instead of the sxlock.  In some
  cases, we decide which to use based on allocation flags passed to the
  MAC Framework entry point.

As with the move to rwlocks/rmlocks in pfil, this may trigger witness
warnings, but these should (generally) be false positives as all
acquisition of the locks is for read with two very narrow exceptions
for policy load/unload, and those code blocks should never acquire
other locks.

Sponsored by: Google, Inc.
Obtained from: TrustedBSD Project
Discussed with: csjp (idea, not specific patch)

15 years agoMFamd64 r189785
alc [Sat, 14 Mar 2009 15:37:19 +0000 (15:37 +0000)]
MFamd64 r189785
  Update the pmap's resident page count when a page table page is freed in
  pmap_remove_pde() and pmap_remove_pages().

MFC after: 6 weeks

15 years agoTwo fixes:
imp [Sat, 14 Mar 2009 14:08:53 +0000 (14:08 +0000)]
Two fixes:
(1) Fix pcib_read/write_config prototypes.
(2) When contrainting a resource request for a 'subtractive' bridge,
    it is important to select a range outside the base/limit
    registers, since those are the only values known to not
    possibly work.  On my HP laptop, the base bridge excludes I/O
    ports 0xa000-0xafff, however that was the range we were passing
    up the tree.  Instead, when a range spans the "hole" we now
    arbitrarily pick the range just above the hole to allocate from.

All of my rl and xl cards, at a minimum, started working again on this
laptop with those fixes.

15 years agoFixes several PR-SCTP releated bugs.
rrs [Sat, 14 Mar 2009 13:42:13 +0000 (13:42 +0000)]
Fixes several PR-SCTP releated bugs.
 - When sending large PR-SCTP messages over a
   lossy link we would incorrectly calculate the fwd-tsn
 - When receiving large multipart pr-sctp packets we would
   incorrectly send back a SACK that would renege improperly
   on already received packets thus causing unneeded retransmissions.

15 years ago - When a mutex is destroyed while locked we need to inform lock profiling
jeff [Sat, 14 Mar 2009 11:43:38 +0000 (11:43 +0000)]
 - When a mutex is destroyed while locked we need to inform lock profiling
   that it has been released.

15 years ago - Call lock_profile_release when we're transitioning a lock to be owned by
jeff [Sat, 14 Mar 2009 11:43:02 +0000 (11:43 +0000)]
 - Call lock_profile_release when we're transitioning a lock to be owned by
   LK_KERNPROC.

Discussed with: attilio

15 years ago - Fix an error that occurs when mp_ncpu is an odd number. steal_thresh
jeff [Sat, 14 Mar 2009 11:41:36 +0000 (11:41 +0000)]
 - Fix an error that occurs when mp_ncpu is an odd number.  steal_thresh
   is calculated as 0 which causes errors elsewhere.

Submitted by: KOIE Hidetaka <koie@suri.co.jp>

 - When sched_affinity() is called with a thread that is not curthread we
   need to handle the ON_RUNQ() case by adding the thread to the correct
   run queue.

Submitted by: Justin Teller <justin.teller@gmail.com>

MFC after: 1 Week

15 years agoUpdate the pmap's resident page count when a page table page is freed in
alc [Sat, 14 Mar 2009 08:28:02 +0000 (08:28 +0000)]
Update the pmap's resident page count when a page table page is freed in
pmap_remove_pde() and pmap_remove_pages().

MFC after: 6 weeks

15 years agoCorrect accounting errors in _pmap_allocpte(). Specifically, the pmap's
alc [Sat, 14 Mar 2009 05:33:09 +0000 (05:33 +0000)]
Correct accounting errors in _pmap_allocpte().  Specifically, the pmap's
resident page count and the global wired page count were not correctly
maintained when page table page allocation failed.

MFC after: 6 weeks

15 years agor189349 removed mktemp() from the XSI namespace when
das [Sat, 14 Mar 2009 02:31:48 +0000 (02:31 +0000)]
r189349 removed mktemp() from the XSI namespace when
__XOPEN_SOURCE >= 700, since mktemp() was withdrawn
from the standard. However, __XSI_VISIBLE is set to
700 in the default BSD envrionment, where mktemp()
should still exist; hence, check for this.

15 years agoDon't suggest mounting procfs in diskless configurations.
rwatson [Fri, 13 Mar 2009 23:42:34 +0000 (23:42 +0000)]
Don't suggest mounting procfs in diskless configurations.

MFC after: 3 days

15 years ago- Fix object directory creation when running threaded buildworld
gabor [Fri, 13 Mar 2009 22:41:30 +0000 (22:41 +0000)]
- Fix object directory creation when running threaded buildworld

15 years agoHID usage minimum can be equal to the maximum.
thompsa [Fri, 13 Mar 2009 22:28:37 +0000 (22:28 +0000)]
HID usage minimum can be equal to the maximum.

Submitted by: Hans Petter Selasky
Tested by: Andreas Tobler

15 years agofix portability; linux does not have sa_len/sun_len
sam [Fri, 13 Mar 2009 19:05:34 +0000 (19:05 +0000)]
fix portability; linux does not have sa_len/sun_len

15 years agoFix comment explaining where this driver came from.
rpaulo [Fri, 13 Mar 2009 16:43:31 +0000 (16:43 +0000)]
Fix comment explaining where this driver came from.

MFC after: 2 weeks

15 years agoRename the k8temp(4) man page to amdtemp(4) and update its contents for
rpaulo [Fri, 13 Mar 2009 16:42:24 +0000 (16:42 +0000)]
Rename the k8temp(4) man page to amdtemp(4) and update its contents for
the new families.

MFC after: 2 weeks

15 years ago- Add an entry about enabling libc NLS support
gabor [Fri, 13 Mar 2009 16:40:56 +0000 (16:40 +0000)]
- Add an entry about enabling libc NLS support

15 years agoImplement new way of branding ELF binaries by looking to a
dchagin [Fri, 13 Mar 2009 16:40:51 +0000 (16:40 +0000)]
Implement new way of branding ELF binaries by looking to a
".note.ABI-tag" section.

The search order of a brand is changed, now first of all the
".note.ABI-tag" is looked through.

Move code which fetch osreldate for ELF binary to check_note() handler.

PR: 118473
Approved by: kib (mentor)

15 years agoMention k8temp -> amdtemp rename.
rpaulo [Fri, 13 Mar 2009 16:30:33 +0000 (16:30 +0000)]
Mention k8temp -> amdtemp rename.

MFC after: 2 weeks

15 years agoRename all the variables/function names/structs/etc. to reflect the
rpaulo [Fri, 13 Mar 2009 16:28:25 +0000 (16:28 +0000)]
Rename all the variables/function names/structs/etc. to reflect the
driver name change.
While there, update copyright.

MFC after: 2 weeks

15 years agoRename the k8temp driver to amdtemp.
rpaulo [Fri, 13 Mar 2009 16:08:08 +0000 (16:08 +0000)]
Rename the k8temp driver to amdtemp.

MFC after: 2 weeks

15 years agoSwitch to using official English short country names.
ru [Fri, 13 Mar 2009 14:35:58 +0000 (14:35 +0000)]
Switch to using official English short country names.

15 years ago- Reenable Native Language Support in libc. This feature was disabled due
gabor [Fri, 13 Mar 2009 10:40:38 +0000 (10:40 +0000)]
- Reenable Native Language Support in libc.  This feature was disabled due
  to possible breakages in the catalog handling code.  Since then, that
  code has been replaced by the secure code from NetBSD but NLS in libc
  remained turned off.  Tests have shown that the feature is stable and
  working so we can now turn it on again.

- Add several new catalog files:
  - ca_ES.ISO8859-1
  - de_DE.ISO8859-1
  - el_GR.ISO8859-7  (by manolis@ and keramida@)
  - es_ES.ISO8859-1  (kern/123179, by carvay@)
  - fi_FI.ISO8859-1
  - fr_FR.ISO8859-1  (kern/78756, by thierry@)
  - hu_HU.ISO8859-2  (by gabor@)
  - it_IT.ISO8859-15
  - nl_NL.ISO8859-1  (corrections by rene@)
  - no_NO.ISO8859-1
  - mn_MN.UTF-8      (by ganbold@)
  - sk_SK.ISO8859-2
  - sv_SE.ISO8859-1
  (The catalogs without explicit source has been obtained from NetBSD.)

Approved by: attilio

15 years agoDon't put "install-info" to the list of install-tools if we're
ru [Fri, 13 Mar 2009 10:09:08 +0000 (10:09 +0000)]
Don't put "install-info" to the list of install-tools if we're
installing with -DWITHOUT_INFO, otherwise one can experience a
failure trying to installworld on a system that is built with
-DWITHOUT_INFO (i.e., without /usr/bin/install-info).

Reported by: bland
MFC after: 3 days

15 years ago1. Clean up usage() output a bit by grouping options that take an argument
dougb [Fri, 13 Mar 2009 08:48:33 +0000 (08:48 +0000)]
1. Clean up usage() output a bit by grouping options that take an argument
2. Fix a comment to refer to the right loop

15 years agoBackout this commit whil a better solution is developed
guido [Fri, 13 Mar 2009 08:13:51 +0000 (08:13 +0000)]
Backout this commit whil a better solution is developed

15 years agoWhen using the -D option:
dougb [Fri, 13 Mar 2009 07:34:05 +0000 (07:34 +0000)]
When using the -D option:
1. The new mtree file should be created in the "host" system /tmp
2. The existing mtree file in the "host" system should not be deleted

Submitted by: scf

15 years agoImplement the xdev target. When you define XDEV=arch XDEV_ARCH=arch,
imp [Fri, 13 Mar 2009 07:23:58 +0000 (07:23 +0000)]
Implement the xdev target.  When you define XDEV=arch XDEV_ARCH=arch,
you can build the cross development tools and install them as
$XDEV-freebsd-xxx for each tool.  This allows one to use autoconf to
find the tools for cross building scenarios.

15 years agoAdd support for setting the debug flags on wlan interfaces after the are
brooks [Fri, 13 Mar 2009 07:12:25 +0000 (07:12 +0000)]
Add support for setting the debug flags on wlan interfaces after the are
created using wlandebug_<ifn> variables.

15 years agoRemove the null_islocked() overloaded vop because the standard one does
attilio [Fri, 13 Mar 2009 07:09:20 +0000 (07:09 +0000)]
Remove the null_islocked() overloaded vop because the standard one does
the same.

15 years agoMake MPC85xx LAW handling and reset routines aware of the MPC8548 variant.
raj [Fri, 13 Mar 2009 06:28:20 +0000 (06:28 +0000)]
Make MPC85xx LAW handling and reset routines aware of the MPC8548 variant.

Inspired by discussion with Alexey V Fedorov on freebsd-powerpc@.

15 years ago1) Check NULL pointer before calling umtx_pi_adjust_locked(), this avoids
davidxu [Fri, 13 Mar 2009 06:06:20 +0000 (06:06 +0000)]
1) Check NULL pointer before calling umtx_pi_adjust_locked(), this avoids
   a PANIC.
2) Rework locking for POSIX priority-mutex, this fixes a
   race where a thread may wait there forever even if the mutex is unlocked.

15 years agoMinorly improved debugging. Use the DEVPRINTF macro and report the
imp [Fri, 13 Mar 2009 05:31:27 +0000 (05:31 +0000)]
Minorly improved debugging.  Use the DEVPRINTF macro and report the
offset for memory when mapping in the CIS.

15 years agoAdd menus to read install.cfg from any disk device sysinstall can see
grog [Fri, 13 Mar 2009 03:51:41 +0000 (03:51 +0000)]
Add menus to read install.cfg from any disk device sysinstall can see
(eg USB key, CD) rather than just floppy.

Handle \r\n line termination in a cfg file.

Add keeprcconf variable.

Submitted by: Daniel O'Connor

15 years agoWe need to initialize the console for dcons to work.
imp [Fri, 13 Mar 2009 02:15:49 +0000 (02:15 +0000)]
We need to initialize the console for dcons to work.

Submitted by: nork@

15 years agoThe recent change to use memory > 1MB for the heap by default broke CD
jhb [Thu, 12 Mar 2009 20:41:52 +0000 (20:41 +0000)]
The recent change to use memory > 1MB for the heap by default broke CD
booting because the CD driver did not use bounce buffers to ensure
request buffers sent to the BIOS were always in the first 1MB.  Copy over
the bounce buffer logic from the BIOS disk driver (minus the 64k boundary
code for floppies) to fix this.

Reported by: kensmith

15 years agoAdd support for 10h and 11h family of processors. Also, make the sysctl
rpaulo [Thu, 12 Mar 2009 18:59:39 +0000 (18:59 +0000)]
Add support for 10h and 11h family of processors. Also, make the sysctl
look like a temperature.

This driver will most likely be renamed to something more meaningful in
the near future.

Submitted by: nork
MFC after: 2 weeks

15 years agopreliminary ar9280 support:
sam [Thu, 12 Mar 2009 18:18:28 +0000 (18:18 +0000)]
preliminary ar9280 support:
o add 9280 attach that sets up ini, cal, etc.
o new rf backend for 9280 and later parts
o split ini setup and spur mitigation support out to methods
  and provide 9280-specific support
o minor fixups to shared code to handle 9280-specific work

Obtained from: Atheros (ini values and some code)

15 years agoChange the sysctls for maxbcache and maxswzone from int to long. I missed
jhb [Thu, 12 Mar 2009 17:23:02 +0000 (17:23 +0000)]
Change the sysctls for maxbcache and maxswzone from int to long.  I missed
this earlier since these sysctls don't exist in 7.x yet.

15 years agoExport the current values of nbuf, ncallout, and nswbuf via read-only
jhb [Thu, 12 Mar 2009 17:21:58 +0000 (17:21 +0000)]
Export the current values of nbuf, ncallout, and nswbuf via read-only
sysctls that match the tunable names.

MFC after: 3 days

15 years agoAdd myself.
rdivacky [Thu, 12 Mar 2009 16:55:16 +0000 (16:55 +0000)]
Add myself.

Approved by: ed (mentor)

15 years agoo Turn the batch mode on if stdout is not tty.
maxim [Thu, 12 Mar 2009 13:17:46 +0000 (13:17 +0000)]
o Turn the batch mode on if stdout is not tty.

Submitted by: vsevolod
MFC after: 1 week

15 years agoo Sync synopsis with reality. Remove BUG section -- there is
maxim [Thu, 12 Mar 2009 13:03:33 +0000 (13:03 +0000)]
o Sync synopsis with reality.  Remove BUG section -- there is
a batch mode in gpart(8) now.

15 years agoThe non-modifying EA VOPs are executed with only shared vnode lock taken.
kib [Thu, 12 Mar 2009 12:43:56 +0000 (12:43 +0000)]
The non-modifying EA VOPs are executed with only shared vnode lock taken.
Provide a custom lock around initializing and tearing down EA area,
to prevent both memory leaks and double-free of it. Count the number
of EA area accessors.

Lock protocol requires either holding exclusive vnode lock to modify
i_ea_area, or shared vnode lock and owning IN_EA_LOCKED flag in i_flag.

Noted by: YAMAMOTO, Taku <taku tackymt homeip net>
Tested by: pho (previous version)
MFC after: 2 weeks

15 years agoEnsure that the semaphore value is re-checked after sem_lock
bms [Thu, 12 Mar 2009 10:36:39 +0000 (10:36 +0000)]
Ensure that the semaphore value is re-checked after sem_lock
is re-acquired, after the condition variable is signalled.

PR:             http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
MFC after:      5 days
Reviewed by:    attilio

15 years agoMake semaphore debugging output more useful.
bms [Thu, 12 Mar 2009 10:34:16 +0000 (10:34 +0000)]
Make semaphore debugging output more useful.

PR:             http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
MFC after:      5 days
Submitted by:   Philip Semanchuk

15 years agotxp(4) should work on all architectures now.
brueffer [Thu, 12 Mar 2009 09:52:42 +0000 (09:52 +0000)]
txp(4) should work on all architectures now.

15 years agoMove the deactivation of the device's BAR to before the loop where we
imp [Thu, 12 Mar 2009 08:42:27 +0000 (08:42 +0000)]
Move the deactivation of the device's BAR to before the loop where we
turn deactivate the resources.  While this likely doesn't matter, it
is likely to be safer.

15 years agoFix the whitespace in this file to be consistent with itself and with
imp [Thu, 12 Mar 2009 07:18:27 +0000 (07:18 +0000)]
Fix the whitespace in this file to be consistent with itself and with
the rest of the project's files.

s/sn_/fe_/ in a routine name that I copied from sn.

15 years agoread_ivar takes a uintptr_t * not a u_char *.
imp [Thu, 12 Mar 2009 06:36:44 +0000 (06:36 +0000)]
read_ivar takes a uintptr_t * not a u_char *.

15 years agoo writereg needs to return a vlue.
imp [Thu, 12 Mar 2009 06:35:00 +0000 (06:35 +0000)]
o writereg needs to return a vlue.
o Add TJ PTJ-LAN_T card.  Some more work may be needed to make this
  actually function correctly.

15 years agoMake the bit-bang callbacks for i2c implementation match their prototypes.
imp [Thu, 12 Mar 2009 06:32:30 +0000 (06:32 +0000)]
Make the bit-bang callbacks for i2c implementation match their prototypes.

15 years agoCheck the Disk FUNCE recorded in the CIS to see if we should probe for
imp [Thu, 12 Mar 2009 06:30:59 +0000 (06:30 +0000)]
Check the Disk FUNCE recorded in the CIS to see if we should probe for
both disks, or if we should suppress the slave drive.  Default to
suppressing the slave, in the case that this REQIURED tuple turns out
to not actually be present...

15 years agoBetter name for this routine... it doesn't reset the card, but resets
imp [Thu, 12 Mar 2009 06:25:30 +0000 (06:25 +0000)]
Better name for this routine...  it doesn't reset the card, but resets
the power to the card...

15 years agoDon't need to set symbol, default value is OK.
obrien [Thu, 12 Mar 2009 04:44:09 +0000 (04:44 +0000)]
Don't need to set symbol, default value is OK.

15 years agoo change a lock model based on HAL preemption lock to a normal mtx.
weongyo [Thu, 12 Mar 2009 02:51:55 +0000 (02:51 +0000)]
o change a lock model based on HAL preemption lock to a normal mtx.
  Based on the HAL preemption lock there is a problem on SMP machines
  and causes a panic.
o When a device detached the current tactic to detach NDIS USB driver is
  to call SURPRISE_REMOVED event.  So it don't need to call
  ndis_halt_nic() again.  This fixes some page faults when some drivers
  work abnormal.
o it assumes now that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is in
  DISPATCH_LEVEL (non-sleepable) and as further work
  URB_FUNCTION_VENDOR_XXX and URB_FUNCTION_CLASS_XXX should be.

Reviewed by: Hans Petter Selasky <hselasky_at_freebsd.org>
Tested by: Paul B. Mahol <onemda_at_gmail.com>

15 years agoMFp4 //depot/projects/usb 159004,159053,159091
thompsa [Thu, 12 Mar 2009 02:32:54 +0000 (02:32 +0000)]
MFp4 //depot/projects/usb  159004,159053,159091

More HID parsing fixes for usb mice.
 - be less strict on the last HID item usage.
 - preserve item size and count accross items
 - improve default HID usage selection.

Tested by: ache
Submitted by: Hans Petter Selasky

15 years agoXref altq.4 and bump .Dd
yongari [Thu, 12 Mar 2009 01:27:15 +0000 (01:27 +0000)]
Xref altq.4 and bump .Dd

15 years agoAdd txp(4) to the list of drivers supporting ALTQ.
yongari [Thu, 12 Mar 2009 01:21:48 +0000 (01:21 +0000)]
Add txp(4) to the list of drivers supporting ALTQ.

15 years agoUncomment txp(4), txp(4) should work on all architectures.
yongari [Thu, 12 Mar 2009 01:17:35 +0000 (01:17 +0000)]
Uncomment txp(4), txp(4) should work on all architectures.

15 years agobus_dma(9) conversion and make txp(4) work on all architectures.
yongari [Thu, 12 Mar 2009 01:14:47 +0000 (01:14 +0000)]
bus_dma(9) conversion and make txp(4) work on all architectures.
o Header file cleanup.
o bus_dma(9) conversion.
  - Removed all consumers of vtophys(9) and converted to use
    bus_dma(9).
  - Typhoon2 functional specification says the controller supports
    64bit DMA addressing. However all Typhoon controllers are known
    to lack of DAC support so 64bit DMA support was disabled.
  - The hardware can't handle more 16 fragmented Tx DMA segments so
    teach txp(4) to collapse these segments to be less than 16.
  - Added Rx buffer alignment requirements(4 bytes alignment) and
    implemented fixup code to align receive frame. Previously
    txp(4) always copied Rx frame to align it on 2 byte boundary
    but its copy overhead is much higher than unaligned access on
    i386/amd64. Alignment fixup code is now applied only for
    strict-alignment architectures. With this change i386 and
    amd64 will get instant Rx performance boost. Typhoon2 datasheet
    mentions a command that pads arbitrary bytes in Rx buffer but
    that command does not work.
  - Nuked pointer trick in descriptor ring. This does not work on
    sparc64 and replaced it with bcopy. Alternatively txp(4) can
    embed a 32 bits index value into the descriptor and compute
    real buffer address but it may make code complicated.
  - Added endianness support code in various Tx/Rx/command/response
    descriptor access. With this change txp(4) should work on all
    architectures.
o Added comments for known firmware bugs(Tx checksum offloading,
  TSO, VLAN stripping and Rx buffer padding control).
o Prefer faster memory space register access to I/O space access.
  Added fall-back mechanism to use alternative I/O space access.
  The hardware supports both memory and I/O mapped access. Users
  can still force to use old I/O space access by setting
  hw.txp.prefer_iomap tunable to 1 in /boot/loader.conf.
o Added experimental suspend/resume methods.
o Nuke error prone Rx buffer handling code and implemented local
  buffer management with TAILQ. Be definition the controller can't
  pass the last received frame to host if no Rx free buffers are
  available to use as head and tail pointer of Rx descriptor ring
  can't have the same value. In that case the Rx buffer pointer in
  Rx buffer ring still holds a valid buffer and txp_rxbuf_reclaim()
  can't fill Rx buffers as the first buffer is still valid. Instead
  of relying on the value of Rx buffer ring, introduce local buffer
  management code to handle empty buffer situation. This should fix
  a long standing bug which completely hangs the controller under
  high network load. I could easily trigger the issue by sending 64
  bytes UDP frames with netperf. I have no idea how this bugs was
  not fixed for a long time.
o Converted ithread interrupt handler to filter based one.
o Rearranged txp_detach routine such that it's now used for general
  clean-up routine.
o Show sleep image version on device attach time. This will help
  to know what action should be taken depending on sleep image
  version. The version information in datasheet was wrong for newer
  NV images so I followed Linux which seems to correctly extract
  version numbers from response descriptors.
o Firmware image is no longer downloaded in device attach time. Now
  it is reloaded whenever if_init is invoked. This is to ensure
  correct operation of hardware when something goes wrong.
  Previously the controller always run without regard to running
  state of firmware. This change will add additional controller
  initialization time but it give more robust operation as txp(4)
  always start off from a known state. The controller is put into
  sleep state until administrator explicitly up the interface.
o As firmware is loaded in if_init handler, it's now possible to
  implement real watchdog timeout handler. When watchdog timer is
  expired, full-reset the controller and initialize the hardware
  again as most other drivers do. While I'm here use our own timer
  for watchdog instead of using if_watchdog/if_timer interface.
o Instead of masking specific interrupts with TXP_IMR register,
  program TXP_IER register with the interrupts to be raised and
  use TXP_IMR to toggle interrupt generation.
o Implemented txp_wait() to wait a specific state of a controller.
o Separate boot related code from txp_download_fw() and name it
  txp_boot() to handle boot process.
o Added bus_barrier(9) to host to ARM communication.
o Added endianness to all typhoon command processing. The ARM93C
  always expects little-endian format of command/data.
o Removed __STRICT_ALIGNMENT which is not valid on FreeBSD.
  __NO_STRICT_ALIGNMENT is provided for that purpose on FreeBSD.
  Previously __STRICT_ALIGNMENT was unconditionally defined for
  all architectures.
o Rewrote SIOCSIFCAP ioctl handler such that each capability can be
  controlled by ifconfig(8). Note, disabling VLAN hardware tagging
  has no effect due to the bug of firmware.
o Don't send TXP_CMD_CLEAR_STATISTICS to clear MAC statistics in
  txp_tick(). The command is not atomic. Instead, just read the
  statistics and reflect saved statistics to the statistics.
  dev.txp.%d.stats sysctl node provides detailed MAC statistics.
  This also reduces a lot of waste of CPU cycles as processing a
  command ring takes a very long time on ARM93C. Note, Rx
  multicast and broadcast statistics does not seem to right. It
  might be another bug of firmware.
o Implemented link state change handling in txp_tick(). Now sending
  packets is allowed only after establishing a valid link. Also
  invoke link state change notification whenever its state is
  changed so pseudo drivers like lagg(4) that relies on link state
  can work with failover or link aggregation without hacks.
  if_baudrate is updated to resolved speed so SNMP agents can get
  correct bandwidth parameters.
o Overhauled Tx routine such that it now honors number of allowable
  DMA segments and checks for 4 free descriptors before trying to
  send a frame. A frame may require  4 descriptors(1 frame
  descriptor, 1 or more frame descriptors, 1 TSO option descriptor,
  one free descriptor to prevent descriptor wrap-around) at least
  so it's necessary to check available free descriptors prior to
  setting up DMA operation.
o Added a sysctl variable dev.txp.%d.process_limit to control
  how many received frames should be served in Rx handler. Valid
  ranges are 16 to 128(default 64) in unit of frames.
o Added ALTQ(4) support.
o Added missing IFCAP_VLAN_HWCSUM as txp(4) can offload checksum
  calculation as well as VLAN tag insertion/stripping.
o Fixed media header length for VLAN.
o Don't set if_mtu in device attach, it's already set in
  ether_ifattach().
o Enabled MWI.
o Fixed module unload panic when bpf listeners are active.
o Rearranged ethernet address programming logic such that it works
   on strict-alignment architectures.
o Removed unused member variables in softc.
o Added support for WOL.
o Removed now unused TXP_PCI_LOMEM/TXP_PCI_LOIO.
o Added wakeup command TXP_BOOTCMD_WAKEUP definition.
o Added a new firmware version query command, TXP_CMD_READ_VERSION.
o Removed volatile keyword in softc as bus_dmamap_sync(9) should
  take care of this.
o Removed embedded union trick of a structure used to to access
  a pointer on LP64 systems.
o Added a few TSO related definitions for struct txp_tcpseg_desc.
  However TSO is not used at all due to the limitation of hardware.
o Redefined PKT_MAX_PKTLEN to theoretical maximum size of a frame.
o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
o Added a new macro TXP_DESC_INC to compute next descriptor index.

Tested by: don.nasco <> gmail dot com

15 years agoadd asserts
sam [Thu, 12 Mar 2009 00:09:29 +0000 (00:09 +0000)]
add asserts

15 years agoadd more register bit defs
sam [Thu, 12 Mar 2009 00:03:55 +0000 (00:03 +0000)]
add more register bit defs

15 years agoWhen writing out updated pollfd records when returning from
rwatson [Wed, 11 Mar 2009 22:00:03 +0000 (22:00 +0000)]
When writing out updated pollfd records when returning from
poll(), only copy out the revents field, not the whole pollfd
structure.  Otherwise, if the events field is updated
concurrently by another thread, that update may be lost.

This issue apparently causes problems for the JDK on FreeBSD,
which expects the Linux behavior of not updating all fields
(somewhat oddly, Solaris does not implement the required
behavior, but presumably our adaptation of the JDK is based
on the Linux port?).

MFC after:      2 weeks
PR: kern/130924
Submitted by:   Kurt Miller <kurt @ intricatesoftware.com>
Discussed with: kib

15 years agoAdd a new type of KTRACE record for sysctl(3) invocations. It uses the
jhb [Wed, 11 Mar 2009 21:48:36 +0000 (21:48 +0000)]
Add a new type of KTRACE record for sysctl(3) invocations.  It uses the
internal sysctl_sysctl_name() handler to map the MIB array to a string
name and logs this name in the trace log.  This can be useful to see
exactly which sysctls a thread is invoking.

MFC after: 1 month

15 years agoDo not double-free the struct inode when insmntque failed. Default
kib [Wed, 11 Mar 2009 19:45:52 +0000 (19:45 +0000)]
Do not double-free the struct inode when insmntque failed. Default
insmntque destructor reclaims the vnode, and ufs_reclaim frees the memory.

Reviewed by: tegge
MFC after: 3 days

15 years agomove shared register support code to common
sam [Wed, 11 Mar 2009 17:46:01 +0000 (17:46 +0000)]
move shared register support code to common

15 years agoadd athpoke, a tool to peek/poke registers
sam [Wed, 11 Mar 2009 17:41:46 +0000 (17:41 +0000)]
add athpoke, a tool to peek/poke registers

15 years agoAlso use %zu to print the allocation size when malloc(3) fails.
ed [Wed, 11 Mar 2009 17:40:39 +0000 (17:40 +0000)]
Also use %zu to print the allocation size when malloc(3) fails.

Discussed with: phk

15 years agoadd athdecode, an app to decode register logs
sam [Wed, 11 Mar 2009 17:15:33 +0000 (17:15 +0000)]
add athdecode, an app to decode register logs

15 years agoadd %b format strings for use by athdecode
sam [Wed, 11 Mar 2009 17:14:17 +0000 (17:14 +0000)]
add %b format strings for use by athdecode

15 years agoFix printf warnings on amd64 etc.
phk [Wed, 11 Mar 2009 16:32:00 +0000 (16:32 +0000)]
Fix printf warnings on amd64 etc.

15 years agoMerge in support for Xen HVM on amd64 architecture.
dfr [Wed, 11 Mar 2009 15:30:12 +0000 (15:30 +0000)]
Merge in support for Xen HVM on amd64 architecture.

15 years agoOptimize the inner loop of pmap_copy().
alc [Wed, 11 Mar 2009 14:55:04 +0000 (14:55 +0000)]
Optimize the inner loop of pmap_copy().

MFC after: 6 weeks

15 years agoGah, fix the code to match the comment. For non-open lookups use a
jhb [Wed, 11 Mar 2009 14:39:55 +0000 (14:39 +0000)]
Gah, fix the code to match the comment.  For non-open lookups use a
shared vnode lock for the leaf vnode if LOCKSHARED is set.

Submitted by: rdivacky

15 years agoAdd a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a
jhb [Wed, 11 Mar 2009 14:13:47 +0000 (14:13 +0000)]
Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a
filesystem supports additional operations using shared vnode locks.
Currently this is used to enable shared locks for open() and close() of
read-only file descriptors.
- When an ISOPEN namei() request is performed with LOCKSHARED, use a
  shared vnode lock for the leaf vnode only if the mount point has the
  extended shared flag set.
- Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but
  not O_CREAT.
- Use a shared vnode lock around VOP_CLOSE() if the file was opened with
  O_RDONLY and the mountpoint has the extended shared flag set.
- Adjust md(4) to upgrade the vnode lock on the vnode it gets back from
  vn_open() since it now may only have a shared vnode lock.
- Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since
  FIFO's require exclusive vnode locks for their open() and close()
  routines.  (My recent MPSAFE patches for UDF and cd9660 already included
  this change.)
- Enable extended shared operations on UFS, cd9660, and UDF.

Submitted by: ups
Reviewed by: pjd (ZFS bits)
MFC after: 1 month

15 years agoMove the PC98_[MS]ID_* defines from g_part_pc98.c to diskpc98.h.
nyan [Wed, 11 Mar 2009 13:15:42 +0000 (13:15 +0000)]
Move the PC98_[MS]ID_* defines from g_part_pc98.c to diskpc98.h.

Reviewed by: marcel

15 years agoBackout previous commit due to PEBKAC
guido [Wed, 11 Mar 2009 12:55:12 +0000 (12:55 +0000)]
Backout previous commit due to PEBKAC

15 years agoEnable advisory file locking for devfs vnodes.
kib [Wed, 11 Mar 2009 12:53:16 +0000 (12:53 +0000)]
Enable advisory file locking for devfs vnodes.

Reported by: Timothy Redaelli <timothy redaelli eu>
MFC after: 1 week

15 years agoOne Pp is more than enough.
phk [Wed, 11 Mar 2009 11:42:17 +0000 (11:42 +0000)]
One Pp is more than enough.

Says: brueffer

15 years agoSome improvements to recoverdisk
phk [Wed, 11 Mar 2009 10:37:02 +0000 (10:37 +0000)]
Some improvements to recoverdisk

15 years agoReplace local CRC32 routine with ether_crc32_be(). This should
yongari [Wed, 11 Mar 2009 09:57:11 +0000 (09:57 +0000)]
Replace local CRC32 routine with ether_crc32_be(). This should
have happened long time ago. Also simplify Rx filter logic.

15 years agos/u_int8_t/uint8_t/g
yongari [Wed, 11 Mar 2009 09:06:39 +0000 (09:06 +0000)]
s/u_int8_t/uint8_t/g
s/u_int16_t/uint16_t/g
s/u_int32_t/uint32_t/g
s/u_int64_t/uint64_t/g

15 years agostyle(9) - space after keywords.
yongari [Wed, 11 Mar 2009 08:49:17 +0000 (08:49 +0000)]
style(9) - space after keywords.

15 years agoRemove return statement at the end of function that returns void.
yongari [Wed, 11 Mar 2009 08:41:57 +0000 (08:41 +0000)]
Remove return statement at the end of function that returns void.

15 years agoRemove extra tab characters.
yongari [Wed, 11 Mar 2009 08:28:24 +0000 (08:28 +0000)]
Remove extra tab characters.

15 years agoK&R -> ANSI C function definitions.
yongari [Wed, 11 Mar 2009 08:25:18 +0000 (08:25 +0000)]
K&R -> ANSI C function definitions.

15 years agoMinor nits notice by jhb@
imp [Wed, 11 Mar 2009 08:19:31 +0000 (08:19 +0000)]
Minor nits notice by jhb@

15 years agoRemove old compat method that's no longer needed (and hasn't been
imp [Wed, 11 Mar 2009 08:15:17 +0000 (08:15 +0000)]
Remove old compat method that's no longer needed (and hasn't been
since just before 6.0).

15 years agoAllow zero length memroy space descriptor sections. It is apparently
imp [Wed, 11 Mar 2009 08:14:44 +0000 (08:14 +0000)]
Allow zero length memroy space descriptor sections.  It is apparently
legal in the spec.  Add newline to the verbose messages we print when
debugging when this happens.  The Hitachi HT-4840-11 is the only card
to hit these in years, and it works well enough if we're liberal about
what we accept.

15 years agoAdd support for Hitachi HT-4840-11. This card is supposedly just like
imp [Wed, 11 Mar 2009 08:12:28 +0000 (08:12 +0000)]
Add support for Hitachi HT-4840-11.  This card is supposedly just like
the J181, but not quite.  This card's CIS has some quirks that means
we have to ignore CFE's 1-9.

15 years agoAdd entry for Hitachi HT-4840-11, which is a fe-based card.
imp [Wed, 11 Mar 2009 08:11:11 +0000 (08:11 +0000)]
Add entry for Hitachi HT-4840-11, which is a fe-based card.

15 years agoAdd 3 new cards that I found today in akihabara...
imp [Wed, 11 Mar 2009 07:22:11 +0000 (07:22 +0000)]
Add 3 new cards that I found today in akihabara...

Toshiba LANCT00A
TDK LAK-CD011
TJ PTJ-LAN/T PC-NIC ENCC 990010759-001A

15 years agoHack: *Temporarily* disable reading extended attributes from disk, as
kientzle [Wed, 11 Mar 2009 05:11:57 +0000 (05:11 +0000)]
Hack: *Temporarily* disable reading extended attributes from disk, as
it seems to be badly broken on ZFS.

15 years agoMFp4 //depot/projects/usb 158981,159016,159024
thompsa [Wed, 11 Mar 2009 04:58:21 +0000 (04:58 +0000)]
MFp4 //depot/projects/usb 158981,159016,159024

Sync support for ATMEGA DCI parts.

Submitted by: Hans Petter Selasky

15 years agoFix a possible NULL pointer access at controller attach.
thompsa [Wed, 11 Mar 2009 04:56:30 +0000 (04:56 +0000)]
Fix a possible NULL pointer access at controller attach.

Submitted by: Hans Petter Selasky

15 years agoChange the PVO zone for fictitious pages to the unmanaged PVO zone, to match
nwhitehorn [Wed, 11 Mar 2009 03:19:19 +0000 (03:19 +0000)]
Change the PVO zone for fictitious pages to the unmanaged PVO zone, to match
the unmanaged flag set in the PVO attributes. Without doing this,
pmap_remove() could try to remove fictitious pages (like those created
by mmap of physical memory) from the wrong UMA zone, causing a panic.

Reported by: Justin Hibbits
MFC after: 1 week

15 years agoo disallow write to RedBoot and FIS directory partitions; these are painful
sam [Wed, 11 Mar 2009 01:12:52 +0000 (01:12 +0000)]
o disallow write to RedBoot and FIS directory partitions; these are painful
  to resurrect (maybe honor foot shooting bit in kern.geom_debugflags)
o fix match macro so we now recognize we want to merge FIS dir with RedBoot
  config parameters even if we don't actually do it

15 years agoAdd INP_INHASHLIST flag for inpcb->inp_flags to indicate whether
rwatson [Wed, 11 Mar 2009 00:29:22 +0000 (00:29 +0000)]
Add INP_INHASHLIST flag for inpcb->inp_flags to indicate whether
or not the inpcb is currenty on various hash lookup lists, rather
than using (lport != 0) to detect this.  This means that the full
4-tuple of a connection can be retained after close, which should
lead to more sensible netstat output in the window between TCP
close and socket close.

MFC after: 2 weeks