Commit Graph

3042 Commits

Author SHA1 Message Date
Bruce Evans
503e666658 Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in the
kernel, but gcc provides a pessimal builtin for it.

Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.

LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.
1999-10-03 07:09:31 +00:00
Matthew N. Dodd
7366fe57d4 Fix includes. I missed this the first time around. 1999-10-02 20:22:26 +00:00
Matthew N. Dodd
fe76c677ea Use the PRVERB() macro instead of 'if (bootverbose) printf()...
Add debuging for all failure cases in aha_cmd().

Always check DATAIN_REG_READY even if we're ready to exit the
read loop.

The last fix allows the AHA-1640 MCA SCSI adapter to operate
correctly and likely fixes problems on a few other oddball
adapters. (I suspect my Dell Drive Array in 1540 mode needs this.)

Reviewed by:	Warner Losh
1999-10-02 17:40:07 +00:00
Nick Sayer
472a4993b0 Add the apm_saver syscons screen saver module.
apm_saver uses the apm_display() routine from the apm system to
"suspend" the "display" part of the machine.

This is beneficial for some laptops (or other machines with
non-traditional displays) that choke on the 'green' saver's
effect.

Another way of looking at this is that it's the same as a screen
saver that does an 'apm -d 0' to blank the display and an 'apm -d 1'
to bring it back. One probably ought to use these commands to make
sure the effect will be correct before using it unattended.
1999-10-02 03:56:42 +00:00
Roger Hardiman
70d32847e5 Backout part of the changes made in 1.111
For unknown devices the output will now be
  pci0: unknown card (vendor=0x109e, dev=0x0878) at 14.1 irq 19
instead of
  pci0: unknown card DD^0878 (vendor=0x109e, dev=0x0878) at 14.1 irq 19

Before this change, the code used to take the PCI vendor id and translate it
into a three letter ASCII name.
For PnP devices, the vendor id _does_ map to a nice ASCII name
(eg Creative Labs PnP ID maps to "CTL", ESS PnP ID maps to "ESS")

But there is no such mapping for PCI devices, as can be seen by the
example above where the Brooktree PCI vendor ID maps to "DD^"

The PCI Special Interest Group confirmed they do not have any mappings
from vendor ID to ASCII.
1999-10-01 16:58:40 +00:00
Peter Wemm
fe49e6c57c Use the sys/wormio.h definitions of the CDRIOCNEXTWRITEABLEADDR and
CDRIOCBLANK ioctls rather than duplicating them.
1999-10-01 14:14:20 +00:00
Matthew N. Dodd
288778409b Add support for the AHA-1640 SCSI adapter.
The changes to sys/dev/aha/aha.c that allow these
cards to function properly will be here in a day
or 2.
1999-10-01 03:12:15 +00:00
Andrew Gallatin
4fc1dda91d Make the fxp driver work on alpha, rather than panic the machine on boot
and/or when using the card.

o Convert the driver to using bus_space.  This allows alphas with
fxp's to boot, rather than panic'ing because rman_get_virtual()
doesn't really return a virtual address on alphas.

o Fix an alpha unaligned access error caused by some misfeature of
gcc/egcs: if link_addr & rbd_addr in the fxp_rfa struct are 32 bit
quantities, egcs will assume they are naturally aligned. So it will do
a ldl & some shifty/masky to twiddle 16 bit values in fxp_lwcopy().
However, if they are 16-bit aligned, the ldl will actually be done on
a 16-bit aligned value & we will panic with an unaligned access
error... Changing their definition to an array of chars seems to fix
this.  I obtained this from NetBSD.

I've tested this on both i386 & alpha.
1999-09-30 19:03:12 +00:00
Poul-Henning Kamp
b89392e703 Remove the D_NOCLUSTER[RW] options which were added because vn had
problems.  Now that Matt has fixed vn, this can go.  The vn driver
should have used d_maxio (now si_iosize_max) anyway.
1999-09-30 07:11:30 +00:00
Doug Rabson
9689906734 Add ID for ESS ES1869. 1999-09-29 07:27:35 +00:00
Greg Lehey
a13f3fcca5 struct plex: Add variables checkblock and rebuildblock to keep track
of parity check and rebuild operations.  This enables us
             to stop the operation and restart at a later time.

enum parityop: Trivial enum to decide what parityops() is going to do.
1999-09-28 22:58:07 +00:00
Greg Lehey
c460c4f8b3 revive_block: set b_resid correctly.
parityops: New function to check and rebuild RAID-5 parity blocks.
Not yet usable.
1999-09-28 22:57:29 +00:00
Greg Lehey
141580f5a0 logrq: add sdiodone case.
launch_requests: Remove debug code

