Commit Graph

65838 Commits

Author SHA1 Message Date
marius
2b9c38a67a In openprom_ioctl() ensure appropriate permissions and that data isn't
NULL and doesn't point to a NULL pointer before dereferencing it. This
fixes a panic triggered by Xorg 7.3.

Reported and tested by:	Bill Green
MFC after:		3 days
2007-12-20 00:31:04 +00:00
alc
af99f17cda Correct one half of a loop continuation condition in vm_phys_unfree_page().
At present, this error is inconsequential; the other half of the loop
continuation condition is sufficient to achieve correct execution.
2007-12-19 23:09:45 +00:00
mav
f381ac2711 Add option to set packets per second limits instead of default
bits per second ones.
2007-12-19 22:50:14 +00:00
imp
46b79678a8 When devclass_get_maxunit is passed a NULL, return -1 to indicate that
there's nothing allocated at all yet.
2007-12-19 22:05:07 +00:00
marcel
c932130a31 Redefine bus_space_tag_t on PowerPC from a 32-bit integral to
a pointer to struct bus_space. The structure contains function
pointers that do the actual bus space access.

The reason for this change is that previously all bus space
accesses were little endian (i.e. had an explicit byte-swap
for multi-byte accesses), because all busses on Macs are little
endian.
The upcoming support for Book E, and in particular the E500
core, requires support for big-endian busses because all
embedded peripherals are in the native byte-order.

With this change, there's no distinction between I/O port
space and memory mapped I/O. PowerPC doesn't have I/O port
space. Busses assign tags based on the byte-order only.
For that purpose, two global structures exist (bs_be_tag and
bs_le_tag), of which the address can be taken to get a valid
tag.

