Commit Graph

87004 Commits

Author SHA1 Message Date
obrien
35702bcc11 Update for version 3.41. 2003-02-28 05:31:47 +00:00
obrien
7de4465cc5 This commit was generated by cvs2svn to compensate for changes in r111658,
which included commits to RCS files with non-trunk default branches.
2003-02-28 05:19:36 +00:00
obrien
f35360c372 Virgin import of Christos Zoulas's FILE 3.41.
* - fix memory allocation problem (Jeff Johnson)
	* - fix stack overflow corruption (David Endler)
2003-02-28 05:19:36 +00:00
tjr
c072d36bb9 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
a95892f08b Use MAJOR_AUTO. GC statically assigned majors. 2003-02-28 04:21:13 +00:00
benno
367f245ca9 These files are no longer used. They have been replaced with similarly named
.S files.
2003-02-28 03:35:42 +00:00
keramida
db29ab160b Spell "utilities" correctly. 2003-02-28 00:55:18 +00:00
gibbs
33a794e92a 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
ru
165c565db3 Handle includes the normal way.
Reviewed by:	markm
Approved by:	nectar
2003-02-27 23:07:26 +00:00
jake
558920f554 - 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
ru
872cb31bba Document the rxcsum and txcsum commands.
Submitted by:	jlemon
2003-02-27 22:59:13 +00:00
phk
be9763de4a 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
phk
d53201220f Add support for the Elan CPU hardware watchdog used in "active" mode. 2003-02-27 21:13:08 +00:00
sam
0694bf3fc5 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
phk
3d159b5719 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
sobomax
da06cd1031 Add a new variable `noInet6', which if set disables IPv6 configuration
dialog for network interfaces.

MFC after:	20 days
2003-02-27 21:04:34 +00:00
njl
7f365cfefe 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
a8b1fc289f 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
imp
361a7c9046 Add xref to oldcard/newcard docs. 2003-02-27 20:45:54 +00:00
imp
5e3d7d78f9 OLDCARD man page. This sucks, but not too bad. and better than
what we had before.  Improvements encouraged and welcome.
2003-02-27 20:45:26 +00:00
sobomax
63fd51fe66 Increase size of the static buffer used to hold runtime dependency list
read from CD from 2k to 16k, because in the modern world of meta-packages
(Gnome et al) the length of this list could easily owerflow limit causing
strange things to happen, ranging from installation failure due to list
truncation to complete stack trashing (there is very vague bounds checking).
For example, x11/gnome2-fifth-toe runtime dependencies list is 2,418 bytes
long.

Due to obvious reasons, this is an immediate MFC candidate.

Sponsored by:	Porta Software Ltd
MFC after:	1 day
2003-02-27 20:43:52 +00:00
jhb
cf1a19f656 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
imp
ddd154ca29 Document the hand springs that you need to go through to use a WL200 2003-02-27 20:37:03 +00:00
alc
89bdff5b12 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
wpaul
5cb66b04a8 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
mux
b67c360759 Document the fact that VTY locking is easily bypassable when DDB
is compiled in the kernel.  Also add some useful xrefs to lock(1).
2003-02-27 18:25:26 +00:00
mux
edbd8f786f 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
markm
cc7e5e7796 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
markm
fe3c734ec8 Warns and lint fix. Nearly all trivial stuff. 2003-02-27 18:07:11 +00:00
markm
5736aa9039 WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
-ansi, due to 'long long'.

Reviewed by:	green (slightly earlier version)
2003-02-27 18:04:54 +00:00
phk
5c7b43870b Update the comment to reflect new reality.
GC more entries.
2003-02-27 15:34:12 +00:00
phk
b84b299fef GC some more major numbers. 2003-02-27 15:18:56 +00:00
phk
6afed80201 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
phk
f3d3aadd6f Use MAJOR_AUTO. 2003-02-27 15:05:28 +00:00
ru
bbec95656d Hook up the if_my module to the build. 2003-02-27 14:49:56 +00:00
mux
456a2ed517 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
phk
9011e44e2d 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
tjr
5b9d37f7e4 Use noread(), nowrite() and nopoll() instead of our own stub functions. 2003-02-27 14:35:21 +00:00
phk
7daff291ec 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
tjr
f1d92edd7f "Advertizing" is ugly and possibly incorrect; use "Advertising" instead. 2003-02-27 14:07:49 +00:00
nectar
0d65b541d4 Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
2003-02-27 13:40:01 +00:00
ru
ae8811433e Don't make buildworld and buildkernel in parallel.
And this is probably what you expect when you say
"make -jX buildworld buildkernel".
2003-02-27 13:11:33 +00:00
phk
082e5cb9c3 Typo, I must have hit xZZ in vi(1). 2003-02-27 12:53:21 +00:00
simokawa
15b70bcd2e 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
phk
6eb790939b Document that flags bit 0x10000 puts PPS timestamping on CTS instead of DCD. 2003-02-27 12:27:35 +00:00
phk
432a372300 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
tjr
3ba9ae5707 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
tjr
ac60a53289 Build the ncp and nwfs modules again, but only on i386 for now. 2003-02-27 11:31:08 +00:00
sos
c7b1aa5bcb Only use function 1 not 0 on cypress chips. 2003-02-27 09:42:57 +00:00
ru
b286653bd0 Only cross-tools may use TARGET_ARCH/TARGET, everyone else
should use the normal MACHINE_ARCH/MACHINE instead.
2003-02-27 09:19:31 +00:00