]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 years agoSupport for f/w crash dumps (2200 && 23XX).
mjacob [Sun, 17 Feb 2002 06:38:22 +0000 (06:38 +0000)]
Support for f/w crash dumps (2200 && 23XX).

If you want QLogic to look at a potential f/w problem for FC cards, you really
have to provide them info in the format they expect. This involves dumping
a lot of hardware registers (> 300 16 bit registers) and a lot of SRAM
(> 128KB minimum). Thus all of this code is #ifdef protected which will
become an option so that the memory allocation of where to dump the crash
image is pretty expensive. It's worth it if you have a reproducible problem
because they have some tools that can tell them, given the f/w version,
the precise state of everything.

MFC after: 1 week

22 years agoHints for WWN are now WWNN and/or WWPN.
mjacob [Sun, 17 Feb 2002 06:34:21 +0000 (06:34 +0000)]
Hints for WWN are now WWNN and/or WWPN.

MFC after: 1 week

22 years agoAdd in support firmware crash dumps. Change CFG options to split
mjacob [Sun, 17 Feb 2002 06:32:58 +0000 (06:32 +0000)]
Add in support firmware crash dumps. Change CFG options to split
WWN into WWNN and WWPN.

MFC after: 1 week

22 years agoBulk changes made during the BSDcon kernel summit and travel afterwards.
imp [Sun, 17 Feb 2002 03:11:11 +0000 (03:11 +0000)]
Bulk changes made during the BSDcon kernel summit and travel afterwards.
Appologies for making this one bulk commit, but I have tested all these
changes together and don't want to break anything by trying to disentangle
it.

o Make debugging a sysctl/tunable
o Remove flags word from yenta chip info, it is unused
o Make 16-bit card I/O range and 32-bit card I/O range tunables
o Start the rename of pccbb to cbb to match NetBSD by misc renames.
o Kill the now bogus list of softcs to create kthread.  Instead, just
  create the kthread in the attach routine.
o Remove sc_ from some structure names.  It isn't needed.
o Refine chipset lookup code.
o Match generic PCI <-> CardBus bridges.  We specifically don't generically
  match PCI PCMCIA bridges because they are not, with one exception, yenta
  devices.
o Add some comments about the why we need to have a function table ala
  OLDCARD
o The PCI interrupt routing by using the ExCA registers is needed for
  for all bridges, per the spec, not just TI ones.
o Collapse TOPIC95 and TOPIC95B.
o Using the ToPIC 97 and 100 datasheets, try to support these bridges better,
  but more work is needed.
o Generally clarify some XXX comments and add them in a few places where
  things didn't look right to me.
o Move interrupt generating register access until after we establish an ISR.
o Add support for YV and XV cards.  X and Y are numbers to be determined
  later (but maybe never).
o factor powerup code for 16-bit and 32-bit cards.
o When a card supports more than one voltage, prefer the lowest supported
  volage.  Windows does this, and MS's design guides imply this is the
  right thing to do.
o Document race between kthread_exit(0) and kldunload's unmapping of pages
  that John Baldwin and I discovered.
o Debounce the CSC interrupt a little better.
o When a 16-bit card is inserted when we don't have a pccard child,
  warn about it better.  Ditto for 32-bit card.
o Ack ALL the interrupt bits that we get, not just 0x1.
o maybe a couple minor style nits corrected.

22 years agoRemove check for sendmail.conf before even trying to start sendmail.
cjc [Sun, 17 Feb 2002 02:01:15 +0000 (02:01 +0000)]
Remove check for sendmail.conf before even trying to start sendmail.

Checking for the existence of sendmail.cf is rather silly when someone
is using the mailwrapper(8) to run a mail daemon that is not actually
sendmail(8). It is also probably better to let sendmail(8) actually
try to start and error out if the administrator has
'sendmail_enable="YES"' but no sendmail.conf. At present, it would
fail silently.

Reviewed by: gshapiro
MFC after: 2 days

22 years agoMFen (1.275 --> 1.277).
kuriyama [Sun, 17 Feb 2002 01:10:24 +0000 (01:10 +0000)]
MFen (1.275 --> 1.277).

22 years agoIf the credential on an incoming thread is correct, don't bother
julian [Sun, 17 Feb 2002 01:09:56 +0000 (01:09 +0000)]
If the credential on an incoming thread is correct, don't bother
reaquiring it. In the same vein, don't bother dropping the thread cred
when goinf ot userland. We are guaranteed to nned it when we come back,
(which we are guaranteed to do).

Reviewed by: jhb@freebsd.org, bde@freebsd.org (slightly different version)

22 years agoremove __P before next commit
julian [Sun, 17 Feb 2002 00:59:58 +0000 (00:59 +0000)]
remove __P before next commit

Reviewed by: jhb

