Commit graph

38520 commits

Author SHA1 Message Date
Ruslan Ermilov e1ace8b4d3 Hopefully, obviate the need of ``make depend''. 2003-02-28 22:17:47 +00:00
Ruslan Ermilov ddc474a84b Initiate the de-orbit burn sequence for <bsd.kern.mk>.
Always use sys/conf/kern.mk when building kernel/modules.
<bsd.kern.mk> is only preserved for sys/boot/pc98/boot2
for now, but this will be fixed.  If there are other
users of <bsd.kern.mk>, please let me know.

Reminded by:	bde
2003-02-28 22:12:17 +00:00
Ruslan Ermilov 5d1b6a85bc Standardize handling of locore.[sS] etc. files.
Submitted by:	jake, bde, ru
2003-02-28 21:59:14 +00:00
Sam Leffler 595064e871 fix compilation w/o INET6
Noticed by:	"James E. Flemer" <jflemer@acm.jhu.edu>
2003-02-28 20:06:29 +00:00
Maxime Henrion 0bc60d9734 GC the major number for the network entries. 2003-02-28 19:56:10 +00:00
John Hay 11229bf39e Implement outgoing interrupt pipes. It is part of the USB 1.1 spec.
The Lego Infrared Tower use it.
2003-02-28 19:28:29 +00:00
Orion Hodson 19921b23b5 o Move vendor ids into separate table.
o Add assorted vendor and codec ids.
2003-02-28 18:04:52 +00:00
Maxime Henrion 7e1f8a0b2f Make the network /dev entries use MAJOR_AUTO. 2003-02-28 18:04:42 +00:00
David Xu 9948c47f0e Check kse group limit before linking new ksegrp. 2003-02-28 15:57:33 +00:00
Warner Losh f6820d8b82 86 ufm: it now uses MAJOR_AUTO. 2003-02-28 13:25:06 +00:00
Warner Losh 56dd04580a ufm doesn't care what major it uses. 2003-02-28 13:23:31 +00:00
Warner Losh cfb14e7100 These appear to work as cardbus cards too 2003-02-28 13:21:17 +00:00
Poul-Henning Kamp 98bbd7aa59 NO_GEOM cleanup:
Retire the "dev_t" centric version of the disk mini-layer.
Remove now unneeded linkage field in dev_t and struct disk.
2003-02-28 10:02:02 +00:00
Poul-Henning Kamp 3e7b60db4b NO_GEOM cleanup:
Convert to "struct disk *" centric API.

OK'ed by:	sos
2003-02-28 09:53:36 +00:00
Poul-Henning Kamp 82a5503800 Retire #3: wd. 2003-02-28 09:48:59 +00:00
Poul-Henning Kamp 8cfa9ac669 NO_GEOM cleanup:
Convert to "struct disk *" centric API.
2003-02-28 09:47:22 +00:00
Poul-Henning Kamp ad89059cbf Attempt to mark the majors which are used by drivers checked into the
CVS tree.
2003-02-28 07:49:57 +00:00
Jake Burkholder 53faa77b2f Sync with bsd.kern.mk.
Reminded by:	bde
2003-02-28 06:49:59 +00:00
Warner Losh 9cd41be1d0 pccard isn't picky about WHAT major it gets. 2003-02-28 05:56:06 +00:00
Tim J. Robbins 0e66bb97d8 Use a character device and ioctl() for communication between libncp
and the kernel instead of adding more syscalls at runtime. As a bonus,
you can now restrict access to the kernel NCP interface with chmod.
2003-02-28 04:31:29 +00:00
Jake Burkholder 3fb37429df Use MAJOR_AUTO. GC statically assigned majors. 2003-02-28 04:21:13 +00:00
Benno Rice 82b65292eb These files are no longer used. They have been replaced with similarly named
.S files.
2003-02-28 03:35:42 +00:00
Justin T. Gibbs acae33b029 aic79xx.c:
Clear the LQICRC_NLQ status should it pop up after we have
	already handled the SCSIPERR.  During some streaming operations
	this status can be delayed until the stream ends.  Without this
	change, the driver would complain about a "Missing case in
	ahd_handle_scsiint".

	In the LQOBUSFREE handler...

		Don't return the LQOMGR back to the idle state until after
		we have cleaned up ENSELO and any status related to this
		selection.  The last thing we need is the LQO manager starting
		another select-out before we have updated the execution queue.
		It is not clear whether the LQOMGR would, or would not
		start a new selection early.

		Make sure ENSELO is off prior to clearing SELDO by flushing
		device writes.

		Move assignment of the next target SCB pointer inside of
		an if to make the code clearer.  The effect is the same.

	Dump card state in both "Unexpected PKT busfree" paths.

	In ahd_reset(), set the chip to SCSI mode before reading SXFRCTL1.
	That register only exists in the SCSI mode.  Also set the mode
	explicitly to the SCSI mode after chip reset due to paranoia.
	Re-arrange code so that SXFRCTL1 is restored as quickly after the
	chip reset as possible.

	S/G structurs must be 8byte aligned.  Make this official by saying
	so in our DMA tag.

	Disable CIO bus stretch on MDFFSTAT if SHVALID is about to come
	true.  This can cause a CIO bus lockup if a PCI or PCI-X error
	occurs while the stretch is occurring - the host cannot service
	the PCI-X error since the CIO bus is locked out and SHVALID will
	never resolve.  The stretch was added in the Rev B to simplify the
	wait for SHVALID to resolve, but the code to do this in the open
	source sequencer is so simple it was never removed.

	Consistently use MAX_OFFSET for the user max syncrate set from
	non-volatile storage.  This ensures that the offset does not
	conflict with AH?_OFFSET_UNKNOWN.

	Have ahd_pause_and_flushwork set the mode to ensure that it has
	access to the registers it checks.  Also modify the checking of
	intstat so that the check against 0xFF can actually succeed if
	the INT_PEND mask is something other than 0xFF.  Although there
	are no cardbus U320 controllers, this check may be needed to
	recover from a hot-plug PCI removal that occurs without informing
	the driver.

	Fix a typo.  sg_prefetch_cnt -> sg_prefetch_align.  This fixes
	an infinite loop at card initialization if the cacheline size is 0.

aic79xx.h:
	Add AHD_EARLY_REQ_BUG bug flag.

	Fix spelling errors.

	Include the CDB's length just after the CDB pointer in the DMA'ed
	CDB case.

	Change AH?_OFFSET_UNKNOWN to 0xFF.  This is a value that the
	curr->offset can never be, unlike '0' which we previously used.
	This fixes code that only checks for a non-zero offset to
	determine if a sync negotiation is required since it will fire
	in the unknown case even if the goal is async.

aic79xx.reg:
	Add comments for LQISTAT bits indicating their names in the 7902
	data book.  We use slightly different and more descriptive names
	in the firmware.

	Fix spelling errors.

	Include the CDB's length just after the CDB pointer in the DMA'ed
	CDB case.

