Commit Graph

224 Commits

Author SHA1 Message Date
Andrey A. Chernov
2471ac957c Increase transfer speed by waiting much less than 10ms after request
Submitted by: stark@sbstark.cs.sunysb.edu & slightly modifyed by me
1994-09-14 20:28:25 +00:00
Garrett Wollman
f86233fe54 Added a bit of missing functionality to make this work correctly on a
wider variety of systems.  Include the deivers from pci_intel.c in
pci_config.c (I hope this is what was intended; my system works ok).
Use pmap_mapdev().  Automatically map any large linear frame buffers
or whatnot in VGA-style devices which ordinarily would not have their
own drivers, and don't call not_supported() for them.  (This shuts up
complaints about my Matrox card.)  Include the beginnings of what could
eventually become dynamically-loadable PCI devices.  Allow for the
possibility of PCI devices simply providing a PCI veneer over an existing
ISA device, and shut up about them, too.
Make autoconfiguration text conform more to the style of other supported
buses.
1994-09-14 01:34:51 +00:00
Poul-Henning Kamp
5b7ffe398f Digicom Systems Inc, makes "softmodems". What this means is simply that
you download the microcode to the DSP everytime you power on your system.
They provide a dos-program to do so, but no other support.  This commit adds
code to the sio-driver, which implement an ioctl, which will down-load the
micro-code.

To get this functionality, you must define DSI_SOFT_MODEM.

The program to actually employ the ioctl is not included, but the entire
source looks like this:

        #include <sys/ioctl.h>
        #include <stdio.h>

        main()
        {
                unsigned char buffer[100000];
                int i;

                read(0,buffer,100000);
                if((i = ioctl(1,TIOCDSIMICROCODE,buffer)) < 0)
                    perror("ioctl");
                return i;
        }

And you use it like this:
	smload < data144b.dsi > /dev/ttyid3

You need to copy the *.DSI files from the dos-media provide with your modem.
You can see what is downloaded by issuing the ATI3 command to the modem.
DSI's scheme for what code you can run on your modem isn't violated by this.

Poul-Henning Kamp
phk@freefall.cdrom.com
1994-09-13 03:30:31 +00:00
David Greenman
b9a3bebbc7 Removed MULTICAST ifdef's; it's no longer optional. Cleaned up code a
little.
1994-09-07 06:11:29 +00:00
Garrett Wollman
9c50c38bb5 unifdef -DMULTICAST, since multicast support is always enabled in 4.4. 1994-09-07 03:34:12 +00:00
Stefan Eßer
d4a8d8c52b Reviewed by: Stefan Esser <se>
Submitted by:
Changed "bp->av_forw" into "bp->b_actf" to make it compile ...
1994-09-06 21:56:09 +00:00
Andreas Schulz
a97f37a9db Reviewed by:
Add initialization to the if_ie driver for the Micom Interlan NI5210 card.
This is a very old 82586 based card with only 8Kb or 16Kb on board memory.
Also only 8-bit wide instead of 16-bit like the AT& or 3COM card.
Warning: this thing is only tested so far that it detects all bits
correctly but is not yet on an ethernet. Will do that tomorrow.
1994-09-05 22:28:31 +00:00
Andreas Schulz
780f8a2611 Reviewed by:
Submitted by:
Update the if_ep driver for the 3C579 and bring over some of the
changes from the netbsd driver.
This is not complete: the detection of the irq in the eisa does not
work and sometimes the reset for the 3C509 in ISA in an EISA bus system
don't work ( Need a hard reset to be found again == reset knob).
1994-09-03 18:10:44 +00:00
Andrey A. Chernov
c4ff2eb1dd Newly implemented ioctls list:
DIOCGDINFO, DIOCGPART, DIOCWDINFO, DIOCSDINFO, CDIOCPLAYMSF, CDIOCRESET,
CDIOCEJECT.

CDIOCPLAYBLOCKS removed (old implementation completely wrong and I don't
know how to implement it correctly).

All routines now detects media change correctly.

DELAY_GETREPLAY increased for long time access from first track
to last.

mcd_waitrdy() now use MIN_DELAY=15 as minimal delay which independs
of machine speed.

mcd_doread() now uses real status (old code uses obsoleted soft copy of it).

clear XBSY on error in mcd_doread()

mcd_statrt(): add missing splx(s), cause dead hang with unmatched slpbio()

optimize mcd_doread(), don't set CD mode each time, keep soft copy of mode.

call getdisklabel() _after_ mcdsize() for proper sizes

