Commit Graph

79252 Commits

Author SHA1 Message Date
Tom Rhodes
5af4935a22 Fix some 'SYNOPSIS' and 'usage' messages. 2002-08-27 00:49:27 +00:00
John Baldwin
abec7762ba Have to create opt_bus.h for sys/bus.h to be happy. *sigh*
Noticed by:	imp and others
2002-08-26 21:11:56 +00:00
Brian Somers
abc1373d37 Correct the FAQ url
Submitted by: Olivier Tharan <olive@oban.frmug.org>
2002-08-26 20:48:07 +00:00
John Baldwin
3cb751691f Oops, forgot to hook up the ACPI PCI bus in the module.
Noticed by:	imp
2002-08-26 19:00:36 +00:00
Prafulla Deuskar
90fd36aac8 Back out TX/RX descriptor/buffer management changes from earier commit.
We are having panics with the driver under stress with jumbo frames.
Unfortunately we didnot catch it during our regular test cycle.
I am going to MFC the backout immediately.
2002-08-26 18:59:16 +00:00
Ian Dowse
02bd1bcd2a Add a new KTR type KTR_CONTENTION, and use it in the mutex code to
log the start and end of periods during which mtx_lock() is waiting
to acquire a sleep mutex. The log message includes the file and
line of both the waiter and the holder.

Reviewed by:	jhb, jake
2002-08-26 18:39:38 +00:00
John Baldwin
e7f52ff8bb Hook up the new ACPI PCI bus and catch up to ACPI PCI bridge driver changes. 2002-08-26 18:32:00 +00:00
Ian Dowse
9261400aa2 Add WITNESS_FILE() and WITNESS_LINE(), which allow users of witness
to print out the file and line from the lock object. These will be
used shortly by CTR() calls in the mutex code.

Reviewed by:	jhb, jake
2002-08-26 18:31:26 +00:00
John Baldwin
2ccfc93222 Overhaul the ACPI PCI bridge driver a bit:
- Add an ACPI PCI-PCI bridge driver (the previous driver just handled
  Host-PCI bridges) that is a PCI driver that is a subclass of the generic
  PCI-PCI bridge driver.  It overrides probe, attach, read_ivar, and
  pci_route_interrupt.
  - The probe routine only succeeds if our parent is an ACPI PCI bus which
    we test for by seeing if we can read our ACPI_HANDLE as an ivar.
  - The attach routine saves a copy of our handle and calls the new
    acpi_pcib_attach_common() function described below.
  - The read_ivar routine handles normal PCI-PCI bridge ivars and adds an
    ivar to return the ACPI_HANDLE of the bus this bridge represents.
  - The route_interrupt routine fetches the _PRT (PCI Interrupt Routing
    Table) from the bridge device's softc and passes it off to
    acpi_pcib_route_interrupt() to route the interrupt.
- Split the old ACPI Host-PCI bridge driver into two pieces.  Part of
  the attach routine and most of the route_interrupt routine remain in
  acpi_pcib.c and are shared by both ACPI PCI bridge drivers.
  - The attach routine verifies the PCI bridge is present, reads in
    the _PRT for the bridge, and attaches the child PCI bus.
  - The route_interrupt routine uses the passed in _PRT to route a PCI
    interrupt.
  The rest of the driver is the ACPI Host-PCI bridge specific bits that
  live in acpi_pcib_acpi.c.
  - We no longer duplicate pcib_maxslots but use it directly.
  - The driver now uses the pcib devclass instead of its own devclass.
    This means that PCI busses are now only children of pcib devices.
  - Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar
    of the child bus.
  - Fetch the _PRT for routing PCI interrupts directly from our softc
    instead of walking the devclass to find ourself and then fetch our
    own softc.

With this change and the new ACPI PCI bus driver, ACPI can now properly
route interrupts for devices behind PCI-PCI bridges.  That is, the
Itanium2 with like 10 PCI busses can now boot ok and route all the PCI
interrupts.  Hopefully this will also fix problems people are having with
CardBus bridges behind PCI-PCI bridges not properly routing interrupts
when ACPI is used.

Tested on:	i386, ia64
2002-08-26 18:30:27 +00:00
Tom Rhodes
277ffe6e6c Fix Synopsis 2002-08-26 18:16:39 +00:00
John Baldwin
28bf1fad05 Add an ACPI PCI bus driver that is a subclass of the generic PCI bus
driver.  This driver overrides the probe, attach, and read_ivar methods.

If the parent bridge is an ACPI PCI bridge, then the probe routine will
match, otherwise it will fail.  It tests this by seeing if it can get
the ACPI_HANDLE ivar from the bridge device.

In the attach routine, it uses pci_add_children() to add all the child
devices (but with a slightly larger ivar so it can store ACPI_HANDLE's
for child devices) and then walks through the ACPI namespace below the
bus device to cache ACPI_HANDLE's for all child devices present in the
namespace.  It does this by comparing the pci slot and function to the
address encoded in _ADR of the devices in the ACPI namespace.