aic79xx.seq:
	Update comments regarding rundown of the GSFIFO to reflect reality.

	Fix spelling errors.

	Since we use an 8byte address and 1 byte length, shorten the size
	of a block move for the legacy DMA'ed CDB case from 11 to 9 bytes.

	Remove code that, assuming the abort pending feature worked, would
	set MK_MESSAGE in the SCB's control byte on completion to catch
	invalid reselections.  Since we don't see interrupts for completed
	selections, this status update could occur prior to us noticing the
	SELDO.  The "select-out" queue logic will get confused by the
	MK_MESSAGE bit being set as this is used to catch packatized
	connections where we select-out with ATN.  Since the abort pending
	feature doesn't work on any released controllers yet, this code was
	never executed.

	Add support for the AHD_EARLY_REQ_BUG.  Don't ignore persistent REQ
	assertions just because they were asserted within the bus settle delay
	window.  This allows us to tolerate devices like the GEM318 that
	violate the SCSI spec.

	Remove unintentional settnig of SG_CACHE_AVAIL.  Writing this bit
	should have no effect, but who knows...

	On the Rev A, we must wait for HDMAENACK before loading additional
	segments to avoid clobbering the address of the first segment in
	the S/G FIFO.  This resolves data-corruption issues with certain
	IBM (now Hitachi) and Fujitsu U320 drives.

	Rearrange calc_residual to avoid an extra jmp instruction.

	On RevA Silicon, if the target returns us to data-out after we
	have already trained for data-out, it is possible for us to
	transition the free running clock to data-valid before the required
	100ns P1 setup time (8 P1 assertions in fast-160 mode).  This will
	only happen if this L-Q is a continuation of a data transfer for
	which we have already prefetched data into our FIFO (LQ/Data
	followed by LQ/Data for the same write transaction).  This can
	cause some target implementations to miss the first few data
	transfers on the bus.  We detect this situation by noticing that
	this is the first data transfer after an LQ (LQIWORKONLQ true),
	that the data transfer is a continuation of a transfer already
	setup in our FIFO (SAVEPTRS interrupt), and that the transaction
	is a write (DIRECTION set in DFCNTRL). The delay is performed by
	disabling SCSIEN until we see the first REQ from the target.

	Only compile in snapshot savepointers handler for RevA silicon
	where it is enabled.

	Handle the cfg4icmd packetized interrupt.  We just need to load
	the address and count, start the DMA, and CLRCHN once the transfer
	is complete.

	Fix an oversight in the overrun handler for packetized status
	operations.  We need to wait for either CTXTDONE or an overrun
	when checking for an overrun.  The previous code did not wait
	and thus could decide that no overrun had occurred even though
	an overrun will occur on the next data-valid req.  Add some
	comment to this section for clarity.

	Use LAST_SEG_DONE instead of LASTSDONE for testing transfer
	completion in the packetized status case.  LASTSDONE may come up
	more quickly since it only records completion on the SCSI side,
	but since LAST_SEG_DONE is used everywhere else (and needs to be),
	this is less confusing.

	Add a missing invalidation of the longjmp address in the non-pack
	handler.  This code needs additional review.

aic79xx_inline.h:
	Fix spelling error.

aic79xx_osm.c:
	Set the cdb length for CDBs dma'ed from host memory.

	Add a comment indicating that, should CAM start supporting cdbs
	larger than 16bytes, the driver could store the CDB in the status
	buffer.

aic79xx_pci.c:
	Add a table entry for the 39320A.

	Added a missing comma to an error string table.

	Fix spelling errors.
2003-02-27 23:23:16 +00:00
Jake Burkholder dd606b5425 - Removed various cruft from before we had a hosted toolchain (!).
- Moved special compiler flags to bsd.kern.mk so they get used for modules
  too.
2003-02-27 23:02:22 +00:00
Poul-Henning Kamp 9fc954f139 NO_GEOM cleanup:
Move <sys/conf.h> before <sys/disk.h>.
No need for raidread()/raidwrite(), we have generic code for that.
Remove non-functional dump code.
Make raidinit() return the softc, not the dev_t.
Move to "struct disk*" centric API.
Fix printfs' to get name from struct disk instead of dev_t.

OK'ed by:	scottl
2003-02-27 22:04:08 +00:00
Poul-Henning Kamp 32f034faca Add support for the Elan CPU hardware watchdog used in "active" mode. 2003-02-27 21:13:08 +00:00
Sam Leffler e85eab7751 add 5801 and 5802 recognition (somehow lost in transition from openbsd)
Noticed by:	Larry Baird <lab@gta.com>
2003-02-27 21:10:20 +00:00
Poul-Henning Kamp e6258fb774 Add header file defining a simple, yet expressive watchdog interface
which can be implemented on all the watchdog hardware I know.
2003-02-27 21:07:36 +00:00
Nate Lawson fdb8bf0997 Zero cpi->target_sprt since atapi-cam does not support target mode. This
gets rid of annoying messages when targbh tries to attach to the ATA bus
and gets rejected.

MFC after:	1 day
2003-02-27 20:56:56 +00:00
Jake Burkholder 418306e3bf Include majors.o in SYSTEM_OBJS to make sparc64 kernels link. This is a
quick fix while I work on a better solution.
2003-02-27 20:55:09 +00:00
John Baldwin 295435632d Expand some #ifdef's to fix I386_CPU compile.
Reported by:	Andy Farkas <andyf@speednet.com.au>
2003-02-27 20:38:48 +00:00
Alan Cox 8480cd45a5 Remove some long unused declarations. (For example, the PV flags have not
been used since revision 1.8, roughly nine years ago.)
2003-02-27 20:13:20 +00:00
Bill Paul c6d8cd1e00 Remember to set if_capenable when setting up checksum offload in fxp_attach().
Pointed out by: jlemon
2003-02-27 19:41:55 +00:00
Maxime Henrion 03ab197379 When DDB is in the kernel, unlock VTY switching so that we
don't end up freezing the box.  This makes VTY locking useless
in the DDB case but a box which is supposed to be physically
secure shouldn't compile DDB anyway.

Reviewed by:	silence on -audit
2003-02-27 18:24:06 +00:00
Mark Murray c1f4590524 This is not going to win prizes for the most useful module ever,
but it is useful to me for some testing and warns-fixing.
2003-02-27 18:08:44 +00:00
Mark Murray ef8b020c73 Warns and lint fix. Nearly all trivial stuff. 2003-02-27 18:07:11 +00:00
Poul-Henning Kamp 28484399ed Update the comment to reflect new reality.
GC more entries.
2003-02-27 15:34:12 +00:00
Poul-Henning Kamp 5fc8342289 GC some more major numbers. 2003-02-27 15:18:56 +00:00
Poul-Henning Kamp 85f19dccdb Add the flip-side check: If a driver wants a particular major#, make
sure it is marked as allocated in reserved_majors[].  Whine if it wasn't.
2003-02-27 15:17:37 +00:00
Poul-Henning Kamp f85c6d3502 Use MAJOR_AUTO. 2003-02-27 15:05:28 +00:00
Ruslan Ermilov e4de92ce2b Hook up the if_my module to the build. 2003-02-27 14:49:56 +00:00
Maxime Henrion bca0668a92 We can now properly return ENODEV in nommap(), so do it.
Remove the now wrong comment which says we can't.
2003-02-27 14:48:53 +00:00
Poul-Henning Kamp beea48b254 Add support for allocating a device driver major number on demand.
To do this, initialize the d_maj member of the cdevsw to MAJOR_AUTO.
When the cdevsw is first passed to make_dev() a free major number
will be assigned.

Until we have a bit more experience with this a printf will announce
this fact.

Major numbers are not reclaimed, so loading/unloading the same
device driver which uses MAJOR_AUTO will eventually deplete the
pool of free major numbers and the system will panic when it can
not allocate one.  Still undecided who to invonvenience with the
solution to this.
2003-02-27 14:46:51 +00:00
Tim J. Robbins 39abaa5fab Use noread(), nowrite() and nopoll() instead of our own stub functions. 2003-02-27 14:35:21 +00:00
Poul-Henning Kamp c2b46fcca4 Add yet a patch for the patchwork quilt called sio(4):
Allow people set set flags on pci based SIO ports.
2003-02-27 14:09:36 +00:00
Poul-Henning Kamp 59c5c475f1 Typo, I must have hit xZZ in vi(1). 2003-02-27 12:53:21 +00:00
Hidetoshi Shimokawa 455454994f MFp4(simokawa_sbp branch)
Improve SBP device probeing:
- Wait 2 sec before issuing LOGIN ORB expecting the reconnection
	hold timer expires.
- Serialize management ORB and scanning LUN by CAM on each target.
	This should fix the problem for devices which have multiple LUNs.
	Test device is donated by: Jaye Mathisen <mrcpu@internetcds.com>
- Freeze SIM queue for 2 sec after BUS RESET.
- Retry with LOGIN rather than RECONNECT after LOGIN is not completed for
	BUS RESET.
