Commit graph

41660 commits

Author SHA1 Message Date
Hartmut Brandt a9ca5bdbd0 The syncache has made use of TCPDEBUG problematic, because the SYN
segments are lost for the application. This broke, for example,
ports/benchmarks/dbs which needs the SYN segment to filter the
contents of the trace buffer for the connection it is interested in.

This patch makes the SYN segments available again. Unfortunately they
are now associated with the listening socket instead of the new one, so
a change to applications is required, but without this patch it wouldn't
work altogether.

PR:		kern/45966
2003-08-13 10:20:57 +00:00
Hartmut Brandt 91f467d592 The tcp_trace call needs the length of the header. Unfortunately the
code has rotten a bit so that the header length is not correct at
the point when tcp_trace is called. Temporarily compute the correct
value before the call and restore the old value after. This makes
ports/benchmarks/dbs to almost work.

This is a NOP unless you compile with TCPDEBUG.
2003-08-13 08:50:42 +00:00
Hartmut Brandt 3c653157a5 A number of patches in the last years have created new return paths
in tcp_input that leave the function before hitting the tcp_trace
function call for the TCPDEBUG option. This has made TCPDEBUG mostly
useless (and tools like ports/benchmarks/dbs not working). Add
tcp_trace calls to the return paths that could be identified in this
maze.

This is a NOP unless you compile with TCPDEBUG.
2003-08-13 08:46:54 +00:00
Poul-Henning Kamp f0ffd81bc2 In case we encounter a zero sectorsize provider in g_io_check(), fail
the request with a printf rather than a divide by zero error.
2003-08-13 06:42:56 +00:00
Marcel Moolenaar 6e1f209af1 Don't use VM_MIN_KERNEL_ADDRESS to check if the faulting address is
in user space or kernel space. VM_MIN_KERNEL_ADDRESS starts after the
gateway page, which means that improper memory accesses to the gateway
page while in user mode would panic the kernel. Use VM_MAX_ADDRESS
instead. It ends before the gateway page. The difference between
VM_MIN_KERNEL_ADDRESS and VM_MAX_ADDRESS is exactly the gateway page.
2003-08-13 03:20:10 +00:00
Alan Cox 46add12552 Reduce the size of the vm map (and by inclusion the vm space) on 64-bit
architectures by moving a field within the structure.
2003-08-13 03:13:22 +00:00
Marcel Moolenaar dfcba5aae3 Put an instruction group break between the move to ar.rnat and the
move to ar.rsc. The RSE must be in enforced lazy mode when writing
to RSE modifyable registers. In this case we restore the RSE NaT
collection register ar.rnat. I have seen 2 general exception faults
on pluto1 now that indicate that the move to ar.rsc has already
happened prior to the move to ar.rnat, meaning that the RSE is not
in enforced lazy mode anymore. The ia64 dependency and instruction
ordering rules seem to allow having both registers written to in
the same instruction group, provided ar.rsc is written to later than
ar.rnat (based on the ordering semantics). It appears that we may
be pushing our luck. For now, put them in seperate cycles (by means
of the instruction group break). If we ever get a general exception
fault on the move to ar.rnat again, we have definite proof that
something else is fishy.
2003-08-13 02:49:50 +00:00
Warner Losh 06b4bf3e55 Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon's
copyrighted files.

Approved by: Matt Dillon
2003-08-12 23:24:05 +00:00
Paul Saab faafb4863d Oops.. Some debugging code snuck in here.
Requeue the request if the controller is busy.
2003-08-12 22:33:49 +00:00
Maxime Henrion affd4332fd Remove extra space. 2003-08-12 20:34:31 +00:00
John Baldwin 9bddab5c4b Fixup comment. 2003-08-12 20:20:23 +00:00
Alan Cox c759a3ca06 Reduce the size of the vm object on 64-bit architectures by moving
a field within the structure.
2003-08-12 20:10:32 +00:00
Tom Rhodes c98a31cad3 Add a '-M mask' option so that users can have different
masks for files and directories.  This should make some
of the Midnight Commander users happy.

Remove an extra ')' in the manual page.

PR:		35699
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru> (original version)
Tested by:	simon
2003-08-12 20:06:56 +00:00
John Baldwin e9911cf591 - Convert Alpha over to the new calling conventions for cpu_throw() and
cpu_switch() where both the old and new threads are passed in as
  arguments.  Only powerpc uses the old conventions now.
- Update comments in the Alpha swtch.s to reflect KSE changes.

Tested by:	obrien, marcel
2003-08-12 19:33:36 +00:00
Paul Saab 639717c8bb Support EINPROGRESS and properly deal with 64bit physical addressing. 2003-08-12 17:55:53 +00:00
Paul Saab 77c39e17fa Halted CPU's should not accumulate time.
Reviewed by:	jhb
2003-08-12 17:01:10 +00:00
Maxime Henrion 445e4e83c5 - No need to bzero() the softc structure.
- Use BUS_DMA_ZERO where appropriate.
2003-08-12 14:55:12 +00:00
Maxime Henrion 9bc72abc30 Remove two useless bzero() calls.
Reviewed by:	cognet
2003-08-12 14:51:18 +00:00
Hartmut Brandt b24521d779 Change the code that enables/disables the ATM channel to use the
new ATMIOCOPENVCC/CLOSEVCC. This allows us to not only use UBR channels
for IP over ATM, but also CBR, VBR and ABR. Change the format of the
link layer address to specify the channel characteristics. The old
format is still supported and opens UBR channels.
2003-08-12 14:20:32 +00:00
Hartmut Brandt 0ddc915c01 db_get_value uses a local buffer to first fetch all the bytes of a
integer value and then to construct the integer from it. This buffer
was sizeof(int) bytes long, which was fine until the (undocumented) 'g'
modifier for 8-byte integers was introduced. Change this to sizeof(uint64_t).
2003-08-12 13:24:21 +00:00
Hidetoshi Shimokawa f40a29157e Validate number of iso. DMA channels. 2003-08-12 13:01:27 +00:00
Alexander Langer 30e27d9623 Add a overhaul of the soundchip initialization for the MSP34xx chipsets
found only many tv-cards.