mcdopen(): old code forget to set MCDREADRAW in flags when open RAW
partition, doread check it for setting RAW CD mode.

Do nothing on stray interrupt (which sometimes occurse, because driver
read data block too slow, DOS driver use 'insb' here). Old stray code
cause timeouts.

Read toc entries code rewritten to return many requested entries
(as supposed) instead of one entry with incorrect structure.

CMDREAD2 requests covered with disable_intr()/enable_intr()
(from DOS driver)

Read junk code added after read block code in doread (from DOS driver)

mcd_read_toc() code fixed to read all needed entries, old code cause
some audio tracks is not played.

mcd_playtracks() code fixed to proper check valid track range.

New binary read modes implemented (from DOS driver).
1994-09-03 16:48:13 +00:00
Andreas Schulz
7dfcb69ffc Reviewed by:
Submitted by:
Put the printf("can't map 3c507 ram.. into an ifdef DEBUG. This will
confuse only normal users and the ie0 found/not found is sufficient.
1994-09-02 23:23:57 +00:00
Andreas Schulz
3d76654d68 Reviewed by:
Submitted by:
1) if_ie.c:
	Changed a printf and put a space in it. Formerly the "<3C507>"
	confused the syslog. He tried to see that as the priority to
	log that message.

2) isa_device.h:
	Changed the iobase variable from short to u_short. EISA
	Adresses can go up to 0xf000 and the sign extension doesn't
	look good in the probe output. Example:
	ep1 at 0xffff8000-0xffff8000f is not good :-), i like more a
	ep1 at 0x8000-0x8000f.

3) isa.c:
	Changed a string constant from "probe" to "prob", it gets
	later already an "ed" tagged on the end.
1994-09-02 22:13:34 +00:00
Stefan Eßer
37bd2c9c33 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + Stefan Esser <se>
Directory for PCI autoconfigure and device driver code.
1994-09-01 01:45:19 +00:00
Andrey A. Chernov
b2be795bf2 Use RAW_PART=2 to trick diskerr 1994-08-29 21:32:31 +00:00
Andrey A. Chernov
3b2dc1fcd6 Raw partition is 2 now 1994-08-29 21:19:27 +00:00
Andrey A. Chernov
67f5dcad6b Bruce was right, stupid device returns non-busy state too early,
add only one DELAY(10) after inb(non_busy) now
1994-08-28 20:37:59 +00:00
David Greenman
8a129caed5 1) Changed ddb into a option rather than a pseudo-device (use options DDB
in your kernel config now).
2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its
   own file.
3) Added \r handing in db_printf.
4) Added missing memory usage stats to statclock().
5) Added dummy function to pseudo_set so it will be emitted if there
   are no other pseudo declarations.
1994-08-27 16:14:39 +00:00
Andrey A. Chernov
de662aeac4 Continue previous fix:
Add MIN_DELAY definition instead of hard-coded 10
1994-08-27 15:28:34 +00:00
Andrey A. Chernov
e84e5d655f 1) Raw partition number was incorrectly 0, changed to 3
2) DELAY(1) does nothing, it affects audio playing f.e:
driver can't play second half of disk, changed to DELAY(10)
3) Debugging messages #ifdef DEBUGed
1994-08-27 13:15:25 +00:00
Garrett Wollman
293c5accf0 Add Charles Martin Hannum to copyright notice so he can stop whining and
find something useful to do other than taking credit for other people's
work.  Also make the 3C507 bits match the indentation style of the rest of
the code.
1994-08-25 20:16:59 +00:00
Bruce Evans
3e0a35fee4 Updated to final 1.1.5 version (revision 1.56).
Merged changes from 2.0 version (revisions 1.46-1.50) by hand.

Finished conversion to clists: removed flush of tty output buffer
in comflush() (most writes were truncated to 256 bytes) and restored
bypass of ttyinput() in siopoll().

Finished conversion to 2.0 types - more void *'s, less caddr_t's,
less casts, no Dev_t's.

Only these things are seriously broken now compared with 1.1.5:
waiting for output complete is impossible so ttywait() can deadlock;
sioclose() isn't called enough so sioopen() sometimes returns EBUSY
unnecessarily; input flow control is not implemented.
1994-08-25 10:15:28 +00:00
Andreas Schulz
411c7a8786 Reviewed by:
Submitted by:
Add the 3com 3C507 card to the if_ie.c driver. The files elink.c and
elink.h are helding routines that are shared between the 3C507 and the
3C509/3C579. if_ie507.h are constant declarations unique to the 3C507.
The code is based on the NetBSD driver if_ie.c donated to NetBSD by
Rafal Boni and then modified by Charles Hannum.
1994-08-24 22:32:44 +00:00
Paul Richards
d091793974 Ran ft.c through ident.
Added a missing #ifdef INET wrapper in lpt.c