- Use appropriate CAM status for BUS RESET and DEVICE RESET.
- Let CAM to scan targets after BUS REST.
- Implement CAM scan target function.
- Keep our own devq freeze count.
- Let CAM to know that SBP does tagged queuing.

These should be merged to RELENG_4 before 4.8-RELEASE.
2003-02-27 12:51:24 +00:00
Poul-Henning Kamp 6cec1852d4 Make flags bit 0x10000 mean that PPS timestamping should use the
CTS instead of the DCD pin.
2003-02-27 12:27:09 +00:00
Tim J. Robbins f449c0f11d Copy some VM changes from smbfs_putpages() to nwfs_putpages(): lock
page queues, use vm_page_undirty().
2003-02-27 11:35:22 +00:00
Tim J. Robbins ef9e45dd01 Build the ncp and nwfs modules again, but only on i386 for now. 2003-02-27 11:31:08 +00:00
Søren Schmidt 33c788a554 Only use function 1 not 0 on cypress chips. 2003-02-27 09:42:57 +00:00
Hartmut Brandt dce4c82d8e When we have found a chunk of memory that is large enough and have computed
a correctly aligned address in this block we really want to check, that the
part of the chunk that starts at the aligned address is large enough with
regard to the original request. Comparing it to 0 makes no sense, because this
is always true except in the rare case, that the aligned address is just at
the end of the chunk.

Approved by:	jake (mentor)
2003-02-27 08:56:41 +00:00
Poul-Henning Kamp 76d6aef572 Add necessary awk magic to create a table of major numbers allocated
in conf/majors so we can avoid autoallocating them in the kernel.
2003-02-27 08:52:11 +00:00
Hartmut Brandt b89bc9e62b When a process has been waiting on a condition variable or mutex the
td_wmesg field in the thread structure points to the description string of
the condition variable or mutex. If the condvar or the mutex had been
initialized from a loadable module that was unloaded in the meantime,
td_wmesg may now point to invalid memory. Retrieving the process table now
may panic the kernel (or access junk). Setting the td_wmesg field to NULL
after unblocking on the condvar/mutex prevents this panic.

PR:		kern/47408
Approved by:	jake (mentor)
2003-02-27 08:43:27 +00:00
Tim J. Robbins 2a42bccb40 Fix vnode corruption bug when trying to rename files across filesystems.
Similar to the bug fixed in smbfs_vnops.c rev 1.33.
2003-02-27 08:26:17 +00:00
Poul-Henning Kamp e30fb64028 Mark comments with '#' to make this machine-readable 2003-02-27 07:57:00 +00:00
Tim J. Robbins 4116d5c10f Sync nwfs_access() with smbfs_access(): use vaccess() instead of checking
permissions ourself, fixes problem with VAPPEND.
2003-02-27 07:46:01 +00:00
Poul-Henning Kamp f477b4fd53 NODEVFS cleanup:
Remove cdevsw_add() and cdevsw_remove(), they served us well for a long time.
Bump __FreeBSD_version to 500104 to mark this.
2003-02-27 07:40:44 +00:00
Poul-Henning Kamp 4c61f9036b NODEVFS cleanup:
Don't call devsw_{add,delete}().
These two drivers are actually broken, and have been for quite some time.
2003-02-27 07:36:03 +00:00
Søren Schmidt 4f57804cd3 Fix UDMA modes setup on CMD chips. 2003-02-27 07:11:42 +00:00
Tim J. Robbins 04dbfb5c89 Catch up with recent netncp changes: ncp_chkintr() takes a thread, not
a proc, as its second argument.
2003-02-27 06:49:46 +00:00
David Xu 3b3df40fc4 Release sched_lock before calling upcall_free. 2003-02-27 05:42:01 +00:00
Scott Long 4bc7efe837 Add the ID for the CS4205 codec found in Dell laptops. Obtained from
the CS4205 spec.
2003-02-27 03:51:43 +00:00
David Xu 1d56863dd2 Needn't kse.h 2003-02-27 03:16:35 +00:00
Julian Elischer ac2e415327 Change the process flags P_KSES to be P_THREADED.
This is just a cosmetic change but I've been meaning to do it for about a year.
2003-02-27 02:05:19 +00:00
David Xu 7d33ae9677 cat KSE > /dev/null 2003-02-27 01:11:58 +00:00
Ruslan Ermilov 824018495d Implemented "nooption" and "nomakeoption" config(8) tokens.
Fixed memory leak in the "nodevice" option implementation.

Use these instead of sed(1) in MD NOTES.

Use a single makefile (sys/conf/makeLINT.mk) to generate
LINT for all architectures.  (Previous versions missed
the LINT dependency on Makefile, and i386 version also
missed the dependency on ${NOTES}.)

Fixed bugs in the previous NOTES conversion using the
"nodevice" token and sed(1):

- i386 LINT lost "device pst".

- pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD
  options, and got needless DPT_* options.

- Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV
  to sparc64 LINT so that it has a chance to config(8).

This basically returns us to where we were before.
2003-02-26 23:36:59 +00:00
Bill Paul c8bca6dc3d As previously threatened, add TCP/IP checksum offload support to
the fxp driver. This is enabled only for the 82550/82551 chips
(PCI revision code 12 or 13). RX and TX checksum offload are
both supported. Transmit offload is limited to TCP and UDP only
right now: there seems to be a problem with IP header checksumming
on transmit in some cases.

This chip has hardware VLAN support as well. I hope to enable
support for this eventually.
2003-02-26 22:12:04 +00:00
Max Khon d52cf765d3 Catch up with KSE changes.
Reviewed by:	tjr
2003-02-26 21:25:55 +00:00
Poul-Henning Kamp 6d473442ca NODEVFS cleanup:
Don't call cdevsw_{add,remove}()
Bracket a more correct subset in "#if experimental"
2003-02-26 21:14:39 +00:00
Poul-Henning Kamp 73f936c5ac NODEVFS cleanup:
Don't call cdevsw_{add,remove}()
Remove remnants of the previous DEVFS.
2003-02-26 21:10:04 +00:00
Poul-Henning Kamp e3163ad47d NODEVFS cleanup: Don't call cdevsw_{add,remove}() 2003-02-26 21:04:51 +00:00
Poul-Henning Kamp f400e58886 msg 2003-02-26 21:01:26 +00:00
Poul-Henning Kamp 109a8a2e47 NODEVFS cleanup: Create devices with make_dev() instead of cdevsw_add() 2003-02-26 20:54:46 +00:00
Poul-Henning Kamp e4d0d8c84a msg 2003-02-26 20:53:28 +00:00
Poul-Henning Kamp 81d4b45da7 NODEVFS cleanup: remove calls to cdevsw_remove() 2003-02-26 20:20:58 +00:00
Mike Barcroft f0603d5be6 Move the typedef for size_t into _iovec.h, so that size_t is available
for struct iovec.
2003-02-26 20:16:58 +00:00
Mike Barcroft 7e7a2c70c0 Change spelling of u_int' to unsigned int' in the POSIX case. 2003-02-26 20:10:54 +00:00
Bill Paul 7dd982591b Some more updates for the new world order:
- Make transmission of packets work again. This stopped working because
  ether_ifattach() was forcing ifp->if_output to be ether_output() and
  clobbering our attempt to override this vector with a pointer to
  ng_fec_output(). Move the overriding of ifp->if_output to after
  ether_ifattach().

- Abandon the use of the netgraph ng_ether_input_p hook for snagging
  incoming frames, and instead override the ifp->if_input vector for
  interfaces that have been aggregated into our bundle. (I would have
  loved to have written things this way in the first place, but I
  didn't want to have to be the one to implement the if_input hook
  and change all the drivers.) This avoids collisions with the ng_ether
  module, which uses the same hook. Each aggregated device now calls
  ng_fec_input() directly, which then fakes up the rcvif pointer
  before invoking ifp->if_input itself.