We currently use more ore less evil hacks (slow_msp_audio sysctl) to
configure the various variants of these chips in order to have
stereo autodetection work.  Nevertheless, this doesn't always work
even though it _should_, according to the specs.
This is, for example, the case for some popular Hauppauge models sold
sold in Germany.

However, the Linux driver always worked for me and others.  Looking at
the sourcecode you will find that the linux-driver uses a very much
enhanced approach to program the various msp34xx chipset variants,
which is also found in the specs for these chips.

This is a port of the Linux MSP34xx code, written by Gerd Knorr
<kraxel@bytesex.org>, who agreed to re-release his code under a
BSD license for this port.

A new config option "BKTR_NEW_MSP34XX_DRIVER" is added, which is required
to enable the new driver.  Otherwise the old code is used.

The msp34xx.c file is diff-reduced to the linux-driver to make later
modifications easier, thus it doesn't follow style(9) in most cases.

Approved by:	roger (committing this, no time to test/review),
		keichii (code review)
2003-08-12 09:45:34 +00:00
Marcel Moolenaar 75cf31a016 Extend identifycpu():
o  Differentiate between CPU family and CPU model. There are multiple
   Itanium 2 models and it's nice to differentiate between them.
o  Seperately export the CPU family and CPU model with sysctl.
o  Merced is the only model in the Itanium family.
o  Add Madison to the Itanium 2 family. We already knew about McKinley.
o  Print the CPU family between parenthesis, like we do with the i386
   CPU class.

My prototype now identifies itself as:
	CPU: Merced (800.03-Mhz Itanium)

pluto1 and pluto2 will eventually identify themselves as:
	CPU: McKinley (900.00-Mhz Itanium 2)
2003-08-12 08:10:16 +00:00
Paul Saab f487e0e2df Fix the busdma support in twe to support EINPROGRESS and enable it for
use with PAE kernels.
2003-08-12 06:38:55 +00:00
Bill Paul 5d99c6417d Add support for the Broadcom BCM5901 and BCM5901 rev A2 chips.
These are 10/100 only NICs found on the IBM Thinkpad R40E and
G40. These seem to be based on the BCM5705 MAC but with a PHY
that doesn't support 1000Mbps modes.

Submitted by:	Igor Sviridov <sia@nest.org>
2003-08-12 05:18:51 +00:00
Nate Lawson 725d623fae This commit was generated by cvs2svn to compensate for changes in r118812,
which included commits to RCS files with non-trunk default branches.
2003-08-12 04:56:45 +00:00
Nate Lawson 3b8fe955eb Fix a few more s/UINT32/ACPI_SIZE issues. iasl and acpidb now build on
ia64.

Tested on:	pluto2
Pointed out by:	tinderbox
2003-08-12 04:56:45 +00:00
Marcel Moolenaar e57196b3db Cleanup prototypes in cpu.h, including fswintrberr and any references
to it. Sort the remaining prototypes in cpu.h.

No functional change.
2003-08-12 03:51:53 +00:00
Alan Cox ad8204e3f5 Pipespace() no longer requires Giant. 2003-08-11 22:23:25 +00:00
Marcel Moolenaar 322d6e0236 Cleanup and style(9) fixes. No functional change. 2003-08-11 21:25:19 +00:00
Bosko Milekic 20e8e865bd - When deciding whether to init the zone with small_init or large_init,
compare the zone element size (+1 for the byte of linkage) against
  UMA_SLAB_SIZE - sizeof(struct uma_slab), and not just UMA_SLAB_SIZE.
  Add a KASSERT in zone_small_init to make sure that the computed
  ipers (items per slab) for the zone is not zero, despite the addition
  of the check, just to be sure (this part submitted by: silby)

- UMA_ZONE_VM used to imply BUCKETCACHE.  Now it implies
  CACHEONLY instead.  CACHEONLY is like BUCKETCACHE in the
  case of bucket allocations, but in addition to that also ensures that
  we don't setup the zone with OFFPAGE slab headers allocated from the
  slabzone.  This means that we're not allowed to have a UMA_ZONE_VM
  zone initialized for large items (zone_large_init) because it would
  require the slab headers to be allocated from slabzone, and hence
  kmem_map.  Some of the zones init'd with UMA_ZONE_VM are so init'd
  before kmem_map is suballoc'd from kernel_map, which is why this
  change is necessary.
2003-08-11 19:39:45 +00:00
Alexander Kabaev 660ebf0ef2 Drop Giant in recvit before returning an error to the caller to avoid
leaking the Giant on the syscall exit.
2003-08-11 19:37:11 +00:00
Nate Lawson 798fb860d5 Style cleanups to match the rest of this directory. For acpi_battery.c,
remove unused includes.
2003-08-11 15:34:43 +00:00
Scott Long 9e8559d2c2 bus_dmamap_create() is no longer optional for non-static dma mappings. Thanks
to ru@ for testing this.
2003-08-11 09:09:10 +00:00
Hartmut Brandt ee4080d424 Add ng_atmpif: a HARP physical interface emulation. This allows one
to run the HARP ATM stack without real hardware.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
2003-08-11 08:40:02 +00:00
Bruce M Simpson abd498aa71 Add the mlockall() and munlockall() system calls.
- All those diffs to syscalls.master for each architecture *are*
   necessary. This needed clarification; the stub code generation for
   mlockall() was disabled, which would prevent applications from
   linking to this API (suggested by mux)
 - Giant has been quoshed. It is no longer held by the code, as
   the required locking has been pushed down within vm_map.c.
 - Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES
   to express their intention explicitly.
 - Inspected at the vmstat, top and vm pager sysctl stats level.
   Paging-in activity is occurring correctly, using a test harness.
 - The RES size for a process may appear to be greater than its SIZE.
   This is believed to be due to mappings of the same shared library
   page being wired twice. Further exploration is needed.
 - Believed to back out of allocations and locks correctly
   (tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC).

