Commit Graph

4882 Commits

Author SHA1 Message Date
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Cameron Grant
7d60928719 ess maestro driver - not enabled by default
Submitted by:   Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>
2000-09-06 20:10:55 +00:00
Bill Paul
46f1212df0 Add support for D-Link DSB-650 USB ethernet adapter. 2000-09-06 19:35:01 +00:00
Bill Paul
d5b5ec1bcf Regenerate. 2000-09-06 19:28:47 +00:00
Bill Paul
349b8c9813 Add new device ID for the D-Link DSB-650 USB ethernet adapter. This is
a pegasus device, which has product ID 0xABC1. I'm not sure why they
changed it; there's already an entry for a DSB-650TX.
2000-09-06 19:28:27 +00:00
Cameron Grant
cd2c103ae0 initial support for multiple ac97 codecs 2000-09-05 21:08:01 +00:00
Cameron Grant
c02f3f7aee add detach support 2000-09-05 21:06:11 +00:00
Cameron Grant
85a6a5dce4 allow a null setdir implementation 2000-09-05 21:00:45 +00:00
Cameron Grant
c9b53085be be more verbose about failed unload attempts 2000-09-05 20:58:51 +00:00
Cameron Grant
37ab02c0ed tidy up a little, add a mask for 32bit formats 2000-09-05 20:56:31 +00:00
Warner Losh
f245fa0e59 MFNetBSD:
1.6 2000/04/12 21:07:55 scw
	Add support for the SOHOware PCMCIA Ethernet card, model ND5100-E.
	This seems to be a re-badged NDC (National Datacomms. Corp) card.
	It needs a quirk entry due to lack of manufacturer tuple in the CIS.
	For some reason, the 'Tx/Rx' LED on the connector module is inverted
	such that it is off during network activity...
2000-09-05 18:25:49 +00:00
Masahide MAEKAWA
d762e7af21 Regen. 2000-09-05 16:01:34 +00:00
Masahide MAEKAWA
a892b1899f Add product ID (Prolific ATAPI-4 Bridge Controller).
Reported by: "K.Sumitani" <sumitani@bd2.hnes.nec.co.jp>
2000-09-05 16:00:55 +00:00
Nick Hibma
361e87effa Regen. 2000-09-05 12:28:33 +00:00
Nick Hibma
b8a22e4b74 Fix typo's 2000-09-05 12:26:37 +00:00
Nick Hibma
5e1f755037 Loads of scanner Ids. 2000-09-05 12:24:05 +00:00
Sheldon Hearn
bade5944c9 Add ZTIA001 - Zoom Internal V90 Faxmodem.
PR:		21028
Submitted by:	Glenn Johnson <glennpj@charter.net>
2000-09-05 09:42:47 +00:00
Peter Wemm
f1998090a4 Regenerate 2000-09-05 01:10:33 +00:00
Peter Wemm
28ea1bf869 When dumping the 'found devices' list in verbose mode, actually show the
bus/slot/function numbers.  The old PCI code used other markers or
something, but without it here under the new pci code it is very hard to
tell which device is which (this only affects bootverbose mode).
2000-09-05 00:32:19 +00:00
Nick Hibma
329474c7de Support for RBC devices, like Sony Memory Sticks.
Not extensively tested yet, so be warned.

Submitted by:	Gerd Knops <gerti@bitart.com>
2000-09-04 15:34:14 +00:00
Nick Hibma
21ca942f09 Add the id for the Sony memory sticks. 2000-09-04 15:29:42 +00:00
Sheldon Hearn
1eb283fdc2 Add Boca K56Flex PnP modem.
PR:		21000
Submitted by:	Andrew Sparrow <spadger@best.com>
2000-09-04 13:50:37 +00:00
Gerard Roudier
aeab966bdd PR: kern/20895
PR kern/20895:
- Add FE_DAC new feature flag to distinguish between
  64 bit PCI addressing (DAC cycles) and 64 bit PCI
  interface (64 bit Memory BARs).
- Properly deal with chips that have a 32 bit PCI
  interface but support and may generate DAC.
  (Only SYM53C895A for now).