This module should actually work now.
2003-02-26 19:49:32 +00:00
John Baldwin 844933a831 Move an optimization check so that it breaks out of the correct loop.
Basically, as soon as we have run out of events to handle in the swi,
we stop looping through all the channels in a for loop.
2003-02-26 19:21:56 +00:00
Søren Schmidt 9fb9aa7f06 Fix a reversed test for ATAPI_DEVICE in the Promise setup code. 2003-02-26 19:13:17 +00:00
Olivier Houchard 7ee68e82e7 Add SigmaTel STAC9750 entry.
Submitted by:	Paulius Bulotas <paulius.bulotas@microlink.lt>
2003-02-26 18:39:04 +00:00
Jonathan Lemon 272c5dfe93 In timewait state, if the incoming segment is a pure in-sequence ack
that matches snd_max, then do not respond with an ack, just drop the
segment.  This fixes a problem where a simultaneous close results in
an ack loop between two time-wait states.

Test case supplied by: Tim Robbins <tjr@FreeBSD.ORG>
Sponsored by: DARPA, NAI Labs
2003-02-26 18:20:41 +00:00
Sam Leffler f1dacb5270 Change default setting of hw.wi.txerate to zero so that tx error msgs are
ignored (as before).  This was the original setting but a bug in ppsratecheck
made me do stupid things.
2003-02-26 17:18:35 +00:00
Sam Leffler 893bec8059 o fix ppsratecheck to interpret a maxpps of zero as "ignore everything"
o add a comment explaining the significance of using 0 or -1 (actually
  any negative value) for maxpps
2003-02-26 17:16:38 +00:00
Mike Barcroft 832b6bd471 Simplify struct __timespec, fix style bugs, add an XXX comment.
Submitted by:	bde
2003-02-26 16:50:01 +00:00
Olivier Houchard 33673595a6 Unbreak emu10k1 by properly using the buffer address.
New contestant for the lamest commit of the year award:	cognet
2003-02-26 16:11:18 +00:00
Maxime Henrion 09e192903c Unbreak the IOMMU code.
Pointy hat to:	mux
Reviewed by:	tmm
2003-02-26 15:02:55 +00:00
Mark Murray c63e8d6470 No-op. Change the type of unnamed bit-fields to unsigned to shut up
warnings.
2003-02-26 14:59:14 +00:00
Peter Grehan 4b67de3419 Register typo and incorrect 32-bit constant load in previous commit.
Resulted in AST delivery not working.
2003-02-26 14:41:39 +00:00
Orion Hodson a4273e83bc Replicate OSS behaviour when rate settings fails.
PR:	kern/26563
2003-02-26 14:38:19 +00:00
Jonathan Lemon ef6b48deb9 The TCP protocol lock may still be held if the reassembly queue dropped FIN.
Detect this case and drop the lock accordingly.

Sponsored by: DARPA, NAI Labs
2003-02-26 13:55:13 +00:00
Yoshihiro Takahashi a5459e94a5 Use rman_get_start() to get start address of the resource. 2003-02-26 13:46:40 +00:00
David Xu 426269b2c2 Fix a bug when handling SIGCONT.
Reported By: Mike Makonnen <mtm@identd.net>
2003-02-26 12:47:46 +00:00
Marcel Moolenaar 21c598caae Increase the block size for reading and writing from 8KB to 1MB and
introduce a preprocessor define for it. The larger block size
significantly speeds up the loading of the kernel.

Submitted by: Arun Sharma <arun.sharma@intel.com>
2003-02-26 09:13:05 +00:00
Mike Silbersack a75a485d62 Fix a condition so that ip reassembly queues are emptied immediately
when maxfragpackets is dropped to 0.

Noticed by:	bmah
2003-02-26 07:28:35 +00:00
Scott Long 303473e252 Bump __FreeBSD_version to note that taskqueue_swi now runs without Giant,
and the Giant-encumbered version is now called taskqueue_swi_giant.
2003-02-26 06:59:22 +00:00
Scott Long 3f9be55c27 Revert the use of -g that leaked in. 2003-02-26 06:56:46 +00:00
Bill Paul 0aef141cd0 Attempt to make the ng_fec module play nice with BPF again. Things have
changed since this code was written:

- The ng_ether_input_p hook only accepts two arguments now: the pointer
  to the ether header structure is gone.

- It's no longer necessary to cons up a fake ether header before passing
  incoming packets to BPF_MTAP().

ng_fec_input() has been modified to account for these two changes.
Running tcpdump on fec0 should work now.

PR:	kern/46720
2003-02-26 06:38:54 +00:00
David E. O'Brien a8896ec82d Consistently use NOFORTH to control the usage of ficl. 2003-02-26 06:18:52 +00:00
David Xu f5044aeb45 Better to not know anything about KSE. 2003-02-26 05:47:25 +00:00
Warner Losh 3dc191a139 Add SMC 34C90. Not tested, but should be a no-op except for the id string.
Print the sockbase when we can't get the memory for debug.
2003-02-26 05:45:48 +00:00
Warner Losh d705fb0577 Add a number of IDs from linux for old, rare pci devices:
o A second 82092AA id.
o SMC 34c90
Plus a couple of trivial formatting changes.
2003-02-26 05:44:00 +00:00
Scott Long ae54359608 Bring aac out from under Giant:
- the mutex aac_io_lock protects the main codepaths which handle queues and
  hardware registers.  Only one acquire/release is done in the top-half and
  the taskqueue.  This mutex also applies to the userland command path and
  CAM data path.
- Move the taskqueue to the new Giant-free version.
- Register the disk device with DISKFLAG_NOGIANT so the top-half processing
  runs without Giant.
- Move the dynamic command allocator to the worker thread to avoid locking
  issues with bus_dmamem_alloc().