PR:             kern/43426, standards/54223
Reviewed by:    jake, alc
Approved by:    jake (mentor)
MFC after:	2 weeks
2003-08-11 07:14:08 +00:00
Jake Burkholder 3014050b19 Fix sparc64 LINT build. <blush> 2003-08-11 07:05:55 +00:00
Nate Lawson fcf000c13c Fix AcpiOsMapMemory to match the function definition. Don't use UINT32
as a cast for a pointer.  Change has been submitted to the vendor.

Pointed out by:		marcel, obrien
2003-08-11 05:54:31 +00:00
Nate Lawson 5f06786496 This commit was generated by cvs2svn to compensate for changes in r118765,
which included commits to RCS files with non-trunk default branches.
2003-08-11 05:54:31 +00:00
Mike Silbersack cebde06978 More pipe changes:
From alc:
Move pageable pipe memory to a seperate kernel submap to avoid awkward
vm map interlocking issues.  (Bad explanation provided by me.)

From me:
Rework pipespace accounting code to handle this new layout, and adjust
our default values to account for the fact that we now have a solid
limit on allocations.

Also, remove the "maxpipes" limit, as it no longer has a purpose.
(The limit on kva usage solves the problem of having two many pipes.)
2003-08-11 05:51:51 +00:00
Scott Long c85c268989 Don't provide mutexes for static busdma allocations. 2003-08-11 03:39:41 +00:00
Marcel Moolenaar 9df7b8eac4 Implement cpu_set_upcall_kse(). Further tweaking may be needed after
testing.
2003-08-11 01:38:23 +00:00
Alan Cox f9999c67be Use vm_page_hold() instead of vm_page_wire(). Otherwise, a multithreaded
application could cause a wired page to be freed.  In general,
vm_page_hold() should be preferred for ephemeral kernel mappings of pages
borrowed from a user-level address space.  (vm_page_wire() should really be
reserved for indefinite duration pinning by the "owner" of the page.)

Discussed with:	silby
Submitted by:	tegge
2003-08-11 00:17:44 +00:00
Jacques Vidrine e059b0f016 The iBCS2 system call translator for statfs(2) did not check the
length parameter for validity.

Submitted by:	David Rhodus <drhodus@catpa.com>
2003-08-10 23:26:16 +00:00
Jacques Vidrine 41b3077a6c panic() if we try to handle an out-of-range signal number in
psignal()/tdsignal().  The test was historically in psignal().  It was
changed into a KASSERT, and then later moved to tdsignal() when the
latter was introduced.

Reviewed by:	iedowse, jhb
2003-08-10 23:05:37 +00:00
Jacques Vidrine 007e25d95a Add or correct range checking of signal numbers in system calls and
ioctls.

In the particular case of ptrace(), this commit more-or-less reverts
revision 1.53 of sys_process.c, which appears to have been erroneous.

Reviewed by:	iedowse, jhb
2003-08-10 23:04:55 +00:00
Alan Cox ba97fd8a78 Rename pmap_changebit() to pmap_clear_ptes() and remove the last
parameter.  The new name better reflects what the function does and
how it is used.  The last parameter was always FALSE.

Note: In theory, gcc would perform constant propagation and dead code
elimination to achieve the same effect as removing the last parameter,
which is always FALSE.  In practice, recent versions do not.  So, there
is little point in letting unused code pessimize execution.
2003-08-10 21:53:55 +00:00
Marcel Moolenaar 425963bb80 o move cpu_reset() from vm_machdep.c to machdep.c.
o reorder cpu_boot(), cpu_halt() and identifycpu().

No functional change.
2003-08-10 21:33:07 +00:00
Bill Paul 822f63fc94 The BCM5704 ASIC has a smaller mbuf space than the 5700/1/2/3. Failure
to configure this correctly yields many watchdog timeouts even on lightly
loaded machines. This is a common complaint from users with Dell 1750
servers with built-in dual 5704 NICs.
2003-08-10 18:04:35 +00:00
Andrey A. Chernov 696fe9ddcd Lower initial drop value to 50, it is enough to hide linearity 2003-08-10 17:56:58 +00:00
Orion Hodson 4cca7f0aed Switch from legacy to native mode for ICH4 and ICH5.
Submitted by: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp>
Test by: Markko Merzin <markko@short.cut.ee>
PR: kern/53242
MFC after: 5 days
2003-08-10 14:57:47 +00:00
Bernd Walter b08a61b045 Don't hardcode unit numer '0'.
We can have multiple instances.
2003-08-10 14:28:24 +00:00
Marcel Moolenaar 29952636d3 Now that we can ignore up to 8KB of dirty registers, remove the RSE
magic from exec_setregs(). In set_mcontext() we now also don't have
to worry that we entered the kernel with more that 512 bytes of
dirty registers on the kernel stack. Note that we cannot make any
assumptions anymore WRT to NaT collection points in exec_setregs(),
so we have to deal with them now.
2003-08-10 08:04:21 +00:00
Warner Losh 8a0ef7be56 MF p4:
Minor style(9) nit.
2003-08-10 03:47:29 +00:00
Bill Paul aadef91a54 Grrr. There is a gratuitous difference in the RX descriptor status
word between the 8139C+ and the 8169. The 8139C+ has a 'frame alignment
error bit' (bit 27) but the 8169 does not. Rather than simply mark this
bit as reserved, RealTek removed it completely and shifted the remaining
status bits one space to the left. This was causing rl_rxeofcplus()
to misparse the error and checksum bits.

