Commit Graph

89462 Commits

Author SHA1 Message Date
Paul Saab
20430a6b04 Something I missed in my tree.
If the media changes, poke the DSP on the 5401/5411 Broadcom PHY's.

Obtained from:	NetBSD
2003-05-04 02:03:20 +00:00
Yoshihiro Takahashi
8c78720918 KSE is useful for pc98. 2003-05-04 02:02:48 +00:00
David E. O'Brien
22e9bc15f9 Use __FBSDID vs. rcsid[]. 2003-05-04 00:59:13 +00:00
David E. O'Brien
78af18bd24 Fix signed/unsigned comparison warnings. 2003-05-04 00:56:00 +00:00
David E. O'Brien
8f5f415d44 Fix a sign/unsigned comparison. 2003-05-04 00:43:39 +00:00
Justin T. Gibbs
d7cff4ab97 Correct spelling errors.
Switch to handling bad SCSI status as a sequencer interrupt
instead of having the kernel proccess these failures via
the completion queue.  This is done because:

 o The old scheme required us to pause the sequencer and clear
   critical sections for each SCB.  It seems that these pause
   actions, if coincident with a sequencer FIFO interrupt, would
   result in a FIFO interrupt getting lost or directing to the
   wrong FIFO.  This caused hangs when the driver was stressed
   under high "queue full" loads.
 o The completion code assumed that it was always called with
   the sequencer running.  This may not be the case in timeout
   processing where completions occur manually via
   ahd_pause_and_flushwork().
 o With this scheme, the extra expense of clearing critical
   sections is avoided since the sequencer will only self pause
   once all pending selections have cleared and it is not in
   a critical section.

  aic79xx.c
	Add code to handle the new BAD_SCB_STATUS sequencer
	interrupt code.  This just redirects the SCB through
	the already existing ahd_complete_scb() code path.
	Remove code in ahd_handle_scsi_status() that paused
	the sequencer, made sure that no selections where
	pending, and cleared critical sections.  Bad
	status SCBs are now only processed when all of these
	conditions are true.

  aic79xx.reg:
	Add the BAD_SCB_STATUS sequencer interrupt code.

  aic79xx.seq:
	When completing an SCB upload to the host, if
	we are doing this because the SCB contains non-zero
	SCSI status, defer completing the SCB until there
	are no pending selection events.  When completing
	these SCBs, use the new BAD_SCB_STATUS sequencer
	interrupt.  For all other uploaded SCBs (currently
	only for underruns), the SCB is completed via the
	normal done queue.  Additionally, keep the SCB that
	is currently being uploaded on the COMPLETE_DMA_SCB
	list until the dma is completed, not just until the
	DMA is started.  This ensures that the DMA is restarted
	properly should the host disable the DMA transfer for
	some reason.

	In our RevA workaround for Maxtor drives, guard against
	the host pausing us while trying to pause I/O until the
	first data-valid REQ by clearing the current snapshot
	so that we can tell if the transfer has completed prior
	to us noticing the REQINIT status.

	In cfg4data_intr, shave off an instruction before getting
	the data path running by adding an entrypoint to the
	overrun handler to also increment the FIFO use count.

	In the overrun handler, be sure to clear our LONGJMP
	address in both exit paths.