This gives about 20% improvement in most of my benchmarks.
2003-02-26 04:46:21 +00:00
Scott Long 7874f606d5 Introduce a new taskqueue that runs completely free of Giant, and in
turns runs its tasks free of Giant too.  It is intended that as drivers
become locked down, they will move out of the old, Giant-bound taskqueue
and into this new one.  The old taskqueue has been renamed to
taskqueue_swi_giant, and the new one keeps the name taskqueue_swi.
2003-02-26 03:15:42 +00:00
Scott Long 13f9c3024f Use BUS_SPACE_MAXADDR_32BIT in the DMA tag where needed. Before the recent
fix to BUS_SPACE_MAXADDR, we were probably bouncing quite a bit =-(
2003-02-26 02:55:58 +00:00
Scott Long 46777e9769 Retire the aacd major (151) now that it's no longer needed. 2003-02-26 02:52:14 +00:00
Scott Long 7540e65e84 Move to 'struct disk*' API
Submitted by:	phk
2003-02-26 02:50:27 +00:00
Maxime Henrion f6c912dd0c Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.
It was bogusly set to 64 * 1024 or 128 * 1024 because it was
bogusly reused in the BUS_DMAMAP_NSEGS definition.
2003-02-26 02:16:06 +00:00
David Xu 5614648e5e Add a missing '!'. 2003-02-26 01:56:14 +00:00
Robert Watson 05c06d15e8 Further GC of M_STRING, missed previously. 2003-02-26 01:00:29 +00:00
Robert Watson ae4f61f0d7 Replace license with two-clause BSD; an old license template with three
clauses was used by mistake.
2003-02-26 00:59:53 +00:00
Robert Watson b8e39e3ad3 GC M_STRING, no longer required as strdup() accepts a malloc type.
Requested by:	phk
2003-02-26 00:58:35 +00:00
David Xu 4b4866ed42 Add a simple facility to allow round roubin in userland.
Reviewed by:	julain
2003-02-26 00:58:23 +00:00
Jeff Roberson 48d4ffc119 - The interlock was not being droped in nfs_flush() if the first part of
an if clause was true.  Break the two clauses out into seperate statements
   since they require different actions.

Reported/Tested by:	jake
Spotted by:	jhb
2003-02-26 00:24:19 +00:00
Kirk McKusick 7e734c4149 When doing cleanup of excessive buffers in bdwrite (see kern/vfs_bio.c
delta 1.371) we must ensure that we do not get ourselves into a
recursive trap endlessly trying to clean up after ourselves.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-02-25 23:59:09 +00:00
Kirk McKusick 74f3809a19 Change the field used to test whether the superblock has been updated
from the filesystem size field to the filesystem maximum blocksize
field. The problem is that older versions of growfs updated only the
new size field and not the old size field. This resulted in the old
(smaller) size field being copied up to the new size field which
caused the filesystem to appear to fsck to be badly trashed.

This also adds a sanity check to ensure that the superblock is not
being updated when the filesystem is mounted read-only. Obviously
such an update should never happen.

Reported by:	Nate Lawson <nate@root.org>
Sponsored by:   DARPA & NAI Labs.
2003-02-25 23:21:08 +00:00
John Baldwin fe6301c61c Chase the musical variable names.
Pointy hat to:	jhb
Reported by:	des
2003-02-25 22:48:33 +00:00
Mike Makonnen 0bd5f7979d Unbreak mutex profiling (at least for me).
o Always check for null when dereferencing the filename component.
	o Implement a try-and-backoff method for allocating memory to
	  dump stats to avoid a spin-lock -> sleep-lock mutex lock order
	  panic with WITNESS.

Approved by:	des, markm (mentor)
Not objected:	jhb
2003-02-25 22:28:46 +00:00
Robert Watson 354d43abf3 Pass a malloc type into the libkern strdup() implementation explicitly,
so that callers can specify what malloc pool the resulting memory
should come from.

Requested by:	phk
2003-02-25 22:11:39 +00:00
Poul-Henning Kamp 9fed9b054d NO_GEOM cleanup:
Retire major #13 (da), #116 (ad), #157 (ar)
2003-02-25 22:09:10 +00:00
Poul-Henning Kamp f64bbf8b61 NO_GEOM cleanup:
Move to "struct disk *" centric api.
2003-02-25 22:06:21 +00:00
Søren Schmidt 2957c08b9c Fix support for Acer chips. The UDMA enable regs wasn't set properly. 2003-02-25 21:22:27 +00:00
David E. O'Brien 6e818956c5 Move most everything back to a MI NOTES, and use "nodevice" in MD NOTES
Where needed.  Use 'sed' for now in place of "nooptions".  Add a sparc64
MD NOTES.

Reviewed by:	arch@
2003-02-25 20:59:23 +00:00
John Baldwin e1159d10c0 Limit the maximum I/O size to 8 pages for version 2 controllers. This
fixes problems with some mlx(4) cards in Alpha machines.

Reviewed by:	msmith (ages ago)
2003-02-25 20:47:22 +00:00
John Baldwin 464e014eb9 Fix a small fat-finger: s/mlxd/mxld/.
Reported by:	Bob Willcox <bob@immure.com>
2003-02-25 20:35:56 +00:00
Jake Burkholder 0f1a7e05a2 - Added inlines pmap_is_current, pmap_is_alternate and pmap_set_alternate
for testing and setting the current and alternate address spaces.
- Changed PTDpde and APTDpde to arrays to support multiple page directory
  pages.

ponsored by:	DARPA, Network Associates Laboratories
2003-02-25 19:40:21 +00:00
Ruslan Ermilov e478cf0a5a Fixed CLEANFILES.
Submitted by:	cron
2003-02-25 15:41:49 +00:00
Søren Schmidt dd6a5ae906 Convert to new disk API.
Prodded by: phk
2003-02-25 15:33:36 +00:00
Tim J. Robbins 93997ef1c9 Allocate struct ipx_ifaddrs with an initial reference count of 1, not 0.
The wrong reference count was causing them to get freed too early and
have their contents scrambled.
2003-02-25 15:10:23 +00:00
Søren Schmidt 2e6c2a1089 Properly teardown the interrupt so we wont panic on detach. 2003-02-25 14:46:30 +00:00
Søren Schmidt 472e291b31 Removed the ISA only hooks here, no longer needed.. 2003-02-25 14:24:42 +00:00
Robert Watson 9327ee33bf When generating a TCP response to a connection, not only test if the
tcpcb is NULL, but also its connected inpcb, since we now allow
elements of a TCP connection to hang around after other state, such
as the socket, has been recycled.

Tested by:	dcs
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-02-25 14:08:41 +00:00
Maxime Henrion a4910cd21c Bump __FreeBSD_version for the d_mmap_t interface change. 2003-02-25 13:38:09 +00:00
Maxime Henrion b9deb009c2 Convert one more d_mmap_t consumer I missed in my previous commit. 2003-02-25 13:30:50 +00:00
Søren Schmidt ae64a900aa Fix support for the old CMD 646 chips, interrupt setup was wrong. 2003-02-25 12:56:37 +00:00
Maxim Konovalov b36f5b3735 style(9): join lines. 2003-02-25 11:53:11 +00:00
Maxim Konovalov 99e8617d24 Ip reassembly queue structure has ipq_nfrags now. Count a number of
dropped ip fragments precisely.

Reviewed by:	silby
2003-02-25 11:49:01 +00:00
David Xu d9b05fa0b0 Remove an unsafe KASSERT. 2003-02-25 11:23:17 +00:00
Jeff Roberson 869d735043 - Properly handle the vnode interlock in nfs_fsync.
Reported by:	phk
2003-02-25 08:50:21 +00:00
Jeff Roberson 2e3981a70c - Add the missing NULL interlock argument to a recently added BUF_LOCK. 2003-02-25 08:23:11 +00:00
Søren Schmidt b301920c88 Revert the probe code change.
It helped those fake devices probe delays to go away, but as a side
effect it also made some not so conforming CD/DVD drives go away...
2003-02-25 08:22:01 +00:00
Poul-Henning Kamp 5cd0cc885f NO_GEOM cleanup:
Move to "struct disk *" centric API.
Add NULL check to a malloc(9) return value.

Ok'ed by:	sos
2003-02-25 08:02:57 +00:00
Poul-Henning Kamp 42170da1d8 NO_GEOM cleanup:
Move to new "struct disk *" centric API.
Retire major #147 (twed)
2003-02-25 07:41:51 +00:00
Poul-Henning Kamp b2fe65c5be NO_GEOM cleanup:
Move to "struct disk*" centric API.
Retire major #131 (mlxd)
2003-02-25 07:35:41 +00:00
Poul-Henning Kamp e78dcaf403 Retire major #133 (amrd). 2003-02-25 07:24:51 +00:00
Alan Cox 077808c588 Fuse two #ifdefs with identical conditions. 2003-02-25 06:46:08 +00:00
Kirk McKusick 3a7053cb60 Prevent large files from monopolizing the system buffers. Keep
track of the number of dirty buffers held by a vnode. When a
bdwrite is done on a buffer, check the existing number of dirty
buffers associated with its vnode. If the number rises above
vfs.dirtybufthresh (currently 90% of vfs.hidirtybuffers), one
of the other (hopefully older) dirty buffers associated with
the vnode is written (using bawrite). In the event that this
approach fails to curb the growth in it the vnode's number of
dirty buffers (due to soft updates rollback dependencies),
the more drastic approach of doing a VOP_FSYNC on the vnode
is used. This code primarily affects very large and actively
written files such as snapshots. This change should eliminate
hanging when taking snapshots or doing background fsck on
very large filesystems.

Hopefully, one day it will be possible to cache filesystem
metadata in the VM cache as is done with file data. As it
stands, only the buffer cache can be used which limits total
metadata storage to about 20Mb no matter how much memory is
available on the system. This rather small memory gets badly
thrashed causing a lot of extra I/O. For example, taking a
snapshot of a 1Tb filesystem minimally requires about 35,000
write operations, but because of the cache thrashing (we only
have about 350 buffers at our disposal) ends up doing about
237,540 I/O's thus taking twenty-five minutes instead of four
if it could run entirely in the cache.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-02-25 06:44:42 +00:00
David Xu d4b570f053 Remove a bogus comment. 2003-02-25 05:17:18 +00:00
David Xu 768298d8c4 Remove a never true condition. 2003-02-25 05:14:18 +00:00
Jeff Roberson 17661e5ac4 - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.
- Remove the buftimelock mutex and acquire the buf's interlock to protect
   these fields instead.
 - Hold the vnode interlock while locking bufs on the clean/dirty queues.
   This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another
   BUF_LOCK with a LK_TIMEFAIL to a single lock.

Reviewed by:	arch, mckusick
2003-02-25 03:37:48 +00:00
Maxime Henrion 07159f9c56 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
Jeffrey Hsu edf02ff15d Hold the TCP protocol lock while modifying the connection hash table. 2003-02-25 01:32:03 +00:00
Marcel Moolenaar 907cf80fbf Remove support for running in SimOS. The support has rotted over
time and there's no indication that it will improve anytime soon.
By removing support for SimOS it is possible to build LINT on
Alpha, which is considered more important at the moment.

Not objected to on: alpha@
2003-02-25 00:42:40 +00:00
David E. O'Brien 957a6263b6 Only apply rev 1.10 (which hacks around the i386 boot2 being too big for
both ufs1 and ufs2 support) on i386.
2003-02-25 00:10:20 +00:00
Poul-Henning Kamp 7d6ddd1027 NO_GEOM cleanup:
Move to new "struct disk *" centered API".