Main change:
	Removed the timeout_func_t casts from timeout calls and
	correctly defined the timeout routines to conform to
	the new format.
lpt.c doesn't have this change.

Reviewed by:
Submitted by:
1994-08-23 07:52:29 +00:00
David Greenman
f85b3e8c21 Fixed minor typo in diagnostic message. 1994-08-22 08:21:51 +00:00
David Greenman
7b42c960f8 1) cleaned up after Garrett - fixed more redundant declarations, changed
use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers.
2) fix a bug in the portalfs that was uncovered by better prototyping -
   specifically, the time must be converted from timeval to timespec
   before storing in va_atime.
3) fixed/added some miscellaneous prototypes
1994-08-20 03:49:02 +00:00
Garrett Wollman
f23b4c91c4 Fix up some sloppy coding practices:
- Delete redundant declarations.
- Add -Wredundant-declarations to Makefile.i386 so they don't come back.
- Delete sloppy COMMON-style declarations of uninitialized data in
  header files.
- Add a few prototypes.
- Clean up warnings resulting from the above.

NB: ioconf.c will still generate a redundant-declaration warning, which
is unavoidable unless somebody volunteers to make `config' smarter.
1994-08-18 22:36:09 +00:00
David Greenman
8912c0ed61 Bruce Evans' dynamic interrupt support.
/usr/src/sys/i386/isa/clock.c:
	o Garrett's statclock changes.
	o Wire xxxintr, not Vclk.
	o Wire using register_intr(), not setidt().

/usr/src/sys/i386/isa/icu.s:
	o Garrett's statclock changes.
	o Removed unused variable high_imask.
	o Fake int 8 for rtc as well as int 0 for clk.  Required for kernel
	  profiling with statclock, harmless otherwise.

/usr/src/sys/i386/isa/isa.c:
	o Allow isdp->id_irq and other things in *isdp to be changed by
	  probes.  Changing interrupts later requires direct calls to
	  register_intr() and unregister_intr() and more care.
	  ALLOW_CONFLICT_* is brought over from 1.1.5, except
	  ALLOW_CONFLICT_IRQ is not supported.  IRQ conflict checking is
	  delayed until after probing so that drivers can change the IRQ
	  to a free one; real conflicts require more cooperation between
	  drivers to handle.
	o Too many details to list.
	o This file requires splitting and a lot more work.

/usr/src/sys/i386/isa/isa_device.h:
	o Declare more things more completely.

/usr/src/sys/i386/isa/sio.c:
	o Prepare to register interrupt handlers as fast.

/usr/src/sys/i386/isa/vector.s:
	o Generate entry code for 16 fast interrupt handlers and 16 normal
	  interrupt handlers.  Changed some constants to variables:
	  # $unit is now intr_unit[intr].  Type is int.  Someday it should
	    be a cookie suitable for the handler (e.g., a struct com_s for
	    sio).
	  # $handler is now intr_handler[intr].
	  # intrcnt_actv[id_num] is now *intr_countp[intr].  The indirection
	    is required to get a contiguous range of counters for vmstat
	    and so that the drivers depend more in the driver than on the
	    interrupt number (drivers could take turns using an interrupt
	    and the counts would remain correct).  There is a separate
	    counter for each device and for each stray interrupt.  In
	    1.1.5, stray interrupt 7 clobbers the count for device 7 or
	    something worse if there is no device 7 :-(.
	  # mask is now intr_mask[intr] (was already indirect).
	 o Entry points are now _XintrI and _XfastintrI (I = intr = 0-15),
	   not _VdevU (U = unit).
	 o Removed BUILD_VECTORS stuff.  There's a trace of it left for
	   the string table for vmstat but config now generates the
	   string in one piece because nothing more is required.
	 o Removed old handling of stray interrupts and older comments
	   about it.

Submitted by:	 Bruce Evans
1994-08-18 05:09:36 +00:00
Søren Schmidt
49e3cd80ee Oops, changed order of include lines...
Reviewed by:
Submitted by:
1994-08-17 19:32:23 +00:00
Søren Schmidt
529f6e548c Updated to latest 1.1.5.1+ version
Reviewed by:
Submitted by:
1994-08-17 08:51:59 +00:00
Garrett Wollman
0254742789 Add option KBD_RESET_FAIL_OK so that GCC 2.6 doesn't break my
console.
1994-08-15 22:41:33 +00:00
Garrett Wollman
f540b1065a Change all #includes to follow the current Berkeley style. Some of these
``changes'' are actually not changes at all, but CVS sometimes has trouble
telling the difference.

This also includes support for second-directory compiles.  This is not
quite complete yet, as `config' doesn't yet do the right thing.  You can
still make it work trivially, however, by doing the following:

