Commit Graph

38478 Commits

Author SHA1 Message Date
Poul-Henning Kamp
d42ee4e410 Note that MAJOR_AUTO is now the default if d_maj is not initialized. This
is more robust and prevents the hijacking of /dev/console for the typical
mistake.

Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the
driver source has cross-branch compatibility to old releases.
2003-03-09 11:03:45 +00:00
Poul-Henning Kamp
441931b53c Define MAJOR_AUTO as zero, which means that leaving out an initialization
of d_maj means "allocate major number automatically".

Keep the definition of MAJOR_AUTO to make life easier for cross-branch
source maintainers.
2003-03-09 10:29:20 +00:00
Poul-Henning Kamp
06a8bb906c Add one little hack to allow us to make MAJOR_AUTO be zero:
Let the console driver ask for major 256 and magically change this to
mean zero.
2003-03-09 10:28:05 +00:00
Yoshihiro Takahashi
e76a843b59 MFi386: revision 1.1079 2003-03-09 10:20:16 +00:00
Yoshihiro Takahashi
26db0f997b Merged from sys/dev/syscons/syscons.c revision 1.396. 2003-03-09 10:18:15 +00:00
Yoshihiro Takahashi
947878824d Merged from sys/dev/sio/sio.c revisions 1.387 and 1.388. 2003-03-09 10:15:11 +00:00
Yoshihiro Takahashi
484be8eac1 Build the drm module also on pc98. 2003-03-09 10:12:58 +00:00
Poul-Henning Kamp
564632b081 Remove unneeded #include of geom_stats.h 2003-03-09 10:04:21 +00:00
Poul-Henning Kamp
f48b881942 Stamp out Danglish. 2003-03-09 10:02:31 +00:00
Poul-Henning Kamp
0e6be4723b Don't use statistics counters to detect outstanding I/O. 2003-03-09 10:01:16 +00:00
Poul-Henning Kamp
c6ae9b5fd2 Don't abuse the statistics counters for detecting if we have outstanding
I/O requests, instead use the new dedicated fields in the consumer and
provider to track this.
2003-03-09 09:59:48 +00:00
Poul-Henning Kamp
0e082fcca2 Add u_int nstart, nend counters to consumer and providers so we will not
have to examine the stats structure to tell if we have outstanding I/O
requests.

Making them u_int improves the chance of atomic updates to them,
but risks roll-over.  Since the only interesting property is if
they are equal or not, this is not an issue.
2003-03-09 09:58:36 +00:00
Poul-Henning Kamp
df6c9fe955 When a DEV class consumer is orphan'ed we need to wait for all the
outstanding requests to return before we unravel the mesh.

It is very important that the stuff below us plays nice and don't
overlook a couple of outstanding bio's, because until they remember
the geom event thread is blocked.  At an expense in code here this
could be made more robust, but I actually _want_ a robust failure
in this case so any offending drivers can be fixed.
2003-03-09 09:28:45 +00:00
David Xu
d03c79eea1 Cosmetic change, make it QUEUE_MACRO_DEBUG friendly 2003-03-09 04:27:46 +00:00
Eric Anholt
43e2d1e384 Update the DRM to latest from DRI CVS. This is approximately the version
included in XFree86 4.3, but includes some fixes.  Notable changes include
Radeon 8500-9100 support, PCI Radeon/Rage 128 support, transform & lighting
support for Radeons, and vblank syncing support for r128, radeon, and mga.
The gamma driver was removed due to lack of any users.
2003-03-09 02:08:30 +00:00
Tim J. Robbins
ef3dab76bf Hold the proc lock while accessing p_procsig in trapsignal(). 2003-03-09 01:40:55 +00:00
Jonathan Lemon
fb68148f4a Discard the packet if the netisr queue is null instead of panicing, for
the benefit of modules which are compiled differently than the kernel.
2003-03-08 22:12:32 +00:00
Jonathan Lemon
a3b6edc353 Remove check for t_state == TCPS_TIME_WAIT and introduce the tw structure.
Sponsored by: DARPA, NAI Labs
2003-03-08 22:07:52 +00:00
Jonathan Lemon
607b0b0cc9 Remove a panic(); if the zone allocator can't provide more timewait
structures, reuse the oldest one.  Also move the expiry timer from
a per-structure callout to the tcp slow timer.

Sponsored by: DARPA, NAI Labs
2003-03-08 22:06:20 +00:00
Jonathan Lemon
921f8bb982 Fix module build by adding options to Makefile. 2003-03-08 21:54:32 +00:00
Poul-Henning Kamp
f37de12275 Retire devstat_add_entry() as a public function and bump __FreeBSD_version
to mark this act.
2003-03-08 21:46:43 +00:00
Poul-Henning Kamp
a9d2245ea8 Allocate the devstat structure with devstat_new_entry(). 2003-03-08 21:44:46 +00:00
John Polstra
537b41d5ff Correct names for fxp devices. Sort data by devid in
fxp_ident_table.

