Commit Graph

351 Commits

Author SHA1 Message Date
Stefan Eßer 80432747dc Remove element pb_maxirq from struct pcibus. 1997-01-25 02:22:34 +00:00
Stefan Eßer e8bfed6d98 Improve on previous fix: Clean up getirq() as well, and remove redundant
warning messages.
1997-01-25 01:57:30 +00:00
Justin T. Gibbs 09e505318a Add the definition for the CFAUTOTERM bit in the aic78xx SEEPROM.
Add auto-termination support as well as support for setting the high byte
termination.  Booting with '-v' will display the settings that the driver
chose.  If you stick narrow devices onto the external wide port, you had
better make sure that your converter cable terminates the bus, you have a
wide device on there that terminates the bus, or you manually set the
termination properly in SCSI-Select instead of using "Automatic".  The
code will get the setting right regardless if you *don't* have internal
wide devices in this type of configuration.  Unfortunatly this is a limitation
of the design of the Adaptec cards.
1997-01-24 22:04:14 +00:00
Stefan Eßer a67fa10338 Make IRQ 0 invalid in pci_map_int(), since it is hardwired to the
programmable interval timer chip in PC systems.
1997-01-23 22:58:03 +00:00
Justin T. Gibbs 5ea6dc36ff Be smarter about enabling memory mapped I/O. The AHC_ALLOW_MEMIO option
should not be required anymore.

Turn on ULTRA for cards that don't have a BIOS or SEEPROM.
1997-01-22 18:07:15 +00:00
Stefan Eßer 99867152a5 Add PCI LKM support:
The new function pci_register_lkm (struct pci_device *dvp) appends the
driver to the list of known PCI drivers, and initiates a PCI bus rescan.
1997-01-21 23:41:42 +00:00
Stefan Eßer 993dec9d58 Add PCI LKM support. 1997-01-21 23:23:40 +00:00
Joerg Wunsch e4107dcf00 This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up
to -current.

Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me
a chance to test this.  Only the PCI driver is tested though.

One final patch will follow in a separate commit.  This is so that
everything up to here can be dragged into 2.2, if we decide so.

Reviewed by:	joerg
Submitted by:	Matt Thomas <matt@3am-software.com>
1997-01-17 23:54:45 +00:00
Joerg Wunsch b05ee6a563 Finally import the 960801 of Matt Thomas' DEC FDDI driver. I'm
importing it onto a vendor branch first, in the hope that this will
make future maintenance easier.

The conflicts are (hopefully) unimportant.  More commits that actually
bring this into the source tree will follow.

Submitted by:	Matt Thomas (thomas@lkg.dec.com)
1997-01-17 23:19:49 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman 477180fbc8 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
Søren Schmidt 7c4eadc07b Fix typo.. 1997-01-06 13:51:15 +00:00
Stefan Eßer 4fe8838383 Fix NetBSD pr kern/3067, which also applies to FreeBSD:
NCR driver dies when "xmcd" accesses the CD-ROM drive

Restrict cacheing of INQUIRY results to LUN 0.

Thanks to Dave Huang <khym@bga.com> for reporting the problem
and suggesting a fix, though I chose a slightly different one.
1997-01-05 23:10:23 +00:00
Stefan Eßer d794fbe35c Add Intel VX chip set specific detection and register dump code.
Submitted by:	brianc@netrover.com (Brian Campbell)
1997-01-02 01:23:17 +00:00
Bruce Evans 0febc3d288 Don't redefine SCSI_NCR_DFLT_TAGS even in if FAILSAFE is defined. 1996-12-23 19:12:29 +00:00
Stefan Eßer deb4f83f3c Improve negotiation messages:
Print MB/s instead of MHz (now takes WIDE into account).
Remove extranous "\n" from WIDE negotiation messages.
1996-12-21 12:32:34 +00:00
Stefan Eßer d14302ba21 Add PCI IDs of the ProLAN and Compex PCI NE2000 clones.
Based on information sent by Peter Mutsaers <plm@xs4all.nl>.
1996-12-21 00:04:09 +00:00
Stefan Eßer edb2a14fa4 Fix bug that would stop probing for SCSI devices
after the first found, if multiple LUNs are tried.
Change probe message to just the SCSI chip id,
similar to what the NCR driver prints.
Change the driver name to "amd" in all places.