Perform a few sequencer optimizations.

  aic79xx.c:
	Print the full path from the SCB when a packetized
	status overrun occurs.

	Remove references to LONGJMP_SCB which is being
	removed from firmware usage.

	Print the new SCB_FIFO_USE_COUNT field in the
	per-SCB section of ahd_dump_card_state().  The
	SCB_TAG field is now re-used by the sequencer,
	so it no longer makes sense to reference this
	field in the kernel driver.

  aic79xx.h:
	Re-arrange fields in the hardware SCB from largest
	size type to smallest.  This makes it easier to
	move fields without changing field alignment.

	The hardware scb tag field is now down near the
	"spare" portion of the SCB to facilitate reuse
	by the sequencer.

  aic79xx.reg:
	Remove LONGJMP_ADDR.

	Rearrange SCB fields to match aic79xx.h.
	Add SCB_FIFO_USE_COUNT as the first byte
	of the SCB_TAG field.

  aic79xx.seq:
	Add a per-SCB "Fifos in use count" field and use
	it to determine when it is safe (all data posted)
	to deliver status back to the host.  The old method
	involved polling one or both FIFOs to verify that
	the current task did not have pending data.  This
	makes running down the GSFIFO very cheap, so we
	will empty the GSFIFO in one idle loop pass in
	all cases.

	Use this simplification of the completion process
	to prune down the data FIFO teardown sequencer for
	packetized transfers.  Much more code is now shared
	between the data residual and transfer complete cases.

	Correct some issues in the packetized status handler.
	It used to be possible to CLRCHN our FIFO before status
	had fully transferred to the host.  We also failed to
	handle NONPACKREQ phases that could occur should a CRC
	error occur during transmission of the status data packet.

Correct a few big endian issues:

  aic79xx.c:
  aic79xx_inline.h:
  aic79xx_pci.c:
  aic79xx_osm.c:
	o Always get the SCB's tag via the SCB_GET_TAG acccessor
	o Add missing use of byte swapping macros when touching
	  hscb fields.
	o Don't double swap SEEPROM data when it is printed.
	  Correct a big-endian bug.  We cannot assign a
	o When assigning a 32bit LE variable to a 64bit LE
	  variable, we must be explict about how the words
	  of the 64bit LE variable are initialized.  Cast to
	  (uint32_t*) to do this.

aic79xx.c:
	In ahd_clear_critical_section(), hit CRLSCSIINT
	after restoring the interrupt masks to avoid what
	appears to be a glitch on SCSIINT.  Any real SCSIINT
	status will be persistent and will immidiately
	reset SCSIINT.  This clear should only get rid of
	spurious SCSIINTs.

	This glitch was the cause of the "Unexpected PKT busfree"
	status that occurred under high queue full loads

	Call ahd_fini_scbdata() after shutdown so that
	any ahd_chip_init() routine that might access
	SCB data will not access free'd memory.

	Reset the bus on an IOERR since the chip doesn't
	seem to reset to the new voltage level without
	this.

	Change offset calculation for scatter gather maps
	so that the calculation is correct if an integral
	multiple of sg lists does not fit in the allocation
	size.

	Adjust bus dma tag for data buffers based on 39BIT
	addressing flag in our softc.

	Use the QFREEZE count to simplify ahd_pause_and_flushworkd().
	We can thus rely on the sequencer eventually clearing ENSELO.

	In ahd_abort_scbs(), fix a bug that could potentially
	corrupt sequencer state.  The saved SCB was being
	restored in the SCSI mode instead of the saved mode.
	It turns out that the SCB did not need to be saved at all
	as the scbptr is already restored by all subroutines
	called during this function that modify that register.

aic79xx.c:
aic79xx.h:
aic79xx_pci.c:
	Add support for parsing the seeprom vital product
	data.  The VPD data are currently unused.

aic79xx.h:
aic79xx.seq:
aic79xx_pci.c:
	Add a firmware workaround to make the LED blink
	brighter during packetized operations on the H2A.

aic79xx_inline.h:
	The host does not use timer interrupts, so don't
	gate our decision on whether or not to unpause
	the sequencer on whether or not a timer interrupt
	is pending.
2003-05-04 00:20:07 +00:00
Paul Saab
3927098f93 Implement the write twice to send producer index workaround for
BCM5700 chips as described in the Broadcom Errata documents.

Obtained from:	NetBSD and Broadcom Errata documentation
2003-05-04 00:07:21 +00:00
Justin T. Gibbs
9bf327a70c aic7xxx.c:
aic7xxx.h:
	Split out core chip initialization into ahc_chip_init().
	This will allow us to reset the chip correctly at times
	other than initial chip setup.