To workaround this, rl_rxeofcplus() now shifts the rxstat word one
bit to the right before testing any of the status bits (but after
the frame length has been extracted).
2003-08-10 02:41:18 +00:00
Warner Losh 2724f3214d Some bridges, like o2 micro and maybe ricoh, have some issues between
the time the card is inserted and the time that the card is
configured.  This can lead to interrupt storms.  The O2Micro suggested
workaround is to route the card function interrupt to IRQ1.  It
appears from my testing that this is an acceptable workaround for most
chipsets (there's still some issue with the ricoh chipset).

Also, only look at the NOT_A_CARD bit when the bridge tells us there's
a card present.  At least one test caused this to be true after the
card was removed, but the author couldn't recreate it with the
workaround in place.  The change is more conservative than the
previous code, but still has the work around that wasn't present in
the older code.
2003-08-10 02:40:49 +00:00
Bill Paul f6bb113e42 - Update some comments regarding hardware details of the 8169 and
note the existence of the 8169S and 8110S components. (The 8169
  is just a MAC, the 8169S and 8110S contain both a MAC and PHY.)

- Properly handle list and buffer addresses as 64-bit. The RX and
  TX DMA list addresses should be bus_addr_t's. Added RL_ADDR_HI()
  and RL_ADDR_LO() macros to obtain values for writing into chip
  registers.

- Set a slightly different TIMERINT value for 8169 NICs for improved
  performance.

- Change left out of previous commit log: added some additional
  hardware rev codes for other 10/100 chips and for the 8169S/8110S
  'rev C' gigE MACs.
2003-08-10 01:41:35 +00:00
David E. O'Brien 96e934df56 Re-enable pcfclock in the build. 2003-08-10 01:35:36 +00:00
Bill Paul ca3f4fd0a9 Silence unwanted 'gigabit link up' messages: do not treat the
BGE_MACSTAT_MI_COMPLETE bit in the MAC status register as a link
change indicator. We turn this bit on now because some of the newer
chips need it, but it usually just means that reading/writing
an MII/GMII register has completed, not that a link change has
occured.
2003-08-10 01:32:16 +00:00
Jake Burkholder 2974095528 Use get_mcontext in sendsig and set_mcontext in sigreturn instead of
frobbing things directly.
2003-08-09 23:14:33 +00:00
Scott Long fc3e87b367 Don't provide a mutex in the S/G list dma tag since it will never be defered.
Fix some nearby style.
2003-08-09 23:07:21 +00:00
Warner Losh fda5b6124b Add code to cope more with strange conditions after careful study of
the standard.

1) When the bridge tells us that we have a card that isn't recognized, we
   use the force register to force the CV_TEST to run.  This test causes the
   bridge to re-evaluate the card.  Once this re-evaluation process happens,
   we get a new interrupt that may say it is ready to process.  We try this up
   to 20 times.  Tests have shown that this appears to correctly reset the
   'Unknown card type' problem that I saw on my Sony PCG-505TS.
2) Take a page from OLDCARD and always read the CSC register in the ISR.
   Some TI (and it seems maybe Ricoh) chipsets require this to behave
   properly.  This work around appears to work due to some power management
   protocols that were improperly implemented.  Maybe it can be removed when
   this driver supports the full PME# protocol described in the standards.
3) Minor additional debug printf when debugging is enabled.
4) Minor additional commentary for things that are obvious only after study.