PR:		kern/48699
Submitted by:	Sergey A. Osokin <osa@FreeBSD.org.ru>
Obtained from:	NetBSD (the device strings, that is)
MFC after:	4 weeks
2003-03-08 21:44:21 +00:00
Poul-Henning Kamp
8098046099 Allocate the devstat structure with devstat_new_entry(). 2003-03-08 21:32:59 +00:00
Poul-Henning Kamp
09f958046c Allocate devstat structure with devstat_new_entry(). 2003-03-08 20:00:11 +00:00
Poul-Henning Kamp
c7e73d59c4 Introduce a device driver for /dev/devstat, this will allow us to mmap
the device statistics structures into userland instead of using sysctl.

Introduce new devstat_new_entry() function which allocates the devstat
structure an calls devstat_add_entry() on it.
2003-03-08 19:58:57 +00:00
Poul-Henning Kamp
bfd614b8a5 Augment the devstat structure with 3 new fields and bump the DEVSTAT_VERSION.
Two fields are sequence numbers for integrity check when we switch devstat
to use mmap to export data rather than sysctl, the last field is to mark
this as an allocated devstat entry.
2003-03-08 19:55:59 +00:00
Jonathan Lemon
06acad4aa4 Revert last change and insure the driver can support other address families.
Pointed out by: ume, matusita
2003-03-08 17:32:21 +00:00
Jonathan Lemon
e0e6419344 The tun driver is INET only. Don't pretend to support other address families.
Sponsored by: DARPA, NAI Labs
2003-03-08 16:26:34 +00:00
Jonathan Lemon
8c90439d70 Include correct opt_* headers for supported address families. Dike out
the unused ATM cases.

Sponsored by: DARPA, NAI Labs
2003-03-08 16:25:27 +00:00
Poul-Henning Kamp
60794e0478 Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c.

As a side effect this makes a lot of #include <sys/devicestat.h>
lines not needed and some biofinish() calls can be reduced to
biodone() again.
2003-03-08 08:01:31 +00:00
Tim J. Robbins
74c69254e6 Remove unimplemented IP-in-IPX encapsulation support (options IPTUNNEL). 2003-03-08 06:58:22 +00:00
Kenneth D. Merry
9b80d344ec Zero copy send and receive fixes:
- On receive, vm_map_lookup() needs to trigger the creation of a shadow
  object.  To make that happen, call vm_map_lookup() with PROT_WRITE
  instead of PROT_READ in vm_pgmoveco().

- On send, a shadow object will be created by the vm_map_lookup() in
  vm_fault(), but vm_page_cowfault() will delete the original page from
  the backing object rather than simply letting the legacy COW mechanism
  take over.  In other words, the new page should be added to the shadow
  object rather than replacing the old page in the backing object.  (i.e.
  vm_page_cowfault() should not be called in this case.)  We accomplish
  this by making sure fs.object == fs.first_object before calling
  vm_page_cowfault() in vm_fault().

Submitted by:	gallatin, alc
Tested by:	ken
2003-03-08 06:58:18 +00:00
David Xu
b4508d7d3f Lock sched_lock before modifying td_flags. 2003-03-08 04:09:04 +00:00
David Xu
1108975fe0 Initialize eflags in fake frame to default value rather than random one.
The random value sometimes causes macro CLKF_USERMODE to return true
because PSL_VM bit is set and really shoudn't be, this causes statclock()
to execute in wrong path, and further breaks KSE code and kernel crashes
when executing threaded program.
2003-03-08 03:58:50 +00:00
Kirk McKusick
34968037b1 Use the appropriate size when zeroing out the unused portion
of a snapshot's copy of a superblock. This patch fixes a panic
when taking a snapshot of a 4096/512 filesystem.

Reported by:	Ian Freislich <ianf@za.uu.net>
Sponsored by:   DARPA & NAI Labs.
2003-03-07 23:49:16 +00:00
Andrey A. Chernov
864b284996 Replace u_int with "unsigned int" to prevent following errors:
#include <sys/types.h>
#include <sys/stat.h>

main () {
}

cc -D_POSIX_C_SOURCE test.c
/usr/include/sys/stat.h:127: syntax error before "u_int"
/usr/include/sys/stat.h:158: syntax error before "u_int"