OK'ed by:	emoore
2003-02-24 21:49:27 +00:00
Jake Burkholder 5cd612b27e - Removed UMAXPTDI and UMAXPTEOFF.
- Changed VM_MAXUSER_ADDRESS to be defined in terms of PTDPTDI.  In order for
  assumptions about the recursive page table map to work it must be the base
  of the recursive map.  Any pte offset that's not NPTEPG will break these
  assumptions.

Sponsored by:	DARPA, Network Associates Laboratories
2003-02-24 20:29:52 +00:00
Alan Cox 3fa24ec9f1 In vm_page_dirty(), assert that the page is not in the free queue(s). 2003-02-24 17:30:45 +00:00
Alexander Kabaev ba873f4c18 Correctly map SIGSYS signal to/from Linux.
Submitted by:   "Georg-W. Koltermann" <g.w.k@web.de>
2003-02-24 16:16:45 +00:00
Yoshihiro Takahashi 2302407b21 The mpbiosreason variable does not used for pc98. 2003-02-24 14:36:03 +00:00
Yoshihiro Takahashi 7bc5ac11b7 Fix printf format error. 2003-02-24 14:32:27 +00:00
David Schultz 9cdb2d4d9d Expand the reference count on struct dquot to 32 bits.
This fixes a panic on large systems where a single user
may have more than 64K active or inactive vnodes.

PR:		48234
Reviewed by:	mike (mentor)
2003-02-24 08:49:59 +00:00
Kirk McKusick 3bf0ed940b When removing the last item from a non-empty worklist, the worklist
tail pointer must be updated.

Reported by:	Kris Kennaway <kris@obsecurity.org>
Sponsored by:   DARPA & NAI Labs.
2003-02-24 07:28:41 +00:00
David E. O'Brien e901be8e96 <machine/vmparam.h> is the right place to get KERNBASE, so don't special
platform case it (or use alternate spellings).
2003-02-24 06:56:18 +00:00
Sam Leffler 45e10ed9ef o instead of applying arbitrary tunables, just honor the COP_F_BATCH
flag that can be marked on each symmetric op
o eliminate hw.ubsec.maxbatch and hw.ubsec.maxaggr since they are not
  needed anymore
o change ubsec_feed to return void instead of int since zero is always
  returned and noone ever looked at the return value
2003-02-24 06:03:13 +00:00
Scott Long 3303c14b57 Don't NULL out p_fd until after closefd() has been called. This isn't
totally correct, but it has caused breakage for too long.  I welcome
someone with more fd fu to fix it correctly.
2003-02-24 05:46:55 +00:00
David E. O'Brien b9a49f7eb4 pst(4) should be portable across all our platforms. 2003-02-24 05:12:24 +00:00
Kirk McKusick c555826bd7 Revert to old (broken for over 1.5Tb filesystems) version of cgbase
so that boot loader once again will fit.

Sponsored by:   DARPA & NAI Labs.
2003-02-24 04:57:01 +00:00
David E. O'Brien 36f19f1bee Wrap the static endian functions to shutup GCC. 2003-02-24 04:44:53 +00:00
Mike Silbersack af9c7d06d5 Fix a comment which didn't match the new cookie behavior.
Submitted by:	Scott Renfro <scott@renfro.org>
MFC after:	1 day
2003-02-24 03:15:48 +00:00
Peter Grehan 597dc6637a Catch up with ATAng changes 2003-02-24 03:12:30 +00:00
Jonathan Lemon 060958481a Fix another case for timewait. 2003-02-24 02:06:50 +00:00
Jonathan Lemon 9c3309d174 Update to work with the new timewait state.
Reviewed by: sam
2003-02-24 02:06:02 +00:00
David Xu 0fccb684d1 Remove a XXXKSE. kg_completed now needs proc lock. 2003-02-24 01:28:10 +00:00
Jeffrey Hsu 11a20fb8b6 tcp_twstart() need to be called with the TCP protocol lock held to avoid
a race condition with the TCP timer routines.
2003-02-24 00:52:03 +00:00
David Xu f5878f69df Backout last surplus commit. That day just wasn't my day. 2003-02-24 00:49:55 +00:00
Jeffrey Hsu 2fbef91887 Pass the right function to callout_reset() for a compressed
TIME-WAIT control block.
2003-02-24 00:48:12 +00:00
Jake Burkholder 28c9e1aa5c Use the direct mapping of IdlePTD setup in locore for proc0's page directory,
instead of allocating another page of kva and mapping it in again.  This was
likely an oversight in revision 1.174 (cut and paste from pmap_pinit).

Discussed with:	peter, tegge
Sponsored by:	DARPA, Network Associates Laboratories
2003-02-24 00:39:50 +00:00
Peter Grehan 84188b7cc1 Add apple partition map GEOM module 2003-02-24 00:16:51 +00:00
David E. O'Brien 0f7d7a85f0 Make the 'a' parameter of bus_space_write_multi_stream_*() a const pointer. 2003-02-24 00:11:15 +00:00
Tor Egge 07d2563244 Allow machines with one CPU and a valid mp table to boot an SMP kernel. 2003-02-23 23:49:57 +00:00
Dan Moschuk 25b803ef49 Add support for Peppercon ROL-F Card.
Submitted by: Sascha Holzeiter <sascha@root-login.org>
PR: 48559
2003-02-23 23:35:35 +00:00
Marcel Moolenaar 0f265fea23 Use the correct size for reading and writing the PCI config space.
Reading the PCI config space with the wrong (larger) size is not
a problem in this case, but writing can be as it clobbers unrelated
registers. In this case the clobbering is for reserved fields, which
too is mostly harmless... for now. Hence, this change is mostly
preventive in nature.
2003-02-23 23:09:17 +00:00
Tor Egge 6a07a13944 Sync new socket nonblocking/async state with file flags in accept().
PR:		1775
Reviewed by:	mbr
2003-02-23 23:00:28 +00:00
David E. O'Brien 1e44b62e0d There is no reason to be cute with ntohl(). Just call it directly rather
than use a macro that tries to do conversions in place.

Compile tested on:	sparc64
2003-02-23 22:26:39 +00:00
Jake Burkholder ef49a94104 Previous commit missed a 1 that should be NGPTD, and an NPDEPG that should
be NPDEPTD.  Grumble.

