Commit Graph

46642 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
d385ba7313 - Initialize uart_bus_space_io and uart_bus_space_mem.
- Fix wrong comment.
2004-05-16 14:12:05 +00:00
Ruslan Ermilov
278d864be2 Fixed the disordering from rev. 1.371. 2004-05-16 13:58:27 +00:00
Doug Rabson
c59285296e Don't use the node id as an index into the topology map. This breaks
if a node on the bus has more than three ports (like my cheapo six
port hub).
2004-05-16 11:26:39 +00:00
Olivier Houchard
9049715ff9 Try harder not to compile anything in sys/boot for arm.
I wonder how buildworld ever worked for me...
2004-05-16 00:19:12 +00:00
Colin Percival
2b8b4f37be Remove dead code. (This loop counted the number of rules, but the count
was never used.)

Reported by:	pjd
Approved by:	rwatson
2004-05-15 20:55:19 +00:00
Scott Long
f3a537ca3f Remove twa_intrhook prototype.
Submitted by:	cperciva
2004-05-15 15:41:59 +00:00
Scott Long
e25b7fccd4 Set the cpi.hba_inquiry field to something useful. 2004-05-15 05:18:05 +00:00
Scott Long
bd4c922777 Remove the config_intrhook as it is not needed. 2004-05-15 05:17:42 +00:00
Dag-Erling Smørgrav
0f126ea09f Remove some debugging printf()s and a pointless device_set_desc() call. 2004-05-15 00:07:23 +00:00
Olivier Houchard
045ec6ce2f Remove libkern/mem* 2004-05-14 23:42:54 +00:00
Olivier Houchard
46bed5089f Implement bcopy, memcpy and memcmp in support.S. 2004-05-14 23:42:30 +00:00
Olivier Houchard
8c412454dd Remove libkern/bzero.S and libkern/memset.S. 2004-05-14 23:31:36 +00:00
Olivier Houchard
c8d8367098 Implement bzero et memset in support.S 2004-05-14 23:31:10 +00:00
Ken Smith
f7dd67d801 Change ffs_realloccg() to set the valid bits for the extended part of the
fragment to zero the valid parts of a VM_IO buffer.

RE would like this to be part of 4.10-RC3 so this will be MFC-ed immediately.