# I'm committing this from my Sony PCG-505TS using shared PCI interrupts
# and NEWCARD, but there are some issues with the Ricoh bridge still, but
# at least now I can boot with the card inserted and have it work.
2003-08-09 21:05:54 +00:00
Warner Losh 71ed0ee3da CBB_SOCKET_STAT_ is too long. Change it to CBB_STATE_. Also, make
some minor changes to more closely match the bit names used in the 7.0
version of the PCMCIA standard.  Also add bits from the FORCE
register.
2003-08-09 20:49:22 +00:00
Warner Losh 69a7c91e70 When allocating memory, align it to the minimum alignment required for
cardbus bridges if the alignment requirements were less restrictive.
2003-08-09 20:38:53 +00:00
Warner Losh da57cf7c7e Add comments about some alignment that looks a little strange. 2003-08-09 20:33:53 +00:00
Warner Losh e3bf57b6c9 Minor fixes to a couple of comments. 2003-08-09 20:31:25 +00:00
Alan Cox c6eb850aac Background: When proc_rwmem() wired and mapped a page, it also added
a reference to the containing object.  The purpose of the reference
being to prevent the destruction of the object and an attempt to free
the wired page.  (Wired pages can't be freed.)  Unfortunately, this
approach does not work.  Some operations, like fork(2) that call
vm_object_split(), can move the wired page to a difference object,
thereby making the reference pointless and opening the possibility
of the wired page being freed.

A solution is to use vm_page_hold() in place of vm_page_wire().  Held
pages can be freed.  They are moved to a special hold queue until the
hold is released.

Submitted by:	tegge
2003-08-09 18:01:19 +00:00
Scott Long 588920f14e Call bus_dmamap_create() to create the per-SRB buffer maps. Note that none
of the SRB resources are freed when the driver unloads; maybe that will be
tackled another day.
2003-08-09 15:16:45 +00:00
Mike Silbersack 7ab9842a99 Also ifdef the variable which becomes unused w/o INET6, fixing the build
after the previous commit.

Noticed by:	alc
2003-08-09 05:44:00 +00:00
Bruce M Simpson 662d85d6a2 Add the POSIX 1003.1-2001 posix_madvise() interface.
PR:		standards/54634
Reviewed by:	das
Approved by:	jake (mentor)
2003-08-09 03:23:24 +00:00
Mike Silbersack fe3e8c5167 #ifdef INET6 the if_loop packet defrag; since only the ipv6 stack (might)
require this to be done, there's no reason to waste time doing it if
ipv6 isn't compiled in.

MFC after:	1 week
2003-08-09 02:55:11 +00:00
Marcel Moolenaar 6098c5e1a2 Add the PCI Id of the Intersil prism3 (mini-PCI) WLAN chip. The Vaio
PCG-505BX (for example) has one of those:

wi0: <Intersil Prism3> mem 0xf8000000-0xf8000fff at device 2.0 on pci2
wi0: 802.11 address: 00:02:8a:94:d8:73
wi0: using RF:PRISM3(Mini-PCI)
wi0: Intersil Firmware: Primary (1.1.1), Station (1.5.6)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
2003-08-08 23:33:42 +00:00
Matthew N. Dodd 654d06941b Initialize bp->bio_driver1 in idad_strategy().
Removed by accident in 1.38.

This fixes the trap 12 everyone was seeing in ida_construct_qcb().

PR:		 kern/53245
2003-08-08 23:01:12 +00:00
Alan Cox 9c62fce085 - Remove GIANT_REQUIRED from pipespace().
- Remove a duplicate initialization from pipe_create().
2003-08-08 22:38:15 +00:00
Daniel Eischen ab908f5935 Copyin the thread mailbox flags from the correct location
in the mailbox.
2003-08-08 20:23:10 +00:00
Yoshihiro Takahashi cbb06fd60c MFi386: revision 1.201. 2003-08-08 12:45:42 +00:00
Nate Lawson bf0c18ec43 Default to 5 seconds before sleeping to give some machines time to stabilize.
This doesn't break anything on my laptop and some claim it helps them.
2003-08-08 03:19:22 +00:00
Alan Cox 7fbff95c04 MFi386 1.422 & 1.423: lock page queues in pmap_insert_entry(). 2003-08-08 01:52:03 +00:00
Marcel Moolenaar f8e1f6d036 MFi386 1.422 & 1.423: lock page queues in pmap_insert_entry(). 2003-08-08 00:30:26 +00:00
Bill Fumerola 2766bd022f 0) preallocate per-interface context structures without the ifnet lock held
1) avoid immediately calling bzero() after malloc() by passing M_ZERO
2) do not initialize individual members of the global context to zero
3) remove an unused assignment of ifctx in bootpc_init()

Reviewed by:	tegge
2003-08-07 21:27:17 +00:00
Warner Losh 42967c7c5f Add MELCO LPC3_CTX. This is the same as Buffalo card of the same name
with different vendor id.

Submitted by: Shizuka Kudo-san
2003-08-07 19:40:05 +00:00
Warner Losh 07dbfcd9cd Sync to 1.62 of pccarddevs 2003-08-07 19:36:06 +00:00
Warner Losh b03ea4feee MELCO has a similar product to Buffalo LPC3-CLX: named the same and
has the same product id, but different vendor id.  It also appears
that the MELCO's id should be 0x18a instead of 0x8a01.  Fix this.

Submitted by: Shizuka Kudo-san
2003-08-07 19:33:11 +00:00
Ruslan Ermilov 98a32cb196 Fix logic in Makefile.i386,v 1.249: only back up ${DESTDIR}${KODIR}
to ${DESTDIR}${KODIR}.old if we have booted from ${DESTDIR}${KODIR},
and always keep kern.bootfile in a good shape.
2003-08-07 19:12:06 +00:00
Andrew Gallatin c8aacbdaa8 MFI386: Acquire the page queues lock in pmap_insert_entry(), from
i386/i386/pmap.c 1.423
2003-08-07 18:35:16 +00:00
Jeffrey Hsu e0f688ba30 Add support for "options PIM" in the kernel configuration file.
Submitted by:	Pavlin Radoslavov <pavlin@icir.org>
2003-08-07 18:19:28 +00:00
Nate Lawson ade9d6fdcf Fix a bug that would result in a very long sleep. Change has been
submitted to the vendor.

Obtained from:	iwasaki
2003-08-07 18:19:12 +00:00
Nate Lawson 0eb1dbb16e This commit was generated by cvs2svn to compensate for changes in r118624,
which included commits to RCS files with non-trunk default branches.
2003-08-07 18:19:12 +00:00
Jeffrey Hsu 59ca77f4a1 New PIM header files.
Submitted by:	Pavlin Radoslavov <pavlin@icir.org>
2003-08-07 18:17:43 +00:00
Jeffrey Hsu 1e78ac216e 1. Basic PIM kernel support
Disabled by default. To enable it, the new "options PIM" must be
added to the kernel configuration file (in addition to MROUTING):

options	MROUTING		# Multicast routing
options	PIM			# Protocol Independent Multicast

2. Add support for advanced multicast API setup/configuration and
extensibility.

3. Add support for kernel-level PIM Register encapsulation.
Disabled by default.  Can be enabled by the advanced multicast API.

4. Implement a mechanism for "multicast bandwidth monitoring and upcalls".