The read_ivar routine passes most requests off to pci_read_ivar()
and adds a new request so that the ACPI_HANDLE for a child device can
be read.

To add proper power support the power methods can be overridden as well,
but that is not currently implemented.  Also, there are cases where a
device may show in the ACPI namespace as a PCI device that the PCI probe
does not find.  Currently such devices are ignored.

Tested on:	i386, ia64
2002-08-26 17:55:42 +00:00
Bruce A. Mah
1976c29afb Add hardware compatability notes for ahd(4)-supported devices. 2002-08-26 17:54:10 +00:00
Justin T. Gibbs
c7ce0c37af Adjust scsi_calc_syncparam() to the exception table changing from 10ths to
100ths of ns.  This should correct a problem with camcontrol "ignoring"
requests to negotiate to slower speeds.
2002-08-26 17:13:35 +00:00
John Baldwin
6f0d58848f Export a few symbols as globals to allow subclassing of this driver. In
OOP speak, you would mark these as 'protected' members.  Specifically:
- Make the pcib_softc struct public so it can be used by subclasses.
- Make pcib_{read,write}_ivar(), pcib_alloc_resource(), pcib_maxslots(),
  and pcib_{read,write}_config() globals that can be used by subclasses.
- Make the pcib devclass a global variable.
- Move most of the pcib_attach() function into a global
  pcib_attach_common() function that can be called by the attach routines
  of subclasses.

Tested on:	i386, alpha, sparc64, ia64
2002-08-26 15:57:08 +00:00
John Baldwin
42dbeaee02 Various changes to make it easier to subclass the PCI bus device.
- Make the pci devclass a global variable.
- Add child devices in pci_attach() instead of pci_probe().  Change
  pci_probe() to just check for a valid bus number from the associated
  bridge and return -1000 if successful.  This allows subclasses of the
  PCI bus driver to override the generic driver.
- Move the code to load the vendor data into its own public function.
  Really though, doing this at attach is just plain wrong.  This should
  really be done in the module load routine instead.  As a side effect,
  the 'busno' variable in pci_attach() is now no longer static (minor
  bug that was harmless so far.)
- Change pci_add_children() to take an extra argument that is the size of
  the device info structure passed to pci_read_device() and make it public
  so subclasses of the PCI bus can call it in their attach routines.
- Move the bits to attach a probed PCI child to a PCI bus into a global
  pci_add_child() function.  This will allow subclasses that can detect
  a PCI device not found in the normal PCI probe to add those devices in
  their own attach routine.  (I have seen this in the ACPI tree on my
  laptop for example.)  As a side effect, change the static function
  pci_add_resources() to get the busno, slot, and func from the passed
  in dinfo structure instead of requiring them as function arguments.

Tested on:	i386, alpha, ia64, sparc64
2002-08-26 15:23:52 +00:00
John Baldwin
473f1ca90d In acpi_pcib_route_interrupt(), the code claims to check to see if a PCI
LNK device (interrupt source provider sort of) is present before using it,
but the code actually tested the status (_STA) of the PCI bridge device
doing the routing, not the actual LNK device.  Fix it to check the status
of the LNK device.
2002-08-26 15:12:47 +00:00
Jeremy Lea
dd1d26511d Don't dump core on packages with an invalid or empty PLIST.
Reviewed by:	markm
2002-08-26 13:25:48 +00:00
Ian Dowse
fd0b613a7b Unbreak the -c option by not using connect(2) for mount_nfs's
communication with the remote NFS server if this flag is specified.

PR:		bin/42003
Submitted by:	Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2002-08-26 13:08:23 +00:00
Mike Barcroft
755a869863 The previous commit log was incorrect. _BSD_CLK_TCK_ and
_BSD_CLOCKS_PER_SEC_ are not as related to stathz as I thought.  So
the previous revision will only serve to unify alpha with i386 and
other architectures.  This actually does introduce some binary
incompatibilities for dynamically linked programs which make use of
clock(3) and times(3).
2002-08-26 06:33:09 +00:00
Giorgos Keramidas
99479039bb Grammar fix.
PR:		docs/42021
Submitted by:	Jeff Ito <jeffi@rcn.com>
MFC after:	3 days
2002-08-26 06:16:51 +00:00
Julian Elischer
b39f32841b move the assert to cover more cases 2002-08-26 05:02:56 +00:00
Tom Rhodes
55c639b2d9 Fix 'SYNOPSIS' and 'usage' 2002-08-26 04:56:23 +00:00
Tom Rhodes
a48ea64073 Print a more realistic usage message 'special_device' 'inode_number'. This
matches the synopsis given in the manual page.

MFC after:	3 days
2002-08-26 03:56:23 +00:00
David E. O'Brien
b9d958f5d4 Grrr.... mumble.... a linger gzip'ism still existed.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-08-26 03:44:44 +00:00
Mike Barcroft
646d21a5a3 Since arm and powerpc aren't far enough to set stathz, take a
preemptive strike and change _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_
to 128.