Thanks to  Nick Sayer <nsayer@quack.kfu.com> for
doing some debugging, for sending a boot message
log that shows the driver is functional, and for
pointing out there still were places that needed
the driver name to be corrected.
1996-12-20 21:52:11 +00:00
Stefan Eßer 7eda43b2d4 Add include of <vm/pmap.h> to make this driver compile under -current.
Cleanup to make it compile cleanly in LINT.
Submitted by:	bde
1996-12-18 11:41:28 +00:00
Stefan Eßer b9bffbaea1 Rename DIAGNOSTIC to DMA_DIAGNOSTIC.
Submitted by:	bde
1996-12-18 11:35:12 +00:00
Stefan Eßer dd0f5b33a3 Add code to fill the EEPROM buffer with default values, if no EEPROM
was found, or if there was a checksum mismatch.
This patch should allow the driver to be used with any AMD 53c974
based SCSI card, or with the AMD SCSI+Ethernet Combo Chip found on
some motherboards.
1996-12-18 01:20:32 +00:00
Stefan Eßer 887819402a Make compile under FreeBSD-current (3.0-DEVELOPMENT). 1996-12-18 01:08:05 +00:00
Stefan Eßer 7abffcc21a Fix "opt_ncr.h" changes:
- put #include into #ifdef KERNEL or ncrcontrol won't build
- rename SCSI_DEBUG_FLAGS to SCSI_NCR_DEBUG
1996-12-16 14:31:45 +00:00
Stefan Eßer d26d022d05 Tekram supplied driver for their DC390 and DC390T controllers.
These controllers are based on the AMD 53c974, and the driver
does only support those two cards, since it checks for a Tekram
specific configuration EEPROM.
This deficiency (TM) will be fixed soon ... :)

This code is:
	(C)Copyright 1995-1996 Tekram Technology Co., Ltd.

Obtained from:	Tekram
1996-12-15 23:40:48 +00:00
Stefan Eßer d44022652e Fix typo 1996-12-15 23:25:50 +00:00
Stefan Eßer a56eccf52b Include "opt_ncr.h" for option settings. 1996-12-15 16:37:17 +00:00
Stefan Eßer 10cffc9fbc Do not limit to 1 LUN if FAILSAVE is set. Seems that CDROM drives
are now only probed for LUN 0, unless there is a specific entry in
scsi_conf.c.
1996-12-15 16:28:24 +00:00
Stefan Eßer 89c1d5dcd9 General cleanup and new features for 53c875 based cards, especially the
Tekram DC390W/U/F, whose config EEPROM can now be dumped, if the kernel
is built with option NCR_TEKRAM_EEPROM.

Other changes:

- add brackets to expansion of OUTB/W/L macro arguments.
- remove unused NCB structure element ns_async
- support sync. SCSI offset of 16 (instead of only 8) on 825A and 875
- correctly identify 53c810A and 53c825A chips
- preserve SCSI BIOS settings of PCI performance options
- remove (already disabled) support for NCR reset because of command timeout
- reverse order of reading of SCSI and DMA specific interrupt cause registers
- add definition of Tekram config EEPROM contents (not currently used)
1996-12-14 13:13:33 +00:00
Jordan K. Hubbard 0b3870cb60 Close PR#2198:
I've added an installation from optical disk drive facility.
	This enables FreeBSD to be installed from an optical disk, which
	may be formatted in "super floppy" style or sliced into MSDOS-FS
	and UFS partitions.

	Note:  ncr.c should be reviewed by Stefan Esser <se@freebsd.org>
	and cd.c by Joerg Wunsch <joerg@freebsd.org> before bringing this
	into 2.2.

Submitted-By: Shunsuke Akiyama <akiyama@kme.mei.co.jp>
1996-12-13 07:55:14 +00:00
David Greenman fb5831565c 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's return
type to be int so that errors can be returned.
2) Use the new SIOCSIFMTU ether_ioctl support in the few drivers that are
   using ether_ioctl().
3) In if_fxp.c: treat if_bpf as a token, not as a pointer. Don't bother
   testing for FXP_NTXSEG being reached in fxp_start()...just check for
   non-NULL 'm'. Change fxp_ioctl() to use ether_ioctl().
1996-12-10 07:29:50 +00:00
Guido van Rooij c01cc91938 Some imporvemnets to the vx driver.
1. 'connector_table' is shortened to 'conn_tab'.
2. More reliable connector change code.
3. Display message like "vx0: selected bnc. (link1)"
   when the connector changed by link[012].
4. Handle MII properly.
5. Potentially slightly better performance.
6. Fixed a silly typo.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-12-02 18:38:37 +00:00
Rodney W. Grimes 79c2a5b3ff Cosmetic code cleanup from Matt's latest driver.
a)  Removal of private typedefs tulip_uint*_t, use standard u_int_*_t.

b)  Change [Dd][Cc]21.4. to just 21.4., seems Dec has done this to all
    of the drivers for all OS's.  (Did they get in trouble with someone?)
    [The few that remain can either not be eliminated, or are waiting for
    additional driver functional changes that will remove them.]

c)  Move some code from dc21040.h into the driver, later a whole block of that
    code and more will move to devar.h, but for now this makes it easier
    to study diffs.

d)  Add a big bold comment to the README.de file about it not reflecting
    reality anymore.

Note that these are all cosmetic changes and should be no functional
change in the driver whatsoever.  If _anyone_ spots a problem introduced
by this please let me know ASAP!
1996-12-01 06:01:00 +00:00
David Greenman 9c7d26071e Fixed obsolete comment. 1996-11-18 02:45:46 +00:00
Justin T. Gibbs 7595de5113 AHC_FORCE_PIO -> AHC_ALLOW_MEMIO 1996-11-16 01:19:50 +00:00
Satoshi Asami 7c219eac8f Some more updates.
wdreg.h: Delete wd_ctlr macro.  PC98 version of wd.c treats it as a
variable.