22 years agoI am sick of being told that "cstsevent occures".
des [Sat, 16 Feb 2002 23:00:27 +0000 (23:00 +0000)]
I am sick of being told that "cstsevent occures".

22 years agoThis commit was generated by cvs2svn to compensate for changes in r90744,
jmallett [Sat, 16 Feb 2002 21:27:48 +0000 (21:27 +0000)]
This commit was generated by cvs2svn to compensate for changes in r90744,
which included commits to RCS files with non-trunk default branches.

22 years agoImport OpenBSD m4 as of today.
jmallett [Sat, 16 Feb 2002 21:27:48 +0000 (21:27 +0000)]
Import OpenBSD m4 as of today.

22 years agoSupply progress information in dump's process title, which is useful
iedowse [Sat, 16 Feb 2002 21:05:16 +0000 (21:05 +0000)]
Supply progress information in dump's process title, which is useful
for monitoring automated backups. This is based on a patch by Mikhail
Teterin, with some changes to make its operation clearer and to
update the proctitle more frequently.

PR: bin/32138

22 years agoOn receipt of a SIGINFO, schedule an immediate printout of the
iedowse [Sat, 16 Feb 2002 20:22:26 +0000 (20:22 +0000)]
On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate.

PR: bin/32138
Submitted by: mi

22 years agoWhen blocked on a mutex, display the mutex name via the wchan string field
dillon [Sat, 16 Feb 2002 20:10:00 +0000 (20:10 +0000)]
When blocked on a mutex, display the mutex name via the wchan string field
so we can at least tell the difference between being blocked in Giant
and being blocked in some other mutex.

22 years agoNew release notes: puc(4).
bmah [Sat, 16 Feb 2002 19:58:56 +0000 (19:58 +0000)]
New release notes:  puc(4).

Modified release notes:  Network device polling not just for i386
anymore and has a manpage (+MFC), uudecode(1) -p un-deprecated.

MFCs noted:  ARCNET support, cm driver,

22 years agoDocument the 'M' state.
des [Sat, 16 Feb 2002 18:47:22 +0000 (18:47 +0000)]
Document the 'M' state.

22 years ago(Doing that whole test-immediately-after-commit-thing like obrien sez:)
green [Sat, 16 Feb 2002 17:44:43 +0000 (17:44 +0000)]
(Doing that whole test-immediately-after-commit-thing like obrien sez:)
Forgot to include lock.h and mutex.h for GIANT_REQUIRED.

22 years agoAdd revoke_and_destroy_dev(), to be used by devices which decide when
green [Sat, 16 Feb 2002 17:35:05 +0000 (17:35 +0000)]
Add revoke_and_destroy_dev(), to be used by devices which decide when
they choose to destroy themselves without regard to whether or not
they are open.

22 years agoFix two file descriptor leaks in the internal function local_rpcb()
iedowse [Sat, 16 Feb 2002 17:05:49 +0000 (17:05 +0000)]
Fix two file descriptor leaks in the internal function local_rpcb()
that is used by a number of rpcbind-related library functions. Also
fix a rpc client leak in rpcb_set().

Submitted by: mbr
Obtained from: NetBSD

22 years agoMerge from NetBSD:
joe [Sat, 16 Feb 2002 16:16:12 +0000 (16:16 +0000)]
Merge from NetBSD:

* Add a -d flag to show the device drivers associated with each device.
* Update to use the new speed structure entry.

22 years agoAdd the puc (PCI "Universal" Communications) driver. The idea and some of
jhay [Sat, 16 Feb 2002 15:12:14 +0000 (15:12 +0000)]
Add the puc (PCI "Universal" Communications) driver. The idea and some of
the structure definitions come from NetBSD to make it easier to share card
definitions. The driver only acts as a shim between the pci bus and the
sio driver. Later pci parallel ports could also be supported through this
driver. Support for most single and multiport pci serial cards should be
as simple as adding its definition to pucdata.c

Tested with the following pci cards:
Moxa Industio CP-114, 4 port RS-232,RS-422/485
Syba Tech Ltd. PCI-4S2P-550-ECP, 4 port RS-232 + 2 parallel ports
Netmos NM9835 PCI-2S-550, 2 port RS-232

22 years agoIf downloading to a temporary file, set the timestamp on the temp file, not
des [Sat, 16 Feb 2002 14:02:57 +0000 (14:02 +0000)]
If downloading to a temporary file, set the timestamp on the temp file, not
on the file we're replacing.

PR: bin/34992
Submitted by: Shunichiro Ariura <syun1rou@blackshell.org>
MFC after: 1 week

22 years agoMFi386: revisions 1.334 and 1.335
nyan [Sat, 16 Feb 2002 13:13:22 +0000 (13:13 +0000)]
MFi386: revisions 1.334 and 1.335

22 years agoMFi386: revisions 1.495 and 1.496
nyan [Sat, 16 Feb 2002 12:59:58 +0000 (12:59 +0000)]
MFi386: revisions 1.495 and 1.496