aic7770.c
aic7xxx_pci.c:
	Flesh out bus chip init methods for our two
	bus attachments and use these, in addition to
	bus suspend/resume hooks to get the core in
	better shape for handling these events.

	When disabling PCI parity error checking, use FAILDIS.
	Although the chip docs indicate that clearing PERRESPEN
	should also work, it does not.

	Auto-disable pci parity error checking after informing
	the user of AHC_PCI_TARGET_PERR_THRESH number of parity
	errors observed as a target.

aic7xxx.h:
aic7xxx_pci.c
aic7770.c
aic7xxx.c
	Add the instruction_ram_size softc field.

	Remove the now unused stack_size softc field.

	Modify ahc_loadseq to return a failure code
	and to actually check the downloaded instruction
	count against the limit set in our softc.

	Modify callers of ahc_loadseq to handle load
	failures as appropriate.

	Set instruction RAM sizes for each chip type.

aic7xxx_pci.c:
	Add some delay in the aic785X termination
	control code.  This may fix problems with
	the 2930.

	Be consistent in how we access config space
	registers.  16bit registers are accessed using
	16bit ops.

aic7xxx.c:
	Correct spelling errors.

	Have ahc_force_renegotiation() take a devinfo as is done
	in the U320 driver.  Use this argument to correct a bug
	in the selection timeout handler where we forced a renegotiation
	with the last device that had set SAVED_SCSIID.  SAVED_SCSIID
	is only updated once a selection is *sucessfull* and so is
	stale for any selection timeout.

	Cleanup the setup of the devinfo for busfree events.  We
	now use this devinfo for a call to ahc_force_renegotiation()
	at the bottom of the routine, so it must be initialized in
	all cases.

	In ahc_pause_and_flushwork(), adjust the loop so that it
	will exit in the hot-eject case even if the INT_PEND mask
	is something other than 0xFF (as it is in this driver).

	Correct a wrapping string constant.

	Call ahc_fini_scbdata() after shutdown so that
	any ahc_chip_init() routine that might access
	SCB data will not access free'd memory.

	Correctly setup our buffer tag to indicate that 39bit
	addressing is available if in 39bit addressing mode.

	Rearrange some variable declarations based on
	type size.

aic7xxx.c
aic7xxx.h:
aic7xxx.reg:
	Consistently use MAX_OFFSET for the user max syncrate
	set from non-volatile storage.  This ensures that the
	offset does not conflict with AHC_OFFSET_UNKNOWN.

	Change AHC_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.

	Change MAX_OFFSET to 0x7f which is the max
	offset U160 aic7xxx controllers can negotiate.
	This ensures that curr->offset will not
	match AHC_OFFSET_UNKNOWN.

aic7xxx_inline.h:
	Have our inline interrupt handler return with a value
	indicating whether we serviced a real interrupt.  This
	is required for Linux support.

	Return earlier if the interrupt is not for us.
2003-05-03 23:55:38 +00:00
Bruce A. Mah
bc81561d23 Add rue(4) devices. 2003-05-03 23:47:21 +00:00
Bruce A. Mah
ad947d4aaf New release notes: rue(4), MI passwd databases, libkse.
Modified release notes:  Update DRM note and move from kernel section
to contrib section, add arch attribute for libthr note.
2003-05-03 23:46:28 +00:00
Justin T. Gibbs
8270490a58 hc_eisa.c:
ahc_pci.c:
ahd_pci.c:
        Don't bogusly use the BUS_DMA_ALLOCNOW flag in our psuedo
        parent bus dma tag.
2003-05-03 23:27:57 +00:00
David E. O'Brien
b47c8cc7d2 No, forget about rev 1.24. My system wasn't virgin enough when I tested that.
Restore rev 1.23.
2003-05-03 23:15:09 +00:00
Marcel Moolenaar
e126260569 Fix c99 victim: the accepted character '0 most now be types as '0'. 2003-05-03 23:05:16 +00:00
Paul Saab
5cba12d3bc - Change the short hand representation of the various ASIC revisions
- Implement the ONEDMA_AT_ONCE workaround as described in the
  5703/5704 eratta documents.
  Obtained from: NetBSD & Broadcom documentation
