Commit Graph

38327 Commits

Author SHA1 Message Date
Alan Cox
72c3aad7e8 MFi386 revision 1.88
Remove some long unused declarations.
2003-03-01 10:02:11 +00:00
Søren Schmidt
638914f17d Fix support for HPT controllers they where always left in PIO mode.
Amazing what a ';' can do :/
2003-03-01 09:33:35 +00:00
Stefan Eßer
1fa4dd2f14 Make /dev/pci use MAJOR_AUTO. 2003-03-01 08:57:16 +00:00
Jeff Roberson
bff5362bf2 - gc USE_BUFHASH. The smp locking of the buf cache renders this useless. 2003-03-01 05:55:03 +00:00
Marcel Moolenaar
59c9bb54ee Speed up debugging in the context of unexpected traps by printing
the address of the image base of the loader. Given cr.iip, we can
use the symbol table to figure out what function caused the trap.
2003-03-01 05:18:28 +00:00
Marcel Moolenaar
884d549049 Paranoia: Don't use the length of the option string alone to
determine whether we have command line options. We expect a
valid string pointer as well.
2003-03-01 05:13:59 +00:00
Scott Long
9e2e96d803 The aac driver has evolved enough over the last few months that it no
longer resembles the 4.x version very much.  Garbage collect the legacy
bits.
2003-03-01 05:07:19 +00:00
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