(u_int becomes invisible for _POSIX_C_SOURCE and some other *_SOURCE modes)
2003-03-07 23:11:37 +00:00
Rob Braun
d132c84f07 Fix a spelling error.
Submitted by:	jkh
Reviewed by:	zarzycki
2003-03-07 22:47:32 +00:00
John Baldwin
9722121a3c Respect any passed in external lockmgr flags such as LK_NOWAIT in the
default implementations of VOP_LOCK() and VOP_UNLOCK().

Tested by:	jlemon, phk
Glanced at by:	jeffr
2003-03-07 20:45:07 +00:00
Poul-Henning Kamp
ea6ff0649f Limit our requests to DFLTPHYS, this is generally a good idea for
memory-allocation purposes.  Right now it is also a very good idea
because we hit a Giant assertion in the free(9) processing if we
free something larger than 64k.
2003-03-07 19:09:46 +00:00
Tim J. Robbins
f69d0d7067 Set f_fstypename in coda_nb_statfs(). 2003-03-07 09:18:15 +00:00
Tom Rhodes
ff470880ba Fix a few spelling errors.
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org> via -doc.
2003-03-07 03:24:38 +00:00
Hidetoshi Shimokawa
3b79dd164b - improve timeout handling in fwmem.c
- stop processing of TX db if we reaches the end of active db.
2003-03-07 02:51:59 +00:00
Justin T. Gibbs
2cd3cc377a aic79xx.c:
Include read streaming in the PPR flags we display in diagnostics.

	In ahd_reset(), set the known mode after our initial pause prior to
	setting the mode. We can't just set the mode directly because the
	current mode, after the pause, is most likely unknown and setting the
	mode when the saved mode is unknown will trigger an assertion in
	the mode debug code.

	Complete an audit for SCB RAM reads.  These reads must be performed
	via the special ahd_in?_scbram() methods so we can perform a
	Rev A. PCI-X workaround.

	Remove a superfluous mode save operation that was performed just
	prior to a call to ahd_clear_critical_section().  The saved mode
	was never restored and wouldn't have been valid anyway since the
	mode could change while single stepping out of a critical section.

aic79xx.h:
	Add new BUG definition AHD_PCIX_SCBRAM_RD_BUG.

aic79xx_inline.h:
	Update ahd_inb_scbram routine to check for AHD_PCIX_SCBRAM_RD_BUG
	and only apply the workaround if this bug is active.  The old code
	applied the workaround in all cases.

aic79xx_pci.c:
	Set AHD_PCIX_SCBRAM_RD_BUG for the A4.

	Remove an attempted saved_modes call in ahd_pci_test_register_access().
	Saving the modes can only occur when we are paused, but the call was
	happening before the chip was known to be paused.  Restoring the
	modes doesn't make sense either since the code makes no assumptions
	about the state of the sequencer until the first time the mode is set
	by the driver.  This happens after the registers are successfully
	mapped.
2003-03-06 23:58:34 +00:00
Kirk McKusick
9a9906281f When the system is panicing, the lock manager grants all lock
requests whether or not the lock is available. To avoid "unlocked
buffer" panics after a crash, we just claim that all buffers
are locked when cleaning up after a system panic.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-03-06 21:40:07 +00:00
John Baldwin
9da590b49b Oops, fix the double faults people were seeing with the recent changes to
witness.  Sleepable locks such as sx locks always come before all mutexes
including Giant.  However, the static lock order list placed Giant before
the proctree and allproc sx locks.  This resulted in witness creating a
cycle in its lock order "tree" (real trees don't have cycles) leading to
infinite recursion and eventually a double fault.  To fix, put Giant after
sx locks in the lock order list.
2003-03-06 17:25:06 +00:00
Takanori Watanabe
b256620797 Add integer value of _CID handling.
If _CID is string, it will need more complicated
handling to distinguish bus other than ISA.

Submitted by: Paul Wankadia <junyer@gmx.net>
2003-03-06 14:40:15 +00:00
Tim J. Robbins
1303bfb807 Add a temporary workaround for a deadlock in Coda venus 5.3.19 that
occurs when mounting the filesystem. The problem is that venus issues
the mount() syscall, which calls vfs_mount(), which calls coda_root()
which attempts to communicate with venus.
2003-03-06 10:48:03 +00:00
Tim J. Robbins
fe72c63e22 Remove fragments of support for the FreeBSD 3.x and 4.x branches. 2003-03-06 10:38:18 +00:00
Hidetoshi Shimokawa
2b4601d10b MFp4(simokawa_sbp)
Improve if_fwe performance.
- Simplify mbuf handling by using bulkxfer.
	Now, it uses mbuf clusters for RX buffer as usual ethernet drivers.
- Recycle struct xfer buffer and don't call malloc at runtime.
- Count input and output errors.
- Handle a mbuf chain longer than 6 correctly.
- Increase queue length.
2003-03-06 05:06:44 +00:00