2003-05-03 22:58:45 +00:00
Bruce A. Mah
d9c32632b9 Fix whitespace nit...no content changes. 2003-05-03 22:18:49 +00:00
Bruce A. Mah
6b7999495b Update "boilerplate", fix wording and markup of some notes. 2003-05-03 22:18:24 +00:00
Bruce A. Mah
f5ad57db26 General update of the Early Adopter's Guide. Too many changes to
list here, but they basically fall into two categories:  1) Make
the document less 5.0-centric (and more applicable to the state of any
5.X before the RELENG_5 branch) and 2) Update for the current state of
5.X, in anticipation of re-issuing this document as a part of the 5.1
release documentation.
2003-05-03 22:14:55 +00:00
Ruslan Ermilov
567296d467 MFV:
- Do not emit multiple empty lines in the CRT mode.
- Fixed the Nd macro to use the right dash.
2003-05-03 22:02:44 +00:00
David E. O'Brien
cd883fb617 Use __FBSDID over rcsid[]. 2003-05-03 21:31:08 +00:00
David E. O'Brien
d2f7262ed4 This is WARNS=2 clean. 2003-05-03 21:30:34 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
Mark Murray
6f0a94a9f1 Fix long constant usage for i386.
Tested by:	Joe Marcus Clarke <marcus@marcuscom.com>
2003-05-03 20:52:48 +00:00
Alan Cox
ad682c4825 Lock the vm_object on entry to vm_object_vndeallocate(). 2003-05-03 20:28:26 +00:00
Giorgos Keramidas
b093b41206 Fix a broken reference to locale(5) and point to re_format(7) too for an
explanation of `collating elements'.
2003-05-03 20:26:11 +00:00
David E. O'Brien
83ddb07b8f Forget about rev 1.23. -$ is now spelled -fno-dollars-in-identifiers.
Submitted by:	kan
2003-05-03 19:57:36 +00:00
David E. O'Brien
804388bb2e GCC 3.3's cpplib does not impliment -$ (forbid the use of $ in identifiers). 2003-05-03 19:50:41 +00:00
Ruslan Ermilov
08383fff66 Fix the misspelling of DPADD, then fix "make checkdpadd". 2003-05-03 19:49:05 +00:00
David E. O'Brien
ebe901b4de Make GCC 3.3 happy with rcsid[], sccs[], and copyright[]. 2003-05-03 19:44:46 +00:00
Scott Long
ce0d74671b Use UFS1 for the floppies instead of UFS2 2003-05-03 19:23:10 +00:00
David E. O'Brien
c04949c564 The author wanted stringification, not concatenation. 2003-05-03 19:22:47 +00:00
David E. O'Brien
8eb2a3de8f Don't shaddow exp(3). 2003-05-03 19:09:11 +00:00
Paul Saab
37ceeb4d9f - Move bge_phy_hack into the phy code and implement the various DSP
patch workarounds for each phy revision.
  Obtained from: NetBSD & Broadcom Linux driver

- Disable AUTOPOLL when accessing the PHY as it may cause PCI errors.
  Obtained from: NetBSD

- Check the UPDATED bit in the status block so the driver knows
  that the status block as indeed changed since the last access.
  Broadcom documentation states drivers should unset the UPDATED/CHANGED
  bits after reading them.

- When changing media types, first loop the phy then set the media.
  Broadcom documentation and Linux drivers do this and I observed
  much better handling of link after this change.

- Broadcom documentation states that for 1000BaseT operation,
  autonegotiation must be enabled.  Fix hard coding of media so that
  the driver only advertises 1000BaseT as the supported media type
  and enable autonegotition.

- Only set Master/Slave on the 5701.
  Obtained from Broadcom Linux driver.
2003-05-03 19:06:50 +00:00
David E. O'Brien
c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Søren Schmidt
7af89aab59 Fix locking on reinit. 2003-05-03 18:28:43 +00:00
Søren Schmidt
a23507bcff Add the pdc20268r as candidate for the TX test. 2003-05-03 18:26:00 +00:00
David E. O'Brien
1d7157c5c3 Use C99 for the kernel. 2003-05-03 18:05:56 +00:00
Warner Losh
d2d8d8cf9d This commit was generated by cvs2svn to compensate for changes in r114584,
which included commits to RCS files with non-trunk default branches.
2003-05-03 17:16:40 +00:00
Warner Losh
0f78c17f6f Fix halt -p. I've done this with an import because kochi-san reports
this is fixed in a newer version of ACPICA and I don't want to take
this off the vendor branch for a trivial reason.  This patch was
applied to NetBSD by kochi-san, who also posted the patch to
acpi-jp@jp.freebsd.org.

# My Dell Inspiron 8000 now powers off!

Submitted by: takayoshi kochi-san kochi at netbsd dot org
2003-05-03 17:16:40 +00:00
Mark Murray
40feca3a99 Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on:	i386, alpha
2003-05-03 16:39:34 +00:00
Mark Murray
f694b8adb6 WARNS cleaning for the Alpha. On alpha, size_t is a long, and it
solicits a warning when used for the '*' in printf("%*d"). Cast
to u_int for universal use.
2003-05-03 16:02:52 +00:00
Giorgos Keramidas
b9e09bb643 Duplicate "from".
PR:		docs/51724
Submitted by:	Christopher Nehren <apeiron@comcast.net
2003-05-03 15:55:23 +00:00
Mark Murray
04b151d66a Remove some games/ cruft that is no longer of relevance. 2003-05-03 15:48:12 +00:00
Mark Murray
b7dbd3e95e Fix a shedload of warnings, some memory leaks and clean up WARNS
and lint. This is now WARNS=9, std=c99 clean on i386.
2003-05-03 10:21:26 +00:00
Shunsuke Akiyama
3dfc942fa1 Regen. 2003-05-03 10:19:43 +00:00
Shunsuke Akiyama
11e04b0528 Add RealTek RTL8150 USB to fast Ethernet controller driver.
This driver now supports the Melco LUA-KTX and the GREEN HOUSE
GH-USB100B.

Reviewed by:	imp
MFC after:	2 weeks
2003-05-03 10:16:56 +00:00
Mark Murray
97daf7ec12 Fix format warning. This is WARNS=9, std=c99 clean on i386. 2003-05-03 10:16:51 +00:00
Mark Murray
fcfa4c9589 Fix warnings. This is now WARNS=9, std=c99 clean in i386.
Use return(0) for main() instead of exit(0). Makes it a
wee bit smaller.
2003-05-03 10:14:26 +00:00
Poul-Henning Kamp
57dfbec57b More axe-work:
Hide all the historical fields of the label, unless people ask for them with -A,
set them to intelligently chosen defaults otherwise.

Distill the manual page to remove inaccuracies, misundertandings and obsolete
information.  It can probably still be done better but now at least it is
not misinforming people.
2003-05-03 09:58:20 +00:00
Doug Barton
7fe19d63ec Slightly tweak the rc update text, since things changed slightly after
I sent the first draft to Bruce. Remove rc.sendmail from the list, since
it was a mistake on my part to remove it from the base, which I've now
corrected. Add the rc.${MACHINE_ARCH} for arch's besides i386.

While I'm here, do a completely trivial re-capitalization of rcNG. :)

Thanks to Bruce for cleaning up my humble first draft.
2003-05-03 09:44:25 +00:00
Wolfram Schneider
ef05268eed Added OpenBSD 3.3
Submitted by: itojun@iijlab.net
2003-05-03 09:18:25 +00:00