22 years agoAdded #include <sys/systm.h>
nyan [Sat, 16 Feb 2002 12:58:16 +0000 (12:58 +0000)]
Added #include <sys/systm.h>

22 years agoAdd header to prototype exit(3). Fix a style bug.
mike [Sat, 16 Feb 2002 09:25:49 +0000 (09:25 +0000)]
Add header to prototype exit(3).  Fix a style bug.

22 years agoUn-deprecate the -p option. We now have two ways to output to stdout:
mike [Sat, 16 Feb 2002 09:18:33 +0000 (09:18 +0000)]
Un-deprecate the -p option.  We now have two ways to output to stdout:
`-o /dev/stdout' or `-p'.

Requested by: grog, nectar

22 years agoDont try to attach ATA RAID's if none found.
sos [Sat, 16 Feb 2002 08:10:24 +0000 (08:10 +0000)]
Dont try to attach ATA RAID's if none found.

22 years agoDon't leave garbage in parts of fpregs in the fxsr case. All callers
bde [Sat, 16 Feb 2002 07:07:54 +0000 (07:07 +0000)]
Don't leave garbage in parts of fpregs in the fxsr case.  All callers
(procfs and ptrace) supply kernel stack garbage, so kernel context was
leaked to userland.

Reviewed by: des

22 years agoFIxed the following style bugs:
bde [Sat, 16 Feb 2002 05:59:26 +0000 (05:59 +0000)]
FIxed the following style bugs:
- clobbering of jsp's $Id$ by FreeBSD's old $Id$.
- long lines in recent KSE changes (procfs_ctl.c).
- other style bugs in KSE changes (most related to an shadowed variable
  in procfs_status.c -- the td in the outer scope is obfuscated by
  PFS_FILL_ARGS).

Approved by: des

22 years agoFIxed the following style bugs:
bde [Sat, 16 Feb 2002 05:38:07 +0000 (05:38 +0000)]
FIxed the following style bugs:
- clobbering of jsp's $Id$ by FreeBSD's old $Id$.
- lost Berkeley id in procfs_dbregs.c
- long lines in recent KSE changes.
- various gratuitous differences between procfs_*regs.c.

22 years agoFixed missing PHOLD()/PRELE().
bde [Sat, 16 Feb 2002 04:05:32 +0000 (04:05 +0000)]
Fixed missing PHOLD()/PRELE().

Obtained from: procfs_dbregs.c
Approved by: des

22 years agoMerge from NetBSD:
joe [Sat, 16 Feb 2002 00:51:26 +0000 (00:51 +0000)]
Merge from NetBSD:

Pave the way for USB2, by replacing 'lowspeed' with 'speed', so
that it can take the values USB_SPEED_LOW, USB_SPEED_FULL or in
time USB_SPEED_HIGH.

22 years agoRe-add bmaj to the cdevsw's, but don't compile it in on -current.
joe [Fri, 15 Feb 2002 22:54:10 +0000 (22:54 +0000)]
Re-add bmaj to the cdevsw's, but don't compile it in on -current.
This makes the code more portable between -current, -stable and the
other BSDs.

22 years agoDocument that the type of st_flags is now fflags_t.
wollman [Fri, 15 Feb 2002 22:37:15 +0000 (22:37 +0000)]
Document that the type of st_flags is now fflags_t.

22 years agoResurrect one of the easiest changes from my big include files roll-up
wollman [Fri, 15 Feb 2002 22:15:39 +0000 (22:15 +0000)]
Resurrect one of the easiest changes from my big include files roll-up
patch from a year ago: give file flags their own type.  This does not
(yet) change the type used by system calls or library functions.
The underlying type was chosen to match what is returned by stat().

22 years agoFix my recent breakage of some modules.
bde [Fri, 15 Feb 2002 15:45:34 +0000 (15:45 +0000)]
Fix my recent breakage of some modules.

22 years agoAdd a delta missed in the last iommu.c commit. This unbreaks the sparc64
tmm [Fri, 15 Feb 2002 14:48:54 +0000 (14:48 +0000)]
Add a delta missed in the last iommu.c commit. This unbreaks the sparc64
kernel build.

Pointy hat to: tmm

22 years ago - Remove unneeded variable.
robert [Fri, 15 Feb 2002 13:22:09 +0000 (13:22 +0000)]
 - Remove unneeded variable.
 - Remove change for my local configuration that slipped in with
   the last commit; I am having problems booting when multiple SCSI
   disks are attached, so I will change this part as soon as I find
   a solution, anyway.

