Commit Graph

46174 Commits

Author SHA1 Message Date
Colin Percival
a58deb4616 Add support for Exsys EX-41098 cards.
PR:		kern/65040
Submitted by:	Stefan Grundmann <sg-sendpr@waset.de>
Tested by:	buildkernel
"Just commit it" by: phk
2004-04-17 11:57:34 +00:00
Maxime Henrion
0335702b9f Don't check for device_get_softc() returning NULL, it can't happen. 2004-04-17 10:25:04 +00:00
Bruce Evans
7b1fe905ef Fixed some style bugs in previous commit (mainly an insertion sort error
for declarations, and poorly worded messages).

Fixed some nearby style bugs (unsorted declarations).
2004-04-17 02:46:05 +00:00
Paul Saab
c61314601b Add support for the HP Modular Smart Array 20 & 500 storage arrays.
Logical volumes on these devices show up as LUNs behind another
controller (also known as proxy controller).  In order to issue
firmware commands for a volume on a proxy controller, they must be
targeted at the address of the proxy controller it is attached to,
not the Host/PCI controller.

A proxy controller is defined as a device listed in the INQUIRY
PHYSICAL LUNS command who's L2 and L3 SCSI addresses are zero.  The
corresponding address returned defines which "bus" the controller
lives on and we use this to create a virtual CAM bus.

A logical volume's addresses first byte defines the logical drive
number.  The second byte defines the bus that it is attached to
which corresponds to the BUS of the proxy controller's found or the
Host/PCI controller.

Change event notification to be handled in its own kernel thread.
This is needed since some events may require the driver to sleep
on some operations and this cannot be done during interrupt context.
With this change, it is now possible to create and destroy logical
volumes from FreeBSD, but it requires a native application to
construct the proper firmware commands which is not publicly
available.

Special thanks to John Cagle @ HP for providing remote access to
all the hardware and beating on the storage engineers at HP to
answer my questions.
2004-04-16 23:00:01 +00:00
Paul Saab
a32168b78e Whitespace cleanup. 2004-04-16 21:03:38 +00:00
John Baldwin
7870c3c61c - Enable (unmask) interrupt sources earlier in the ithread loop.
Specifically, we used to enable the source after locking sched_lock
  and just before we had already decided to do a context switch.
  This meant that an ithread could never process more than one interrupt
  per context switch.  Enabling earlier in the loop before sched_lock is
  acquired allows an ithread to handle multiple interrupts per context
  switch if interrupts fire very rapidly.  For the case of heavy interrupt
  load this can reduce the number of context switches (and thus overhead)
  as well as reduce interrupt latency.
- Now that we can handle multiple interrupts per context switch, add simple
  interrupt storm protection to threaded interrupts.  If X number of
  consecutive interrupts are triggered before the itherad voluntarily
  yields to another thread, then the interrupt thread will sleep with the
  associated interrupt source disabled (masked) for 1/10th of a second.
  The default value of X is 500, but it can be tweaked via the tunable/
  sysctl hw.intr_storm_threshold.  If an interrupt storm is detected, then
  a message is output to the kernel console on the first occurrence per
  interrupt thread.  Interrupt storm protection can be disabled completely
  by setting this value to 0.  There is no scientific reasoning for the
  1/10th of a second or 500 interrupts values, so they may require tweaking
  at some point in the future.

Tested by:	rwatson (an earlier version w/o the storm protection)
Tested by:	mux (reportedly made a machine with two PCI interrupts
		storming usable rather than hard locked)
Reviewed by:	imp
2004-04-16 20:25:40 +00:00
John Baldwin
d0a83b0ba6 Whitespace fix. 2004-04-16 20:09:53 +00:00
John Baldwin
f203f177f4 Revert part of the "BIOS brain damage" from rev 1.10. It seems that
different BIOSs use the same exact settings to mean two very different and
incompatible things for the SCI.  Thus, if the SCI is remapped to a PCI
interrupt, we now trust the trigger/polarity that the MADT provides by
default.  However, the SCI can be forced to level/lo as 1.10 did by setting
the tunable "hw.acpi.force_sci_lo" to a non-zero value from the loader.

Thus, if rev 1.10 caused an interrupt storm, it should nwo fix your
machine.  If rev 1.10 fixed an interrupt storm on your machine, you
probably need to set the aforementioned tunable in /boot/loader.conf to
prevent the interrupt storm.

The more general problem of getting the SCI's trigger/polarity programmed
"correctly" (for some value of correctly meaning several workarounds for
broken BIOSs and inconsistent "implementations" of the ACPI standard) is
going to require more work, but this band-aid should improve the current
situation somewhat.

Requested by:	njl
2004-04-16 19:46:30 +00:00
John Baldwin
79cdd799f6 Use %eax rather than %ax when loading segment registers to avoid partial
register stalls.