GENERIC98: Delete ep0 entry. Current ep driver write I/O port 0x100.
This clobbers ICW of i8259, because upper 8bits of address line is not
masked on mother board.

if_fe.c: Merge from revision 1.18 of sys/i386/isa/if_fe.c.

pc98.c: Globalize dmapageport, because SCSI driver use this
variable.

wd82371.c: Yet another merge.

These are 2.2 candidates.

Submitted by:	The FreeBSD(98) Development Team
1996-11-14 08:46:21 +00:00
John Hay 0c064d6185 Oops I forgot to add the official id for this card. 1996-11-13 18:06:52 +00:00
Stefan Eßer 576b74fcc8 Add support for header type == 1 devices (PCI 2.1 compatible PCI to PCI
bridges with support for 64 bit memory addresses and 32 bit I/O addresses).

The code is not complete. It ignores the upper half of the long addresses.
This is not a problem on PC compatible systems, but has to be fixed for
real computers.
1996-11-12 23:18:12 +00:00
Stefan Eßer c88529d0e9 Fix PCI to PCI bridge register bit field masks.
Thanks to "Mike Durian" <durian@plutotech.com> for the very good
problem report and his support as a beta tester of this patch.
1996-11-12 23:10:24 +00:00
Justin T. Gibbs ea4f3c468a Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.

Be smart about the STPWEN control bit in SCFRCTL1.  It should only be set
if the low byte of the bus is to be terminated.  We figure this out either
by "caching" the value left over from the BIOS setup before we reset the card
or by using the values stored in the seeprom if it is availible.
1996-11-11 05:26:14 +00:00
David Greenman d66e3876dd Put the packet error printf inside #ifdef DIAGNOSTIC. 1996-11-10 13:36:46 +00:00
Stefan Eßer e6f6908163 Only access the specific interrupt status registers if required.
This follows more closely the suggestions in the latest NCR docs, and has
been running on my system for weeks with no problem. It does improve the
quality of diagnostic messages and does allow to better understand the
sequence of events in case of an error.

This should go into 2.2 and 2.1.6.
1996-11-08 23:46:04 +00:00
Justin T. Gibbs a75528de6b Clean up some code having to do with the 398X cards. We can't rely on the
7810 being either the last of the first device to be probed, so use a counting
scheme instead to determine when one card ends and another begins.  There may
be a better way to do this by decoding the PCI tag, which I will investigate
later.

2.2 Candidate.
1996-11-05 07:59:28 +00:00
Guido van Rooij b3ac88f13f New vx driver for:
3COM 3C590 Etherlink III PCI,
        3COM 3C595 Fast Etherlink PCI,
        3COM 3C592 Etherlink III EISA,
        3COM 3C590 Fast Etherlink EISA,
        3COM 3C900 Etherlink XL PCI and
        3COM 3C905 Fast Etherlink XL PCI.

This driver is based on OpenBSD's driver. I modified it to run under FreeBSd
and made it actually work usefully.
Afterwards, nao@tom-yam.or.jp (HAMADA Naoki) added EISA support as well as
early support for 3C900 Etherlink XL PCI and 3C905 Fast Etherlink XL PCI.
He also split up the driver in a bus independant and bus dependant parts.

Especially the 3c59X support should be pretty stable now.

Submitted by:	partly nao@tom-yam.or.jp (HAMADA Naoki)
Obtained from:partly OpenBSD
1996-11-04 22:17:20 +00:00
John Hay ebcdcb982a Add support for the SDL RISCom N2pci cards. Bring in the enhancements
made to the Arnet driver.
1996-10-29 03:53:21 +00:00
Justin T. Gibbs b36b7d853f Add basic support for the 398X cards as multi-channel SCSI host adapters.
This involves expanding the support of the SEEPROM routines to deal with
the larger SEEPROMs on these cards and providing a mechanism to share
SCB arrays between multiple controllers.

Most of the 398X support came from Dan Eischer.

ahc_data -> ahc_softc

Clean up some more type bogons I missed from the last pass.
1996-10-28 06:10:33 +00:00
Justin T. Gibbs 7491f60b54 - KNF cleanup.
- Add support for memory mapped I/O.
1996-10-25 06:43:10 +00:00
Stefan Eßer 9ac309b8ce Definitions for ioctl() accesses to PCI config space registers.
Submitted by:	wollman
1996-10-22 20:33:19 +00:00
Stefan Eßer 10e966fae4 Add support for ioctl() accesses to PCI config space registers.
Garrett Wollman sent me this code a few weeks ago for review, and I made
some significant changes, which he in turn accepted ...

In order to make use of these changes, a device entry has to added to /dev.

Submitted by:	wollman
1996-10-22 20:20:14 +00:00
Bruce Evans 62c3734cbe Updated #includes to 4.4lite style. 1996-10-15 19:22:46 +00:00
Stefan Eßer b86a81e448 pci_map_mem() did a too restrictive check on the mapping type:
PCI_MAP_MEMORY_TYPE_32BIT_1M should be accepted as well as
PCI_MAP_MEMORY_TYPE_32BIT (and now is).
(Problem reported by David Greenman.)
1996-10-14 13:04:34 +00:00