Commit graph

25545 commits

Author SHA1 Message Date
Warner Losh f6056f14ec Th -> The in a comment 2001-05-12 06:04:02 +00:00
Daniel Eischen b85c313a62 Preserve the state of the %gs register when setting up the signal
handler in Linux emulation.  According to bde, this is what Linux
does.

Recent versions of linuxthreads use %gs for thread-specific data,
while FreeBSD uses %fs (mostly because WINE uses %gs).

Tested by: drew
2001-05-12 03:23:10 +00:00
John Baldwin 1efb92b7ca Simplify the vm fault trap handling code a bit by using if-else instead of
duplicating code in the then case and then using a goto to jump around
the else case.
2001-05-11 23:50:08 +00:00
John Baldwin b012b205a7 GC prototype for procfs_bmap() missed during a previous commit. 2001-05-11 23:37:37 +00:00
John Baldwin dd094a2d17 Simply the vm fault trap handling code a bit by using if-else instead of
duplicating code in the then case and then using a goto to jump around
the else case.
2001-05-11 23:17:54 +00:00
John Baldwin 87e2d38376 Allow sendsig() to hand the proc lock off to osendsig() rather than having
sendsig() release the lock just so it can call osendsig() and have
osendsig() acquire the lock.
2001-05-11 23:17:05 +00:00
John Baldwin b88cd712a7 Add a new macro to test if a process' proc lock is held by the current
thread: PROC_LOCKED().
2001-05-11 21:28:37 +00:00
Bill Paul e39cd3b251 It's vlan.h, not opt_vlan.h. 2001-05-11 20:55:31 +00:00
Ian Dowse 1feb7a6efa In vrele() and vput(), avoid triggering the confusing "missed vn_close"
KASSERT when vp->v_usecount is zero or negative. In this case, the
"v*: negative ref cnt" panic that follows is much more appropriate.

Reviewed by:	mckusick
2001-05-11 20:42:41 +00:00
Jonathan Lemon fae4825cdf Regenerate. 2001-05-11 20:41:20 +00:00
Jonathan Lemon dafdd7777b Correctly recognize the i82562{EM} PHYs.
Obtained from: OpenBSD
2001-05-11 20:34:38 +00:00
Bill Paul b680c0ae8b Regenerate 2001-05-11 20:27:39 +00:00
John Baldwin 9e5620599e Check witness_dead in more functions to avoid panic'ing when assertions
fail due to witness exhausting its internal resources and shutting down.

Reported by:	Szilveszter Adam <sziszi@petra.hos.u-szeged.hu>
Tested by:	David Wolfskill <david@catwhisker.org>
2001-05-11 20:25:29 +00:00
Bill Paul 84b86890ae Disable the 'stats counter overflow' interrupts since they can happen
much more often that expected and negatively impact performance when
running at 100mbps. I need to figure out if there's a better way to
handle this, but for now this shouldn't hurt anything.
2001-05-11 20:15:41 +00:00
Bill Paul ce4946daa5 Add support for gigabit ethernet cards based on the NatSemi DP83820
and DP83821 gigabit ethernet MAC chips and the NatSemi DP83861 10/100/1000
copper PHY. There are a whole bunch of very low cost cards available with
this chipset selling for $150USD or less. This includes the SMC9462TX,
D-Link DGE-500T, Asante GigaNIX 1000TA and 1000TPC, and a couple cards
from Addtron.

This chip supports TCP/IP checksum offload, VLAN tagging/insertion.
2048-bit multicast filter, jumbograms and has 8K TX and 32K RX FIFOs.
I have not done serious performance testing with this driver. I know
it works, and I want it under CVS control so I can keep tabs on it.
Note that there's no serious mutex stuff in here yet either: I need
to talk more with jhb to figure out the right way to do this. That
said, I don't think there will be any problems.

This driver should also work on the alpha. It's not turned on in
GENERIC.
2001-05-11 19:56:39 +00:00
Tor Egge dd1c45f3ca Regenerate. 2001-05-11 17:05:47 +00:00
Tor Egge b4b469e6bb gettimeofday() is MP safe on both -current and -stable. 2001-05-11 17:05:12 +00:00
Ruslan Ermilov 9185426827 In in_ifadown(), differentiate between whether the interface goes
down or interface address is deleted.  Only delete static routes
in the latter case.