Reviewed by:	alc, tegge
2004-05-14 22:00:08 +00:00
Bruce Evans
a13ec35b05 Fixed some common printf format errors. Don't assume that "struct foo *"
is "void *" (it isn't) or that the default promotion of pid_t is int.
Instead, assume that casting "struct foo *" to "void *" and printing the
result with %p is useful, and that all pid_t's are representable as longs.

Fixed some minor style bugs (mainly spelling errors in comments).
2004-05-14 20:51:42 +00:00
Ruslan Ermilov
237266b2e6 Back out last revision that unnecessarily changed valid assembler
line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:29:30 +00:00
Ruslan Ermilov
b09ce52594 Partly back out last revision that unnecessarily changed valid
assembler line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:28:31 +00:00
MIHIRA Sanpei Yoshiro
e68f2db9a3 MFNetBSD (umodem.c 1.46):
URL updates
2004-05-14 15:16:09 +00:00
Olivier Houchard
a43fa5c730 This is FreeBSD/arm, not FreeBSD/i386
Submitted by:	ru
2004-05-14 14:52:32 +00:00
Olivier Houchard
fffcd6531e Define uart_sa1110_ops and uart_sa1110_classe in .c files instead of spamming
uart_cpu.h
2004-05-14 13:42:50 +00:00
Olivier Houchard
d6301dcdbb Define INLINE_LIMIT for arm. 2004-05-14 13:35:46 +00:00
Olivier Houchard
b791f3fb91 Do not attempt to build anything in sys/boot for arm. 2004-05-14 13:34:53 +00:00
Olivier Houchard
dfc9776e84 Implement enough of an uart driver to get serial console working. 2004-05-14 13:26:52 +00:00
Olivier Houchard
03f110294b Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
Olivier Houchard
78b36e3ca5 Add config magic for arm. 2004-05-14 11:49:40 +00:00
Olivier Houchard
6fc729af63 Import FreeBSD/arm kernel bits.
It only supports sa1110 (on simics) right now, but xscale support should come
soon.
Some of the initial work has been provided by :
Stephane Potvin <sepotvin at videotron.ca>
Most of this comes from NetBSD.
2004-05-14 11:46:45 +00:00
Nate Lawson
0025fb0f4f Add support for GPE being a package of { reference, gpe bit }.
Rework the ECDT probe to pass all the parameters in a temporary struct.
Note why we are mostly ok evaluating _GLK so early.
2004-05-14 04:17:56 +00:00
Bill Paul
6f8aee2268 Fix a bug which I discovered recently while doing IPv6 testing at
Wind River. In the IPv4 output path, one of the tests in ip_output()
checks how many slots are actually available in the interface output
queue before attempting to send a packet. If, for example, we need
to transmit a packet of 32K bytes over an interface with an MTU of
1500, we know it's going to take about 21 fragments to do it. If
there's less than 21 slots left in the output queue, there's no point
in transmitting anything at all: IP does not do retransmission, so
sending only some of the fragments would just be a waste of bandwidth.
(In an extreme case, if you're sending a heavy stream of fragmented
packets, you might find yourself sending nothing by the first fragment
of all your packets.) So if ip_output() notices there's not enough
room in the output queue to send the frame, it just dumps the packet
and returns ENOBUFS to the app.

It turns out ip6_output() lacks this code. Consequently, this caused
the netperf UDPIPV6_STREAM test to produce very poor results with large
write sizes. This commit adds code to check the remaining space in the
output queue and junk fragmented packets if they're too big to be
sent, just like with IPv4. (I can't imagine anyone's running an NFS
server using UDP over IPv6, but if they are, this will likely make them
a lot happier. :)
2004-05-14 03:57:17 +00:00
John Polstra
15a3ddef19 Fix a potential stack buffer overflow on systems whose ACPI OEMID
fills its field (6 characters).  In that case the OEMID is not
null-terminated, and the sprintf that was used would copy up to the
next null byte, which could be pretty far away.
2004-05-14 01:29:21 +00:00
John Baldwin
92cb9c9b67 Different VIA host bridges use different offsets to their AGP config
registers, so add a register offset array to the softc.  We key off the
device ID to determine which set of register offsets.  Currently the 8385
host bridge used on amd64 is the only bridge to use the AGP3_VIA_*
register offsets and all other bridges use the AGP_VIA_* offsets.  It is
currently unclear if the AGP3_VIA_* offsets are for VIA bridges that
implement AGP 3.0 bridges or just for amd64 bridges.

Submitted by:	Kenneth Culver culverk at sweetdreamsracing dot biz
2004-05-13 20:05:42 +00:00
John Baldwin
3335671ddd Split sleepq_wakeup_thread() into two functions. sleepq_remove_thread()
removes a specific thread from a sleep queue.  sleepq_resume_thread()
resumes scheduling of a thread that has been previously removed from a
sleep queue.
- sleepq_catch_signals() just removes a thread from the queue it was just
  added to when a pending signal is found.
- sleepq_signal() and sleepq_broadcast() remove threads from a queue,
  drop the queue lock, and then resume all the previously removed threads.
  This doesn't completely fix the sched_lock <-> sleepq chain LOR, but it
  makes it a little better as we no longer call setrunnble() with a sleep
  queue lock held meaning if setrunnable() tries to wakeup the swapper we
  don't try to lock two sleep queue chains at the same time.
2004-05-13 20:00:43 +00:00
Dag-Erling Smørgrav
7cec30e791 Unbreak the build. 2004-05-13 19:15:21 +00:00
Scott Long
d7f2f66e08 Enable INTR_ENTROPY if the interrupt is not set to INTR_FAST. Remove the
testing and setting of the INTR_ENTROPY macro as it is not needed in
FreeBSD 5.x.

Submitted by:	Alex Vasylenko
2004-05-13 16:02:18 +00:00
Don Lewis
63625ec31e Remove extraneous spaces. 2004-05-13 11:33:44 +00:00
Don Lewis
9d2820eaac Implement sbc_lockassert() and sb_lockassert() functions to allow
proper locking to be checked at runtime.

Remove sb_lock() and sb_unlock() calls from sb_reset_dsp() because the
latter is called from sb_setup() with the lock already held.  Add a
call to sb_lockassert().

Surround the call to sb_reset_dsp() in sb16_attach() with sb_lock()
and sb_unlock() calls.

Tested by:	Bartek Marcinkiewicz <junior AT p233.if.pwr.wroc.pl>
2004-05-13 11:32:54 +00:00
Yoshihiro Takahashi
33e48d06ba MFi386: revision 1.489 2004-05-13 11:17:07 +00:00
Yoshihiro Takahashi
2621fd00aa Move the ichwd to i386 only. 2004-05-13 11:13:55 +00:00
Nate Lawson
c868ac7d12 Add support for retrieving _GLK in the ECDT probe. Now we no longer always
use the global lock at the beginning of the ECDT probe.  Instead, we use
the handle from the ECDT to call _GLK.  Also, unify the device description.
2004-05-13 03:17:08 +00:00
Warner Losh
560c97db54 Expose USBVERBOSE as a first-class option. It will be needed soon as
an option.  Note that this option doesn't follow the normal USB_ or
Uxxx_ convention.  That's because it is this way in the upstream
provider and I didn't want to change that.
2004-05-13 03:15:04 +00:00
Warner Losh
4cec015da7 Sync to pccarddevs 1.84 2004-05-13 01:24:48 +00:00
Warner Losh
4fa82af570 Add Intel EtherExpress PRO/100 LAN Modem. This will eventually be
added to xe once the pccard issues are resolved...
2004-05-13 01:24:26 +00:00
Bill Paul
dc9d837079 Restore source code compatibility with 5.2-RELEASE. 2004-05-12 15:58:42 +00:00
Joerg Wunsch
0233123076 Convert the #if 0 magic to #if SCAN_IICBUS, and make it actually compile
again.  While it's not generally recommended anymore, it might still prove
useful for debugging purposes.
2004-05-12 13:43:41 +00:00
Alan Cox
1bb816d3d1 Restructure vm_page_select_cache() so that adding assertions is easy.
Some of the conditions that caused vm_page_select_cache() to deactivate a
page were wrong.  For example, deactivating an unmanaged or wired page is a
nop.  Thus, if vm_page_select_cache() had ever encountered an unmanaged or
wired page, it would have looped forever.  Now, we assert that the page is
neither unmanaged nor wired.
2004-05-12 04:27:18 +00:00
Vinod Kashyap
088113ed0b 1. Fixed potential problem that would cause out-of-order requests in twe_startio.
2. Changed version.

Submitted by: scottl
Reviewed by: vkashyap
Approved by: re
2004-05-12 04:10:37 +00:00
Alan Cox
f651b12907 Cache queue pages are not mapped. Thus, the pmap_remove_all() by
vm_pageout_scan()'s loop for freeing cache queue pages is unnecessary.
2004-05-12 04:10:35 +00:00
Justin T. Gibbs
22dbd4c64c aic79xx.c:
Allow 500us between pauses in ahd_pause_and_flushwork().
	The maximum we will wait is now 500ms.

	In the same routine, remove any attempt to clear ENSELO.
	Let the firmware do it once the current selection has
	completed.  This avoids some race conditions having to
	do with non-packetized completions and the auto-clearing
	of ENSELO on packetized completions.

	Also avoid attempts to clear critical sections when
	interrups are pending.  We are going to loop again
	anyway, so clearing critical sections is a waste of
	time.  It also may not be possible to clear a critical
	section if the source of the interrupt was a SEQINT.

aic79xx_pci.c:
	Use the Generic 9005 mask when looking for generic 7901B
	parts.  This allows the driver to attach to 7901B parts
	on motherboards using a non-Adaptec subvendor ID.

aic79xx_inline.h:
	Test for the SCBRAM_RD_BUG against the bugs
	field, not the flags field in the softc.

aic79xx.c:
	Cancel pending transactions on devices that
	respond with a selection timeout.  This decreases
	the duration of timeout recovery when a device
	disappears.

aic79xx.c:
	Don't bother forcing renegotiation on a selection
	timeout now that we use the device reset handler
	to abort any pending commands on the target.
	The device reset handler already takes us down
	to async narrow and forces a renegotiation.

	In the device reset handlers, only send a
	BDR sent async event if the status is not
	CAM_SEL_TIMEOUT.  This avoids sending this
	event in the selection timeout case

aic79xx.c:
	Modify the Core timeout handler to verify that another
	command has the potential to timeout before passing off
	a command timeout as due to some other command.  This
	safety measure is added in response to a timeout recovery
	failure on H2B where it appears that incoming reselection
	status was lost during a drive pull test.  In that case,
	the recovery handler continued to wait for the command
	that was active on the bus indefinetly.  While the root
	cause of the above issue is still being determined seems
	a prudent safeguard.

aic79xx_pci.c:
	Add a specific probe entry for the Dell OEM 39320(B).

aic79xx.c:
aic79xx.h:
aic79xx.reg:
aic79xx.seq:
	Modify the aic79xx firmware to never cross a cacheline or
	ADB boundary when DMA'ing completion entries to the host.
	In PCI mode, at least in 32/33 configurations, the SCB
	DMA engine may lose its place in the data-stream should
	the target force a retry on something other than an
	8byte aligned boundary. In PCI-X mode, we do this to
	avoid split transactions since many chipsets seem to be
	unable to format proper split completions to continue
	the data transfer.

	The above change allows us to drop our completion entries
	from 8 bytes to 4.  We were using 8 byte entries to ensure
	that PCI retries could only occur on an 8byte aligned
	boundary.  Now that the sequencer guarantees this by splitting
	up completions, we can safely drop the size to 4 bytes (2
	byte tag, one byte SG_RESID, one byte pad).

	Both the split-completion and PCI retry problems only show
	up under high tag load when interrupt coalescing is being
	especially effective.  The switch from a 2byte completion
	entry to an 8 byte entry to solve the PCI problem increased
	the chance of incurring a split in PCI-X mode when multiple
	transactions were completed at once.  Dropping the completion
	size to 4 bytes also means that we can complete more commands
	in a single DMA (128byte FIFO -> 32 commands instead of 16).

aic79xx.c:
	Modify the SCSIINT handler to defer clearing
	sequencer critical sections to the individual
	interrupt handlers.  This allows us to
	immediately disable any outgoing selections in
	the case of an unexpected busfree so we don't
	inadvertantly clear ENSELO *after* a new selection
	has started.  Doing so may cause the sequencer
	to miss a successful selection.

	In ahd_update_pending_scbs(), only clear ENSELO if
	the bus is currently busy and a selection is not
	already in progress or the sequencer has yet to
	handle a pending selection.  While we want to ensure
	that the selection for the SCB at the head of the
	selection queue is restarted so that any change in
	negotiation request can take effect, we can't clobber
	pending selection state without confusing the sequencer
	into missing a selection.
2004-05-11 20:46:05 +00:00
Justin T. Gibbs
f49574218d o When restarting the sequencer, clear any pending
sequencer interrupt codes.  These codes are only
  relevant to the code that was last being executed
  and that context is cleared when we reset the
  program counter.  This addresses a race condition
  between a sequencer interrupt and any SCSI event
  that causes us to restart the sequencer.

o When running the untagged-Q, we must start the
  timer for any transaction we queue.

o Give the firmware half a millisecond between
  pauses to flush work out.  This should give us
  around half a second of total delay before flagging
  an issue with pausing and flushing controller work.

  Only attempt to clear critical sections if there
  are no pending interrupts in the pause and flush
  loop.  If the sequencer has issued an INTSTAT, we
  may not be able to step out of the critical section.

o Cancel pending transactions on devices that
  respond with a selection timeout.  This decreases
  the duration of timeout recovery when a device
  disappears.

  Don't bother forcing renegotiation on a selection
  timeout now that we use the device reset handler
  to abort any pending commands on the target.
  The device reset handler already takes us down
  to async narrow and forces a renegotiation.

o In the device reset handlers, only send a
  BDR sent async event if the status is not
  CAM_SEL_TIMEOUT.  This avoids sending this
  event in the selection timeout case.

o Modify the Core timeout handler to verify that another
  command has the potential to timeout before passing off
  a command timeout as due to some other command.
2004-05-11 20:39:46 +00:00
Justin T. Gibbs
9fe88a385d Add aic_scb_timer_start() which will be used in the aic7xxx driver to
start the timer on SCBs queued in the untagged SCB queue.

The core treats timeouts in usecs to satisfy Linux requirements.  Multiply
accordingly.
2004-05-11 20:33:42 +00:00
John Baldwin
a894993de1 - Move some macros from icu.h into atpic.c as that is the only place they
are used.
- Reduce duplication of a couple of macros removing the duplicates from
  ich.h.
- Remove unused macros from icu.h as well as locore protection as this
  header is no longer included in assembly sources.
2004-05-11 20:23:24 +00:00