mav [Tue, 22 Dec 2009 19:56:35 +0000 (19:56 +0000)]
MFC r200218:
- Cleanup kernel messages, mostly PMP.
- Took references on devices, while PMP reinitializes them, to not let them
go and distort freeze reference counting.
yongari [Mon, 21 Dec 2009 18:52:38 +0000 (18:52 +0000)]
MFC r199563,199608-199613
r199563:
Fix copy & paste error and remove extra space before colon.
r199608:
Remove unnecessary structure packing.
r199609:
Add initial endianness support. It seems the controller supports
both big-endian and little-endian format in descriptors for Rx path
but I couldn't find equivalent feature in Tx path. So just stick to
little-endian for now.
r199610:
Because we know received bytes including CRC there is no reason to
call m_adj(9). The controller also seems to have a capability to
strip CRC bytes but I failed to activate this feature except for
loopback traffic.
r199611:
Add IPv4/TCP/UDP Tx checksum offloading support. It seems the
controller also has support for IP/TCP checksum offloading for Rx
path. But I failed to find to way to enable Rx MAC to compute the
checksum of received frames.
r199612:
Add __FBSDID.
r199613:
Only Tx checksum offloading is supported now. Remove experimental
code sneaked in r199611.
yongari [Mon, 21 Dec 2009 18:34:18 +0000 (18:34 +0000)]
MFC r199558,199561
r199558:
Use bus_{read,write}_4 rather than bus_space_{read,write}_4.
r199561:
Use capability pointer to access PCIe registers rather than
directly access them at fixed address. Frequently the register
offset could be changed if additional PCI capabilities are added to
controller.
One odd thing is ET_PCIR_L0S_L1_LATENCY register. I think it's PCIe
link capabilities register but the location of the register does
not match with PCIe capability pointer + offset. I'm not sure it's
shadow register of PCIe link capabilities register.
yongari [Mon, 21 Dec 2009 18:07:15 +0000 (18:07 +0000)]
MFC r199548:
Remove complex macros that were used to compute bits values.
Although these macros may have its own strength, its complex
definition make hard to read the code.
jilles [Sun, 20 Dec 2009 20:51:20 +0000 (20:51 +0000)]
MFC r198173: sh: show more info about syntax errors in command substitution:
the line number where the command substitution started.
This applies to both the $() and `` forms but is most useful for ``
because the other line number is relative to the enclosed text there.
(For older versions, -v can be used as a workaround.)
kan [Sun, 20 Dec 2009 02:35:10 +0000 (02:35 +0000)]
MFC r198471.
Log:
Compile libgcov without stack protection. It can be linked into
both static and dynamic binaries compiled with or without stack
protection and should not depend on libssp_nonshared.a symbols.
marius [Sun, 20 Dec 2009 01:44:47 +0000 (01:44 +0000)]
MFC: r200482, r200485
o Properly support M5229 revision 0xc7 and 0xc8:
- These revisions no longer have cable detection capability.
- The UDMA support bit of register 0x4b has been dropped without an
replacement.
- According to Linux it's crucial for working ATAPI DMA support to
also set the reserved bit 1 of regsiter 0x53 with these revisions.
o Only set ATA_CHECKS_CABLE for chip versions that actually support
cable detection, i.e. neither for ALI_OLD nor for ALI_NEW revisions
>= 0xc7.
marius [Sun, 20 Dec 2009 01:38:01 +0000 (01:38 +0000)]
MFC: r200481
Specify the capability and media bits of the capabilities page in
native, i.e. big-endian, format and convert as appropriate like we
also do with the multibyte fields of the other pages. This fixes
the output of acd_describe() to match reality on big-endian machines
without breaking it on little-endian ones. While at it, also convert
the remaining multibyte fields of the pages read although they are
currently unused for consistency and in order to prevent possible
similar bugs in the future.
attilio [Sat, 19 Dec 2009 19:30:27 +0000 (19:30 +0000)]
MFC r199805:
Change gcore in order to get rid of the procfs support and use FreeBSD's
specific interfaces. Main changes:
- now gcore recognizes threads within the the process and handle dumps on
a thread scope
- the process to be analyzed should be stopped while gcore runs
- gcore may not work with processes that are being debugged with gdb or
truss
- ptrace may let interruptible calls to return EINTR, thus dirtying
signals handling within the process
kib [Sat, 19 Dec 2009 11:31:28 +0000 (11:31 +0000)]
MFC r198507:
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals.
MFC r198590:
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.
MFC r198670:
For trapsignal() and postsig(), kern_sigprocmask() is called with
both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock
recursion on ps_mtx in reschedule_signals().
kib [Sat, 19 Dec 2009 11:13:59 +0000 (11:13 +0000)]
MFC r198506:
In kern_sigsuspend(), manipulate thread signal mask using
kern_sigprocmask(). Also, do cursig/postsig loop immediately after
waiting for signal, repeating the wait if wakeup was spurious due to
race with other thread fetching signal from the process queue before us.
MFC r199136:
Use cpu_set_syscall_retval(9) to set syscall result, and return
EJUSTRETURN from kern_sigsuspend() to prevent syscall return code from
modifying wrong frame.
Take care of possibility that pending SIGCONT might be cancelled by
SIGSTOP, causing postsig() not to deliver any catched signal.
avg [Sat, 19 Dec 2009 11:05:42 +0000 (11:05 +0000)]
MFC r200053,200091: ichsmb: drop default attachment to generic smbus hw
Note that r200091 completely overrides r200053 and the merge of the
former is recorded for bookkeeping only.
r200091 won't be merged to 'more stable' branche(s) because of the POLA.
kib [Sat, 19 Dec 2009 10:54:29 +0000 (10:54 +0000)]
MFC r197963:
Put process-directed signals to the process queue unconditionally,
selecting the thread to deliver the signal only by the thread returning
to usermode.
Change cursig() and postsig() to look both into the thread and process
signal queues.
MFC r197976:
Fix typo.
MFC r200082:
Remove wrong assertion. Debugee is allowed to lose a signal
jhb [Fri, 18 Dec 2009 22:23:27 +0000 (22:23 +0000)]
MFC 200357:
Don't warn about an RSDP with a corrupt checksum. The kernel does a better
job about warning about these things later and this message can be
confusing.
jhb [Fri, 18 Dec 2009 21:21:14 +0000 (21:21 +0000)]
MFC 200310:
Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot. I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.
jhb [Fri, 18 Dec 2009 21:01:56 +0000 (21:01 +0000)]
MFC 200309:
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
safely allocate a heap region above 1MB. This enables {gpt,}zfsboot()
to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers. This
allows more reliable reading of compressed files in a raidz/raidz2 pool.
jhb [Fri, 18 Dec 2009 20:28:04 +0000 (20:28 +0000)]
MFC 200216,200219:
- Various small whitespace and style fixes.
- Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.
jhb [Fri, 18 Dec 2009 19:43:44 +0000 (19:43 +0000)]
MFC 200084:
Properly return an error reply if an NFS remove or link operation fails.
Previously the failing operation would allocate an mbuf and construct an
error reply, but because the function did not return 0, the NFS server
assumed it had failed to generate a reply and would leak the reply mbuf as
well as not sending the reply to the NFS client.
jhb [Fri, 18 Dec 2009 18:30:49 +0000 (18:30 +0000)]
MFC 200037:
ndis_scan_results() can sleep if the scan results are not ready when
ndis_scan() is called. However, ndis_scan() is invoked from softclock()
and cannot sleep. Move ndis_scan_results() to the ndis driver's scan_end
hook instead.
jhb [Thu, 17 Dec 2009 20:41:27 +0000 (20:41 +0000)]
MFC 199606, 199614:
Add an internal _once() method. This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes. Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.
kib [Thu, 17 Dec 2009 19:53:16 +0000 (19:53 +0000)]
MFC r199829:
Implement rtld part of the support for -z nodlopen (see ld(1)).
MFC r199877:
Allow to load not-openable dso when tracing. This fixes ldd on such dso or
dso linked to non-openable object.
Remove '\n' at the end of error message.
End comments with dot.
marius [Wed, 16 Dec 2009 18:39:32 +0000 (18:39 +0000)]
MFC: r200459
Unbreak the ata_atapi() usage. Since r200171 (MFC'ed in r200432) the
mode setting functions get a ata_device type device passed instead of
a ata_channel one, thus ata_atapi() has to be adjusted accordingly.
mav [Wed, 16 Dec 2009 17:48:26 +0000 (17:48 +0000)]
MFC r200607:
Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
subsequent timeouts. Restore previous limit for now, at least until
I will have hardware to experiment.
ume [Tue, 15 Dec 2009 15:01:52 +0000 (15:01 +0000)]
MFC r199995:
Don't try to bind to an anycast address. The KAME IPv6 stack doesn't
allow bind to an anycast address. It does away with an annoying
message.
stas [Tue, 15 Dec 2009 10:16:57 +0000 (10:16 +0000)]
MFC r198318:
- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
instead of POSTREAD: the hardware do not touch this memory (CPU
updates it). It is already synchronized as PREWRITE after the
processing is done.
stas [Tue, 15 Dec 2009 10:00:00 +0000 (10:00 +0000)]
- MFC r197832, r197834, r197837:
- Add support for new BGE chips (5761, 5784 and 57780). These chips uses new
BGE_PCI_PRODID_ASICREV register to store the chip identifier and its revision.
- Add new grouping macro for 7575+ chips (BGE_IS_5755_PLUS).
- Add IDs for Fujitsu-branded Broadcom adapters.
rwatson [Mon, 14 Dec 2009 13:13:43 +0000 (13:13 +0000)]
Merge r197841 from head to stable/8:
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
operation on a file descriptor that is not authorized by the descriptor's
capability flags.
rwatson [Mon, 14 Dec 2009 12:19:21 +0000 (12:19 +0000)]
Merge r197808 from head to stable/8:
In rtld's map_object(), use pread(..., 0) rather than read() to read the
ELF header from the front of the file. As all other I/O on the binary
is done using mmap(), this avoids the need for seek privileges on the
file descriptor during run-time linking.
rwatson [Mon, 14 Dec 2009 00:19:31 +0000 (00:19 +0000)]
Merge r197636 from head to stable/8:
Reserve system call numbers for Capsicum security framework capabilities,
capability mode, and process descriptors: cap_new, cap_getrights, cap_enter,
cap_getmode, pdfork, pdkill, pdgetpid, and pdwait.
Obtained from: TrustedBSD Project
Sponsored by: Google
dougb [Sun, 13 Dec 2009 23:56:46 +0000 (23:56 +0000)]
MFC r200377:
Update to the December 12, 2008 version of this file. The one
substantive change is to add the IPv6 address of L. The other
changes are all CAPS LOCK related.
rnoland [Sun, 13 Dec 2009 15:03:54 +0000 (15:03 +0000)]
MFC r198694,r198697
Some general cleanup of scatter/gather memory allocation
- We don't need to check malloc return values with M_WAITOK
- remove variables that we don't really need
- cleanup the error paths by just calling drm_sg_cleanup()
- fix drm_sg_cleanup() to be safe to call at any time
antoine [Sat, 12 Dec 2009 12:34:20 +0000 (12:34 +0000)]
MFC r199187 to stable/8:
Remove trailing ";" in struct ieee80211_beacon_offsets declaration
Found by: phk's FlexeLint in September
Reviewed by: rpaulo@
mav [Sat, 12 Dec 2009 10:37:31 +0000 (10:37 +0000)]
MFC r200171, r200182, r200275, r200295, r200359:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this option deprecates all ata(4)
peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers
(ada, cd, ...) and interfaces to be natively used instead.
As side effect of this, ata(4) mode setting code was completely rewritten
to make controller API more strict and permit above change. While doing
this, SATA revision was separated from PATA mode. It allows DMA-incapable
SATA devices to operate and makes hw.ata.(ata|atapi)_dma tunable work again.
Also allow ata(4) controller drivers (except some specific or broken ones)
to handle larger data transfers. Previous constraint of 64K was artificial
and is not really required by PCI ATA BM specification or hardware.