Reported by:	Alexander Leidinger <Alexander@leidinger.net>
2001-05-11 14:37:34 +00:00
Kirk McKusick 9b35c30cf7 Remove yet another deadlock case. 2001-05-11 07:12:03 +00:00
Greg Lehey e6d1172096 Fix world-breaking typo in previous commit. 2001-05-11 07:06:06 +00:00
Mike Smith 85fab96387 Un-swap irq/link byte values so that printf works. 2001-05-11 04:52:29 +00:00
John Baldwin f2909e6cd8 Trim lots of stuff that is now in MI code along with MD alpha code. 2001-05-10 17:58:35 +00:00
John Baldwin ba228f6d96 - Split out the support for per-CPU data from the SMP code. UP kernels
have per-CPU data and gdb on the i386 at least needs access to it.
- Clean up includes in kern_idle.c and subr_smp.c.

Reviewed by:	jake
2001-05-10 17:45:49 +00:00
Bill Paul d639723b88 Try to read the station address twice during the probe. I've seen
a LinkSys card here in the office where reading the station address
fails the first time, but works find afterwards. Without this, the
probe fails. I don't think this will negatively impact any existing
cards, but I want to confirm this before MFC'ing.
2001-05-10 17:17:24 +00:00
John Baldwin df4d012b9a - Use sched_lock and critical regions to ensure that LDT updates are thread
safe from preemption and concurrent access to the LDT.
- Move the prototype for i386_extend_pcb() to <machine/pcb_ext.h>.

Reviewed by:	silence on -hackers
2001-05-10 17:03:03 +00:00
Matt Jacob 5532b9f61e The new order of things is that dwlpxN is now called pcibN- so hack around
*that* whilst we ponder the best way to decide how to register dwlpx interrupts
with TLSB.
2001-05-10 07:08:03 +00:00
Warner Losh f40d7afa05 Fix the panics for real this time. When something can't be allocated,
we need to delete the info from the list as well as zero out the res
pointer we saved in the code.

Also made a few style(9) changes while I was at it.  Don't use if
(ptr) or if (!ptr), but compare against NULL.  Compare against NULL
rather than 0.  Don't have useless blocks.

There are likely other problems as well, but at least the wi based
wireless card with memory listed in its cis doesn't panic the system
when the card is inserted.
2001-05-10 06:55:39 +00:00
Matt Jacob fd5fcd7c1a add alpha_pci_route_interrupt method 2001-05-10 06:52:56 +00:00
Matt Jacob d18bc19f87 Quick hack to reintroduce the notion that there might be alpha platforms
without an i8254 timer/counter. This really needs to be cleaned up.
2001-05-10 05:23:58 +00:00
Daniel C. Sobral ec10295143 FICL 2.05 has a flawed definition of BASE. Fix it.
Spotted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
2001-05-10 05:13:09 +00:00
John Baldwin 221897cddb Include sys/lock.h for witness_list_locks() and axe unneeded sys/mutex.h
include.
2001-05-09 22:08:28 +00:00
John Baldwin 0142c72785 Add in commented out entries for NEWCARD so that they are at least
documented.  They cannot be turned on by default due to conflicting
symbols at link time between OLDCARD and NEWCARD.

Approved by:	imp
2001-05-09 19:37:25 +00:00
Bill Paul 68e691b2ab The sk driver developed a bug when the multicast code was changed to
use TAILQ macros. The sk_attach_xmac() routine calls sk_init_xmac()
before doing the transceiver probe, but *before* ether_ifattach()
is called. This causes sk_init_xmac() to call sk_setmulti(), which
tries to do a TAILQ_FOREACH(), which it can't do because ether_ifattach()
hasn't done a TAILQ_INIT() yet. This causes a NULL pointer dereference
and panic in sk_setmulti() at driver load/initialization time.

Fixed by calling ether_ifattach() before the MII probe.

The code in RELENG_4 still uses the old way of enumerating the
multicast list and doesn't have this problem. Yet.
2001-05-09 18:22:42 +00:00
John Baldwin 28a24ae515 Add include of sys/mutex.h and resort include of sys/lock.h. 2001-05-09 16:56:48 +00:00
John Baldwin d90b453427 Add needed sys/lock.h include. 2001-05-09 16:55:59 +00:00
Søren Schmidt 63e45b51b0 Remove the error var, it hides the real one.
PR 27213.