Approved by:	benno
2002-08-26 03:44:11 +00:00
Mike Barcroft
091fe703a4 Fix a long-standing bug on alpha:
Change _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ to match stathz.  This
  should result in bug for bug compatibility in staticly linked
  programs and dynamicly linked programs should see an immediate
  correction.
2002-08-26 02:39:03 +00:00
Greg Lehey
045d6370fc Clarify that the date 26 August 1920 was the date women got the vote
in USA, not the world first.

Add dates for women's votes in New Zealand.

Add dates for women's votes and rights to political office in South
Australia.
2002-08-26 00:23:56 +00:00
Giorgos Keramidas
ba4be60fa0 Document -p option of diff.
PR:		docs/41887
Submitted by:	tobez
2002-08-26 00:13:06 +00:00
Jake Burkholder
81f223ca02 Fixed most indentation bugs. 2002-08-25 22:36:52 +00:00
Jake Burkholder
ca0387ef9f Fixed placement of operators. Wrapped long lines. 2002-08-25 20:48:45 +00:00
David E. O'Brien
a8a1e43d8f Backout rev 1.4. The code certainly does not spell the sysctl with 'ed':
$ grep disable /sys/boot/i386/libi386/i386_module.c
    if ((getenv("acpi_load") && !getenv("hint.acpi.0.disable"))) {
2002-08-25 20:02:30 +00:00
Mike Barcroft
dd7770019a Move intrmask_t to the kernel-only section of <sys/types.h>. Add some
comments submitted by bde.
2002-08-25 19:26:31 +00:00
Matthew Dillon
301b6a7936 Rearrange a sentence that got stuck in the wrong paragraph.
X-MFC after:	(all commits here will be MFCd)
2002-08-25 18:54:04 +00:00
Matthew Dillon
c3bf8c4544 Clear up confusion in a sentence describing [/var]/tmp. 2002-08-25 18:46:43 +00:00
Mitsuru IWASAKI
9c4d34df76 Add suspend/resume method to syscons. This switch the mode
(text <-> graphics) by changing current vty during ACPI
sleep/wakeup (maybe APM also).
2002-08-25 18:35:44 +00:00
Matthew Dillon
78d1394010 Add a section on the net.inet.ip.portrange.* sysctls.
Suggested by: Mike Harding <mvh@ix.netcom.com>
MFC after:	3 days
2002-08-25 18:34:48 +00:00
Julian Elischer
c341dbce8b Fix a couple of typos in comments.
Submitted by:	Jake Burkholder <jake@locore.ca>
2002-08-25 17:49:28 +00:00
Mike Barcroft
33213740d8 Append a d to disable to make the ACPI hint example valid.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-08-25 16:48:16 +00:00
Philippe Charnier
f0067240a1 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:30:43 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
Philippe Charnier
7fed38d0a0 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:10:45 +00:00
Philippe Charnier
0d9f1a69d8 Replace various spellings with FALLTHROUGH which is lint()able 2002-08-25 13:01:47 +00:00
Jens Schweikhardt
798fb62432 Reformat the mvterm entry to fit mostly in an 80 column terminal.
Suggested by:	bde
MFC after:	3 days
2002-08-25 12:12:46 +00:00
Bruce Evans
17ce36a93b Oops, the previous commit messages should have said that the previous
commit also removed the hint about using -Werror.  -Werror is now added
in sys/conf/kern.pre.mk, which is a better place except it doesn't cover
modules.
2002-08-25 08:08:56 +00:00
Bruce Evans
64fc62d407 Turned format checking back on. It was left turned off for too long after
the gcc lossage that caused it to be turned off was fixed.

Tested with:	i386/{GENERIC,LINT,...}, alpha/GENERIC
2002-08-25 08:05:02 +00:00
Chris Costello
4e1e73eb94 Remove a repeated word.
Submitted by:	horikawa
2002-08-25 07:13:05 +00:00
Warner Losh
ca551bcd21 Remove extra args to printf
use Capabilities rather than Capacities.

Submitted by: kkenn
2002-08-25 06:15:50 +00:00
Mitsuru IWASAKI
ff01efb50d Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (in
seconds) before ACPI sleep.  Some machines might need this to sleep
by Hot-key.
2002-08-25 06:13:53 +00:00
Crist J. Clark
fcfce9770f Don't give up on a remote log host when we get a EHOSTUNREACH or
EHOSTDOWN. These are often transient errors (when the remote host
reboots, temporary network problems, etc.), and we'd rather err on the
side of caution and keep trying send messages that never arrive than
just give up.

Note that this is not an implementation of the "back-off" methods
given in the PR. Those just seem too complicated. Why not just keep
trying each time? Trying and failing doesn't really consume
significantly more resources than if we were successful for each
message.

PR:		bin/31029
MFC after:	1 week
2002-08-25 06:05:25 +00:00
Crist J. Clark
0b3a80af0d Check if a host argument is a IPv6 presentation format address before
going to gethostbyname2(3).

PR:		bin/31632
MFC after:	3 days
2002-08-25 05:44:13 +00:00