rm /sys/compile
mkdir /usr/obj/sys/compile
ln -s M-. /sys/compile
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
ln -s /sys @
rm machine
ln -s @/i386/include machine
make depend
make
1994-08-13 03:50:34 +00:00
David Greenman
bd1671dc28 Removed some unnecessary code that sets the link layer address. This should
be removed from the other drivers, too, as it is already done at a higher level
in the kernel.
1994-08-12 06:36:51 +00:00
David Greenman
6979fee553 Add missing ifr variable declaration that I forgot when adding MTU
ioctl support.
1994-08-12 06:06:19 +00:00
Jordan K. Hubbard
3578b06c6a Fix a compilation-stopping typo; whoops, David - more sleep! :-)
Submitted by:	jkh
1994-08-08 16:45:11 +00:00
David Greenman
8867d2f19c Added support for SIOCSIFMTU. 1994-08-08 13:33:16 +00:00
David Greenman
90fd8c3866 Added ioctl support for SIOCSIFMTU. 1994-08-08 12:09:04 +00:00
David Greenman
0f8a0292a2 Updated to include improvements from FreeBSD 1.1.5. Fixed brokeness
with multicast support and BPF.
1994-08-04 17:42:35 +00:00
David Greenman
3c4dd3568f Added $Id$ 1994-08-02 07:55:43 +00:00
David Greenman
a445481c3e Fixed a bug that was introduced in the conversion from 1.1.5 to 2.0. 1994-08-01 10:38:19 +00:00
Rodney W. Grimes
fb49e767ba Cast arguments to timeout() to quite compiler warnings. Should we
change all of these to be timeout_funt_t and remove the casts and
typedef?

Remove secound argument (uban) from ifp->if_reset routines since it is now
obsolete.

Reviewed by:	David Greenman
1994-05-27 04:02:10 +00:00
Rodney W. Grimes
35c2e6db96 Since we have removed com.c and renamed comreg.h to sioreg.h I need to
fix sio.c to #include sioreg.h.
1994-05-26 13:31:40 +00:00
Rodney W. Grimes
d5d6e3f5d0 Fix some references to MIN() and MAX() that have been replaced by min() and
max().
1994-05-26 13:30:20 +00:00
Rodney W. Grimes
26f9a76710 The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by:	Rodney W. Grimes
Submitted by:	John Dyson and David Greenman
1994-05-25 09:21:21 +00:00
Andreas Schulz
fa4452258b Added the bugfixes from the current NetBSD driver. Put in some parts of
the 3c579 support, but not the init/probe part.
1994-05-02 22:27:33 +00:00
Gary Clark II
698a2ca9f2 Change old alias b_cylin to b_resid 1994-04-30 17:03:33 +00:00
Søren Schmidt
0573e73943 Updated swedish keymap. 1994-04-26 09:24:06 +00:00
Søren Schmidt
749613741c Fixed missing bounds check in scroll up/down sequence, that could
cause a panic (and did).
1994-04-26 09:09:57 +00:00
David Greenman
f66fdd6803 Added support for the 16 port Boca via a flag to specify that there is
no master port.
1994-04-23 02:11:43 +00:00
Søren Schmidt
872dacbfeb Changed timer usage to new functions in clock.c 1994-04-21 14:22:26 +00:00
Søren Schmidt
bc4ff6e376 Change timer usage to use new functions in clock.c 1994-04-21 14:21:50 +00:00
David Greenman
0e195446b7 Bug fixes and performance improvements from John Dyson and myself:
1) check va before clearing the page clean flag. Not doing so was
	causing the vnode pager error 5 messages when paging from
	NFS. (pmap.c)
2) put back interrupt protection in idle_loop. Bruce didn't think
	it was necessary, John insists that it is (and I agree). (swtch.s)
3) various improvements to the clustering code (vm_machdep.c). It's
	now enabled/used by default.
4) bad disk blocks are now handled properly when doing clustered IOs.
	(wd.c, vm_machdep.c)
5) bogus bad block handling fixed in wd.c.
6) algorithm improvements to the pageout/pagescan daemons. It's amazing
	how well 4MB machines work now.
1994-04-20 07:06:57 +00:00