Submitted by:	Pavlin Radoslavov <pavlin@icir.org>
2003-08-07 18:16:59 +00:00
John Baldwin b2db7dc658 td_dupfd just needs to be less than 0, it does not have to hold the
negative value of the index of the new file, so just use -1.
2003-08-07 17:08:26 +00:00
Nate Lawson c7fe6a7bfb Import the userland interface from acpica 0619 2003-08-07 16:59:44 +00:00
Nate Lawson 65782e561a This commit was generated by cvs2svn to compensate for changes in r118617,
which included commits to RCS files with non-trunk default branches.
2003-08-07 16:59:44 +00:00
Jacques Vidrine 01b9dc96e3 Update some argument-documenting comments to match reality.
Add an explicit range check to those same arguments to reduce risk of
cardiac arrest in future code readers.
2003-08-07 16:42:27 +00:00
Nate Lawson 59db4265c5 Import common/ files from acpica 0619 2003-08-07 16:38:54 +00:00
Nate Lawson 64f80a8302 This commit was generated by cvs2svn to compensate for changes in r118613,
which included commits to RCS files with non-trunk default branches.
2003-08-07 16:38:54 +00:00
Nate Lawson 53289f6a61 Import compiler/ files from acpica 0619 2003-08-07 16:38:31 +00:00
Nate Lawson b9361fabdb This commit was generated by cvs2svn to compensate for changes in r118611,
which included commits to RCS files with non-trunk default branches.
2003-08-07 16:38:31 +00:00
Nate Lawson 22d162d7d1 Remove the user include of ctype.h and instead include it for each utility
that uses strupr().
2003-08-07 15:52:42 +00:00
Nate Lawson 327f90d8cc Remove nowerror from some files that no longer generate warnings. 2003-08-07 15:51:35 +00:00
John Baldwin 8b149b5131 Consistently use the BSD u_int and u_short instead of the SYSV uint and
ushort.  In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.

Requested by:	bde (kern_ktrace.c)
2003-08-07 15:04:27 +00:00
Nate Lawson c53bcc89ca Null terminate the OEM hint. This rids my laptop of the smiley face that
would follow the 6 valid chars of the table entry.
2003-08-07 14:53:14 +00:00
Hartmut Brandt 46cf3cb76f Make open channels persist across ifconfig down and up. All channels
that are not currently closing when the interface is configured down
will be brough up as soon as the interface is configured up.
2003-08-07 14:30:58 +00:00
Nate Lawson 7f325bba26 Comment out ctype.h. It's not ok to always include in the !_KERNEL case
since the bootblocks have their own local includes.  Sorry for breaking
world.
2003-08-07 14:17:23 +00:00
John Baldwin 277576de43 The ktrace mutex does not need to be locked around the post of the ktrace
semaphore and doing so can lead to a possible reversal.  WITNESS would have
caught this if semaphores were used more often in the kernel.