Obtained from: Juniper, Semihalf
2007-12-19 18:00:50 +00:00
imp
93ea7f3594 Actually program the interrupt controller for priorities. As we
support more AT91 platforms, we'll need to move this into some
platform init routine.
2007-12-19 17:34:17 +00:00
ambrisko
c805d7131a Add Dell's sub-vendor id to identify PERC6 RAID controller which has LSI
vendor id's.
2007-12-19 17:23:47 +00:00
ambrisko
a41ac17851 I incorrectly assumed the log buffer started from the beginning when it
is actually a circular log.  Deal with it rolling around.  Fortunately,
the log area is big and I haven't seen any roll over yet.  Update and
get rid of the obsolete comment.
2007-12-19 17:22:07 +00:00
ambrisko
edee84f0a7 Allow negative values to be specified in the loader. 2007-12-19 17:06:32 +00:00
ru
82b21d0858 Fix bugs in the TCP syncache timeout code. including:
When system ticks are positive, for entries in the cache
bucket, syncache_timer() ran on every tick (doing nothing
useful) instead of the supposed 3, 6, 12, and 24 seconds
later (when it's time to retransmit SYN,ACK).

When ticks are negative, syncache_timer() was scheduled
for the too far future (up to ~25 days on systems with
HZ=1000), no SYN,ACK retransmits were attempted at all,
and syncache entries added in that period that correspond
to non-established connections stay there forever.

Only HEAD and RELENG_7 are affected.

Reviewed by:	silby, kmacy (earlier version)
Submitted by:	Maxim Dounin, ru
2007-12-19 16:56:28 +00:00
emaste
a9a3bcada9 Do not recursively acquire aac_io_lock in aac_ioctl_event.
MFC After: 3 days
2007-12-19 14:33:40 +00:00
alc
3c2abd13fb Eliminate redundant code from vm_page_startup(). 2007-12-19 05:47:50 +00:00
kmacy
fad994205a Remove extraneous debug statements.
Noticed by: Andrey Chernov
2007-12-19 05:17:40 +00:00
kmacy
17d5d1f3fc Don't overload tcp_usrreqs unless the kernel doesn't provide offload support. 2007-12-18 23:00:25 +00:00
kmacy
7a03620a3b Incorporate TCP offload hooks in to core TCP code.
- Rename output routines tcp_gen_* -> tcp_output_*.
  - Rename notification routines that turn in to no-ops in the absence of TOE
    from tcp_gen_* -> tcp_offload_*.
  - Fix some minor comment nits.
  - Add a /* FALLTHROUGH */

Reviewed by: Sam Leffler, Robert Watson, and Mike Silbersack
2007-12-18 22:59:07 +00:00
obrien
ee337f2c34 Be more exact with sigaction SA_SIGINFO handling.
Reviewed by:	marcel
2007-12-18 20:39:13 +00:00
thompsa
dbcd24960c Simplify the error handling and use the dereferenced sc->sc_ifp pointer. 2007-12-18 09:13:04 +00:00
thompsa
c0871871de When the bridge has an address and a packet comes in for it then drop it if the
link has been marked discarding by Spanning Tree. This would cause the bridge
to see duplicate packets to itself even if STP has correctly calculated the
topology and blocked redundant links.

Reported by:	trasz
Tested by:	trasz
MFC after:	3 days
2007-12-18 07:04:50 +00:00
thompsa
3b94f3069c - Use the macro to check the port status has it will also test if its
administratively down (!IFF_UP)
 - Use the same parameters to lagg_link_active() to get the backup port as in
   the output path, this didnt actually matter in practice as sc_primary is
   always the first on the port list.

MFC after:	3 days
2007-12-18 02:12:03 +00:00
rrs
285c9ed214 - sctp-iterator should run at PI_NET priority ...not 0.
MFC after:	1 week
2007-12-18 01:24:15 +00:00
kmacy
9fc024313f only include intr_machdep.h when it is needed for intr_bind
ia64 doesn't have an intr_machdep.h
2007-12-17 23:39:28 +00:00
marcel
d7ca70a3f7 Remove file after being repocopied to ../ofw, where it lives on.
Repocopy by: simon@
2007-12-17 22:50:39 +00:00
marcel
91afcd2b37 Build the OFW loader from its new location after the sources
were repocopied from ./loader to ./ofw.
2007-12-17 22:19:44 +00:00
thompsa
1321a9c9d1 Add myself to the copyright. 2007-12-17 18:49:44 +00:00
rwatson
658a0a8d45 Fix a MAC label leak for POSIX semaphores, in which per-policy labels
would be properly disposed of, but the global label structure for the
semaphore wouldn't be freed.

MFC after:	3 days
Reported by:	tanyong <tanyong at ercist dot iscas dot ac dot cn>,
		zhouzhouyi
2007-12-17 17:26:32 +00:00
rwatson
4a0d85f1d4 Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
is the same code, but IPv6 has a separate free path.  The results was
that as new IPv6 TCP connections were created, kernel memory would
gradually leak.

MFC after:	3 days
Reported by:	tanyong <tanyong at ercist dot iscas dot ac dot cn>,
		zhouzhouyi
2007-12-17 17:20:57 +00:00
kmacy
f0dbf05ef2 disable update in place on transmit 2007-12-17 10:02:29 +00:00
kmacy
41d59439f8 Add SB_NOCOALESCE flag to disable socket buffer update in place 2007-12-17 10:02:01 +00:00
kmacy
a541ef6e7d Make TCP offload work on HEAD (modulo negative interaction between sbcompress
and t3_push_frames).
 - Import latest changes to cxgb_main.c and cxgb_sge.c from toestack p4 branch
 - make driver local copy of tcp_subr.c and tcp_usrreq.c and override tcp_usrreqs so
   TOE can also functions on versions with unmodified TCP

- add cxgb back to the build
2007-12-17 08:17:51 +00:00
davidxu
496a3a2c52 Check NULL pointer. 2007-12-17 08:09:37 +00:00
kmacy
6742ef6138 build tcp_offload.c instead of tcp_ofld.c 2007-12-17 08:00:08 +00:00
kmacy
b45a98500c incorporate feedback since initial commit
- rename tcp_ofld.[ch] to tcp_offload.[ch]
- document usage and locking conventions of the functions in the
  toe_usrreqs function vector
- document tcpcb, inpcb, and socket fields used by toe
- widen the listen interface into 2 functions
- rename DISABLE_TCP_OFFLOAD to TCP_OFFLOAD_DISABLE
- shrink conditional compilation to reduce the likelihood of bitrot
- replace sc->sc_toepcb checks in tcp_syncache.c with TOEPCB_ISSET
2007-12-17 07:56:27 +00:00
kmacy
5d9e84762f widen the routing event interface (arp update, redirect, and eventually pmtu change)
into separate functions

revert previous commit's changes to arpresolve and add a new interface
arpresolve2 which does arp resolution without an mbuf
2007-12-17 07:40:34 +00:00
davidxu
747bbe486b Add missing changes for fixing LOR of umtx lock and thread lock, follow
the committing of files:
	kern_resource.c revision 1.181
	sched_4bsd.c	revision 1.111
	sched_ule.c	revision 1.218
2007-12-17 05:55:07 +00:00
kevlo
f3f1d0b3a5 Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL
Reviewed by: imp
2007-12-17 05:08:54 +00:00
kmacy
139d7c3fb1 Don't panic in arpresolve if we're given a null mbuf. We could
insist that the caller just pass in an initialized mbuf even
if didn't have any data - but that seems rather contrived.
2007-12-17 04:19:25 +00:00
kmacy
ab4dffd44a Include cdefs.h and param.h for architectures with less header pollution 2007-12-16 21:22:24 +00:00
phk
d97768bb7c Add the magic word 0 value for CFA compliant devices. 2007-12-16 21:18:13 +00:00
rpaulo
b3d67d43ff Fix previous commit. The code ended up in the wrong function.
Approved by:	     njl (mentor)
2007-12-16 20:37:27 +00:00
phk
f0debf860a Chop DIOCGDELETE from userland up in 1024 sector chunks to give geom_disk
or any other bio chopping geom a reasonable size of work.

Check for delivered signals between chunks, because the request size
and service time is unbounded.
2007-12-16 19:38:26 +00:00
kmacy
707b3f65a7 Add back in cxgb now that the includes are believed to be fixed 2007-12-16 18:45:23 +00:00
kmacy
9bec876a09 Use the vm include convention of busdma 2007-12-16 18:43:57 +00:00
kmacy
74fb05ec40 need M_IOVEC define 2007-12-16 18:36:57 +00:00
kmacy
da6c45e051 Don't globally include mvec.h its only needed by cxgb_sge.c 2007-12-16 18:26:04 +00:00
phk
e8d782d36d Don't limit BIO_DELETE requests to MAXPHYS, they perform no data
transfers, so they are not subject to the VM system limitation.
2007-12-16 18:03:31 +00:00
kmacy
fa3f9f75ec Remove cxgb module from build until I can compensate for the lack of header
pollution on architectures other than amd64
2007-12-16 17:43:40 +00:00
stas
10ac9b50a2 - Don't return 0xffff if PHY id isn't equal 0. This allows PHYs with
non-zero addresses to be used.

Approved by:	cognet
MFC after:	2 weeks
2007-12-16 12:57:12 +00:00
stas
beccb3754c - Add quirk for the TrendNet TU-S9 adapter, which uses new version of PL2303
chip (revision 0x400). This allows it to be correctly identified as PL2303X.

Approved by:	maxim
MFC after:	1 week
2007-12-16 12:39:50 +00:00
scottl
9d644f65df Add a missing mutex unlock.
Reported by: Michael Jung
2007-12-16 07:49:44 +00:00
kmacy
ee178ec997 turn off building of cxgb properly ... sigh 2007-12-16 07:44:08 +00:00