sdio: Reformat log call.
1999-09-28 22:56:54 +00:00
Greg Lehey
667b5ca097 Don't count iterations while waiting for a lock to become free. 1999-09-28 22:56:04 +00:00
Greg Lehey
aa1c16b781 Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:55:37 +00:00
Greg Lehey
af87ab426c Reduce MAX_IOCTL_REPLY to 1024; the previous value was more than ioctl
could stand.

Define the correct return lengths for a number of ioctls.

Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:54:58 +00:00
Greg Lehey
b86ee4725e open_drive: Don't call set_drive_state to take a drive down, do it
ourselves.  This breaks a vicious circle which caused
            vinum to dereference a null vp if device nodes were
            missing.

Reported-by:	Brad Chisholm <sasblc@unx.sas.com>
		Alec Wolman <wolman@cs.washington.edu>

check_drive: Don't take a drive down if it's only referenced.

read_drive: Remove unused variable.
1999-09-28 22:46:39 +00:00
Greg Lehey
3465ababcf sdio_done: Log events if DEBUG_LASTREQS set. 1999-09-28 22:45:21 +00:00
Greg Lehey
a40b9736a1 Change remove_drive_entry
Add parityops
1999-09-28 22:43:59 +00:00
Greg Lehey
bb5f4d7898 Remove some superfluous comments.
get_empty_volume: initialize plexes to -1 (not allocated)