Submitted by:	Ted Unangst <tedu@stanford.edu>, Dawson Engler
2003-08-07 13:58:13 +00:00
Hartmut Brandt a80f653574 Make the driver preserve open connections accross ifconfig down
and up commands. When configuring the interface down only the
connections that are currently closing are deleted from the connection
table. When the interface is configured up, all connections that
are in the table are re-opened.
2003-08-07 13:42:31 +00:00
Hartmut Brandt 3593b92478 When configuring the interface down and up again try to re-open all
connections that have been open (and were not closing) when
the interface was stopped. This makes the behaviour of fatm(4) more like
the behaviour of en(4).
2003-08-07 10:40:24 +00:00
Noriaki Mitsunaga 51f202f1af We donot need `\n' for panic(). 2003-08-07 08:13:37 +00:00
Marcel Moolenaar 1634f50b1b Better define the flags in the mcontext_t and properly set the flags
when we create contexts. The meaning of the flags are documented in
<machine/ucontext.h>. I only list them here to help browsing the
commit logs:
	_MC_FLAGS_ASYNC_CONTEXT
	_MC_FLAGS_HIGHFP_VALID
	_MC_FLAGS_KSE_SET_MBOX
	_MC_FLAGS_RETURN_VALID
	_MC_FLAGS_SCRATCH_VALID

Yes, _MC_FLAGS_KSE_SET_MBOX is a hack and I'm proud of it :-)
2003-08-07 07:52:39 +00:00
Marcel Moolenaar a50bc30203 o Fix cut-n-paste whitespace corruption in previous commit
o  For trap-based upcalls the argument (the kse_mailbox) to
   the UTS must be written onto the kernel stack, not the
   user stack. While here, deal with the fact that we may
   be at a NaT collection point.
2003-08-07 07:40:19 +00:00
Bill Paul 554e54b5de Add preliminary support for the RealTek 8169 gigE chip. Changes:
- Fix a bug in rl_dma_map_desc(): set the 'end of ring' bit in the
  right descriptor (DESC_CNT - 1, not DESC_CNT). The 8139C+ is limited
  to 64 descriptors and automatically wraps at 64 descriptors even
  if the EOR bit isn't set, but the 8169 NIC can have up to 1024
  descriptors per ring, so we must set the wrap point in the right
  place.

- RealTek moved the RL_TIMERINT register from offset 0x54 to 0x58 in
  the 8169 -- account for this.

- Added rl_gmii_readreg() and rl_gmii_writereg() routines.

- Fix rl_probe() to deal with the case where the base type is
  not RL_8139.

The next step is to add jumbo buffer support.

Tested with the Xterasys XN-152 NIC (hard to beat $29 for a gigE NIC).
2003-08-07 07:00:30 +00:00
Nate Lawson ad173a0cbe Add includes to fix user-compilation of acpica. Also clarify a comment
about overriding the OS name.
2003-08-07 04:46:17 +00:00
Warner Losh 1513d7ed42 Remove trailing newlines (from the right branch this time) 2003-08-07 04:33:47 +00:00
Alan Cox f9b1de367e - Remove GIANT_REQUIRED from pipe_free_kmem().
- Remove the acquisition and release of Giant around pipe_kmem_free() and
   uma_zfree() in pipeclose().
2003-08-07 04:32:40 +00:00
Mike Silbersack b7fbac1813 Increase SMALL_PIPE_SIZE from 4096 to PAGE_SIZE.
Sorry people with 8K pages, this could be have been causing some of the
resent panics under heavy pipe load.
2003-08-07 00:03:29 +00:00
Marcel Moolenaar bee4e73025 In cpu_set_upcall_kse(), create the upcall according to the entry
path into the kernel. Normally it's due to a syscall, but one can
also be created as the result of a clock interrupt (for example).
This now even more looks like exec_setregs().

While here, add an assert that we don't expect more than 8KB of
dirty registers on the kernel stack.
2003-08-06 23:28:19 +00:00
Marcel Moolenaar 5f20d75a5f o In revision 1.45 of exception.S we changed exception_restore to
unconditionally restore ar.k7 (kernel memory stack) and ar.k6
   (kernel register stack). I don't know what I was smoking then,
   but if you unconditionally restore ar.k6, you also want to
   compute its value unconditionally. By having the computation
   predicated and dependent on whether we return to user mode, we
   would end up writing junk (= invalid value for ar.bspstore) if
   we would return to kernel mode. But the whole point of the
   unconditional restoration was that there is a grey area where
   we still need to have ar.k6 restored. If we restore with a junk
   value, we would end up wedging the machine on the next interrupt.
   So, unconditionally calculate the value we unconditionally write
   to ar.k6.

o  The previous braino was found while making the following change:
   We used to clear the lower 9 bits of the value we write to ar.k6.
   The meaning being that we know that the kernel register stack is
   at least 512 byte aligned and simply clearing the lower 9 bits
   allows us to return to a context of which we don't have dirty
   registers on the kernel stack, even though the context that
   entered the kernel does have dirty registers on the kernel stack.
   By masking-off the lower bits, we correctly obtain the base of
   the register stack without having to worry that we didn't actually
   reached the base while unwinding it.
   The change is to mask off the lower 13 bits, knowing that the
   kernel register stack is always 8KB aligned. The advantage is that
   we don't have to worry anymore if there's more than 512 bytes of
   dirty registers on the kernel stack. A situation that frequently
   occurs. In exec_setregs() in machdep.c:1.147 or older, we had to
   deal with that situation by copying the active portion of the
   register stack down in multiples of 512 bytes. Now that we mask off
   the lower 13 bits we don't have to do that at all. Contemporary
   IPF processors have a register file that can hold up to 96 stacked
   registers (=784 bytes [incl. 2 NaT collections]). With no indication
   that register files grow beyond a couple of hundred registers, we
   should not have to worry about it anymore... and yes, 640KB is
   enough for everybody :-)
   This change helps setcontext(2) and cpu_set_upcall_kse() in that
   they can return to completely different contexts without having to
   mess with the kernel stack. Of course exec_setregs() doesn't need
   to do that anymore as well.
2003-08-06 21:32:38 +00:00
Alan Cox 2c2464cb27 Correct a mistake in the previous revision: Reduce the scope of the page
queues lock such that it isn't held around the call to get_pv_entry(),
which calls uma_zalloc().  At the point of the call to get_pv_entry(), the
lock isn't necessary and holding it could lead to recursive acquisition,
which isn't allowed.
2003-08-06 19:18:08 +00:00
Alan Cox b0b2803a3b Acquire the page queues lock in pmap_insert_entry(). (I used to believe
that the page's busy flag could be relied upon to synchronize access to the
pv list.  I don't any longer.  See, for example, the call to
pmap_insert_entry() from pmap_copy().)
2003-08-06 18:46:47 +00:00
Poul-Henning Kamp 887dd1d910 Remove dangling extern reference to swap_pager_full 2003-08-06 18:40:49 +00:00
Bruce Evans 90630944c8 Backed out previous commit. This restores the warning about pessimized
(short) types for the port arg of inb() (rev.1.56).  The warning started
working for u_short types with gcc-3.3.  The pessimizations exposed
by this been fixed except for the cx and oltr drivers where the breakage
of the warning has been pushed to the drivers.
2003-08-06 18:21:27 +00:00
Bruce Evans aff964606a Don't use pessimal (u_short) types for i/o ports. This is mainly for
completenss.  The pessimization is tiny compared with i/o port slowness
except on very old machines, but code that used signed short types for
i/o ports was unpessimized long ago, and the macro that detected it
recently started working for u_short types too.  Use of bus space
should have made this moot long ago.

Not tested at runtime by:  bde
2003-08-06 18:06:30 +00:00
Nate Lawson 370f5d5b0f Remove all USB quirks that only specify DA_Q_NO_6_BYTE. They are no longer
needed.  Other USB quirks remain in hopes that user testing will reveal
which ones are also no longer needed.

Courtesy of:	USENIX lunch break
2003-08-06 17:30:03 +00:00
Bruce Evans bb11094995 Don't use pessimal (u_short) types for i/o ports. This is mainly for
completenss.  The pessimization is tiny compared with i/o port slowness
except on very old machines, but code that used signed short types for
i/o ports was unpessimized long ago, and the macro that detected it
recently started working for u_short types too.  Use of bus space
should have made this moot long ago.

Not tested at runtime by:  bde
2003-08-06 17:28:33 +00:00
Nate Lawson 2b2187130e Remove the 6-10 byte translation from UFI and ATAPI command sets. It is
no longer needed now that we have PIM_NO_6_BYTE.

Requested by:	jhb
2003-08-06 17:19:06 +00:00
Hartmut Brandt 6757bf1b26 When compiling the module with INVARIANTS we also need INVARIANT_SUPPORT. 2003-08-06 16:01:32 +00:00
Hartmut Brandt 20e57b1045 Ups. I forgot this one in the SIOCATMENA/SIOCATMDIS removal commit.
This change allows one to specify almost the complete traffic parameters
for IPoverATM channels through the routing table. Up to now we used
4 byte DL addresses (flag, vpi, vciH, vciL). This format is still allowed.
If the address is longer, however, the 5th byte is interpreted as the
traffic class (UBR, CBR, VBR or ABR) and the remaining bytes are the
parameters for this traffic class:

  UBR: 0 byte or 3 byte PCR
  CBR: 3 byte PCR
  VBR: 3 byte PCR, 3 byte SCR, 3 byte MBS
  ABR: 3 byte PCR, 3 byte MCR, 3 byte ICR, 3 byte TBE, 1 byte NRM,
       1 byte TRM, 2 bytes ADTF, 1 byte RIF, 1 byte RDF and 1 byte CDF

A script to generate the corresponding 'route add' arguments will follow soon.
2003-08-06 15:56:37 +00:00
Poul-Henning Kamp 2fbc275447 Dont initialize a TSC timecounter until we know if it is broken or not. 2003-08-06 15:05:27 +00:00
Poul-Henning Kamp f9e4b94aac Update to recognize Geode and note that the TSC seems broken. 2003-08-06 15:03:47 +00:00
Hartmut Brandt 68ece75839 Remove the ATMIOCENA and ATMIOCDIS ioctl. Everyting has been converted
to use the new OPENVCC and CLOSEVCC calls that allow the sepcification
of traffic parameters for the connections.
2003-08-06 14:53:27 +00:00
Hartmut Brandt a808105d63 Remove the last vestiges of ATM raw mode. This has not been useful for a
long time and has already been removed from the only driver that supported
it (en(4)) and from the man page.
2003-08-06 14:34:38 +00:00
Nate Lawson a70515e217 Remove unused cmd6workaround() calls.
MFC after:	1 day
2003-08-06 14:24:16 +00:00
Poul-Henning Kamp ef3c5abdba Make the first two pages magic to protect the BSD labels rather than
only one.
2003-08-06 14:13:38 +00:00
Hartmut Brandt 1d253d7336 Use the new OPENVCC and CLOSEVCC ioctls to open and close the NATM
channel. These have been the last consumers of the old ioctls.
2003-08-06 14:07:54 +00:00
Yaroslav Tykhiy b81694ed13 If connect(2) has been interrupted by a signal and therefore the
connection is to be established asynchronously, behave as in the
case of non-blocking mode:

- keep the SS_ISCONNECTING bit set thus indicating that
  the connection establishment is in progress, which is the case
  (clearing the bit in this case was just a bug);

- return EALREADY, instead of the confusing and unreasonable
  EADDRINUSE, upon further connect(2) attempts on this socket
  until the connection is established (this also brings our
  connect(2) into accord with IEEE Std 1003.1.)
2003-08-06 14:04:47 +00:00
Hartmut Brandt 9a6d13bede Style(9): remove unneccesary space and blank lines, indentation,
function prototypes. Use LIST_FOREACH instead of explicit loops.

The indentation of functions indendet by 4 space have been left alone.
2-space indented functions have been re-indented.
2003-08-06 13:46:15 +00:00
Hartmut Brandt b3eead8a06 Make the driver honor the ATMIO_FLAG_ASYNC that requests
asynchronuous open/close operations.
2003-08-06 13:16:51 +00:00
Hartmut Brandt 4f15e38cba Honor the ATMIO_FLAG_ASYNC for asynchronuous open/close of VCs. 2003-08-06 13:09:36 +00:00
Hartmut Brandt 5dc310d4d5 Honor the new ATMIO_FLAG_ASYNC for asynchronuous open/close operations
on a VC.
2003-08-06 12:37:50 +00:00
Poul-Henning Kamp 07f81f9159 Remove an unused variable. 2003-08-06 12:09:34 +00:00
Poul-Henning Kamp 751221fd32 Staticize swap_pager_putpages()
Eliminate a lot of checkes to make sure requests are not cross-device
which is unnecessary with the new layout.  We know a sequential request
cannot possibly be cross-device because there is a reserved page between
the devices.

Remove a couple of comments which no longer are relevant.
2003-08-06 12:08:27 +00:00
Poul-Henning Kamp 030b34923d Access the swap_pagers' ->putpages() through swappagerops instead
of directly, this is a cleaner way to do it.
2003-08-06 12:05:48 +00:00
Hartmut Brandt 580f2456b7 Honor the new ATMIO_FLAG_ASYNC that requests asynchronuous open/close
operations on VCs.
2003-08-06 11:53:53 +00:00
Hartmut Brandt 2ac9f22556 When sending check that the channel is really open. Get the information
whether we use AAL5 or not from the aal field of the channel parameters
instead of the flag in the pseudo header. This flag will go away soon.
2003-08-06 11:35:41 +00:00
Hartmut Brandt efa3048b1e Print an array index that is computed as ptrdiff_t with %tu. 2003-08-06 11:30:53 +00:00
Bruce Evans 1c5fa550e8 Broke the warning that the cx driver (cronyx.c, cx,c and if_cx.c) uses
pessimal (u_short) types for i/o ports.  I don't understand the data
structures in this driver well enough to unpessimize the types.
2003-08-06 11:05:42 +00:00
Bruce Evans ded45a40b0 Broke the warning that this driver uses pessimal (u_short) types for
i/o ports by calling the implementation-detail level below inb() and
outb() instead of inb() and outb().  Unpessimizing the types is too
hard since they are mainly used in microcode.
2003-08-06 10:52:16 +00:00
Poul-Henning Kamp f976cfd99a Add XXX: comment to vm_pager_unswapped(). 2003-08-06 10:51:40 +00:00
Poul-Henning Kamp 5e04322a6e Explicitly set B_PAGING 2003-08-06 09:22:47 +00:00
David E. O'Brien 7df14ae5de Change the format type to unbreak LINT on 64-bit platforms. 2003-08-06 07:18:42 +00:00