Commit Graph

150578 Commits

Author SHA1 Message Date
Pyun YongHyeon
c215fd771d Do bus_dmamap_sync call only if frame size is greater than
standard buffer size. If controller is not capable of handling
jumbo frame, interface MTU couldn't be larger than standard MTU
which in turn the received should be fit in standard buffer. This
fixes bus_dmamap_sync call for jumbo ring is called even if
interface is configured to use standard MTU.
Also if total frame size could be fit into standard buffer don't
use jumbo buffers.
2009-11-06 23:49:20 +00:00
Pyun YongHyeon
a669a81f0b bge(4) already switched to use UMA backed page allocator and local
memory allocator for jumbo frame was removed long time ago. Remove
no more used macros.
2009-11-06 22:37:29 +00:00
Attilio Rao
337c5ff4fc Save the sack when doing a lockmgr_disown() call.
Requested by:	kib
MFC:		3 days
2009-11-06 22:33:03 +00:00
Attilio Rao
9c76640868 - Improve comments about locking of the "struct fifoinfo" which is a bit
unclear.
- Fix a memory leak [0]

[0] Diagnosed by:	Dorr H. Clark <dclark at engr dot scu dot edu>
MFC:	1 week
2009-11-06 22:29:46 +00:00
Jung-uk Kim
b66e2b8e50 Remove duplicate suspend/resume code from vga_pci.c and let vga(4) register
itself to an associated PCI device if it exists.  It is little bit hackish
but it should fix build without frame buffer driver since r198964.
Fix some style(9) nits in vga_isa.c while we are here.
2009-11-06 20:32:26 +00:00
John Baldwin
f802264db1 Take a step towards removing if_watchdog/if_timer. Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.

(Missed this driver in the earlier commit.)
2009-11-06 20:07:16 +00:00
Pyun YongHyeon
ff08021657 It's normal to see Rx FIFO overruns under high network load and
showing the message creates other side-effects. Remove the Rx
FIFO overrun message in interrupt handler. msk(4) should recover
from the FIFO overruns without any user intervention. Users can
still check the Rx FIFO overrun counter from MAC MIB statistics
maintained in driver(dev.msk.0.stats.rx.overflows).
2009-11-06 18:51:05 +00:00
Pyun YongHyeon
56964c4c9f Remove unnecessary header file. 2009-11-06 18:36:09 +00:00
John Baldwin
775a636b11 - Use device_printf() instead of printf() with an explicit unit number
in the PCI attach routine.
- Simplify PCI probe.
- Remove no-longer-used 'unit' from an_attach() parameters.

PR:		kern/126924
Submitted by:	gavin
2009-11-06 18:28:13 +00:00
Hajimu UMEMOTO
287e3cb475 Make nd6_llinfo_timer() does its job, again. ln->la_expire was
greater than time_second, in most cases.

MFC after:	3 days
2009-11-06 17:34:26 +00:00
John Baldwin
c6d9480519 Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

Reviewed by:	bz
MFC after:	1 week
2009-11-06 16:55:05 +00:00
John Baldwin
e1b17582f4 Take a step towards removing if_watchdog/if_timer. Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.
2009-11-06 14:55:01 +00:00
John Baldwin
f1b211841d Use device_printf() and if_printf() instead of printf() with an explicit
unit number and remove 'unit' members from softc.
2009-11-06 14:52:37 +00:00
John Baldwin
50c3239e85 Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.

Submitted by:	Dorr H. Clark  dclark of engr.scu.edu
MFC after:	1 week
2009-11-06 13:10:12 +00:00
Alexander Motin
1f02c0f7a9 Document support for more chips. 2009-11-06 11:17:33 +00:00
Hajimu UMEMOTO
2eb10edccb Don't call LLE_FREE() after nd6_free().
MFC after:	3 days
2009-11-06 10:07:38 +00:00
Ed Schouten
54a1c2b5aa Add MAP_ANONYMOUS.
Many operating systems also provide MAP_ANONYMOUS. It's not hard to
support this ourselves, we'd better add it to make it more likely for
applications to work out of the box.