remove_drive_entry:
  Remove recurse parameter (there's nothing below a drive in the hierarchy).
  Use remove_sd_entry to remove sds, don't do it ourselves.
  Log errors, don't throw rude remarks.

remove_plex_entry:
  Don't use plex->subdisks as a loop limit, it gets changed in the
     loop.  This caused some removals to only remove half the subdisks.
  Change logging of some "impossible" situations.

remove_volume_entry:
  Use remove_plex_entry to remove plexes, don't do it ourselves.

update_sd_config:
  Use set_sd_state to do the work.
1999-09-28 22:43:07 +00:00
Greg Lehey
18ba0ff290 Minor formatting changes (7th attempt) 1999-09-28 22:42:06 +00:00
Greg Lehey
9bd4ba1364 Add loginfo type for sdiodone. 1999-09-28 22:27:10 +00:00
Cameron Grant
5b78a73443 * add a non-reset device- will not reset the channel on open. you
will have to mknod yourself for now.
* don't eat the first write()
* partial rvplayer fix- don't panic on unaligned writes unless our
  feeder chain requires them for downconversion.  a fuller fix is
  on the way.
1999-09-28 21:43:35 +00:00
Cameron Grant
89c57f2d02 add a missing blank line 1999-09-28 20:24:28 +00:00
Cameron Grant
cf56588462 seperate the ad1816 driver from the mss driver since it shares no code 1999-09-28 20:00:06 +00:00
Warner Losh
d77db02192 Use rmand_get_bus{tag,handle} rather than hard wiring things to
I386_BUS_SPACE_IO.  Compiles now on the Alpha, but likely will not
work due to bus space address <-> virtual address mapping bogons that
work for i386 but not alpha.
1999-09-28 19:59:41 +00:00
Poul-Henning Kamp
1ab305ef60 Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.

Reviewed by: julian, bde
1999-09-28 11:45:31 +00:00
Doug Rabson
340b1ef545 Add another ID for the AWE64. 1999-09-28 08:25:08 +00:00
Warner Losh
896f49b096 Newbusification of aha. dfr sent me the first cut, and I made it
work.  Be more verbose when one cannot allocate IRQ, et al since this
is a common configuration problem.  The cards have the IRQ soft wired
into their BIOS and do not try to do collision detection.  This can
cause problems when this IRQ is the same as another card/device.

The PNP hasn't been tested.  My PNP board is in a deployed system.
I'll sneak in testing of it sometime later.  I've been able to mount
the 3.3R cdrom that arrived today and access files off it.

Submitted by: dfr
1999-09-28 02:39:45 +00:00
Roger Hardiman
77b4241c45 Add auto-detection for Askey Dynalink Magic TView and
Leadtek Winfast 2000 cards.
No audio support yet, just the card make is reported.

Submitted by:	 Craig <crh@outpost.co.nz>
Submitted by:	 Peter Wemm <peter@netplex.com.au>
1999-09-27 08:04:55 +00:00
Greg Lehey
1441456f23 Correct typo in comment. putccdbuf() releases a buffer, it doesn't allocate one. 1999-09-27 01:51:42 +00:00
Peter Wemm
2740fc8ee1 zap #include "streams.h" (for NSTREAMS) - which isn't used. 1999-09-27 00:54:20 +00:00
Peter Wemm
9854d29d4e Zap #include "vn.h" - it's not used 1999-09-27 00:53:24 +00:00
Matthew Dillon
adec8f4338 If the request crosses EOF and bp->b_bcount is not a multiple of
the sector size, the new value for bp->b_bcount was incorrectly
    calculated.  Fixed.

Submitted by: 	Tor.Egge@fast.no
1999-09-27 00:27:32 +00:00
Matthew Dillon
74427f90f2 Buffer locking code failed to use BUF_KERNPROC and BUF_UNLOCK and
BUF_LOCKFREE a buffer prior to physically freeing it.  While these
    bugs did not cause a crash, they might in the future.

    Added eof handling for unlabeled partitions.

Submitted by:	Tor.Egge@fast.no
1999-09-27 00:12:36 +00:00
Roger Hardiman
96476a9986 Split the Bt848 driver into seperate files for
audio, tuner, card make, os dependent code and core bt848/i2c code.

Also, rewrite tuner code for FM Radio to make the code cleaner.
1999-09-26 22:06:20 +00:00
Bill Paul
c63d3a6678 Update the Starfire driver comments and man page to include the URL of
the AIC-6915 Programmer's Manual which I finally found online at Adaptec's
site.
1999-09-26 18:35:30 +00:00
Eivind Eklund
3e148c4099 Move the declaration of panic() from sys/systm.h to sys/param.h.
Rationale: Wider access, so we can add assertions to header files.
panicstr is still in sys/systm.h

Suggested by:   phk
Discussed with: peter
1999-09-26 18:19:49 +00:00
Matthew N. Dodd
20530663b3 device_get_ivars() called twice. Remove second call and assignment.
Noticed by: Peter
1999-09-26 18:05:37 +00:00
Matthew N. Dodd
58e4bcc53a Duplicated '(' removed.
Noticed by: Mark Murray <mark@grondar.za>
1999-09-26 18:04:26 +00:00
Matthew N. Dodd
d8accb14bd mca_add_{iospace,mspace}() no longer takes a 4th arg. 1999-09-26 07:16:01 +00:00
Matthew N. Dodd
b438239c0a Rip out the nastiness I cribbed from the EISA bus code and actually
implement the resource management code correctly, using approved
interfaces.

While I'm here, clean up a few things.
1999-09-26 07:02:05 +00:00
Matthew N. Dodd
39b547ce4d - Split out the ISA and PCCARD specific code.
- Split out the prototypes, externs and struct decls from if_epreg.h into
  if_epvar.h.

- Add support for MCA based Etherlink III (3c529) devices.

None of this code is used right now; the old if_ep driver is still
in place and used.

I will eventually get around to converting if_ep_isa.c to newbus once I've
had a talk with Peter and DFR about the DEVICE_IDENTIFY() method.

I have tested this code on my PS/2.  It works.  I would like EISA and ISA
testers since my example hardware hasn't arrived yet.

Add:

dev/ep/if_ep.c          optional ep
dev/ep/if_ep_isa.c      optional ep isa
dev/ep/if_ep_eisa.c     optional ep eisa
dev/ep/if_ep_mca.c      optional ep mca
dev/ep/if_ep_pccard.c   optional ep card

to sys/conf/files

Remove:

i386/eisa/3c5x9.c             optional        ep
i386/isa/if_ep.c              optional        ep

from sys/i386/conf/files.i386

PCCARD testers wanted!

I will switch off and cvs rm the old driver in favor of this copy once
I've had positive feedback or have the hardware to verify that it works.
1999-09-26 06:42:36 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Bill Paul
784733e9ec Change contigmalloc() lower memory bound from 1MB to 0 to improve
chances of allocations succeeding on systems with small amounts of
RAM.

Pointed out by: bde
1999-09-25 17:29:02 +00:00
Poul-Henning Kamp
ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Poul-Henning Kamp
46783fb897 Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
Bill Paul
e51e55880d Call sk_start() at the end of sk_intr() if there's packets in the
interface send queue that need to be processed.
1999-09-25 04:50:27 +00:00
David E. O'Brien
2b832347ec Switch the order of a two tests so that the error actually has to occur
for you to be told there was an error [during verbose boot].

I poked him for the fix, he poked me to get it committed.

Submitted by:	Jason Young <doogie@anet-stl.com>
1999-09-24 16:27:32 +00:00
Søren Schmidt
27fceb7416 Fix timeout handeling and add retry counts.
Add HPT366 probe message (but no real support yet),
Add CDR support for several diffenrent blocktypes, also close
disk as a multisession CD.
1999-09-24 12:36:10 +00:00