Reviewed by:	bde (a while ago, and I think an earlier version)
2004-04-16 19:26:37 +00:00
John Baldwin
86f4fd6f71 Don't call the BIOS to route a link that has already been routed by the
BIOS during POST as it apparently makes some machines unhappy.

Tested by:	mux
2004-04-16 18:54:05 +00:00
Mark Murray
55636152d5 Attempts to make this device Giant-free were ill-conceived as
uiomove(9) is not properly locked. So, return to NEEDGIANT
mode. Later, when uiomove is finely locked, I'll revisit.

While I'm here, provide some temporary debugging output to
help catch blocking startups.
2004-04-16 17:10:54 +00:00
Mark Murray
2a8b87d883 Default to harvesting everything. This is to help give a faster
startup. harvesting can be turned OFF in etc/rc.d/* if it is a
burden.
2004-04-16 17:07:11 +00:00
Nate Lawson
a50f2c9f42 Disable the new wake GPE behavior. With it enabled, my laptop won't stay
suspended after the second try.  Intel is working on a fix to properly
differentiate the non-standard wake/runtime GPEs from wake-only GPEs.
2004-04-16 16:27:37 +00:00
Warner Losh
f77ad99d59 ooops. I disabled pci_enable_io_modes not pci_do_powerstate in the last
commit.  That was in error.

Noticed by: sos
2004-04-16 15:01:54 +00:00
Robert Watson
d54efd4d31 At some point during the history of m_getcl(), MAC support began to
unconditionally initialize the mbuf header even if cluster allocation
failed, which could result in a NULL pointer dereference in low-memory
conditions.

PR:		kern/65548
Submitted by:	Stephan Uphoff <ups@tree.com>
2004-04-16 14:35:11 +00:00
Luigi Rizzo
9046571f1c Use if_link instead of the alias if_list, and change a for() into
the TAILQ_FOREACH() form.

Comment the need to store the same info (mac address for ethernet-type
devices) in two different places.

No functional changes. Even the compiler output should be unmodified
by this change.
2004-04-16 10:32:13 +00:00
Luigi Rizzo
d65d2351b0 Documented the intended usage of if_addrhead and ifaddr_byindex()
This commit only changes comments. Nothing to recompile.
2004-04-16 10:28:54 +00:00
Eivind Eklund
4d3f164c01 Improve comment (SMB bus -> System Management Bus) 2004-04-16 09:29:45 +00:00
Luigi Rizzo
7affdebea2 Consistently use ifaddr_byindex() to access the link-level address
of an interface. No functional change.

On passing, comment an useless invocation of TAILQ_INIT(&ifp->if_addrhead)
which could probably be removed in the interest of clarity.
2004-04-16 08:15:37 +00:00
Luigi Rizzo
9b98ee2c4f Consistently use ifaddr_byindex() to access the link-level address
of an interface. No functional change.

On passing, comment a likely bug in net/rtsock.c:sysctl_ifmalist()
which, if confirmed, would deserve to be fixed and MFC'ed
2004-04-16 08:14:34 +00:00
Luigi Rizzo
3c56e09895 Remove two variables that became unused because of last commit.
Reported by: tinderbox
2004-04-16 06:58:39 +00:00
David E. O'Brien
a29628bc28 Move ENABLE_ALART to proper place.
Submitted by:	bde
2004-04-16 05:59:08 +00:00
David E. O'Brien
a1f60844da Fix building on L64 machines. 2004-04-16 05:34:14 +00:00
David E. O'Brien
38974555bd Add support for the ADMtek AN8513 USB Ethernet adapter.
Submitted by:	taxman <taxman@freedombi.com>
2004-04-16 05:24:45 +00:00
David E. O'Brien
e5b1e74d89 Correct $FreeBSD$ style. 2004-04-16 05:22:11 +00:00
Warner Losh
b24afb1761 make the bad bar warning less scary, and toss it behind a bootverbose.
It is harmless, but freaking people out.
2004-04-16 04:53:19 +00:00
Warner Losh
d966428737 Turn off the power stuff for a little while longer. There appears to be
something subtle wrong with it.
2004-04-16 04:50:54 +00:00
Alan Cox
ace2c466dc Set the "global" attribute on the page table entries for the kernel and
direct mappings.  This shaves a few seconds off of my buildworld times.

Discussed with:	peter@
2004-04-16 03:45:28 +00:00
Bill Paul
ef617c0842 - Use memory barrier with atomic operations in ntoskrnl_lock_dpc() and
ntoskrnl_unlocl_dpc().
- hal_raise_irql(), hal_lower_irql() and hal_irql() didn't work right
  on SMP (priority inheritance makes things... interesting). For now,
  use only two states: DISPATCH_LEVEL (PI_REALTIME) and PASSIVE_LEVEL
  (everything else). Tested on a dual PIII box.
- Use ndis_thsuspend() in ndis_sleep() instead of tsleep(). (I added
  ndis_thsuspend() and ndis_thresume() to replace kthread_suspend()
  and kthread_resume(); the former will preserve a thread's priority
  when it wakes up, the latter will not.)
- Change use of tsleep() in ndis_stop_thread() to prevent priority
  change on wakeup.
2004-04-16 00:04:28 +00:00
Luigi Rizzo
0318355d0e Remove improper use of if_addrhead in device drivers to check
if the link-level address has been initialized already.

The majority of modern drivers never does this and works fine, which
makes me think that the check is totally unnecessary and a residue
of cut&paste from other drivers.

This change is done to simplify locking because now almost none of the
drivers uses this field. The exceptions are "ct" "ctau" and "cx"
where i am not sure if i can remove that part.
2004-04-15 20:31:10 +00:00
Luigi Rizzo
621b79c4d5 Document the way if_addrhead and struct ifaddr are used.
Remove a member from 'struct ifaddr' which has been in an
#ifdef notdef block since rev 1.1

No ABI changes -- no need to recompile anything.
2004-04-15 19:45:59 +00:00
Robert Watson
f43fd9a000 If IF_HANDOFF() or netisr_queue() fail, they will free the mbuf. When
this happens, set (m) to NULL or we'll try to free it a second time on
return.

Submitted by:	Pavel Gulchouck <gul@gul.kiev.ua>
2004-04-15 19:11:34 +00:00
Josef El-Rayes
2e30742814 Add note that npx depends on isa.
Approved by:	green
2004-04-15 15:11:04 +00:00
Colin Percival
851c07559f s/atspeaker/speaker/
cf. revision 1.2 of src/sys/modules/speaker/Makefile

PR:		conf/65195
Submitted by:	daichi
2004-04-15 12:12:15 +00:00
Ruslan Ermilov
61f7581d08 Ensure that the poll_burst <= poll_burst_max constraint really holds.
Reviewed by:	luigi
2004-04-15 07:38:44 +00:00
Peter Edwards
7c8ca9400e Let the NFS client notice a file's size changing as a modification.
This avoids presenting invalid data to the client's applications
when the file is modified, and then extended within the window of
the resolution of the modifcation timestamp.

Reviewed By:	iedowse
PR:		kern/64091
2004-04-14 23:23:55 +00:00
Peter Wemm
5027176b20 Check in structure definitions for the FreeBSD-3.x signal syscall stuff.
Nothing uses these yet, but I dont want to lose them.
2004-04-14 23:20:14 +00:00
Peter Wemm
5b3283b084 Regen 2004-04-14 23:17:57 +00:00
Peter Wemm
0c70bced57 Catch up to the not-so-recent statfs(2) changes. 2004-04-14 23:17:37 +00:00
Paul Saab
ffdf82e1a7 Don't allow the driver to be unloaded if the device node is open. 2004-04-14 19:45:07 +00:00
Scott Long
d8a0a47347 Remove the 'timeout' argument from aac_wait_command() as it isn't used and
never will be.  Update the XXX comment for this function to accurately reflect
why things are the way they are.
2004-04-14 19:11:29 +00:00
Paul Saab
40f05b02ec Do not catch signals when waiting for a request. This fixes a nasty
race when issuing commands from userland.
2004-04-14 18:55:28 +00:00
Nate Lawson
5e679b57b6 Remove nowerror lines now that acpica is warns clean. 2004-04-14 18:13:16 +00:00
Nate Lawson
eccb3e0e14 Remove warnings from vendor files. This takes some files off the vendor
branch but they have indicated they will not fix these warnings.
2004-04-14 18:12:29 +00:00
Nate Lawson
a34ec6cdf6 Return an error immediately if asked to switch a non-existent consumer. 2004-04-14 17:58:19 +00:00
Warner Losh
b0855e456e Now that the dust has settled on the resource issues, turn on the
power parts of my patches and see what breaks.  Don't (yet) throw
the chatty messages behind a if (bootverbose).
2004-04-14 17:52:08 +00:00
Nate Lawson
865b8d0bfd Remove a non-variable static and move other static variables to the same
location.
2004-04-14 17:48:33 +00:00
Nate Lawson
dfd36c130b Fix some warnings by commenting out unused code. 2004-04-14 17:47:42 +00:00
Nate Lawson
916dc0e20c Only try to set the ACPI power state if the handle is valid. There was
probably no problem with this except it may have had the side effect of
registering a NULL consumer.
2004-04-14 17:46:21 +00:00
Nate Lawson
95ee367419 Even though the patch has been submitted to the vendor, this file is off
the vendor branch.  Once more, with feeling!
2004-04-14 16:52:19 +00:00