Pyun YongHyeon [Tue, 25 Nov 2008 01:33:16 +0000 (01:33 +0000)]
Fix Tx/Rx checksum offload ioctl handling and make Rx handler honor
checksum offload configuration. Now checksum offload can be
controlled by ifconfig(8).
While I'm here add an additional check for interface capabilities
before applying user's request.
Warner Losh [Tue, 25 Nov 2008 00:13:26 +0000 (00:13 +0000)]
Tweak the disclaimer section of the license to match COPYRIGHT, for
better or worse. Ok'd by folks that have additional copyrights to the
files in cases where there's joint authorship.
Sam Leffler [Mon, 24 Nov 2008 01:31:10 +0000 (01:31 +0000)]
nuke special handling of RXORN interrupt; the hal marks the FATAL
bit in the interrupt status when RXORN is hit and the chip requires
a reset so our special handling was causing useless resets
Sean Farley [Sun, 23 Nov 2008 23:26:12 +0000 (23:26 +0000)]
Fixed style issues with variable ordering and naming, spacing and
parentheses.
Fixed alignment issue in gr_dup() in its assignment of gr_mem using a
struct to force alignment without performing alignment mathematics. This
was noticed recently with libutil was built with WARNS=6 on platform such
as sparc64.
Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults
when examining struct group's with the struct members pointing to NULL's.
David Malone [Sun, 23 Nov 2008 21:05:22 +0000 (21:05 +0000)]
It's possible that the dump device has gone away after it was
configured, change the message to let people know this is a
possibility. I've slightly changed the message from the one
submitted by Pekka to keep the printf on one line.
David Malone [Sun, 23 Nov 2008 21:01:28 +0000 (21:01 +0000)]
Make the new CCEQ macro a little more like the old one - first do
the comparison between c and val and then compare val to _POSIX_VDISABLE.
This avoids comparing c (which is usually of type char) to
_POSIX_VDISABLE (which has value 0xff and may not be representable
as a char).
Enhance the explanation of using filesystem-specific mount options
in /etc/fstab. We do support passing special options on a per
filesystem type basis, like `-u UID -g GID' for mount_msdosfs, but
the syntax of these options in fstab is non-obvious and a lot of
users have asked about it.
PR: docs/128816
Submitted by: Roland Smith, rsmith at xs4all dot nl
MFC after: 2 days
Marcel Moolenaar [Sat, 22 Nov 2008 21:22:53 +0000 (21:22 +0000)]
Cast to uintptr_t before casting to void*. This allows the
QUICC backend to be built on LP64 platforms. This makes it
possible to include the QUICC backend in the kernel module.
IFp4: Don't rely on disk IDs and always use vdev guids, which means always look
up for components by reading metadata. This might be slower when there are big
number of disks in the system, but is definiately more reliable.
IFp4: Finish implemnetation of chflags(2) for ZFS. While doing this I found
that zfs_access() can only handle VREAD, VWRITE and VEXEC, for the rest we need
to use vaccess(9).
Busy ufs filesystem around block of code that does ".." lookup. Since
mnt_lock is before lock of any vnode on the mp, it uses LK_NOWAIT. Since
MNTK_UNMOUNT may be transient, pdp lock is dropped when vfs_busy()
failed, and operation is retried after some time. This way, ffs_vget()
is not called on the mp that may be in the process of being destroyed by
unmount.
Check for the VI_DOOMED flag on pdp after its lock is reacquired, to
better detect some situations where directory containing ".."
entry is removed during the lookup.
Add sv_flags field to struct sysentvec with intention to provide description
of the ABI of the currently executing image. Change some places to test
the flags instead of explicit comparing with address of known sysentvec
structures to determine ABI features.
Kip Macy [Sat, 22 Nov 2008 08:05:05 +0000 (08:05 +0000)]
- enable multiple transmit queues
- invert sense of hw.cxgb.singleq tunable to hw.cxgb.multiq
- don't wake up transmitting thread by default
- add per tx queue ifaltq to handle ALTQ
- remove several unused functions in cxgb_multiq.c
- add several sysctls: multiq_tx_enable, coalesce_tx_enable,
and wakeup_tx_thread
- this obsoletes the hw.cxgb.snd_queue_len as ifq is replaced
by a buf_ring
Kip Macy [Sat, 22 Nov 2008 05:55:56 +0000 (05:55 +0000)]
- bump __FreeBSD version to reflect added buf_ring, memory barriers,
and ifnet functions
- add memory barriers to <machine/atomic.h>
- update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer
- remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to
allow drivers to efficiently manage multiple hardware queues
(i.e. not serialize all packets through one ifq)
- expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
Several small additions to the Chelsio 10G driver.
1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the
device from ever coming back up once it had been set to down.
2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible
to give the device more than IFQ_MAXLEN entries in its send queue. The
default remains 50.
3) Add code to place the card'd identification and serial number into
its description (%desc) so that users can tell which card they have
installed.
Warner Losh [Fri, 21 Nov 2008 03:03:57 +0000 (03:03 +0000)]
Create a /dev/cardbus%d.cis, to be compatible with older versions of
the software. This is a trivial amount of code to keep wireless
monitoring software working... I plan on removing it in 9.0.
Marius Strobl [Thu, 20 Nov 2008 18:44:09 +0000 (18:44 +0000)]
- According to OpenSolaris, CDMA flushing/syncing for Tomatillos
and XMITS has to be basically done in the same manner as for
the Sabres, i.e. only for devices behind PCI-PCI-bridges and
after a PIO read on the far side of the farest PCI-PCI-bridge.
Given that the Tomatillo documentation mentions no difference
to the Schizo bridges in this regard and this is also still
part of the procedure described Schizo documentation this
seems about right so adjust accordingly (the unconditional
CDMA flushing/syncing previously done was based on how Linux
behaves).
- Implement CDMA flushing/syncing for Schizo version >= 5,
which requires the workaround described in Schizo Errata I-23.
According to Schizo Errata I-13 it's just unusable with
version < 5 though. [1]
- Don't register the Schizo streaming buffer for now until it's
usage is sorted out according to the erratas.
- Register our interrupt filters with the revived INTR_FAST so
they these interrupts can even interrupt filters of device
drivers as necessary.
- Remove the comment regarding lack of newbus'ified bus_dma(9)
as being able to associate a DMA tag with a device would
allow to implement CDMA flushing/syncing in bus_dmamap_sync(9)
but that would totally kill performance. Given that for devices
not behind a PCI-PCI bridge the host-to-PCI bridges also only
do CDMA flushing/syncing based on interrupts there's no
additional disadvantage for polling(4) callbacks in the case
schizo(4) has to do the CDMA flushing/syncing but rather a
general problem.
Luigi Rizzo [Thu, 20 Nov 2008 14:57:09 +0000 (14:57 +0000)]
As reported in kern/118222, pxeboot in RELENG7 (and presumably
above) exhibits some misbehaviours on machines with AMD64 CPUs,
which at least in some cases I have tracked down to a heap overflow.
It is unclear whether it depends on the CPU or on the pxe bios
itself which may use more memory on AMD machines.
Noticeably a pxeboot compiled from 6.x sources works fine on all
machines I have tried so far, while a pxeboot compiled from 7.x
sources does not.
This patch is a first step in reducing the amount of memory used
while processing the configuration files read by the loader at boot
(some of them are quite large, 1700+ lines), and it does so by:
+ moving a buffer to static memory instead of allocating in the heap;
+ skipping empty lines;
+ reducing the amount of memory used for line descriptors;
Unfortunately there are several changes between 6.x and above,
affecting the compiler, the loader code itself, and libstand,
and it is not so straightforward to
These changes fix the behaviour on one motherboard with a
single-core AMD cpu, but are still not enough e.g on an Asus
M2N-VM (with a dual-core CPU).
I need to investigate the problem a bit more before figuring
out what should be committed to RELENG_7
Warner Losh [Thu, 20 Nov 2008 08:32:19 +0000 (08:32 +0000)]
damn. Always do make depend. Forgot to recompile main because of it,
so the changes for the struct cis -> struct tuple_list didn't get
made. They have been now.
Warner Losh [Thu, 20 Nov 2008 08:30:15 +0000 (08:30 +0000)]
Fix check for link target so we don't print cardbus CIS information twice.
Also, eliminate some magic constants and replace them with values from cis.h.
Warner Losh [Thu, 20 Nov 2008 08:20:53 +0000 (08:20 +0000)]
Restore now-useless ioctl as a roadmap. The original dumpcis code
assumed it had to toggle between attribute and common memory in the
cards. The kernel is supposed to cope with that automatically and
give us a tuple list. However, there's a number of details of how
that happens that's currently, ummm, magical and/or not implemented
for 16-bit PC Cards that have CIS_LONGLINK_C tuples in them (eg, mix
both attribute memory and common memory). Also, CIS_LOGNLINK_A
entries might not be handled completely correctly either, since there
can be gaps in the attribute vs common stuff.
All this will need to be corrected in the kernel. Once it is
corrected, dumpcis can be made even simpler in some ways, a little
more complicated in others once an API for presentation of CIS to
userland in these weird cases is settled upon.
Warner Losh [Thu, 20 Nov 2008 08:12:26 +0000 (08:12 +0000)]
The original programs that this code was lifted from (pccardd and
pccardc) parsed data to make decisions about stuff related to card
configuration.
The purely CIS dumping aspect of this program obviates the need for
such parsing. Save some space and don't parse the data anymore for
configuration purposes. Just parse it to print an interpreatation of
it.
Marius Strobl [Wed, 19 Nov 2008 22:12:32 +0000 (22:12 +0000)]
Use the interrupt level right below PIL_FAST for executing interrupt
filters instead of PIL_FAST and allow special filters and handlers
for interrupts which need to be able to interrupt even filters, f.e.
bus error interrupts, to be registered with the revived INTR_FAST
at PIL_FAST.
Marius Strobl [Wed, 19 Nov 2008 22:09:03 +0000 (22:09 +0000)]
Given that the buffer dcons_crom(4) exposes is used for both input
and output, set BUS_DMA_COHERENT when creating the DMA map used for
loading the buffer. As a side-effect this solves locking issues on
sparc64 when dcons(4) calls bus_dmamap_sync(9) while in an interrupt
filter, which are executed in a critical section, and iommu(4) has
to use a sleep lock when taking advantage of the streaming buffer.
Reported and tested by: kensmith
Approved by: simokawa
Ed Schouten [Wed, 19 Nov 2008 21:07:33 +0000 (21:07 +0000)]
Make nmdm(4) use MPSAFE callouts.
For some reason the nmdm(4) driver doesn't use CALLOUT_MPSAFE, even
though we live in the MPSAFE TTY era. Add the CALLOUT_MPSAFE flags.
System survives.
Rafal Jaworowski [Wed, 19 Nov 2008 17:34:28 +0000 (17:34 +0000)]
Initial storage functionality for U-Boot support library.
- Only non-sliced bsdlabel style partitioning is currently supported (but provisions
are made towards GPT support, which should follow soon)
- Enable storage support in loader on ARM