22 years agoGarbage-collect options ACPI_NO_ENABLE_ON_BOOT, AML_DEBUG, BLEED,
bde [Fri, 15 Feb 2002 13:16:11 +0000 (13:16 +0000)]
Garbage-collect options ACPI_NO_ENABLE_ON_BOOT, AML_DEBUG, BLEED,
DEVICE_SYSCTLS, KEY, LOUTB, NFS_MUIDHASHSIZ, NFS_UIDHASHSIZ, PCI_QUIET
and SIMPLELOCK_DEBUG.

22 years agoThis file is now unneeded.
robert [Fri, 15 Feb 2002 13:11:00 +0000 (13:11 +0000)]
This file is now unneeded.

22 years ago - Do not include a NetBSD header as it is not needed anymore.
robert [Fri, 15 Feb 2002 13:09:34 +0000 (13:09 +0000)]
 - Do not include a NetBSD header as it is not needed anymore.
 - Remove two constants that were needed in conjuction with the
   NetBSD disklabel header.  Use the FreeBSD equivalents.
   To boot from NetBSD/sparc64 partitions, define LABELOFFSET to
   be 128.
 - Do not use the complete open firmware path to filter out cdrom drives.
   No path containing "cdrom" is detected as a disk now.
 - Simplify some code.

22 years agoAdd the FreeBSD/sparc64 bootblock and its make file.
robert [Fri, 15 Feb 2002 12:49:20 +0000 (12:49 +0000)]
Add the FreeBSD/sparc64 bootblock and its make file.

22 years agoMoved the 127/8 check below so that IPF redirects have a chance of working.
ru [Fri, 15 Feb 2002 12:19:03 +0000 (12:19 +0000)]
Moved the 127/8 check below so that IPF redirects have a chance of working.

MFC after: 1 day

22 years agoGarbage collect options AVM_A1_PCI, AVM_A1_PCMCIA, DEBUG_LINUX, DEV_APM,
bde [Fri, 15 Feb 2002 10:19:39 +0000 (10:19 +0000)]
Garbage collect options AVM_A1_PCI, AVM_A1_PCMCIA, DEBUG_LINUX, DEV_APM,
GUS_DMA, GUS_DMA2, GUS_IRQ, OLTR_NO_BULLSEYE_MAC, OLTR_NO_HAWKEYE_MAC,
OLTR_NO_TMS_MAC and PCIC_RESUME_RESET.

22 years agonew entry for polling manpage
luigi [Fri, 15 Feb 2002 08:36:06 +0000 (08:36 +0000)]
new entry for polling manpage
(wonder why the process cannot be made automatic...)

22 years agoAdd a manpage for DEVICE_POLLING
luigi [Fri, 15 Feb 2002 08:34:33 +0000 (08:34 +0000)]
Add a manpage for DEVICE_POLLING