BTW the CDIOCREADAUDIO ioctl is deprecated, its not longer needed
and was an ugly hack from start on.
2001-05-09 13:01:10 +00:00
Dag-Erling Smørgrav ee72cb740e Avoid overflow when converting ticks to jiffies.
PR:		27215
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2001-05-09 11:41:54 +00:00
Duncan Barclay 3f36f543ff Eliminate some panics for errors we can recover from.
Reduce the verbose memory map setup reports and work with pccardd to
set the common memory map up.

Use enumeration values for CARD_SET_RES_FLAGS.

Use DELAY when spinning waiting for the card to come free instead of a loop.

MFC:	after 1 week
2001-05-09 00:03:19 +00:00
Duncan Barclay 7b8ec2c952 Use enumeration values for CARD_SET_RES_FLAGS.
Remove panic on out of range io window and return ENXIO. Add a similar
check for memory windows.

Approved by:	imp
2001-05-08 23:59:13 +00:00
Duncan Barclay 1fcaa98da5 Use enumeration types for CARD_SET_RES_FLAGS.
Approved by:	imp
2001-05-08 23:57:32 +00:00
Duncan Barclay 0a177c3dca Add additional enumeration types for CARD_SET_RES_FLAGS.
Approved by:	imp
MFC:	after 1 week
2001-05-08 23:56:47 +00:00
Duncan Barclay a31957707a Add a sysctl pair for the pcic memory allocation range
machdep.pccard.pcic_mem_start
	machdep.pccard.pcic_mem_end
and default the range to IOM_BEGIN/IOM_END.

This may prove useful to if_ray users (and others) on more modern
hardware that maps BIOS stuff into 0xd000-0xdffff.

MFC: after 1 week

Approved by:	imp
2001-05-08 22:51:05 +00:00
Seigo Tanimura 9d68b59376 - Eliminate locks in functions called only during probe and attach.
- Finish transmitting data to mpu when a buffer gets empty.

Submitted by:	KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
2001-05-08 12:15:26 +00:00
Poul-Henning Kamp 724682d233 Polish error handling with biofinish(). 2001-05-08 09:10:27 +00:00
Poul-Henning Kamp d4e6d409ca Polish error handling code using biofinish() 2001-05-08 09:09:32 +00:00
Alfred Perlstein 97d4578662 Remove an 'optimization' I hope to never see again.
The pipe code could not handle running out of kva, it would panic
if that happened.  Instead return ENFILE to the application which
is an acceptable error return from pipe(2).

There was some slightly tricky things that needed to be worked on,
namely that the pipe code can 'realloc' the size of the buffer if
it detects that the pipe could use a bit more room.  However if it
failed the reallocation it could not cope and would panic.  Fix
this by attempting to grow the pipe while holding onto our old
resources.  If all goes well free the old resources and use the
new ones, otherwise continue to use the smaller buffer already
allocated.

While I'm here add a few blank lines for style(9) and remove
'register'.
2001-05-08 09:09:18 +00:00
Poul-Henning Kamp b63170f870 Exploit recent improvements in the disk minilayer to simplify error
handling a bit.

Dogmatic lingupurists can celebrate that a number of gotos got removed.

Reviewed by:	mjacob, ken
2001-05-08 08:30:48 +00:00
Poul-Henning Kamp e0e0b6610e Always initialize bio_resid from bio_bcount in the disk mini-layer so
that the drivers don't have to do it umpteen times.
2001-05-08 08:24:54 +00:00
Brian Somers f80704eff1 Remove all the mutex stuff - suggested by jhb
Tidy up includes, credit Slawa Olhovchenkov, John Prince and Eric Hernes
for their efforts and add a couple of missing parenthesis around return
expressions.
2001-05-08 07:55:33 +00:00
Kirk McKusick 9ccb939ef0 When running with soft updates, track the number of blocks and files
that are committed to being freed and reflect these blocks in the
counts returned by statfs (and thus also by the `df' command). This
change allows programs such as those that do news expiration to
know when to stop if they are trying to create a certain percentage
of free space. Note that this change does not solve the much harder
problem of making this to-be-freed space available to applications
that want it (thus on a nearly full filesystem, you may still
encounter out-of-space conditions even though the free space will
show up eventually). Hopefully this harder problem will be the
subject of a future enhancement.
2001-05-08 07:42:20 +00:00