Sponsored by:	DARPA, Network Associates Laboratories
2003-02-23 22:12:08 +00:00
David E. O'Brien 71655cc2c9 This commit was generated by cvs2svn to compensate for changes in r111368,
which included commits to RCS files with non-trunk default branches.
2003-02-23 21:58:31 +00:00
David E. O'Brien e242322ffe Import Linux's linux/include/asm-sparc64/bitopts.h.
This is taken from the 2.4.3 Linux sources as shipped on Red Hat 7.1 Alpha.
2003-02-23 21:58:31 +00:00
David E. O'Brien 068bd9b1d9 Import Linux's linux/include/asm-sparc64/bitopts.h.
This is taken from the 2.4.3 Linux sources as shipped on Red Hat 7.1 Alpha.
2003-02-23 21:58:31 +00:00
Jake Burkholder 910548dea7 - Added macros NPGPTD, NBPTD, and NPDEPTD, for dealing with the size of the
page directory.
- Use these instead of the magic constants 1 or PAGE_SIZE where appropriate.
  There are still numerous assumptions that the page directory is exactly
  1 page.

Sponsored by:	DARPA, Network Associates Laboratories
2003-02-23 21:20:00 +00:00
Brian Feldman 3fbe138ca9 It seems that sound(4)'s feeder routines don't need to allocate memory
without waiting, since they are called from a system-call context only.
This appears to fix all sorts of problems with open("/dev/dsp", O_WRONLY)
randomly returning ENXIO.

Found by:	cognet
2003-02-23 20:49:45 +00:00
David E. O'Brien 437ce69ead The rest of our platforms make bus_space_write_multi_stream_2's 'a' a
const pointer.
2003-02-23 20:42:32 +00:00
David E. O'Brien 2ae86927a6 Add an empty bus_space_unmap() like Alpha has. puc(4) uses it. 2003-02-23 19:54:16 +00:00
David E. O'Brien cc2f8c60cd PAGE_SIZE is unsigned on all our platforms, and is a long on some.
So cast to u_long before printing out and use a matching specifier.

Tested on:	sparc64
2003-02-23 19:49:30 +00:00
David E. O'Brien 660a811fcd Pass 'nodevice' onto the final output. 2003-02-23 19:40:45 +00:00
David E. O'Brien 40578dc8ce Add adv_adj_endian_qdone_info() & adv_adj_scsiq_endian()
so this at least compiles on big-endian machines.
2003-02-23 19:16:53 +00:00
Poul-Henning Kamp e165e4d26a NO_GEOM cleanup:
Move to "struct disk *" centered API.

Fix some minor nits.
2003-02-23 19:15:34 +00:00
Mike Silbersack a432399c56 Improve the security and performance of syncookies:
Security improvements:
- Increase the size of each syncookie secret from 32 to 128 bits
  in order to make brute force attacks on the secrets much more
  difficult.
- Always return the lowest order dword from the MD5 hash; this
  allows us to expose 2 more bits of the cookie and makes ACK
  floods which seek to guess the cookie value more difficult.

Performance improvements:
- Increase the lifetime of each syncookie from 4 seconds to 16
  seconds.  This increases the usefulness of syncookies during
  an attack.
- From Yahoo!: Reduce the number of calls to MD5Update; this
  results in a ~17% increase in cookie generation time here.

Reviewed by:	hsu, jayanth, jlemon, nectar
MFC After:	15 seconds
2003-02-23 19:04:23 +00:00
Poul-Henning Kamp e5dc8339ae NO_GEOM cleanup:
Move ida driver to "struct disk *" centric api.

Retire major number 109.
2003-02-23 18:45:50 +00:00
Poul-Henning Kamp 7d0bbeb87c Fix the detach code to actually detach the disk instance created
during attach.
2003-02-23 18:31:17 +00:00
Poul-Henning Kamp 6ccf52c822 Remove a goto the very next statement. 2003-02-23 18:20:03 +00:00
Poul-Henning Kamp 14ebcbfa42 Mark major 102 unused now that the fla driver no longer needs a major number. 2003-02-23 18:12:41 +00:00
Poul-Henning Kamp acb18acfec Bracket the kern.vnode sysctl in #ifdef notyet because it results
in massive locking issues on diskless systems.

It is also not clear that this sysctl is non-dangerous in its
requirements for locked down memory on large RAM systems.
2003-02-23 18:09:05 +00:00
Søren Schmidt 7931af6934 Temporarily disable tagged queueing while I figure out why it broke. 2003-02-23 16:43:26 +00:00
Søren Schmidt 4efc1603dc Fix chipset setup problem on older ALI chips. 2003-02-23 16:36:21 +00:00
Jonathan Lemon f243998be5 Yesterday just wasn't my day. Remove testing delta that crept into the diff.
Pointy hat provided by: sam
2003-02-23 15:40:36 +00:00
Søren Schmidt 9644f64b75 Fix timeout when using UDMA speeds, bad chip setup. 2003-02-23 15:05:04 +00:00
Robert Watson 96c4266cb3 Add an implementation of strdup() to libkern. Allocated memory is of
type M_STRING, now defined in malloc.h.  Useful when string parsing
must occur using the kernel strsep() and we want to avoid toasting
the source string.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-02-23 14:30:17 +00:00
Peter Grehan 9ea031d50b Doh. Forgot to remove _KERNEL version. 2003-02-23 13:47:44 +00:00
Poul-Henning Kamp 5cb3dc8fa3 OK, I was too sleepy there...
Pointy hat over here!
2003-02-23 13:45:55 +00:00
Yoshihiro Takahashi dddb791fa4 Add NOTES for pc98. 2003-02-23 13:34:21 +00:00
Yoshihiro Takahashi a0450500b3 Move MD devices to <machine>/conf/NOTES. 2003-02-23 13:32:33 +00:00
Yoshihiro Takahashi 08daad2b26 Merged from sys/dev/syscons/syscons.c revision 1.393. 2003-02-23 13:29:59 +00:00
Yoshihiro Takahashi d653affd6c Fix compile error with FB_INSTALL_CDEV option. 2003-02-23 13:28:44 +00:00
Yoshihiro Takahashi 0f46d10b5c MFi386: revision 1.554. 2003-02-23 13:26:21 +00:00
Yoshihiro Takahashi fe18df5d91 The ether_ifdetach() function requires only one argument now. 2003-02-23 13:24:26 +00:00
Yoshihiro Takahashi 6bc774603f Move ar_devclass definition to if_ar.c. 2003-02-23 13:20:42 +00:00
Yoshihiro Takahashi 8aee776d63 Remove unneeded entries and fix indent. 2003-02-23 13:17:27 +00:00
Poul-Henning Kamp 8f5ef1a9fa Implement CLOCK_MONOTONIC. 2003-02-23 10:18:31 +00:00
Jake Burkholder e29632c9e1 - Added macros PDESHIFT and PTESHIFT, use these instead of magic constants
in locore.
- Removed the macros PTESIZE and PDESIZE, use sizeof instead in C.

Sponsored by:	DARPA, Network Associates Laboratories
2003-02-23 09:45:50 +00:00
Sam Leffler eb73a605cd o add a CRYPTO_F_CBIMM flag to symmetric ops to indicate the callback
should be done in crypto_done rather than in the callback thread
o use this flag to mark operations from /dev/crypto since the callback
  routine just does a wakeup; this eliminates the last unneeded ctx switch
o change CRYPTO_F_NODELAY to CRYPTO_F_BATCH with an inverted meaning
  so "0" becomes the default/desired setting (needed for user-mode
  compatibility with openbsd)
o change crypto_dispatch to honor CRYPTO_F_BATCH instead of always
  dispatching immediately
o remove uses of CRYPTO_F_NODELAY
o define COP_F_BATCH for ops submitted through /dev/crypto and pass
  this on to the op that is submitted

Similar changes and more eventually coming for asymmetric ops.