Reviewed by:	alc (mman.h)
2009-11-06 07:17:31 +00:00
Marcel Moolenaar
9da005c692 Unbreak E500 builds. The inline assembly for the 970 CPUs
is invalid when compiling for BookE.
2009-11-06 06:09:04 +00:00
Pyun YongHyeon
c3bbfed430 Correct MSI mode register bits. 2009-11-06 01:11:59 +00:00
Jung-uk Kim
2259d74c68 Save/restore VGA state from vga_pci.c instead of relying on vga_isa.c.
It was not working because we were saving its state after the device was
powered down.  Simplify vesa_load_state() as the culprit is fixed now.
2009-11-05 22:58:50 +00:00
Jilles Tjoelker
663c61a35b sh: Fix memory leak when using a variable in arithmetic like $((x)).
MFC after:	3 weeks
2009-11-05 20:44:39 +00:00
Christian Brueffer
f11ccc426a Fix two memory leaks in error cases.
PR:		138378
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
Approved by:	mlaier
MFC after:	1 week
2009-11-05 16:30:16 +00:00
Attilio Rao
f1c892a33c Strip from messages for users external URLs the project cannot directly
control.

Requested by:	kib, rwatson
2009-11-05 14:34:38 +00:00
Ruslan Ermilov
d638857a04 Revert the spelling of Taiwan to be politically neutral in accordance
with the policy published at http://www.freebsd.org/internal/i18n.html.

Requested by:	core (murray)
2009-11-05 10:01:15 +00:00
Alexander Motin
379ad35853 MFp4:
Implement device stats accounting for ATA commands.
2009-11-05 08:55:24 +00:00
Alexander Leidinger
f3d62ac43d Fix typo in kernel message. The fix is based upon the patch in the PR.
PR:		kern/140279
Submitted by:	Alexander Best <alexbestms@math.uni-muenster.de>
MFC after:	1 week
2009-11-05 07:37:48 +00:00
Marcel Moolenaar
4590f2282a Fix gdb_cpu_getreg() to actually match GDB's register
definition.
2009-11-05 06:31:50 +00:00
Marcel Moolenaar
2ffa44209a Implement db_trace_thread() by calling db_stack_trace_cmd() and
passing a frame pointer that comes from the thread context. This
fixes DDB backtraces by not unwinding debugger functions first.
2009-11-05 06:27:46 +00:00
Marcel Moolenaar
faa7ba7a3f Implement db_trace_self() by calling db_stack_trace_cmd()
and not db_trace_thread().
2009-11-05 06:23:02 +00:00
Marcel Moolenaar
c2ef543ba1 IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL
instead.
2009-11-05 06:08:04 +00:00
Jaakko Heinonen
5639f997b7 File flags handling fixes for ext2fs:
- Disallow setting of flags not supported by ext2fs.
- Map EXT2_APPEND_FL to SF_APPEND.
- Map EXT2_IMMUTABLE_FL to SF_IMMUTABLE.
- Map EXT2_NODUMP_FL to UF_NODUMP.

Note that ext2fs doesn't support user settable append and immutable flags.
EXT2_NODUMP_FL is an user settable flag also on Linux.

PR:		kern/122047
Reported by:	Ighighi
Submitted by:	Aditya Sarawgi (original version)
Reviewed by:	bde
Approved by:	trasz (mentor)
2009-11-05 04:51:38 +00:00
Xin LI
2804a96a50 Cleanup code to make it WARNS=6 clean:
- ANSIfy prototypes;
 - Add __unused for parameters that is not being currently used;
 - Add a header for subrountines being called from other modules.