PR misc/17584 (at least partially addressed):
- Try detecting hardware combinations that trigger
  spurious PCI master parity error detections by the
  PCI chip. This work-around is implemented in the
  `snooptest' routine and consists in retrying with
  PCI master parity checking disabled if such an
  error is reported by the PCI chip during this test.

Other:
- Fix a tiny bug in WIDE negotiation that was very
  unlikely to be triggerred. The BUS width was wrongly
  compared against chip's max. offset.
2000-09-03 12:36:21 +00:00
Peter Wemm
ab1f00b960 Replace previous change by a move of a #include since something else
#includes "smbus.h".    There is still some bogus (but harmless) stuff
here surrounding the #include <sys/bus.h> includes here and elsewhere in
the bktr code.
2000-09-03 05:54:40 +00:00
Peter Wemm
e96d838a6a If we are going to test NSMBUS, we had better #include the file that
defines it.  This creates more warnings rather than less though. These
had gone undetected until now. :-(
2000-09-03 05:44:33 +00:00
Peter Wemm
8ac2d635c4 Fix warnings by moving static functions before they are used. 2000-09-03 05:32:09 +00:00
Cameron Grant
f776b5abb8 update for phk's last devfs commit 2000-09-02 23:14:46 +00:00
Poul-Henning Kamp
db90128160 Avoid the modules madness I inadvertently introduced by making the
cloning infrastructure standard in kern_conf.  Modules are now
the same with or without devfs support.

If you need to detect if devfs is present, in modules or elsewhere,
check the integer variable "devfs_present".

This happily removes an ugly hack from kern/vfs_conf.c.

This forces a rename of the eventhandler and the standard clone
helper function.

Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include
like <sys/queue.h>

Remove all #includes of opt_devfs.h they no longer matter.
2000-09-02 19:17:34 +00:00
Cameron Grant
f3dcf66158 add a missing return statement, doh. 2000-09-02 18:55:01 +00:00
Mitsuru IWASAKI
09ab664412 Add ACPI_BUS_SPACE stuff definitions in acpi_machdep.h.
Change to include this file rather than acpica_osd.h to use
only ACPI_BUS_SPACE stuff.
2000-09-02 15:06:54 +00:00
Poul-Henning Kamp
0b32abca7c Bite the bullet and provde memcmp() and memset(), this will be cheaper
than all the copy&paste versions we already have :-(
2000-09-02 13:34:52 +00:00
Nick Hibma
5bfc478e32 Don't check for ohci/uhci to be loaded, check for the usb module. 2000-09-02 10:17:58 +00:00
Bill Paul
21aff61248 Define some more bits in CSR15 needed for previous change. 2000-09-02 00:02:51 +00:00
Bill Paul
918434c883 Make the blinkylights on non-MII 21143 cards work. We need to enable
the link and activity LED control bits in CSR15 in order for the
controller to drive the LEDs correctly. This was largely done for the
ZNYX multiport cards, but should also work with the DEC DE500-BA
and other non-MII cards.
2000-09-01 23:59:54 +00:00
Mike Smith
f7c7ba14bf If a base address register has been set up by the BIOS, but the relevant
enable bit hasn't been set in the command register, set the bit and
honour the register.  It seems that quite a few lazy BIOS writers
aren't bothering to do this, which upsets the existing code and causes
us to miss out on properly-configured devices.
2000-09-01 23:09:02 +00:00
Mike Smith
0f4c21ddfc Move the 'asr' driver to cdev major 154, since 97 is already taken. 2000-09-01 21:14:17 +00:00
Mitsuru IWASAKI
6861bd8822 Change the probing order priority of acpi so that acpi is probed after
pcib instance is initialized because accesses to PCI_Config region can
occur during ACPI initialization.
Note that this is a short term solution, more consideration will be
required in order to integrate ACPI into the newbus probe sequence.
2000-09-01 20:37:07 +00:00
Cameron Grant
33dbf14a17 change mixer api slightly
change channel interface - kobj implementation coming soonish
make pcm_makelinks not panic if modular
add pcm_unregister()

these changes support newpcm kld unloading, but this is only implemented
by ds1.c
2000-09-01 20:09:24 +00:00
David E. O'Brien
1c7f976dec Cleanup after repo copy of sys/svr4 to sys/compat/svr4. 2000-09-01 08:47:14 +00:00
Mike Smith
f25c4efcd0 Add MAINTAINER tag to aid updaters in finding the responsible parties. 2000-09-01 07:53:04 +00:00
Mike Smith
ef137fd32f Add the 'asr' driver, supplied by Mark Salyzyn of Adaptec (nee DPT).
This provides support for the Adaptec SCSI RAID controller family,
as well as the DPT SmartRAID V and VI families.

The driver will be maintained by Mark and Adaptec, and any changes
should be referred to the MAINTAINER.
2000-09-01 07:51:25 +00:00
Peter Wemm
54613737b4 Remove duplicate static definition of pci_devclass 2000-08-31 21:27:51 +00:00
Mitsuru IWASAKI
bb579ecba0 Cleanup on power off code under ACPI.
- Remove DELAY() kludge before power off.
 - Move EVENTHANDLER_REGISTER to acpi_attach().
 - Pass RB_POWEROFF flag to shutdown_nice().

Reviewed by:	msmith
2000-08-31 11:15:03 +00:00
Mike Smith
3e755f76d1 Make it possible to pass boot()'s flags to shutdown_nice() so that the
kernel can instigate an orderly shutdown but still determine the form of
that shutdown.  Make it possible eg. to cleanly shutdown and power off the
system under ACPI when the power button is pressed.
2000-08-31 00:08:50 +00:00
Mike Smith
9f1776230d Major update to the AMI MegaRAID driver.
- New support for 40LD firmware found in Series 475 and 471 adapters.
 - Better support for 8LD firmware adapters
 - Ioctl passthrough interface for userland utilities.
 - Improved error handling and queueing.
 - Several bugfixes (including the 'still open' shutdown bug and
   closing some small race conditions).
 - Zone-style command allocator, reducing memory wasted under heavy
   load conditions.
 - CAM interface (disabled and not fully working) for SCSI passthrough
   access to non-disk devices

Thanks to AMI for supplying a pile of new adapters and various other
help in making this happen.
2000-08-30 07:52:50 +00:00
Warner Losh
f5c4d53efc Add comment about why the deletion of children is necessary in detach. 2000-08-30 06:56:03 +00:00
Cameron Grant
f2d00399d1 remove stuff accidentally left in last commit 2000-08-29 20:53:56 +00:00
Cameron Grant
1088e98b00 suspend/resume for ds1 driver
PR:		misc/20891
Submitted by:	Ira L. Cooper <ira@mit.edu>
2000-08-29 20:50:42 +00:00
Mitsuru IWASAKI
51b6d45826 Refine implementation of PowerResource manipulation sub-routines.
- Add new funcions for device state stuff;
   acpi_get_current_device_state() and acpi_set_device_state()
 - Add new funcions for power resource stuff;
   acpi_powerres_init(), acpi_powerres_debug(),
   acpi_get_current_powerres_state() and acpi_set_powerres_state()

These were implemented based on 7.1, 7.2, 7.2.2, 7.2.3, 7.2.4, 7.3,
7.3.3, 7.4, 7.4.1, 7.4.2, 7.4.3 and 7.5 of ACPI spec 1.0b.
2000-08-29 20:38:31 +00:00
Mitsuru IWASAKI
001bdb7c40 A lot of changes on acpi driver code.
- The "Osd*" stuff went away from acpi driver code, use the bus_space
   functions directly instead.
 - Fix minor english bugs.
   acpi_registers_input  -> acpi_register_input
   acpi_registers_output -> acpi_register_output
 - Remove all magic numbers for the sleeping states.  We now have
   #defines for these.
 - NULL is treated the same as the return from aml_get_rootname in
   aml_find_from_namespace().

Suggested by:	msmith

Thanks mike!
2000-08-29 20:30:54 +00:00
Cameron Grant
c07a337569 make the test for hwptr going backwards more picky- now it only triggers if
15/16 of the buffer is skipped or we go backwards by < 1/16 of buffer size.
2000-08-29 16:32:26 +00:00
Poul-Henning Kamp
a6b1634eb2 Give ccd a cloning function. 2000-08-29 16:29:02 +00:00
Cameron Grant
7c438dbe9c add devfs support. when devfs is enabled, sysctl hw.sndunit is used to set
which sound unit the /dev/{dsp,mixer,dspW,audio} links point at.  this can
also be set from the loader.
2000-08-29 16:21:33 +00:00
Cameron Grant
dacda62ff2 add driver for forte-media fm801
PR:             conf/20698
Submitted by:   dimmy the wild <diwil@dataart.com>
2000-08-29 16:12:28 +00:00
Poul-Henning Kamp
e2ea84222c Many and sundry changes. Still alpha quality. 2000-08-29 12:32:01 +00:00
Doug Rabson
21c3015a24 * Completely rewrite the alpha busspace to hide the implementation from
the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.
2000-08-28 21:48:13 +00:00
Doug Rabson
e6171135a7 Fix disordered arguments to bus_space_barrier(). 2000-08-28 21:02:18 +00:00
Warner Losh
5f2686b793 Define a pcic module version 2000-08-28 04:53:36 +00:00
Coleman Kane
a436a79744 Removed detection for Voodoo Banshee and Voodoo3 cards. I forsee certain
possible complications with the forthcoming DRI code, and feel that DRI
should handle the device-level interaction. Read
http://people.FreeBSD.org/~cokane/3dfx.html
to find out more. Basically want to move toward using OpenGL and DRI for
everything on these cards. Added a few defines and spacing style fixes in
tdfx_vars.h
2000-08-28 04:28:53 +00:00
Matt Jacob
84267b9edd remove clause 3 licence 2000-08-27 23:39:23 +00:00
Matt Jacob
b6b6ad2f23 various fixes 2000-08-27 23:38:44 +00:00
Poul-Henning Kamp
62ddc84e08 Call destroy_dev() when sio devices go away. 2000-08-27 14:46:13 +00:00
Kazutaka YOKOTA
201e598bbc Fix ioctl MOUSE_SETMODE as defined in mouse(4).
(Do not return EINVAL when -1 is specified as a new value,
as it should mean "preserve the current value.")
2000-08-27 12:36:28 +00:00
Peter Wemm
cffd8a1d93 Allow the DPT pci attachment to share IRQ's
Submitted by:	Jonathan Chen <jon@spock.org>
2000-08-26 22:19:53 +00:00
Masahide MAEKAWA
d40690a5c9 Regen. 2000-08-26 05:08:11 +00:00
Masahide MAEKAWA
6ba1312ec3 Add vendor IBM product USB CD-ROM Drive 2000-08-26 05:06:40 +00:00
Warner Losh
925c6cf689 Minor tweaks to have the card be properly enabled via the CCR.
Minor debug changes
Minor power management pessimizations
2000-08-26 00:07:40 +00:00
Mitsuru IWASAKI
d7c0bff411 Move acpi_softc into acpi.h to be shared from additional files.
Add PowerResource manipulation code; acpi_powerres.c.  (more files to
be created something like acpi_battery, acpi_thermal.c...)
2000-08-25 19:04:16 +00:00
Roger Hardiman
dae49011e7 Fix newbus resource allocations
PR:		kern/18744
Submitted by:	Alexander Langer <alex@cichlids.com>
2000-08-24 14:17:06 +00:00
Takanori Watanabe
681cfb39e1 Add orthogonal part of ACPI support code.
This does not come effect until non-orthogonal part is commited.

Approved by: jkh
Obtained from:	ACPI for FreeBSD CVS repository.
2000-08-24 09:33:30 +00:00
Kazutaka YOKOTA
01819900ae Add spltty()/splx() in the watchdog timer routine. 2000-08-24 08:49:44 +00:00
Warner Losh
90cb220e62 Sync to pccarddevs 1.5 2000-08-24 07:01:49 +00:00
Warner Losh
979ca3b327 o Fix unterminated comment
o Sync to NetBSD (rev NetBSD-user edited-log):
	1.97 onoe add Samsung MagicLAN SWL-2000N
	1.96 gmcgarry Add entries for all Xircom ethernet models.
	1.95 onoe Add Farallon SkyLINE 11mb card as Intersil Prism2 [...]
	1.94 joda add 3Com 3CRWE737A (AirConnect)
	1.93 soren Include vendor name for IBM products.
	1.92 onoe Add Farallon SkyLINE Wireless LAN Card for awi(4) [...]
	1.91 soren Add Olicom GoCard.
	1.90 gmcgarry Clean up XIRCOM entries
	- Add entry for Xircom CreditCard Ethernet + Modem 28
	- Add entry for Intel EtherExpress PRO/100
	- Add entry for Compaq Netelligent 10/100 Ethernet
	1.89 is RATOC REX-R280 (another if_mbe_pcmcia card) support by [...]
	1.88 joda Panasonic KXLC003
	1.87 scw [...] SOHOware PCMCIA Ethernet card, model ND5100-E [...]
	1.86 itojun add CIS for Corega Wireless LAN PCC-11 [...]
o Minor diffs between the two files corrected to aid future sync.
2000-08-24 07:01:12 +00:00
Mike Smith
e07acca5f0 This is the initial import of a new driver for the current family of
PCI:SCSI RAID controllers from Mylex.
2000-08-23 03:22:41 +00:00
Marcel Moolenaar
322bfdc330 Update include directives for Linuxulator headers after the
MD/MI split.
2000-08-22 05:57:55 +00:00
Warner Losh
bd6dd21e8d Save a pointer to the dev, if any, that each function attach.
Remove some bogus printfs.
2000-08-22 04:25:57 +00:00
Seigo Tanimura
2e2ed5f6e2 Fix a bug upon initialization. (_INDX_ADDR -> _INDX_DATA) 2000-08-21 13:18:56 +00:00
Nick Hibma
50b37103a2 Fix up the command in the destination buffer, not the source.
This makes the conversion from Test-Unit-Ready to Start-Stop-Unit in the case
of SCSI (Iomega Zip drive) actually work.
2000-08-21 09:39:07 +00:00
Cameron Grant
513693be6c rework feeder sytem to allow feeders in klds
modify driver capability reporting format to list every audio format
seperately- required for above and because we could not previously indicate
that mono was unsupported.

there should be no functional impact.
2000-08-20 22:18:56 +00:00
Poul-Henning Kamp
3f54a085a6 Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)
Remove old DEVFS support fields from dev_t.

  Make uid, gid & mode members of dev_t and set them in make_dev().

  Use correct uid, gid & mode in make_dev in disk minilayer.

  Add support for registering alias names for a dev_t using the
  new function make_dev_alias().  These will show up as symlinks
  in DEVFS.

  Use makedev() rather than make_dev() for MFSs magic devices to prevent
  DEVFS from noticing this abuse.

  Add a field for DEVFS inode number in dev_t.

  Add new DEVFS in fs/devfs.

  Add devfs cloning to:
        disk minilayer (ie: ad(4), sd(4), cd(4) etc etc)
        md(4), tun(4), bpf(4), fd(4)

  If DEVFS add -d flag to /sbin/inits args to make it mount devfs.

  Add commented out DEVFS to GENERIC
2000-08-20 21:34:39 +00:00
Nick Hibma
59e8700a14 Unbreak LINT. 2000-08-20 15:30:15 +00:00
Warner Losh
c8ce264e17 o Move to using PCCARD_SOFTC(dev)
o fill in the size of the actual softc, rather than 1 in data structure
o minor debugging improvements.
2000-08-19 19:22:04 +00:00
Warner Losh
943e2bf6f6 o move to using PCIC_SOFTC(dev) to get the softc
o move pcic_deactivate into pcic_detach
o Better debug messages
2000-08-19 19:20:25 +00:00
Cameron Grant
fa06efc7e6 fix SNDCTL_DSP_GETODELAY
PR:		kern/20340
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
2000-08-19 18:29:46 +00:00
Cameron Grant
4e77c04865 don't complain about bad irqs if using a shared irq 2000-08-19 18:22:20 +00:00
Cameron Grant
becc0678b7 Recognize ESS 1888 in Dell Latitude XPi
PR:		kern/18714
Submitted by:	Sean O'Connell <sean@stat.Duke.EDU>
2000-08-19 18:17:15 +00:00
David Malone
a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
Warner Losh
546eb2b18e Call bus_generic_detach on pcic before deleting the children. This
has the side effect of detaching the children before I delete them.
When I put the last commits in a loop for loop it died after 5 or so
iterations.  After this change, I lasted 50 before I stopped the test.
2000-08-19 05:01:07 +00:00
Warner Losh
2a30553ef2 Remove pcic_isa_identify. I don't think it is needed.
Add pcic_detach which removes all of the pcic's children.

This lets me load/unload pcic multiple times w/o having multiple
instances of each slot attached to pcic.
2000-08-19 04:47:09 +00:00
Yoshihiro Takahashi
82583dd564 - Fixed the conversion to bus_space interface.
- Added PC-98 Cbus devices support.
  The original patch is submitted by chi@bd.mbn.or.jp (Chiharu Shibata)
- Removed old ed driver.
2000-08-17 12:15:45 +00:00
Warner Losh
928db2a912 Add support for loading this as a module (before there were some
problems).  Also pick an irq if one isn't specified.  Ditto for
memory.

Add additional printfs in the error paths.  These will disappear in time.

There are still some panics, but this is a good checkpoint.
2000-08-17 05:52:18 +00:00
Søren Schmidt
b0bb0aeb95 Rearrange the probe a bit, hopefully this will help to eleminate
some of the fake devices sometimes seen on single device ATA
channels.

Proberly fail on failures in ata-disk.c, retry instead of hang.

Cleanup the VIA probe/init code a bit.

Fix a couble of missing free's in atapi-cd.c in the changer code.
2000-08-16 07:09:04 +00:00
Greg Lehey
7a598eabdd open_drive:
Add support for AMD RAID controllers as "disks".

Requested-by:  Marius Bendiksen <mbendiks@eunet.no>

  Remove potential panic when attempting to open non-existent drivers.

init_drive: Return error codes correctly.  Previously it would
            occasionally return 0.  The error was redetected
            elsewhere, but this was causing a number of confusing
            error messages.
2000-08-16 04:31:37 +00:00
Peter Wemm
d7db4e569d Add another USR modem.
PR: 20621
Submitted by: Masanori Taira <mtaira@logicaleffect.com>
2000-08-15 21:03:28 +00:00
Atsushi Onoe
e05d1af60e awictl configuration interface is never used and now it is replaced by
wicontrol(8).
2000-08-14 14:10:10 +00:00
Atsushi Onoe
3b65d03e0a Add support for WEP functionality.
Add support for wi(4) compatible configuration interface.  It enables
wicontrol(8) to configure some 802.11 specific parameters.
Some minor fixes from NetBSD.
Obtained from:  NetBSD current
2000-08-14 13:42:38 +00:00
Atsushi Onoe
149348ccc3 This file contains a shim just for NetBSD, and not used in FreeBSD at all. 2000-08-14 05:44:35 +00:00
Seigo Tanimura
8f4fec9c36 Newbusify ed driver.
Partly submitted by:	alex
2000-08-14 04:31:07 +00:00
Nick Sayer
6ba60b3c4a This patch appears to solve the problems with recording resulting
in bogus hwptr warnings. Further comments sought on -hackers
were not forthcoming. I can only hope that calling DELAY() like
this doesn't cause any heartburn.
2000-08-13 19:20:02 +00:00
Nick Hibma
74bd1c1038 CAM, the module: scbus, da, cd, and st wrapped in one module.
Make the umass driver depend on this module.

Makes it possible to compile the kernel without SCSI support and load it
when for example a USB floppy is conencted.
2000-08-13 18:49:40 +00:00
Nick Hibma
028d28adb8 From NetBSD:
Make it possible to move a device to its unconfigured state by
using config #0.

Add some comments.

Change error reporting in port reset function.

usbd_devinfo_vp(): search the know devs array also if the device doesn't
return product description (e.g. Kye's Genius NetScroll mouse returns
vendor, but not product); the strings returned by device are still
preferred to those in the array, though
2000-08-13 18:39:24 +00:00
Nick Hibma
3f0148fee0 Add more CDC defines. 2000-08-13 18:23:07 +00:00
Nick Hibma
048f89016c Fake the Power On command on the virtual hub.
This removes the two IOERROR's on startup a many has been seeing on UHCI
controllers.

Taken from NetBSD.
2000-08-13 18:21:18 +00:00
Søren Schmidt
710591b796 Fix off by one error in track# calculation. 2000-08-13 09:08:19 +00:00
Bill Paul
069363018f Fix a bug brought to light by the people working on SMPng. I don't quite
understand exactly what it is about SMPng that tickles this bug. What I
do know is that the foo_init() routine in most drivers is often called
twice when an interface is brought up. One time is due to the ifconfig(8)
command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another
is probably due to the kernel calling ifp->if_init at some point. In any
case, the SMPng changes seem to affect the timing of these two events in
such a way that there is a significant delay before any packets are sent
onto the wire after the interface is first brought up. This manifested
itself locally as an SMPng test machine which failed to obtain an address
via DHCP when booting up.

It looks like the second call to fxp_init() is happening faster now than
it did before, and I think it catches the chip while it's in the process
of dealing with the configuration command from the first call. Whatever
the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after
the second fxp_init() call. (This interrupt is apparently never generated
by a non-SMPng kernel, so nobody noticed.)

There are two problems with this: first, fxp_intr() does not handle the
FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything
to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not
documented in the driver. (Apparently it means "command unit not active.")
Bad coder. No biscuit.

The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the
FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for
the configuration/RX filter programming stuff from getting wedged for
several seconds and preventing packet transmission.

Noticed by: jhb
2000-08-11 17:47:55 +00:00
Nick Hibma
cad823f463 Fix indentation ruined by previous commit. 2000-08-11 16:37:43 +00:00
Warner Losh
2c6b3ec454 Define get_memory_offset method 2000-08-11 15:51:51 +00:00
Søren Schmidt
ae97e232fb Backout the tsleep on probe, it breaks in resume mode as tsleep
not always has a context to sleep on.
Back to the drawing board...
2000-08-11 10:34:22 +00:00
Søren Schmidt
071e6e581e Add support for accessing individual tracks on a CD.
This is done by misusing the device minor a bit to encode the
track no there.

So to read track #4 just use /dev/acdNt4 where N is the device #.

The driver no automatically sets the blocksize (sectorsize) to
what the track is set to in the TOC.

This has the nice effect that you can now rip audioi tracks
by simply doing:

dd if=/dev/acdNt2 of=audiotrack2.raw bs=2352

it cant be much simpler than that :)

NOTE: the original acdNa & acdNc device still work as usual,
except the blocksize is set according to track0.
2000-08-11 09:21:36 +00:00
Søren Schmidt
4466a3504d Fix the ICH2 ATA100 support, and proberly downgrade the chip setup when
going to slower DMA modes on all Intel chips.
2000-08-10 07:34:49 +00:00
Nick Sayer
fc35953a16 Missed a step when activating the solo driver. 2000-08-09 20:28:19 +00:00
Cameron Grant
4873b46dc7 change irq handling slightly
add another non-ac97 256av
2000-08-09 18:51:27 +00:00
Cameron Grant
071280d442 MFS: module macro changes 2000-08-09 18:46:48 +00:00
Nick Hibma
b40a42fbe8 Finally got my brain around what a SIM UNIT number is and how it differs
from the SCSI id it has. (this avoids the confusing umass-sim32 device. It
should have been umass-sim0 all along (there is only one), and if it is
spoken to as a SCSI device the sim should be umass32.

Make the rescan actually work. We need to fill in a target and lun wildcard
and not the SCSI id of the SIM.

Add a seatbelt.
2000-08-09 17:41:11 +00:00
Nick Hibma
02211bae3b Avoid a '"fd" is usurping ...' message.
PR:		20348
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-08-09 12:45:04 +00:00
Nick Sayer
0edeb3dc90 A couple of cosmetic fixes, plus a biggie: When checking the DMA
position, channel 1's dma position register must be quiescent. So
the driver will spl, pause the DMA, delay a bit and hold as still as
possible while snapping the picture.

I'm sure there HAS to be a better way to do this, but if there is, it's
not documented.

So far as I can tell, this fixes recording, which means the Solo is open
for business.
2000-08-09 07:14:56 +00:00
Cameron Grant
1874ec255c MFS: sync with peter's isadma fixup 2000-08-09 01:22:09 +00:00
Cameron Grant
ba90ebe703 activate via82c686 audio driver 2000-08-09 01:08:59 +00:00
Cameron Grant
fb9f118e6f new driver: via 82c686 chipset audio
not personally tested, but i'm assured it works

Submitted by:	David Jones <dej@ox.org>
PR:		kern/20161
2000-08-09 00:55:55 +00:00
Cameron Grant
5fd7b0878e warn if hwptr goes backwards 2000-08-09 00:42:00 +00:00
Peter Wemm
3dd0dbfeb9 MF4: fix style(9) whitespace breakage. 2000-08-08 23:53:11 +00:00
Søren Schmidt
bfc0a42650 Fix braino in the tsleep call, ata_delayed_attach might be a NULL
pointer..
2000-08-08 14:57:36 +00:00
Peter Wemm
d27e361b58 Fix some warnings. Here are more part-time volatiles - ie: data that
lives in memory and is sometimes busmastered to/from the controller.
I believe these are all ok.
2000-08-07 18:44:05 +00:00
Bill Paul
bf64541762 Close PR 20438. Make fix for preserving LED settings conditional on
presence Intel 21143 chip.
2000-08-07 17:03:20 +00:00
Nick Hibma
9bd863570a Save and restore the registers SOF and FRAMENUMBER on suspend. In some
cases the registers are not correctly set on resume.

This solves the problem of USB failing after resuming a machine.

Submitted by:	mike+fbsd@medianstrip.net
PR:		18261
2000-08-07 00:04:53 +00:00
Nick Hibma
2a46959d8e Regen. 2000-08-06 23:27:36 +00:00
Nick Hibma
6ba97967be New ids
Submitted by:	Scott Long
PR:		18897
2000-08-06 23:26:58 +00:00
Nick Hibma
85dff41567 Some new ids, from NetBSD 2000-08-06 23:22:13 +00:00
Søren Schmidt
ab418d7db3 Add experimental code for ATA100 support on:
Promise Ultra100 / Fasttrak100
HighPoint HPT370 controllers (fx Abit KA7-100 onboard ctrl, Abit HotRod 100)
Intel ICH2 (Intel 815E based motherboards)

So far I can read >90MB/s on the Promise and the HPT370.
I can write >64MB/s on the promise and >50MB/s on the HPT370 so it seems
writing is still done in ATA66 mode :(
The ICH2 support is untested as of yet...
2000-08-06 19:51:58 +00:00
Søren Schmidt
19095fd23c Use tsleep instead od DELAY in probe when not in boot.
This fixes the uptil 30s hangs on PCCARD ata device probes.
2000-08-06 19:10:05 +00:00
Cameron Grant
6c1146c0b8 fix the staticy sound issue
use timer instead of per-channel interrupts

do playback like the linux driver - may fix nmi-with-ecc issue
2000-08-06 18:10:05 +00:00
Søren Schmidt
0ec4d7b5b0 Remove sequence checking in the burner support.
This was really a leftover from the wormcontrol days, it is no longer
needed when using burncd.
2000-08-06 18:03:42 +00:00
Søren Schmidt
e7d1a5c2b1 Be a bit more restrictive in using multisector transfers. 2000-08-06 18:01:47 +00:00
Nick Hibma
adeb72abfb Finally make the module dependencies work. kern_linker.c now allows
modules to depend on modules in the same file (uhub depends on usb) or
even on themselves (usb on usb, makes the define in usb_port.h a lot
less convoluted).

Use ANSI prototypes.
2000-08-04 19:05:49 +00:00
Bill Paul
8ebe5155fa *smack* #if 0, not #ifdef 0. 2000-08-04 18:17:45 +00:00
Bill Paul
624539bb38 The check_extport() function appears to have some new code in it that checks
the scratch RAM for data normally found in the SEEPROM (presumably in the
event that the SEEPROM is unavailable or can't be read). This code causes
a spontaneous reboot on monster.osd.bsdi.com, which has an embedded aic7880
controller. The problem appears to happen either when it writes to the
SCBPTR port and then reads from the SCB_CONTROL port. Somewhere during
the inb/outb operations, the system has a heart attack and restarts.

This code looks very suspicious, particularly since it has unconditionalized
debug mesages such as "Got here!" and "And it even worked!". With this
block #ifdef'ed out, the machine boots and runs properly. I stronly suggest
that it stay #ifdef'ed out until it's properly tested.
2000-08-04 18:09:56 +00:00
Mike Smith
786cd128a8 Add support for 2.x/3.x firmware adapters which are too old to have a
memory-mapped register window.  This closes the last known issue with
2.x vintage adapters.
2000-08-04 06:52:00 +00:00
Matt Jacob
3ea883b46d Add a comment as to where stdarg.h applies. 2000-08-03 03:05:50 +00:00
John Baldwin
7d615c1d8b Use <machine/stdarg.h> instead of <stdarg.h> so that this will compile.
While I'm at it, move the #include line up to the top of the file.
2000-08-03 02:47:06 +00:00
Nick Sayer
05a1fdb459 Simplex devices will always report EBUSY on 2nd (and subsequent)
opens if the reference count is not decremented on close.

Note that this may result in the reference count being corrupted
on full duplex devices (due to mismatching opens/closes), but the
code doesn't use the reference count for anything on full duplex
devices.
2000-08-02 22:47:44 +00:00
Nick Sayer
3ac1ca3363 1. Increase the size of the DMA buffer.
2. Offer half duplex with both playback and record on channel 1 or
full duplex with playback always on channel 2 as a compile-time option.

3. 16 bit record output is byte swapped for some dumb reason. Report the _BE
AFMTs for recording.
2000-08-02 22:45:57 +00:00
Nick Sayer
a7e1150660 Undo some of my own damage. With this patch, it appears that both
recording and playback now work correctly.
2000-08-02 19:37:43 +00:00
Bill Paul
6f069b494a Add support for the Netgear GA620T copper gigabit card. 2000-08-02 18:49:17 +00:00
Bill Paul
abe1d92e0a Add call to bus_generic_attach() at the end of sk_attach(). It turns out that
if you kldload this driver, all the subordinate devices are probed/attached
as expected. But this is not the case when the driver is statically compiled
into the kernel. Since I do most of my testing with modules, I failed to
notice this. I'm not sure if it's intended behavior or not. I think it may
be, but it seems a little counter-intuitive.
2000-08-02 18:19:00 +00:00
Bill Paul
c400cb27d2 Grrrr. Add definition for DC_WDOG_CTLWREN. I made this change yesterday
but stupidly only commited to if_dc.c.
2000-08-02 16:31:11 +00:00
Nick Sayer
bb7f26c3d9 Fix channel 1 playback the rest of the way. There are a couple of
hiccups, but playback now proceeds mostly normally using both channel 1
and 2.
2000-08-02 15:09:39 +00:00
Nick Sayer
19a0702e86 Get playback on channel 1 closer to working. 8 bit samples work.
16 bit samples have some sort of choppiness, the nature of which
is not completely clear, but it clearly has something to do with
dma buffer synchronization. But at least channel 1 makes noise now.
2000-08-02 08:01:00 +00:00
Nick Sayer
8eb3acc9be Fix channel 1, sort of. recording now generates IRQs and the output
appears to be the correct length, but quality of output has not yet
been tested. Also, full duplex audio (that is, playback on channel 1)
does not yet work. Two constants and I am there!

Obtained from:	major hints from ALSA
2000-08-02 06:36:55 +00:00
Nick Hibma
6939e9446e Sync with NetBSD:
K&R style function headers -> ANSI.
2000-08-01 22:40:23 +00:00
Bill Paul
8273d5f8b1 Apply patch supplied by John Hood <jhood@sitaranetworks.com> to fix problems
with LEDs on some cards being stomped on when clearing the "jabber disable"
bit. Using DC_SETBIT() has an unwanted side effect of setting a write enable
bit in the watchdog timer register which we really want to be cleared when
we do a write.
2000-08-01 19:34:13 +00:00
Matt Jacob
c7d5594134 Add in macros && masks so that mailbox command errors can be
selectively printed/supressed in isp_mboxcmd.
2000-08-01 06:55:08 +00:00
Matt Jacob
d0d5832ac7 Major whacking for core version 2.0. A major motivator for 2.0 and these
changes is that there's now a Solaris port of this driver, so some things
in the core version had to change (not much, but some).

In order, from the top.....:

A lot of error strings are gathered in one place at the head of the file.
This caused me to rewrite them to look consistent (with respect to
things like 'Port 0x%' and 'Target %d' and 'Loop ID 0x%x'.

The major mailbox function, isp_mboxcmd, now takes a third argument,
which is a mask that selectively says whether mailbox command failures
will be logged. This will substantially reduce a lot of spurious noise
from the driver.

At the first run through isp_reset we used to try and get the current
running firmware's revision by issuing a mailbox command. This would
invariably fail on alpha's with anything but a Qlogic 1040 since SRM
doesn't *start* the f/w on these cards. Instead, we now see whether we're
sitting ROM state before trying to get a running BIOS loaded f/w version.

All CFGPRINTF/PRINTF/IDPRINTF macros have been replaced with calls to
isp_prt. There are seperate print levels that can be independently
set (see ispvar.h), which include debugging, etc.

All SYS_DELAY macros are now USEC_DELAY macros. RQUEST_QUEUE_LEN and
RESULT_QUEUE_LEN now take ispsoftc as a parameter- the Fibre Channel
cards and the Ultra2/Ultra3 cards can have 16 bit request queue entry
indices, so we can make a 1024 entry index for them instead of the
256 entries we've had until now.

A major change it to fix isp_fclink_test to actually only wait the
delay of time specified in the microsecond argument being passed.
The problem has always been that a call to isp_mboxcmd to get he
current firmware state takes an unknown (sometimes long) amount of
time- this is if the firmware is busy doing PLOGIs while we ask
it what's up. So, up until now, the usdelay argument has been
a joke. The net effect has been that if you boot without being plugged
into a good loop or into a switch, you hang. Massively annonying, and
hard to fix because the actual time delta was impossible to know
from just guessing. Now, using the new GET_NANOTIME macros, a precise
and measured amount of USEC_DELAY calls are done so that only the
specified usecdelay is allowed to pass. This means that if the initial
startup of the firmware if followed by a call from isp_freebsd.c:isp_attach
to isp_control(isp, ISP_FCLINK_TEST, &tdelay) where tdelay is 2 * 1000000,
no more than two seconds will actually elapse before we leave concluding
that the cable is unhooked. Jeez. About time....

Change the ispscsicmd entry point to isp_start, and the XS_CMD_DONE
macro to a call to the platform supplied isp_done (sane naming).

Limit our size of request queue completions we'll look at at interrupt
time. Since we've increased the size of the Request Queue (and the
size of the Response Queue proportionally), let's not create an
interrupt stack overflow by having to keep a max completion list
(forw links are not an option because this is common code with
some platforms that don't have link space in their XS_T structures).
A limit of 32 is not unreasonable- I doubt there'd be even this many
request queue completions at a time- remember, most boards now use
fast posting for normal command completion instead of filling out
response queue entries.

In the isp_mboxcmd cleanup, also create an array of command
names so that "ABOUT FIRMWARE" can be printed instead of "CMD #8".

Remove the isp_lostcmd function- it's been deprecated for a while.
Remove isp_dumpregs- the ISP_DUMPREGS goes to the specific bus
register dump fucntion.

Various other cleanups.
2000-08-01 06:51:05 +00:00
Matt Jacob
b09b009594 Core version 2.0 rewrite. In this file we replace isp_tdebug with
isp_prt calls. We now use an argument to the  ISPCTL_FCLINK_TEST
call. We change all IDPRINTF macros to isp_prt calls. We add
the isp_prt function here.
2000-08-01 06:31:44 +00:00
Matt Jacob
18ccaecd45 Core version 2.0 cleanup/rewrite. Things get rearranged and changed
quite a bit so that all of the ports have a similar set of required
macros/definitions (and in similar places in the isp_<platform>.h
file).

Some new macros/functions added- Mailbox Acquire/Relase macros,
NANOTIME macros, SNPRINTf and STRNCAT. MemoryBarrier beomes
MEMORYBARRIER with much stronger types.
2000-08-01 06:29:55 +00:00
Matt Jacob
16dd34376c Remove isp_prtstst (now in case statement in isp.c). Remove
isp2100_fw_statename as an INLINE (now a function in isp.c). Remove
isp2100_pdb_statename (unused). Redo all ISP_SCSI_XFER_T as XS_T types.
Change all RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN macros to take a parameter.
Add isp_print_bytes function.
2000-08-01 06:26:04 +00:00
Matt Jacob
10549c059a Remove isp_tdebug. Change all PRINTF macros to the now common
isp_prt logging function.
2000-08-01 06:24:01 +00:00
Matt Jacob
69fbe07a2e Fix typo. Remove isp_tdebug (we'll use ISP_LOGTDEBUG2 in isp->isp_dblev
as a selector now). Change DFLT_CMD_CNT to a fixed amount for now.
2000-08-01 06:23:24 +00:00
Matt Jacob
a6db0ba6d3 Add in lengths of SBus or PCI registers. 2000-08-01 06:21:21 +00:00
Matt Jacob
53cff3bb65 Rewrite for version 2.0. Some structural changes, but also
a substantial amount of commenting about what each platform
specific definitions are supposed to be.
2000-08-01 06:10:21 +00:00
Matt Jacob
d02373f1a0 Part of major rewrite for core version 2.0- clarification of
mdvec structure, removal of printf/CFGPRINTF in place of isp_prt
calls. Parameterization of RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN.
2000-08-01 05:16:49 +00:00
Coleman Kane
9a63bf73d2 Bring tdfx_pci.c in sync with some patches I have been testing. Adds better
stability for the Voodoo3/Banshee cards than there was before. Still has a
little way to go before it is completely fixed for those cards though.
2000-08-01 05:10:29 +00:00
Nick Sayer
80a8e065eb Reverse the sense of the signed/unsigned formatting bit.
This dramatically cleans up playback quality, at least with mxaudio.
2000-08-01 04:18:15 +00:00
Cameron Grant
fd1aaeccce almost-there ess solo-1 driver, committed so people can tell me why it
doesn't generate irqs.
2000-07-31 16:17:40 +00:00
Cameron Grant
5151584d21 add suspend/resume for yamaha chips
Submitted by:	Ira L Cooper <ira@MIT.EDU>
2000-07-30 21:15:35 +00:00
Cameron Grant
1c60ef3f3c fix a potential local DoS attack 2000-07-30 19:38:26 +00:00
Cameron Grant
e04387c95a fix a bug where opening /dev/dsp twice resulted in it being busy until reboot 2000-07-30 19:36:13 +00:00
Steve Price
bf11d3dcda Spell the word 'limited' with only one 't'. 2000-07-30 17:54:34 +00:00
Cameron Grant
3c1b957d66 do the ac97 init delay for all chips and increase it to 500ms 2000-07-30 02:33:37 +00:00
Peter Wemm
d244b0e95b "Fix" cast qualifier warnings using the uintptr_t intermediate trick. 2000-07-28 23:30:30 +00:00
Peter Wemm
58c9d62373 Fix a warning re: a potentially unused pccard helper function 2000-07-28 23:00:00 +00:00
Kazutaka YOKOTA
fc581b6bf6 Fix GENERIC_MOUSE_ENTRY.
Submitted by: Graham Wheeler <gram@cequrux.com> and gibbs
2000-07-28 03:48:46 +00:00
Justin T. Gibbs
957790c3e6 ahc_pci.c:
Disable "cache line streaming" for aic7890/91 Rev A chips.  I
	have never seen these chips fail using this feature, but
	some of Adaptec's regression tests have.

	Explicitly set "cache line streaming" to on for aic7896/97
	chips.  This was happening before, but this documents the
	fact that these chips will not function correctly without
	CACHETHEEN set.

aic7xxx.h:
	Add new bug types.

	Fix a typo in a comment.

aic7xxx.reg:
	Add a definition for the SHVALID bit in SSTAT3 for Ultra2/3
	chips.  This bit inicates whether the bottom most (current)
	element in the S/G fifo has exhausted its data count.

aic7xxx.seq:
	Be more careful in how we turn off the secondary DMA channel.
	Being less careful may hang the PCI bus arbitor that negotiates
	between the two DMA engines.

	Remove an unecessary and incorrect flag set operation in
	the overrun case.

	On Ultra2/3 controllers, clear the dma FIFO before starting
	to handle an overrun.  We don't want any residual bytes from
	the beginning of the overrun to cause the code that shuts
	down the DMA engine from hanging because the FIFO is not
	(and never will be) empty.

	If the data fifo is empty by the time we notice that a
	read transaction has completed, there is no need to
	hit the flush bit on aic7890/91 hardware that will not
	perform an auto-flush.  Skip some cycles by short circuiting
	the manual flush code in this case.

	When transitioning out of data phase, make sure that we
	have the next S/G element loaded for the following
	reconnect if there is more work to do.  The code
	would do this in most cases before, but there was
	a small window where the current S/G element could
	be exhausted before our fetch of the next S/G element
	completed.  Since the S/G fetch is already initiated
	at this point, it makes sense to just wait for the
	segment to arrive instead of incuring even more latency
	by canceling the fetch and initiating it later.

	Fast path the end of data phase handling for the last
	S/G segment.   In the general case, we might have
	worked ahead a bit by stuffing the S/G FIFO with
	additional segments.  If we stop before using them
	all, we need to fixup our location in the S/G stream.
	Since we can't work past the last S/G segment, no
	fixups are ever required if we stop somewhere in
	that final segment.

	Fix a little buglet in the target mode dma bug handler.
	We were employing the workaround in all cases instead
	of only for the chips that require it.

	Fix the cause of SCB timeouts and possible "lost data"
	during read operations on the aic7890.  When sending
	a data on any Ultra2/3 controller, the final segment
	must be marked as such so the FIFO will be flushed and
	cleaned up correctly when the transfer is ended.  We
	failed to do this for the CDB transfer and so, if
	the target immediately transfered from command to data
	phase without an intervening disconnection, the first
	segment transferred would be any residual bytes from
	the cdb transfer.  The Ultra160 controllers for some
	reason were not affected by this problem.

Many Thanks to Tor Egge for bringing the aic7890 problem
to my attention, providing analysis, as well as a mechanism
to reproduce the problem.
2000-07-27 23:17:52 +00:00
Jonathan Lemon
1277c3bac4 The DEC version of the Smart controller has its configuration information
stored at a different location in the PCI space, so adjust accordingly.

Also, when using more than two smart controllers in one machine, the
disks were assigned the wrong drive number; fix this as well.
2000-07-27 22:24:44 +00:00
Bill Paul
51a4eb4bed Use a custom Tigon 2 firmware image, hopefully temporarily. This is
the 12.4.11 firmware with a few changes to the link handling code merged
in from the 12.4.13 release. I'm doing this because the 12.4.13 firmware
doesn't seem to handle 10/100 link settings properly on 1000baseT cards.
Note that the revision codes still identify the firmware as 12.4.13
because both ti_fw2.h and ti_fw.h have to have the same revision values,
and I wanted to keep the 12.4.13 firmware for Tigon 1 cards.

It's nice to have firmware source.
2000-07-26 23:55:34 +00:00
Nick Hibma
9d6eda11bc Remove the preliminary support for ATAPI. It does not work and breaks
(physically) IBM Microdrives.
2000-07-26 01:01:01 +00:00
Mark Murray
7aa4389a6c o Fix a horrible bug where small reads (< 8 bytes) would return the
wrong bytes.

o Improve the public interface; use void* instead of char* or u_int64_t
  to pass arbitrary data around.
Submitted by:	kris ("horrible bug")
2000-07-25 21:18:47 +00:00
Justin T. Gibbs
f94bf02fdb Properly handle the case where the residual is 0, but, as the target
didn't bother to send a saved data pointers after the last transfer,
is not recorded in sgptr.  This was only a problem if the target
reported non-zero status as we always check the residual in that case.
2000-07-25 20:40:34 +00:00
Justin T. Gibbs
c27eebfde8 aic7xxx.c:
Correct the BUILD_TCL macro.  It was placing the target id
	in the wrong bits.  This was only an issue for adapters that
	do not perform SCB paging (aha-3940AUW for instance).

	Don't bother inlining ahc_index_busy_tcl.  It is never
	used in a performance critical path and is a bit chunky.

	Correct ahc_index_busy_tcl to deal with "busy target tables"
	embedded in the latter half of 64byte SCBs.

	Don't initialize the busy target table to its empty state
	until after we have finished extracting configuration
	information from chip SRAM.  In the common case of using
	16 bytes of chip SRAM to do untagged target lookups,
	we were trashing the last 8 targets configuration data.
	(actually only target 8 because of the bug in the
	BUILD_TCL macro).

	Cram the "bus reset delivered" message back under bootverbose.

	Fix the cleanup of the SCB busy target table when aborting
	commands.  If the lun is wildcarded, we must loop through
	all possible luns.

aic7xxx.h:
	Only bother supporting 64 luns right now.  It doesn't seem
	like either this driver or any peripherals will be doing
	information unit transfers (where the lun number is a
	32 bit integer) any time soon.

aic7xxx.seq:
	Fix support for the aic7895.  We must flush the data
	FIFO if performing a manual transfer that is not
	a multiple of 8 bytes.  We were doing this quite
	regularly for embedded cdbs.

	Manaually flush the fifo on earlier adapters when
	dealing with embedded cdbs too.  We were stuffing
	the FIFO with 16 bytes instead, but triggering
	the flush is more efficient and allows us to
	remove two instructions from the "copy_to_fifo"
	routine.
2000-07-24 22:27:40 +00:00
Seigo Tanimura
eecdc4415b MFPAO: Add support for AX88190, equipped in MELCO LPC3-TX. 2000-07-23 15:15:43 +00:00
Mark Murray
c90a8fc9a5 Clean this up with some BDE-inspired fixes.
o Make the comments KNF-compliant.
o Use nanotime instead of getnanotime; the manpage lies about the
  kern.timecounter.method - it has been removed.
o Fix the ENTROPYSOURCE const permanently.
o Make variable names more consistent.
o Make function prototypes more consistent.

Some more needs to be done; to follow.
2000-07-23 11:08:16 +00:00
Sheldon Hearn
bf1a3264f7 Remove the awi(4) manual page from the sys/ hierarchy after a repo-
copy to share/man/man4 .  The file is still not connected to the
build from that directory either.
2000-07-23 09:40:39 +00:00
Poul-Henning Kamp
3765820607 Add transmit buffer limitation depending on actual bandwidth.
Add unframed E1 mode.
Various cleanup.
2000-07-22 17:08:52 +00:00
Kazutaka YOKOTA
7ce6464adc This is yet another attempt to fix "psmintr out of sync.." problems.
- Properly protect the watchdog timer routine.
- Relocate the sync check statement so that we don't see too many
  error messages.
2000-07-22 04:08:12 +00:00
Andrey A. Chernov
6e424f2ea5 Make Reset (ESC c) reset attributes too, not only clear screen 2000-07-21 14:26:31 +00:00
Bill Paul
54358bfe2b Tweak probe message so that 1000baseSX and 1000baseT cards are
explicitly identified.
2000-07-20 23:43:45 +00:00
Bill Paul
e87631b976 Update the Tigon driver to support 1000baseTX gigE over copper AceNIC
cards. This basically involves switching to the 12.4.13 firmware, plus
a couple of minor tweaks to the driver.

Also changed the jumbo buffer allocation scheme just a little to avoid
'failed to allocate jumbo buffer' conditions in certain cases.
2000-07-20 22:24:43 +00:00
Andrey A. Chernov
91de5914ec Implement SGR 22,24,25,27 from ECMA-48 2000-07-20 18:48:03 +00:00
Andrey A. Chernov
598cad91fd Accorfing to ECMA-48 SGR 39 and 49 are just another colors and must not reset
other attrs, so reset only bold on 39
2000-07-20 13:12:58 +00:00
Doug Rabson
ac7ba92669 Add support for the PC87303 chipset (found on Miata alphas) and add
support for relocating the port address if the isa hints specify a
different address from the address the chipset currently has.

Submitted by: Andrew M. Miklic <miklic@ibm.net>
2000-07-20 09:28:07 +00:00
Mike Smith
4b85df4ea6 Remove some confusing verbosity - we have no idea what RAID level the
drive is at, so don't print the 'unknown' value, just say nothing.
2000-07-20 02:31:56 +00:00
Andrew Gallatin
0617522889 Fix an alpha-only race which causes the transmit side of the chip to
lock up under moderate to heavy load.

The status & command fields share a 32-bit longword.  The programming
API of the eepro apparently requires that you update the command field
of a transmit slot that you've already given to the card.  This means
the card could be updating the status field of the same longword at
the same time. Since alphas can only operate on 32-bit chunks of
memory, both the status & command fields are loaded from memory &
operated on in registers when the following line of C is executed:

                sc->cbl_last->cb_command &= ~FXP_CB_COMMAND_S;

The race is caused by the card DMA'ing up the status at just the wrong
time -- after it has been loaded into a register & before it has been
written back.  The old value of the status is written back, clobbering
the status the card just DMA'ed up. The fact that the card has sent
this frame is missed & the transmit engine appears to hang.

Luckily, as numerous people on the freebsd-alpha list pointed out, the
load-locked/store-conditional instructions used by the atomic
functions work with respect changes in memory due to I/O devices.  We
now use them to safely update the command field.

Tested by: Bernd Walter <ticso@mail.cicely.de>
2000-07-19 14:33:52 +00:00
Coleman Kane
48f6bffc18 Studied the tech docs for the Voodoo3 and Banshee, and hopefully fixed the
errors that plagued those cards with XFree86 4.0. They have two memory
ranges as well as an IO port range to them. Also cleaned up the three
warning messages that I got, from inb(), outb() and linuxulator. Also, I
noticed that the DRI and Glide support for the Voodoo4 and 5 has been
placed upon linux.3dfx.com, too bad they haven't released the tech docs
yet. Apparently, they are still pushing glide for all of us, so I will try
and add support once those tech docs are up.
2000-07-19 05:41:14 +00:00
Cameron Grant
d98c7b9a99 make this file suitable for 4-stable as well as 5-current 2000-07-18 21:23:48 +00:00
Richard Seaman Jr.
307754cbe2 PR:19945
Reviewed by:tanimura
Fix boot panic introduced by newmidi code.
2000-07-18 20:18:16 +00:00
Nick Hibma
ef36241a4a Remove an unused variable warning. 2000-07-18 20:16:36 +00:00
Nick Hibma
677cec5b04 Fix the detection of parallel port Zip drives.
Submitted by:	j mckitrick <jcm@freebsd-uk.eu.org>
Reviewed by:	nsouchu
2000-07-18 20:16:16 +00:00
Justin T. Gibbs
aa6dfd9d3d o Convert to <inttypes.h> style fixed sized types to facilitate porting to
other systems.

 o Normalize copyright text.

 o Clean up probe code function interfaces by passing around a single
   structure of common arguments instead of passing "too many" args
   in each function call.

 o Add support for the AAA-131 as a SCSI adapter.

 o Add support for the AHA-4944 courtesy of "Matthew N. Dodd" <winter@jurai.net

 o Correct manual termination support for PCI cards.  The bit definitions
   for manual termination control in the SEEPROM were incorrect.

 o Add support for extracting NVRAM information from SCB 2 for BIOSen
   that use this mechanism to pass this data to OS drivers.

 o Properly set the STPWLEVEL bit in PCI config space based on the
   setting in an SEEPROM.

 o Go back to useing 32byte SCBs for all controllers.  The current
   firmware allows us to embed 12byte cdbs on all controllers in
   a 32byte SCB, and larger cdbs are rarely used, so it is a
   better use of this space to offer more SCBs (32).

 o Add support for U160 transfers.

 o Add an idle loop executed during data transfers that prefetches
   S/G segments on controllers that have a secondary DMA engine
   (aic789X).

 o Improve the performance of reselections by avoiding an extra
   one byte DMA in the case of an SCB lookup miss for the reselecting
   target.  We now keep a 16byte "untagged target" array on the card
   for dealing with untagged reselections.  If the controller has
   external SCB ram and can support 64byte SCBs, then we use an
   "untagged target/lun" array to maximize concurrency.  Without
   external SCB ram, the controller is limited to one untagged
   transaction per target, auto-request sense operations excluded.

 o Correct the setup of the STPWEN bit in SXFRCTL1.  This control
   line is tri-stated until set to one, so set it to one and then
   set it to the desired value.

 o Add tagged queuing support to our target role implementation.

 o Handle the common cases of the ignore wide residue message
   in firmware.

 o Add preliminary support for 39bit addressing.

 o Add support for assembling on big-endian machines.  Big-endian
   support is not complete in the driver.

 o Correctly remove SCBs in the waiting for selection queue when
   freezing a device queue.

 o Now that we understand more about the autoflush bug on the
   aic7890, only use the workaround on devices that need it.

 o Add a workaround for the "aic7890 hangs the system when you
   attempt to pause it" problem.  We can now pause the aic7890
   safely regardless of what instruction it is executing.
2000-07-18 20:12:14 +00:00
Poul-Henning Kamp
f8fc6141fb Fix the IRQ9/IRQ2 confusion.
Submitted by:	Alan Clegg <abc@bsdi.com>
2000-07-18 18:50:24 +00:00
Poul-Henning Kamp
cdd075277a Driver for LMC1504 card: four port E1 or fractional E1.
T1 support is possible but I have no T1 hardware to test with.

The vendor can be found at: www.lanmedia.com
2000-07-18 11:34:15 +00:00
Doug Rabson
6a5be8627c Add smc37c935 chipset support and clean up the code which tries to
allocate a short port range in some alpha configurations.

Submitted by: "Andrew M. Miklic" <miklic@udlkern.fc.hp.com>,
	      Mark Abene <phiber@radicalmedia.com>
2000-07-18 09:01:09 +00:00
Matt Jacob
482cf5c2e7 Add in some new IN_XXX and CT_XXXX flags in preparation
for the rototilling that !*$)~@!$_@*_(~@$*_(~@$*~@$*
Qlogic F/W changes will need.
2000-07-18 07:06:47 +00:00
Matt Jacob
d37162ca7a If debugging set, zero out an incoming response entry
when we're done reading it (makes checking things easier).
Before calling isp_notify_ack make sure we're at RUNSTATE-
elsewise we can be responding to LIPs or SCSI bus resets
before we've finished some of the wiring.
2000-07-18 07:05:37 +00:00
Matt Jacob
910fb4f6ee The SERVICING_INTERRUPT isn't quite safe yet. 2000-07-18 07:04:07 +00:00
Matt Jacob
f48ce1882f Add a isp_target_putback_atio- we aren't using CCINCR at this time, so
we need a function that tells the Qlogic f/w that a target mode command
is done, so increase the resource count for that lun. Add in a timeout
function to kick the putback again if we fail to do it the first time (we
may not have the request queue space for ATIO push). Split the function
isp_handle_platform_ctio into two parts so that the timeout function for
the ATIO push or isp_handle_platform_ctio can inform CAM that the requested
CTIO(s) are now done.

Clean up (cough) residual handling. What we need for Fibre Channel
is to preserve the at_datalen field from the original incoming ATIO
so we can calculate a 'true' residual.  Unfortunately, we're not
guaranteed to get that back from CAM. We'll *try* to find it hiding
in the periph_priv field (layering violation)- but if an ATIO was
passed in from user land- forget it. This means that we'll probably
get residuals wrong for Fibre Channel commands we're completing
with an error. It's too late to 4.1 release to fix this- too bad.
Luckily the only device we'd really care about this occurring on
is a tape device and they're still so rare as FC attached devices
that this can be considered an untested combination anyway.

Remove all CCINCR usage (resource autoreplenish). When we've proved
to ourself that things are working properly, we can add it back
in.

Make sure we propage 'suggested' sense data from the incoming ATIO
into the created system ATIO- and set sense_len appropriately.
Correctly propagate tag values.

Fall back to the model of generating (well, the functions in isp_pci.c
do the work) multiple CTIOs based upon what we get from XPT. Instead
of being able to pair Qlogic generated ATIOs with CAM ATIOs, and then
to pair CAM CTIOs with Qlogic CTIOs, we have to take the CTIO passed
to us from XPT, and if it implies that we have to generate extra
Qlogic CTIOs, so be it. This means that we have to wait until the
last CTIO in a sequence we generated completes before calling xpt_done.

Executive summary- target mode actually now pretty much works well
enough to tell folks about.
2000-07-18 06:58:28 +00:00
Matt Jacob
c77d11d0cc Raise debug level for some messages. Fix botched inversion
about MBOX_COMMAND_ERROR vs. MBOX_COMMAND_PARAM_ERROR.
2000-07-18 06:46:48 +00:00
Matt Jacob
05fbcbb000 Keep interrupts blocked for all of isp_pci_attach. Redo DMA routines
for target mode for cleanliness and accuracy.
2000-07-18 06:40:22 +00:00
Matthew N. Dodd
5ce6286805 Properly detect ISA cards in EISA mode and skip them in the ISA identify
routine so that they will be picked up by the EISA front end.

PR:		i386/2598
2000-07-18 06:37:08 +00:00
Nick Hibma
bda0fa93eb The modem driver for Communication Device Class, ACM compliant devices.
There is a number of devices that are compliant, of which the 3Com 5605 is
has been verified to work.

The driver is not perfect yet, but should be able to get you somewhere.

The driver was originally written by Lennart Augustsson, but Mike Smith
and Mike Meyer <mwm@mired.org> did the porting.
2000-07-17 19:28:29 +00:00
Bill Paul
ead7cde9d1 Add the PCI IDs for the Macronix 98727 and 98732 parts. These are
3.3volt PCI/cardbus chipsets similar to the 98715 (and they have
512-bit hash tables). Also update the man page to mention the 98727/98732
and the SOHOware SFA110A Rev B4 card with the 98715AEC-C chip.
2000-07-17 19:27:41 +00:00
Nick Hibma
4f04f78215 Remove __P prototypes to reduce diffs between the NetBSD and FreeBSD
versions.
2000-07-17 18:41:20 +00:00
Sheldon Hearn
f274479332 Rename MDNSECT to MD_NSECT and declare it as something that isn't
default in NOTES.

Requested by:	bde
Approved by:	phk
2000-07-17 13:13:04 +00:00
Mark Murray
720a3741cf Add randomness write functionality. This does absolutely nothing for
entropy estimation, but causes an immediate reseed after the input
(read in sizeof(u_int64_t) chunks) is "harvested".

This will be used in the reboot "reseeder", coming in another
commit. This can be used very effectively at any time you think
your randomness is compromised; something like

# (ps -gauxwww; netstat -an; dmesg; vmstat -c10 1) > /dev/random

will give the attacker something to think about.
2000-07-17 12:23:04 +00:00
Nick Hibma
f10e5a6e89 Regen. 2000-07-17 09:56:01 +00:00
Nick Hibma
b067ff95e2 Lots of new device Ids. From NetBSD. 2000-07-17 09:55:34 +00:00
Matt Jacob
a4de02ec12 Roll back target mode f/w to 7.55- 7.65 hangs when presented with a
non-disconnecting command. Interestingly enough, of the other flavors
of the 7.65 f/w (the dual-id and multi-id flavor)- the dual-id doesn't
hang (they're also supposed to be the same except for supporting dual
or multi-id capture!), but other things are questionable as well.
2000-07-17 00:34:52 +00:00
Nick Hibma
fba108ec94 Add some detection code for the InSystem USB cable (ATAPI support not yet
there, so the cable does not work yet)
2000-07-16 17:40:23 +00:00
Mark Murray
7d4e8b5df8 Don't break the ability to debug the kernel when gathering entropy.
Pointed out by:	bde
2000-07-16 09:25:04 +00:00
Bill Paul
79d11e0960 Apply patch to the dc driver to handle Macronix MX98715AEC-C/D/E chips,
which differ slightly from the Macronix MX98715AEC chip on the sample
adapter that I have in that the multicast hash table is only 128 bits
wide instead of 512. New adapters are popping up with this chip, and
due to improper handling of the smaller hash table, broadcast packets
were not being received correctly.
2000-07-15 17:54:30 +00:00
Andrey A. Chernov
40b376941a Shorten 49m attr resetting expression 2000-07-15 14:13:42 +00:00
Andrey A. Chernov
7e1eea4825 Reset corresponding color attributes on 39m and 49m
Unify comments related to color
2000-07-15 13:46:57 +00:00
Bill Paul
eddceb0d2b Close PR# 19904: remember to call sf_setmulti() when initializing the
interface so the multicast filter will be programmed correctly.
2000-07-14 19:11:02 +00:00
Archie Cobbs
21b8ebd926 Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by:	julian, freebsd-net
2000-07-13 22:54:34 +00:00
Doug Rabson
e547d6fd34 Add support for Intel's i810 chipset with integrated graphics. An
associated patch to XFree86 allows the X server to work with this chipset
on FreeBSD. Additional work will include porting the Linux 3D driver.

Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
2000-07-12 10:13:07 +00:00
Poul-Henning Kamp
6aafb00805 This in essence completes the receive path. 2000-07-12 09:57:00 +00:00
Kirk McKusick
f2a2857bb3 Add snapshots to the fast filesystem. Most of the changes support
the gating of system calls that cause modifications to the underlying
filesystem. The gating can be enabled by any filesystem that needs
to consistently suspend operations by adding the vop_stdgetwritemount
to their set of vnops. Once gating is enabled, the function
vfs_write_suspend stops all new write operations to a filesystem,
allows any filesystem modifying system calls already in progress
to complete, then sync's the filesystem to disk and returns. The
function vfs_write_resume allows the suspended write operations to
begin again. Gating is not added by default for all filesystems as
for SMP systems it adds two extra locks to such critical kernel
paths as the write system call. Thus, gating should only be added
as needed.

Details on the use and current status of snapshots in FFS can be
found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness
is not included here. Unless and until you create a snapshot file,
these changes should have no effect on your system (famous last words).
2000-07-11 22:07:57 +00:00
Duncan Barclay
6b55e51be0 Add attribute memory setup warnings 2000-07-11 21:31:59 +00:00
Mark Murray
4d0e6f79d6 Storing to a pointer is (effectively) atomic; no need to protect this
with splhigh(). However, the entropy-harvesting routine needs pretty
serious irq-protection, as it is called out of irq handlers etc.

Clues given by:	bde
2000-07-11 19:37:25 +00:00
Mark Murray
7978f67e28 I think I need to move the newly static variables to the random_state
structure; remind myself in the cooments. Also regroup all the Yarrow
variables at the top of the variable list; they are "special".
(no functional change).
2000-07-11 18:35:33 +00:00
Seigo Tanimura
fb0ef52838 Finally merge newmidi.
(I had been busy for my own research activity until the last weekend)

Supported devices:

SB Midi Port			(sbc + midi)
SB OPL3				(sbc + midi)
16550 UART			(midi, needs a trick in your hint)
CS461x Midi Port		(csa + midi)

OSS-compatible sequencer	(seq)

Supported playing software:

playmidi			(We definitely need more)

Notes:

/dev/midistat now reports installed midi drivers. /dev/sndstat reports
only pcm drivers. We need the new name(pcmstat?).

EMU8000(SB AWE) does not sound yet but does get probed so that the OPL3
synth on an AWE card works.

TODO:

MSS/PCI bridge drivers
Midi-tty interface to support general serial devices
Modules
2000-07-11 11:49:33 +00:00
Brian Feldman
87a478de7b One should never allocate 4-kilobyte structs and such on the interrupt
stack.  It's bad for your machine's health.

Make the two huge structs in reseed() static to prevent crashes.  This
is the bug that people have been running into and panic()ing on for the
past few days.

Reviewed by:	phk
2000-07-11 06:47:38 +00:00
Warner Losh
ce1dd19461 Remove the XE_DEBUG define. It shouldn't be defined now that things
are working.  Add a small blurb about XE_DEBUG as it might be useful
to some people troubelshooting problems in the future.

Submitted by:	"Kevin Oberman" <oberman@es.net>
2000-07-10 16:46:21 +00:00
Mark Murray
fb15ada363 Provide more splsofttq() protection for the reseed task (running out of
taskqueue_swi).
2000-07-10 06:40:23 +00:00
Mark Murray
43975bd56c Make sure that tasks (running out of taskqueue_swi at splsofttq)
are not interfered with by the harvester.
2000-07-09 16:00:31 +00:00
Mark Murray
11197ed12c Small style change; make function names less likely to clash with
existing names. "null" is too common a string; use "null_".
2000-07-09 12:29:24 +00:00
Mark Murray
a909184e9d Add entropy-harvesting calls.
/dev/random now has new-and-improved entropy!
2000-07-09 12:26:38 +00:00
Mark Murray
585ebe2b41 Yarrow tweaks; separate the fast and slow reseed tasks so that they don't
stomp on each other; provide constant names (as enums) for the harvester
to use (makes it more self-documenting).
2000-07-09 11:52:12 +00:00
Mark Murray
769afb047c Fix bug with a vraiable that needs to be per-process, not static;
fix formatting of long macros.

Pointed out by:	bde
2000-07-09 11:49:07 +00:00
Andrew Gallatin
19a6b3fea6 use contigfree() rather than free() to free memory allocated with
contigmalloc().

reviewed by: wpaul
2000-07-08 00:14:12 +00:00
Duncan Barclay
766748ceac Move newbus detection code to alloc routines.
Work around pccard nasties.
2000-07-07 19:13:11 +00:00
Mark Murray
c9ec235ca1 Add entropy gathering code. This will work whether the module is
compiled in or loaded.
2000-07-07 09:03:59 +00:00
Nick Hibma
1d3e7ea3dd Properly fix world.
Sorry for breaking things in the first place.
2000-07-06 13:23:35 +00:00
Ollivier Robert
ee76ce7fa5 Fix buildworld. 2000-07-06 08:37:34 +00:00
Bill Paul
1be1972c4b Close PR# 19617: add support for VIA VT6102 NICs to VIA Rhine driver. 2000-07-05 21:37:21 +00:00
Nick Hibma
0c880a36fb Use the packed attribute for the descriptor on the wire 2000-07-05 08:11:43 +00:00
Matt Jacob
1fcf5deb4a Oops! If we're deciding a command is now really dead, make *darned*
sure that it really is by issuing a ISPCTL_ABORT_CMD just on the
off chance the f/w will start it up again and, ha ha, start using
the DMA resources we gave it but are now taking away.
2000-07-05 06:44:17 +00:00
Matt Jacob
3e97a5b432 Clean up ISPCTL_ABORT_CMD function to not be too chatty if it succeeds,
or even if it fails with INVALID_PARM (which just means that the handle
doesn't refer to an active commane).
2000-07-05 06:41:36 +00:00
Jun-ichiro itojun Hagino
2f0dab8f41 be sure to wipe out m_pkthdr when you set M_PKTHDR, you may see junk pointer
in m_pkthdr portion.
actually, we should not change pkthdr mbuf <-> non-pkthdr mbuf.
2000-07-04 18:43:32 +00:00
Poul-Henning Kamp
77978ab8bc Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
Pointed out by:	bde
2000-07-04 11:25:35 +00:00
Poul-Henning Kamp
0cfaeeee87 Fix the "almost clone" semantics. 2000-07-04 10:06:34 +00:00
Kirk McKusick
e6796b67d9 Move the truncation code out of vn_open and into the open system call
after the acquisition of any advisory locks. This fix corrects a case
in which a process tries to open a file with a non-blocking exclusive
lock. Even if it fails to get the lock it would still truncate the
file even though its open failed. With this change, the truncation
is done only after the lock is successfully acquired.

Obtained from:	 BSD/OS
2000-07-04 03:34:11 +00:00