Commit Graph

71942 Commits

Author SHA1 Message Date
Marius Strobl
6c9f0f2124 Fix whitespace. 2009-04-14 19:11:02 +00:00
Marius Strobl
24b847f1f0 Fix masking of TTE bits; the TD_*_MASK macros need shifting via the
corresponding TD_*_SHIFT.

MFC after:	3 days
2009-04-14 19:02:34 +00:00
John Baldwin
bfee0576cb - Consolidate duplicated code for reading and sizing BARs and writing base
addresses to BARs into new pci_read_bar() and pci_write_bar() routines.
  pci_add_map(), pci_alloc_map(), and pci_delete_resource() now use these
  routines to work with BARs.
- Just pass the device_t for the new PCI device to various routines instead
  of passing the device, bus, slot, and function.

Reviewed by:	imp
2009-04-14 18:32:37 +00:00
Jack F Vogel
b3096a0430 Thanks to Michael Tuexen and Randall Scott for providing a
few important bug fixes found while they were doing SCTP
development, and that I somehow lost during the scramble.

Thanks guys!!
2009-04-14 17:14:35 +00:00
John Baldwin
087ebb8a5c Use a disk address instead of an int to hold the starting offset of an
open partition.  This fixes access to partitions whose starting offset
is >= 2 TB.

Submitted by:	"James R. Van Artsdalen"  james jrv.org
MFC after:	3 days
2009-04-14 14:19:18 +00:00
Ed Schouten
0de5b9b0f0 Use si_drv1 instead of dev2unit() in twe(4) and twa(4)
Reviewed by:	scottl
2009-04-14 14:02:43 +00:00
Ed Schouten
9078597210 Use si_drv1 instead of dev2unit() in powermac_nvram.
Reviewed by:	nwhitehorn
2009-04-14 13:18:39 +00:00
Ed Schouten
b7d9e67c45 Use si_drv1 instead of dev2unit() inside agp(4).
Reviewed by:	rnoland
2009-04-14 13:11:34 +00:00
Ed Schouten
9555aafab2 Let tdfx(4) use si_drv1 instead of using dev2unit(). 2009-04-14 11:57:26 +00:00
Ed Schouten
9ef0e425f3 Use si_drv1 to store joy(4)'s softc.
There are still some calls to dev2unit() left, but I guess we should
take care of those another time.
2009-04-14 11:23:09 +00:00
Randall Stewart
544e35bd97 Move the flight size reduction to right after
we recognize its a retransmit, ahead of the PR-SCTP
work. Without this fix, we end up NOT reducing flight
size and causing an miscalculation when PR-SCTP is active
and data is skipped.

Obtained from:	Michael Tuexen.
2009-04-14 07:50:29 +00:00
Nathan Whitehorn
e3bcab29e6 Changing the overflow trap to use bla to branch to dbtrap in r190946 was
bogus. Revert to a branch that does not set LR. It's been a long week...
2009-04-14 04:15:56 +00:00
Kip Macy
f2502470b5 - define em_transmit and em_qflush
- make buF_ring usage conditional but enabled by default

Reviewed by:	jfv
2009-04-14 03:36:59 +00:00
Kip Macy
aee3056f64 call default if_qflush on ifq if default method isn't used by the driver 2009-04-14 03:17:44 +00:00
Warner Losh
f133918640 Another NE-2000 clone. The GVC NIC-2000P Ethernet adapter. Based on
the MN5017 chipset.  There's no vendor/product pair on this card, so
it needs to be matched by the CIS strings.
2009-04-14 03:13:05 +00:00
Kip Macy
3efea33724 Adapt buf_ring abstraction interface to allow consumers to interoperate with ALTQ 2009-04-14 00:27:59 +00:00
Kip Macy
5e6a926611 - use a shared lock for reads
- remove stale comment