Reviewed by:	mjacob
2009-11-04 23:36:23 +00:00
Jung-uk Kim
8fa0490a2e Tweak memory allocation for amd64 suspend/resume CPU context. 2009-11-04 22:39:18 +00:00
Xin LI
c2b1d5a3d6 Include string.h for prototype of strcmp(). 2009-11-04 21:12:33 +00:00
Pyun YongHyeon
3ee5d7da8e Make bge_newbuf_std()/bge_newbuf_jumbo() returns actual error code
for buffer allocation. If driver know we are out of Rx buffers let
controller stop. This should fix panic when interface is run even
if it had no configured Rx buffers.
2009-11-04 21:06:54 +00:00
Pyun YongHyeon
0ac56796f7 Remove common DMA tag used for TX/RX mbufs and create Tx DMA tag
and Rx DMA tag separately. Previously it used a common mbuf DMA tag
for both Tx and Rx path but Rx buffer(standard ring case) should
have a single DMA segment and maximum buffer size of the segment
should be less than or equal to MCLBYTES. This change also make it
possible to add TSO with minor changes.
2009-11-04 20:57:52 +00:00
Pyun YongHyeon
a23634a177 Covert bge_newbuf_std to use bus_dmamap_load_mbuf_sg(9). Note,
bge_newbuf_std still has a bug for handling dma map load failure
under high network load. Just reusing mbuf is not enough as driver
already unloaded the dma map of the mbuf. Graceful recovery needs
more work.
Ideally we can just update dma address part of a Rx descriptor
because the controller never overwrite the Rx descriptor. This
requires some Rx initialization code changes and it would be done
later after fixing other incorrect bus_dma(9) usages.
2009-11-04 20:40:38 +00:00
Pyun YongHyeon
a41504a9b1 Use correct dma tag for jumbo buffer. 2009-11-04 20:19:21 +00:00
Doug Barton
4c061eaa53 Fix not only the grammar, but also the formatting that makes the gag 2009-11-04 18:40:05 +00:00
Jung-uk Kim
00b9e39e68 Do not probe video mode if we are not going to use it. 2009-11-04 17:30:48 +00:00
Alexander Motin
2a3510fd51 Fix protype. 2009-11-04 16:37:13 +00:00
Alexander Motin
fd2cc0bde8 PMP commands use short format. PMP write doesn't return result. 2009-11-04 16:16:50 +00:00
Alexander Motin
efa575b6be MFp4:
- Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be
periph flag. May be SIM, may be CCB, but now it works fine just without it.
- Remove check unused for at least five years. If we will ever have non-BIO
devices in CAM, this check is smallest of what we will need.
- If several controllers complete requests same time, call swi_sched()
only once.
2009-11-04 15:40:19 +00:00
Alexander Motin
c1bd46c2d3 MFp4:
- Add support for sector size > 512 bytes and physical sector of several
logical sectors, introduced by ATA-7 specification.
- Remove some obsoleted code.
2009-11-04 15:24:32 +00:00
Alexander Motin
c82b245af9 Do not unarm callout on request completion and change slot selection
algorithm as done in ahci(4). This saves some CPU time on high request
rates.
2009-11-04 15:10:46 +00:00
Edward Tomasz Napierala
7a172809b5 Fix build.
Submitted by:	Andrius Morkūnas <hinokind at gmail.com>
2009-11-04 08:25:58 +00:00
Edward Tomasz Napierala
3b1b09809f Revert r198874, pending further discussion. 2009-11-04 07:14:16 +00:00
Edward Tomasz Napierala
da9ce28ecb Style fixes. 2009-11-04 07:04:15 +00:00
Edward Tomasz Napierala
8fafa5cecf Make sure we don't end up with VAPPEND without VWRITE, if someone calls open(2)
like this: open(..., O_APPEND).
2009-11-04 06:48:34 +00:00
Edward Tomasz Napierala
597954c813 While VAPPEND without VWRITE makes sense for VOP_ACCESSX(9) (e.g. to check
for the permission to create subdirectory (ACE4_ADD_SUBDIRECTORY)), it doesn't
really make sense for VOP_ACCESS(9).  Also, many VOP_ACCESS(9) implementations
don't expect that.  Make sure we don't confuse them.
2009-11-04 06:47:14 +00:00