22 years ago#include "opt_compat.h" so that the support for old ioctls can actually
bde [Fri, 15 Feb 2002 08:28:34 +0000 (08:28 +0000)]
#include "opt_compat.h" so that the support for old ioctls can actually
be compiled.  Old tty ioctls are still used (possibly ifdef'ed) in at
least the following programs in the src tree:
  atc des ee fontedit gdb gdbserver lock ntp perl5 tcsh telnet top vttest

rp.c:
Unremoved used variables so that the support for old ioctls actually
compiles.

Not tested at runtime by: bde

22 years agoUpdate manpage to reflect reality.
luigi [Fri, 15 Feb 2002 07:47:39 +0000 (07:47 +0000)]
Update manpage to reflect reality.

22 years agoAdded undocumented options AAC_DEBUG, ACD_DEBUG, ACPI_MAX_THREADS,
bde [Fri, 15 Feb 2002 07:08:44 +0000 (07:08 +0000)]
Added undocumented options AAC_DEBUG, ACD_DEBUG, ACPI_MAX_THREADS,
ACPI_NO_SEMAPHORES, ASR_MEASURE_PERFORMANCE, AST_DEBUG, ATAPI_DEBUG,
ATA_DEBUG, BKTR_ALLOC_PAGES, BROOKTREE_ALLOC_PAGES, CAPABILITIES,
COMPAT_SUNOS, CV_DEBUG, MAXFILES, METEOR_TEST_VIDEO, NDEVFSINO,
NDEVFSOVERFLOW, NETGRAPH_BRIDGE, NETSMB, NETSMBCRYPTO, PFIL_HOOKS,
SIMOS, SMBFS, VESA_DEBUG, VGA_DEBUG.

Start using #! to comment out negative options and ## to comment out
broken options.

atapi-all.c:
Fixed rotted bits that were hiding under ATAPI_DEBUG.

atapi-cd.c:
#include "opt_ata.h" so that ACD_DEBUG is actually visible.

ata/atapi-tape.c
#include "opt_ata.h" so that AST_DEBUG is actually visible.

22 years agoLots of improvement to the bridging code.
luigi [Fri, 15 Feb 2002 05:11:11 +0000 (05:11 +0000)]
Lots of improvement to the bridging code.
In order of importance:

 + each cluster now uses private data structures (filtering and
   local address tables) so you can treat them as fully independent
   switches. This part of the work was supported by:
        Cisco Systems, Inc. - NSITE lab, RTP, NC.

 + cleaned up the handling of configuration, so the system will behave
   much better when real or pseudo devices are dynamically attached
   or detached. It should also not panic anymore on systems with large
   number of devices, closing a few existings PRs on the topic.

 + while at it, add support for VLAN. This means that a FreeBSD box
   can now work as a real VLAN switch, with trunk interfaces etc.
   As an example:
        ifconfig vlan0 vlan 3 vlandev dc0
        ifconfig vlan1 vlan 4 vlandev dc0
        net.link.ether.bridge_cfg="vlan0:3,dc1:3,vlan1:4,dc1:4"
   uses dc0 as a trunk interface, and dc1 and dc3 as ports on vlans 3 and 4
   You get the idea...
   NOTA BENE: by default bridge_cfg is initialised to "" so even if
   you enable bridging, no packets will be bridged until you set the
   list of interfaces on which you want this to happen.

 + large restructuring of the code, moving private vars and types from
   bridge.h to bridge.c.

 + added a lot of comments to the code to explain how to use it.

22 years agoRemove useless initialization to 0 of a couple of global variables.
luigi [Fri, 15 Feb 2002 04:57:18 +0000 (04:57 +0000)]
Remove useless initialization to 0 of a couple of global variables.

22 years agoDo not disable IPv6 and vlan support when RELEASE_CRUNCH is defined.
luigi [Fri, 15 Feb 2002 03:57:06 +0000 (03:57 +0000)]
Do not disable IPv6 and vlan support when RELEASE_CRUNCH is defined.
We do support already IPv6 in the RELENG_4 boot floppies, and
vlan might be desirable as well.

22 years agoFixed a typo in rev.1.65 that gave a reference to a nonexistent variable.
bde [Fri, 15 Feb 2002 03:54:01 +0000 (03:54 +0000)]
Fixed a typo in rev.1.65 that gave a reference to a nonexistent variable.
This was not detected by LINT because LINT is missing COMPAT_SUNOS.

22 years agoMake this compile after changes to kse structures.
luigi [Fri, 15 Feb 2002 02:50:07 +0000 (02:50 +0000)]
Make this compile after changes to kse structures.
This escaped because DEVICE_POLLING is disabled in LINT being
not compatible with SMP. In fact, it is only a runtime problem,
so if we could recognize that we are building a LINT kernel
we could as well disable the check for SMP being defined.

Reported-by: Joe Clarke
22 years agoDon't leave stack garbage in the reserved fields of the header.
bde [Fri, 15 Feb 2002 02:37:08 +0000 (02:37 +0000)]
Don't leave stack garbage in the reserved fields of the header.

22 years agoFixed style bugs in rev.1.5:
bde [Fri, 15 Feb 2002 02:28:50 +0000 (02:28 +0000)]
Fixed style bugs in rev.1.5:
- missing whitespace
- strange version of warn() built out of warnx() + strerror().  Just use
  warn().
- conversion of just one of the two perror()'s to warn*()

Actually use _warn() instead of _warn(), to keep up with namespace-
unpollution for warn().

22 years agoUnbogotify the comment containing the RCS Id.
des [Fri, 15 Feb 2002 00:46:32 +0000 (00:46 +0000)]
Unbogotify the comment containing the RCS Id.

22 years agoSpell #if 0 correctly
gallatin [Thu, 14 Feb 2002 22:29:03 +0000 (22:29 +0000)]
Spell #if 0 correctly

22 years agoPut a more reasonable path for "more" sources in crunch.conf,
luigi [Thu, 14 Feb 2002 19:43:40 +0000 (19:43 +0000)]
Put a more reasonable path for "more" sources in crunch.conf,
and disable telnet and friends in favour of ssh/sshd/scp.

Pull out a few NIC drivers from the config file to make the
image fit into a 1.44 image again. I have left "lnc" in as that is
emulated by vmware so this can be booted there.

22 years agoUse { } instead of ( ) for grouping shell commands so that
luigi [Thu, 14 Feb 2002 19:21:50 +0000 (19:21 +0000)]
Use { } instead of ( ) for grouping shell commands so that
variable assignments are retained ( () creates a subshell)

Reported-by: Michael Bretterklieber <mbretter@inode.at>
22 years agoRemove an unneeded include of sys/sx.h. An older pre-commit version of
jhb [Thu, 14 Feb 2002 18:18:25 +0000 (18:18 +0000)]
Remove an unneeded include of sys/sx.h.  An older pre-commit version of
the filedesc locking used an sx lock for the filedesc lock rather than a
mutex which is why the include was here.

22 years agoPrevent dup2(2) from closing internal libc_r pipe descriptors.
maxim [Thu, 14 Feb 2002 15:26:59 +0000 (15:26 +0000)]
Prevent dup2(2) from closing internal libc_r pipe descriptors.

PR: misc/28947
Reviewed by: jasone, ru
Approved by: jasone, ru
MFC after: 1 week

22 years agoCorrect a typo pthread_attr_setscope() function fails unconditionally
maxim [Thu, 14 Feb 2002 15:20:36 +0000 (15:20 +0000)]
Correct a typo pthread_attr_setscope() function fails unconditionally
due to.

PR: misc/30699
Reviewed by: jasone, ru
Approved by: jasone, ru
MFC after: 1 week

22 years agoThe previous fix for broken -DMAKE_KERBEROS5 world was incomplete.
ru [Thu, 14 Feb 2002 13:06:52 +0000 (13:06 +0000)]
The previous fix for broken -DMAKE_KERBEROS5 world was incomplete.
Finish it by adding kerberos5/lib/libvers to the build-tools list.

(I didn't notice it before because I tested my fix in a -DNOCLEAN
environment, and static libc.a was already in ${WORLDTMP}/usr/lib,
and libvers's make-print-version build tool used it for linking.)

Spotted by: John Indra <maverick@office.naver.co.id>

22 years agoFix a bug introduced in rev.1.40 which can cause systems to crash when
green [Thu, 14 Feb 2002 08:22:37 +0000 (08:22 +0000)]
Fix a bug introduced in rev.1.40 which can cause systems to crash when
detaching USB devices.  Specifically, a variable which was not meant
to be reused was, in fact, being reused.

22 years agoRegenerate.
joe [Thu, 14 Feb 2002 03:03:08 +0000 (03:03 +0000)]
Regenerate.

22 years agoSupport the HP 5400C scanner.
joe [Thu, 14 Feb 2002 02:51:12 +0000 (02:51 +0000)]
Support the HP 5400C scanner.

PR: kern/34783

22 years agoMove user_from_uid to pwd.h
imp [Thu, 14 Feb 2002 01:59:47 +0000 (01:59 +0000)]
Move user_from_uid to pwd.h
Move group_from_gid to grp.h
Remove from stdlib.h
Make the prototypes match the code
Fix rm and mv to include new files.

NetBSD has these defined in those files, and others too that I've not
done.

Approved by: terminal room kabal
Reviewed by: jhb, phk

22 years agoComplete rework of the PowerPC pmap and a number of other bits in the early
benno [Thu, 14 Feb 2002 01:39:11 +0000 (01:39 +0000)]
Complete rework of the PowerPC pmap and a number of other bits in the early
boot sequence.

The new pmap.c is based on NetBSD's newer pmap.c (for the mpc6xx processors)
which is 70% faster than the older code that the original pmap.c was based
on.  It has also been based on the framework established by jake's initial
sparc64 pmap.c.

There is no change to how far the kernel gets (it makes it to the mountroot
prompt in psim) but the new pmap code is a lot cleaner.

Obtained from: NetBSD (pmap code)

22 years agoIn createfiles(), properly handle a number of cases where no further
iedowse [Thu, 14 Feb 2002 01:30:45 +0000 (01:30 +0000)]
In createfiles(), properly handle a number of cases where no further
volumes are available, instead of getting stuck in a loop calling
getvol(). Normally restore in 'x' or 'i' modes will ask for a new
(earlier) volume when the current inode number on the tape is greater
than the last inode to be restored, since there can be no further
inodes of interest on that volume. However we don't want to change
volumes in this case either if the user explicitly said that there
are no more tapes, or if we are looking at the first volume.

When no more volumes are available but there are still inodes that
we have not found, we now just fall through to the code that prints
out a list of any missing files, so the restore completes normally.
Also simplify the logic a bit by always returning to the start of
the main for(;;) loop whenever the volume has changed.

This should completely fix the "Changing volumes on pipe input" bug
that is often observed when restoring dumps of active filesystems.

PR: bin/4176, bin/34604, misc/34675

22 years agoFixed sign extension bugs in previous commit. They didn't completely
bde [Thu, 14 Feb 2002 01:21:23 +0000 (01:21 +0000)]
Fixed sign extension bugs in previous commit.  They didn't completely
break scheduling because negative priorities were most fixed up by
converting kg_pri_user back to the correct type.

Fixed some style bugs in previous commit (non-terminated sentence fragments
and regressions in comments).

22 years agoTypo fix: Usally -> Usually.
keramida [Thu, 14 Feb 2002 01:21:07 +0000 (01:21 +0000)]
Typo fix: Usally -> Usually.

PR: docs/34918
Submitted by: Harry Newton <harry_newton@telinco.co.uk>

22 years agoRework revision 1.12, and wrap the bmaj entry with an #if doesn't
joe [Thu, 14 Feb 2002 00:35:03 +0000 (00:35 +0000)]
Rework revision 1.12, and wrap the bmaj entry with an #if doesn't
compile it in on FreeBSD-current, but does in all other cases
(-stable, NetBSD, OpenBSD, etc).

22 years agoReinstate revision 1.14. The empty uscannerioctl() was accidently
joe [Thu, 14 Feb 2002 00:32:03 +0000 (00:32 +0000)]
Reinstate revision 1.14.  The empty uscannerioctl() was accidently
re-added during a recent NetBSD merge.

22 years agoDon't confuse a struct with its first member. This fixes:
bde [Wed, 13 Feb 2002 21:38:48 +0000 (21:38 +0000)]
Don't confuse a struct with its first member.  This fixes:
./@/i386/i386/machdep.c: In function `init386':
./@/i386/i386/machdep.c:1700: warning: assignment from incompatible pointer type

22 years agoremove superflous empty line (in preparation to MFC)
fjoe [Wed, 13 Feb 2002 19:36:14 +0000 (19:36 +0000)]
remove superflous empty line (in preparation to MFC)

22 years agoSet rc=1 rather than 0 so that setting daily_show_success=YES masks
brian [Wed, 13 Feb 2002 19:10:07 +0000 (19:10 +0000)]
Set rc=1 rather than 0 so that setting daily_show_success=YES masks
the output of all goes well.

PR: 34825
Submitted by: Valentin Nechayev <netch@netch.kiev.ua>
MFC after: 3 weeks

22 years agoRe-enable WITNESS for GENERIC. Since the 5.x branch is mostly about
alfred [Wed, 13 Feb 2002 18:47:50 +0000 (18:47 +0000)]
Re-enable WITNESS for GENERIC.  Since the 5.x branch is mostly about
SMP we'd like as much feedback as possible from users about possible
locking problems as early as possible.

To negate most of the performance impact I've also enabled
WITNESS_SKIPSPIN.  I've done this as we've been running WITNESS
over the spinlock code for a while without incident and it goes a
long way to making the performance problems of WITNESS much more
bearable.

Users who should be running current should know about turning WITNESS
off for performance reasons.

That said and done, WITNESS could/should be made into a tuneable,
but we'll leave that as an excersize to those that want to disable
it without a kernel recompile.

22 years ago- Added support for receive in multiple
pdeuskar [Wed, 13 Feb 2002 18:19:27 +0000 (18:19 +0000)]
- Added support for receive in multiple
  descriptors. This simplifies code for jumbo frames.
- Cleaned up coding conventions to make code more unix-like.
- Cleaned up code in if_em_fxhw.c and if_em_phy.c.
  Added relevant comments.

MFC after: 1 week

22 years agoCorrect comment: mklocale(1) and NLS are absolutely independent
phantom [Wed, 13 Feb 2002 18:18:13 +0000 (18:18 +0000)]
Correct comment: mklocale(1) and NLS are absolutely independent

22 years agoCorrect NLSOWN and NLSGRP values.
phantom [Wed, 13 Feb 2002 18:16:34 +0000 (18:16 +0000)]
Correct NLSOWN and NLSGRP values.

22 years agoCalculate physmem before calling init_param2().
tmm [Wed, 13 Feb 2002 17:05:56 +0000 (17:05 +0000)]
Calculate physmem before calling init_param2().

Submitted by: jake

22 years agoAvoid crashing in early boot when WITNESS is enabled by moving the
tmm [Wed, 13 Feb 2002 16:36:44 +0000 (16:36 +0000)]
Avoid crashing in early boot when WITNESS is enabled by moving the
mtx_init() for intr_table_lock after the globaldata pointer
initialization.

22 years agoAdd counter.c and sbus.c. Unify style.
tmm [Wed, 13 Feb 2002 16:29:51 +0000 (16:29 +0000)]
Add counter.c and sbus.c. Unify style.

22 years agoAdd the counter-timer node to the exclusion list, as it is handled
tmm [Wed, 13 Feb 2002 16:28:40 +0000 (16:28 +0000)]
Add the counter-timer node to the exclusion list, as it is handled
specially. While being there, sort that list.

22 years agoUse stxa_sync() when accessing the LSU control register to avoid undefined
tmm [Wed, 13 Feb 2002 16:25:33 +0000 (16:25 +0000)]
Use stxa_sync() when accessing the LSU control register to avoid undefined
behaviour.

22 years agoUse stxa_sync() when accessing the diagnostic registers to invalidate
tmm [Wed, 13 Feb 2002 16:20:38 +0000 (16:20 +0000)]
Use stxa_sync() when accessing the diagnostic registers to invalidate
caches; this is needed to avoid undefined behaviour.
Clean up a bit.

22 years agoAdd support for the counter-timer which is included in the Sun U2S and
tmm [Wed, 13 Feb 2002 16:16:36 +0000 (16:16 +0000)]
Add support for the counter-timer which is included in the Sun U2S and
U2P bridges as a time counter.

22 years agoAdd support for the SBus, which is used in early Sun UltraSPARC machines.
tmm [Wed, 13 Feb 2002 16:11:36 +0000 (16:11 +0000)]
Add support for the SBus, which is used in early Sun UltraSPARC machines.
Ported from NetBSD.

22 years agoMerge r1.39 from NetBSD (manage both streaming caches for psycho pairs).
tmm [Wed, 13 Feb 2002 16:07:59 +0000 (16:07 +0000)]
Merge r1.39 from NetBSD (manage both streaming caches for psycho pairs).
Use explicit bus space accesses instead of mapping the device memory
into kva.
Fix support for psycho pairs, and catch up with iommu code changes.

22 years agoMerge r1.42 of iommu.c and r1.9 of iommuvar.h from NetBSD (this adds
tmm [Wed, 13 Feb 2002 15:59:17 +0000 (15:59 +0000)]
Merge r1.42 of iommu.c and r1.9 of iommuvar.h from NetBSD (this adds
support for managing both streaming caches on psycho pairs).
Use explicit bus space accesses instead of mapping the device memory into
kva.
Move DVMA allocation to the map creation/dma memory allocation functions.

22 years agoClean up bus space debugging support; change sparc64_bus_mem_map() to
tmm [Wed, 13 Feb 2002 15:51:57 +0000 (15:51 +0000)]
Clean up bus space debugging support; change sparc64_bus_mem_map() to
take a bus tag and handle as argument instead of a i/o space id and a
physical address, now that nexus handles device memory resource
allocations.

22 years agoDefine constants for the CPU implementation id; export the dectected id
tmm [Wed, 13 Feb 2002 15:47:12 +0000 (15:47 +0000)]
Define constants for the CPU implementation id; export the dectected id
as cpu_impl.

22 years agoDon't panic when no interrupt map can be found for a PCI bus; this seems
tmm [Wed, 13 Feb 2002 15:44:58 +0000 (15:44 +0000)]
Don't panic when no interrupt map can be found for a PCI bus; this seems
to happen on some models, like the Netra T1.

22 years agoFix typos in a comment.
tmm [Wed, 13 Feb 2002 15:43:42 +0000 (15:43 +0000)]
Fix typos in a comment.

22 years agoAdd a few new functions/macros: intr_disable() and intr_restore() to
tmm [Wed, 13 Feb 2002 15:40:05 +0000 (15:40 +0000)]
Add a few new functions/macros: intr_disable() and intr_restore() to
disable interrupts completely, and stxa_sync(), which performs a store
immediately followed by a membar #Sync with interrupts disabled (this
is needed for writes to diagnostic registers).

22 years agoMinor bug fixes (add a missing break, correct the resource ranges, remove
tmm [Wed, 13 Feb 2002 15:35:22 +0000 (15:35 +0000)]
Minor bug fixes (add a missing break, correct the resource ranges, remove
a memory leak).

22 years ago* Don't SEGFAULT on attempt to write nothing (if no source files were
phantom [Wed, 13 Feb 2002 13:00:33 +0000 (13:00 +0000)]
* Don't SEGFAULT on attempt to write nothing (if no source files were
specified)
* Don't print currline if it's NULL

MFC after: 3 days

22 years agoFix a number of long-standing restore bugs in tape.c, mainly relating
iedowse [Wed, 13 Feb 2002 12:06:58 +0000 (12:06 +0000)]
Fix a number of long-standing restore bugs in tape.c, mainly relating
to multi-volume restores:
 - In findinode(), keep a copy of header->c_type so that we don't
   exit the do-while loop until we have processed the current header.
   Exiting too early leaves curfile.ino set to 0, which confuses
   the logic in createfiles(), so multi-volume restores with the
   'x' command don't work if you follow the instructions and supply
   the tapes in reverse order.  This appears to have been broken
   by CSRG revision 5.33 tape.c (Oct 1992).
 - The logic in getvol() for deciding how many records to skip after
   the volume header was confused; sometimes it would skip too few
   records and sometimes too many, leading to "resync restore"
   warnings and missing files. Skip to the next header only when
   the current action is not `USING'. Work around a dump bug that
   sets c_count incorrectly in the volume header of the first tape.
   Some of the problems here date back to at least 1991.
 - Back out revision 1.23. This appeared to avoid warnings about
   missing files in the 'rN' verification case, but it made the
   problems with the 'x' command worse by stopping getvol() from
   even attempting to find the first inode number on the newly
   inserted tape. The bug it addressed is fixed by correcting the
   skipping logic as described above.
 - Save the value of `tpblksread' in case the wrong volume is
   supplied, because it is incremented each time we read a volume
   header. We already saved `blksread' for the same reson.