Reviewed by:	jeffr
2009-04-13 23:09:44 +00:00
Sam Leffler
19ea87c42b o eliminate a << in calculating the tx time for turbo mode by pre-multiplying
data in the phy tables
o correct the ctrl rate indices in the 5212 turbog phy table
2009-04-13 21:01:08 +00:00
Sam Leffler
e40b6ab1cf don't use caddr_t to match ieee80211_dump_pkt type; supplying the correct
one costs nothing
2009-04-13 20:58:47 +00:00
Sam Leffler
040972a18b o fix dynamic slave-side tdma slot length updating: we need to re-setup the
burst length in the tx q's
o remove re-config of the beaconq on update; it's not needed
2009-04-13 20:57:34 +00:00
Sam Leffler
5e86169a67 add a debug msg for when a fixed transmit rate is not applied because
it's not found in the sta's negotiated rate set
2009-04-13 20:54:08 +00:00
Sam Leffler
5434ed5af3 setup turboA/G fixed rate parameters too; this is needed, in particular,
for turboG operation
2009-04-13 20:53:12 +00:00
Sam Leffler
baa55e71d4 correct debug printf 2009-04-13 20:50:51 +00:00
Sam Leffler
4477b68344 check correct address for a bssid mtch 2009-04-13 20:50:07 +00:00
Sam Leffler
c5262b82e6 fix txparms setup for 108G sta's: ieee80211_iserp_rateset does not
identify a station operating in turbo-boost mode because it has a
pure ofdm rate set; add an explicit check for the channel type
instead of depending on IEEE80211_NODE_ERP being set
2009-04-13 20:45:29 +00:00
Konstantin Belousov
e0769d2dff Remove trailing spaces 2009-04-13 19:54:33 +00:00
Marius Strobl
b7f089e9f1 Fix whitespace. 2009-04-13 19:43:37 +00:00
Konstantin Belousov
3feb57a0a8 The bus_dmamap_load_uio(9) shall use pmap of the thread recorded in the
uio_td to extract pages from, instead of unconditionally use kernel
pmap.

Submitted by:	Jason Harmening <jason.harmening gmail com> (amd64 version)
PR:	amd64/133592
Reviewed by:	scottl (original patch), jhb
MFC after:	2 weeks
2009-04-13 19:20:32 +00:00
David Xu
945488297b Make UMTX_OP_WAIT_UINT actually wait for an unsigned integer on 64-bits
machine.

MFC after: 1 week
2009-04-13 05:21:17 +00:00
Sam Leffler
89047529ac remove reference to sc_tdmabintcnt; it was removed in r190848 2009-04-13 03:20:21 +00:00
Pyun YongHyeon
0685c824ca Don't blindly set IP packet length from interface MTU in TSO case.
Remote host can advertise smaller MSS than that of sender so upper
stack might have adjusted the MSS which in turn generates IP
packets that are less size than that of interface MTU.

Reported by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
Tested by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )
MFC after:	3 days
2009-04-13 00:32:34 +00:00
Robert Watson
de231a063a Put TCPSTAT_ADD() and TCPSTAT_INC() behind _KERNEL.
MFC after:	3 days
2009-04-12 21:28:35 +00:00
Rick Macklem
45452edc37 Change nfsserver so that it uses the nfssvc() system call provided
in sys/nfs/nfs_nfssvc.c by registering with it using the
	nfsd_call_nfsserver function pointer. Also, add the build glue for
	nfs_nfssvc.c optionally based on "nfsserver" and also as a loadable
	module.

Submitted by:	rmacklem
Reviewed by:	kib
Approved by:	kib (mentor)
2009-04-12 19:04:27 +00:00
Robert Watson
6bf65bcf3a Update stats in struct carpstats using two new macros: CARPSTATS_ADD()
and CARPSTATS_INC(), rather than directly manipulating the fields of
the structure.  This will make it easier to change the implementation
of these statistics, such as using per-CPU versions of the data
structure.

MFC after:	3 days
2009-04-12 14:19:37 +00:00
Robert Watson
07cf7ab29c Update stats in struct pimstat using two new macros: PIMSTAT_ADD()
and PIMSTAT_INC(), rather than directly manipulating the fields of
the structure.  This will make it easier to change the
implementation of these statistics, such as using per-CPU versions
of the data structure.

MFC after:	3 days
2009-04-12 14:06:26 +00:00
Robert Watson
fb83a36856 Update stats in struct mrtstat using two new macros: MRTSTAT_ADD()
and MRTSTAT_INC(), rather than directly manipulating the fields of
the structure.  This will make it easier to change the
implementation of these statistics, such as using per-CPU versions
of the data structure.

MFC after:	3 days
2009-04-12 14:00:36 +00:00
Robert Watson
bd88cce2ed Update stats in struct igmpstat using two new macros:
IGMPSTAT_ADD() and IGMPSTAT_INC(), rather than directly
manipulating the fields of the structure.  This will make it
easier to change the implementation of these statistics,
such as using per-CPU versions of the data structures.