MFC if re gives approval.
2003-02-23 07:25:48 +00:00
Marcel Moolenaar 19d4fb8e5c Workaround for compiling LINT. Large kernels (like LINT) can have
branch targets that are too far apart for the BRADDR relocation.
This is caused by the branch prediction optimizationi in the atomic
inlines here, because they jump across sections.
The workaround is to suppress jumping to a different section when
compiling LINT. To generate correct code in that case, the section
directives are replaced by a branch and a label to deal with the
fall-through case. Reasonably good C compilers will optimize this
away anyway, so the end result isn't really that bad.
2003-02-23 06:34:21 +00:00
Marcel Moolenaar 1583e8d08e Fix compilation on non-i386 machines. Inconsistent conditional
compilation yielded definitions that we're used.
2003-02-23 03:39:22 +00:00
Peter Grehan 485d645e63 Drop down Apple Partition Map code that has been in use by some
ppc developers for a while.

OK'd by:  phk
2003-02-23 01:25:35 +00:00
Orion Hodson 148f84cf1e Fix compilation on alpha. Pointy hat to Marcel. 2003-02-23 01:06:58 +00:00
Sam Leffler 14dd6717f8 Add a new config option IPSEC_FILTERGIF to control whether or not
packets coming out of a GIF tunnel are re-processed by ipfw, et. al.
By default they are not reprocessed.  With the option they are.

This reverts 1.214.  Prior to that change packets were not re-processed.
After they were which caused problems because packets do not have
distinguishing characteristics (like a special network if) that allows
them to be filtered specially.

This is really a stopgap measure designed for immediate MFC so that
4.8 has consistent handling to what was in 4.7.

PR:		48159
Reviewed by:	Guido van Rooij <guido@gvr.org>
MFC after:	1 day
2003-02-23 00:47:06 +00:00
Alan Cox 01a06ce250 The root of the splay tree maintained within the pm_pteobj always refers
to the last accessed pte page.  Thus, the pm_ptphint is redundant and can
be removed.
2003-02-22 23:43:08 +00:00
Jake Burkholder d44f8f150c unsigned -> pt_entry_t.
Sponsored by:	DARPA, Network Associates Laboratories
2003-02-22 23:41:27 +00:00
Jake Burkholder fc718df7d0 Add a /a modifier to the show ktr ddb command, which prints the whole trace
buffer without stopping.  Useful if you just want to capture the output but
can't run ktrdump.
2003-02-22 23:30:37 +00:00
Orion Hodson c7bbf97e00 o Add back support for DXS channels.
o Make DXS3 the primary playback channel.  It may be the only
universally supported channel with the assorted revisions of this
chipset.

o Add sysctl and handler for enabling s/pdif output from DXS3.
2003-02-22 23:28:15 +00:00
Peter Grehan d273b006c5 Expose powerpc_mb() to user-space. Currently needed for atomic.h users,
this may go away in the future.
2003-02-22 22:58:13 +00:00
Jonathan Lemon a14c749f04 Check to see if the TF_DELACK flag is set before returning from
tcp_input().  This unbreaks delack handling, while still preserving
correct T/TCP behavior

Tested by: maxim
Sponsored by: DARPA, NAI Labs
2003-02-22 21:54:57 +00:00
Robert Watson 90623e1a9e Don't panic when enumerating SYSCTL_NODE() nodes without any children
nodes.

Submitted by:	green, Hiten Pandya <hiten@unixdaemons.com>
2003-02-22 17:58:06 +00:00
Bosko Milekic fd18f292bd Make xl use m_getcl() to allocate an mbuf and a cluster in one shot,
as opposed to one after the other.  This is faster in both -CURRENT
and -STABLE.  Additionally, there is less code duplication for
error-checking.

One thing to note is that this code seems to return(1) when no buffers
are available; perhaps ENOBUFS should be the correct return value?

Partially submitted & tested by: Hiten Pandya <hiten@unixdaemons.com>
MFC after: 1 week
2003-02-22 14:46:31 +00:00
Poul-Henning Kamp 4209510904 It is pretty evident that nobody loves this file anymore, so retire it
to the Attic from where it can be picked up again, should it ever again
become fashionable to run an alpha simulator.
2003-02-22 13:52:38 +00:00
Poul-Henning Kamp d9af634109 Use DISKFLAG_OPEN rather than maintaining our own flag.
Use nullclose() rather than now empty twed_close().
2003-02-22 10:42:21 +00:00
Poul-Henning Kamp 89f8bb39da Use nullclose(), not noclose(). 2003-02-22 10:40:36 +00:00
Poul-Henning Kamp 1c7d84ed3c Don't use mbuf allocator flags for malloc(9). 2003-02-22 10:35:37 +00:00
Poul-Henning Kamp 3eb309c55e Use the standard DISKFLAG_OPEN instead of implementing our own.
Use noclose() instead now that our close method is empty.
2003-02-22 10:10:12 +00:00
Poul-Henning Kamp 3512c1b386 Use system noioctl() instead of homerolled. 2003-02-22 10:02:05 +00:00
Poul-Henning Kamp c3dbde2864 NO_GEOM cleanup: unifdef -UNO_GEOM 2003-02-22 09:36:40 +00:00
Poul-Henning Kamp d0083ea9ce NO_GEOM cleanup:
Move to "struct disk *" centric use of disk_* API.

Remove NOOP ioctl, spl*() and some debug printfs.
2003-02-22 09:32:57 +00:00
Mike Silbersack 375386e284 Add the ability to limit the number of IP fragments allowed per packet,
and enable it by default, with a limit of 16.

At the same time, tweak maxfragpackets downward so that in the worst
possible case, IP reassembly can use only 1/2 of all mbuf clusters.

MFC after: 	3 days
Reviewed by:	hsu
Liked by:	bmah
2003-02-22 06:41:47 +00:00
Mike Makonnen 750a91d8b1 Remove a comment which hasn't been true since rev. 1.158
Approved by:	jhb, markm (mentor)(implicit)
2003-02-22 05:59:48 +00:00
Robert Watson 838a6d03e8 Export the name of the device used to mount the root file system as
kern.rootdev.  If rootdev is undefined (NFS mount, etc), export an
empty string.

Desired by:	peter
2003-02-22 05:01:12 +00:00
Kirk McKusick 5bb651cb72 This patch fixes a deadlock between the bufdaemon and a process taking
a snapshot. As part of taking a snapshot of a filesystem, the kernel
builds up a list of the filesystem metadata (such as the cylinder
group bitmaps) that are contained in the snapshot. When doing a
copy-on-write check, the list is first consulted. If the block being
written is found on the list, then the full snapshot lookup can be
avoided. Besides providing an important performance speedup this
check also avoids a potential deadlock between the code creating
the snapshot and the bufdaemon trying to cleanup snapshot related
buffers. This fix creates a temporary list containing the key
metadata blocks that can cause the deadlock. This temporary list
is used between the time that the snapshot is first enabled and the
time that the fully complete list is built.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:59:34 +00:00
Kirk McKusick 37e2ebfdba This patch fixes a bug on an active filesystem on which a snapshot
is being taken from panicing with either "freeing free block" or
"freeing free inode". The problem arises when the snapshot code
is scanning the filesystem looking for inodes with a reference
count of zero (e.g., unlinked but still open) so that it can
expunge them from its view. If it encounters a reclaimed vnode
and has to restart its scan, then it will panic if it encounters
and tries to free an inode that it has already processed. The fix
is to check each candidate inode to see if it has already been
processed before trying to delete it from the snapshot image.

Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:29:51 +00:00
Kirk McKusick d60682c239 This patch fixes a bug in the logical block calculation macros so
that they convert to 64-bit values before shifting rather than
afterwards. Once fixed, they can be used rather than inline expanded.

Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:19:26 +00:00
Poul-Henning Kamp ad3467e1fc NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"
as "this" handle.
2003-02-21 23:25:43 +00:00
Poul-Henning Kamp d25ecb917b - m = m_gethdr(M_NOWAIT, MT_HEADER);
+       m = m_gethdr(M_DONTWAIT, MT_HEADER);

'nuff said.
2003-02-21 23:17:12 +00:00