MFC after:	3 days
2009-04-12 13:41:13 +00:00
Robert Watson
e27b0c8775 Update stats in struct icmpstat and icmp6stat using four new
macros: ICMPSTAT_ADD(), ICMPSTAT_INC(), ICMP6STAT_ADD(), and
ICMP6STAT_INC(), rather than directly manipulating the fields
of these structures across the kernel.  This will make it
easier to change the implementation of these statistics,
such as using per-CPU versions of the data structures.

In on case, icmp6stat members are manipulated indirectly, by
icmp6_errcount(), and this will require further work to fix
for per-CPU stats.

MFC after:	3 days
2009-04-12 13:22:33 +00:00
Robert Watson
f68f9f77fe Commit file omitted in r190962:
Update stats in struct udpstat using two new macros, UDPSTAT_ADD()
and UDPSTAT_INC(), rather than directly manipulating the fields
across the kernel.  This will make it easier to change the
implementation of these statistics, such as using per-CPU versions
of the data structures.

MFC after:    3 days
2009-04-12 11:53:12 +00:00
Robert Watson
026decb8f3 Update stats in struct udpstat using two new macros, UDPSTAT_ADD()
and UDPSTAT_INC(), rather than directly manipulating the fields
across the kernel.  This will make it easier to change the
implementation of these statistics, such as using per-CPU versions
of the data structures.

MFC after:	3 days
2009-04-12 11:42:40 +00:00
Kip Macy
f0b9868d3a sendfile doesn't modify the vnode - acquire vnode lock shared
Reviewed by:	ups, jeffr
2009-04-12 05:19:35 +00:00
Nathan Whitehorn
8cf9d6cd7e Rework the way we get the cacheline size. Instead of having a table of
CPUs known to use 128 byte cache lines and defaulting to 32, use the dcbz
instruction to measure it. Also make dcbz behave the way you would
expect on PPC 970.
2009-04-12 03:03:55 +00:00
Robert Watson
86425c62a0 Update stats in struct ipstat using four new macros, IPSTAT_ADD(),
IPSTAT_INC(), IPSTAT_SUB(), and IPSTAT_DEC(), rather than directly
manipulating the fields across the kernel.  This will make it easier
to change the implementation of these statistics, such as using
per-CPU versions of the data structures.

MFC after:	3 days
2009-04-11 23:35:20 +00:00
Alan Cox
b9519926e6 Remove execute permission from the memory allocated by sbrk().
Pre-announced on: -arch (3/31/09)
Discussed with: rwatson
Tested by: marius (sparc64)
2009-04-11 22:34:08 +00:00
Robert Watson
78b5071407 Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() and
TCPSTAT_INC(), rather than directly manipulating the fields across the
kernel.  This will make it easier to change the implementation of
these statistics, such as using per-CPU versions of the data structures.

MFC after:	3 days
2009-04-11 22:07:19 +00:00
Robert Watson
89f28b1b86 Remove conditionally compiled time counter statistics; tools like
DTrace, kernel profiling, etc, can provide this information without
the overhead.

MFC after:	3 days
Suggested by:	bde
2009-04-11 22:01:40 +00:00
Nathan Whitehorn
1e89943aa3 Fix recognition of kernel-mode traps that pass through the KDB trap handler
but do not actually invoke KDB. This includes recoverable machine checks
encountered in kernel mode.

This patch causes machines with Grackle host-PCI bridges to be able to
correctly enumerate them again.

MFC after:	3 days
2009-04-11 20:43:41 +00:00
Alexander Kabaev
9d75482f99 Fix v_cache_dd handling for negative entries. v_cache_dd pointer was
not populated in parent directory if negative entry was being
created, yet entry itself was added to the nc_neg list. It was
possible for parent vnode to get discarded later, leaving negative
entry pointing to now unused memory block.

Reported by:	dho
Revewed by:	kib
2009-04-11 20:23:08 +00:00
Konstantin Belousov
fd409594c6 When zapping v_cache_dd for !MAKEENTRY case in cache_lookup(), we shall
lock cache as writer.

Reviewed by:	kan
2009-04-11 16:12:20 +00:00
Paolo Pisati
50d25dda1b What's the point of adjusting a checksum if we are going to toss the
packet? Anticipate the check/return code.
2009-04-11 15:26:31 +00:00