Randall Hopper <rhh@ct.picker.com> GHUE/GBRIGHT bug
Louis Mamakos made a new bt848 struct, including massive changes to the entire
body of code, substituting array offsets with struct members.
Randall Hopper aadded fixes of BT848_GHUE & BT848_GBRIG.
I (fsmp):
added polled hardware i2c routines,
removed all existing software i2c routines.
added eeprom support.
form `tv = time'. Use a new function gettime(). The current version
just forces atomicicity without fixing precision or efficiency bugs.
Simplified some related valid accesses by using the central function.
Michael submitted code to activate the audio muxes.
fsmp:
extended those changes for different boards.
auto-detection of board types.
auto-detection of tuner types.
auto-detection of stereo option.
Fixed a bug in fxp_mdi_write - a hex number was missing a preceding 0x
and this was causing the routine to not wait for a PHY write to complete.
Added support for link0, link1, and link2 flags to toggle auto-
negotiation, 10/100, and half/full duplex:
link0 disable auto-negotiation
When set, these flags then have meaning:
-link1 10Mbps
link1 100Mbps
-link2 half duplex
link2 full duplex
...needs a manual page.
I broke the cable tuning with my 'TEST_A' code. Remove TEST_A define
till I finish this change for both tuning modes. Note that this
will effectively break the new TVTUNER_SETFREQ/TVTUNER_GETFREQ ioctl()s.
These aren't used by anyone but me yet (attempt to provide full resolution
fine tuning for "fringe" stations) so it should be no problem
written:
1) Full duplex mode is now supported (and works!)
2) The 10Mbps-only PCI Pro/10 should now work (untested, however)
Thanks to Justin Gibbs for providing a PCI bus analyzer trace while the
Intel Windows driver was configuring the board...this made it possible
to figure out the mystery bit that I wasn't setting in the PHY for full
duplex to work.
can't perform overlapping commands on both of its channels.
To enable the CMD640B work-around, the kernel must be compiled with
"options CMD640". Without that option there should be no difference
in the code produced compared to the previous revision of wd.c.
Submitted by: Wolfgang Helbig <helbig@ba-stuttgart.de>
This parameter is intended to allow new kernels to work with old LKM binaries,
provided the revision ID is incremented whenever the PCI LKM interface is
changed. The revision ID does not at all protect against changes in data
structures accesses by the driver.
Disabled the DMA byte counters - I had it this way originally and this is
the recommended setting.
Set crscdt to CRS only (0) since this is what it should be for an MII PHY.
Also fixed some comments.
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.
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>
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)
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.
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).
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.
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.
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.
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
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)
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>
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().
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>
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!
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
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.
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.
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.
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.
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
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.
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
<net/if_arp.h> and fixed the things that depended on it. The nested
include just allowed unportable programs to compile and made my
simple #include checking program report that networking code doesn't
need to include <sys/socket.h>.
Still no support for Ultra-SCSI and other new features, but the code
should now correctly initialize the clock pre-scaler (based on freqency
measurement results, if necessary).
Fix support of 16 targets for WIDE SCSI.
Disable bus reset in case no progress is made for too long ("ncr dead"
message), which did not work too well with scanners and other slow devices.
not resuming the NIC as required for transmit. Thanks to Alan Cox
<alc@cs.rice.edu> for noticing this.
Added another performance optimization to compensate. :-)
Changed crscdt to 1...strange, but this seems to be needed for some reason
despite what the manual says.
ring that caused wrong things to happen sometimes.
Doubled the number of transmit descriptors to 128 so that the internal
FIFO in the NIC can be fully filled when dealing with small packets.
Several minor performance improvements.
to deal with the fact that we relied on devconf to do the shutdown
callouts in various drivers. The changes in this commit are to add support
for device shutdown in this driver via the new at_shutdown() mechanism.
Similar changes need to be made to all of the other drivers that need
a shutdown routine called (if_de.c comes to mind immediately).
changes. This version should fix a number of bugs such as with auto-
speed sensing and at least one known panic.
Submitted by: Matt Thomas (matt@3am-software.com)
not depend on bootverbose being true.
Include only register specifications for those chip sets that apply to
a cpu that might boot this a particular kernel (ie. make the Saturn code
depend on I486_CPU being defined, the Pentium chip sets on I586_CPU ...)
way it attaches multiple PCI buses directly to the CPU, instead of having
them hanging off from PCI to PCI bridges. This code is a hack, and will
be obsoleted by the planned rework of the PCI code, which will change the
dealing with PCI to PCI bridges and other special devices significantly.
The patch also adds a kern_devconf entry for PCI bus 0 which is assumed
to be a child of cpu0. The new PCI code will make it possible to hand out
the kern_devconf structure to a pci device being attached, since this is
(regretably, IMHO) required by a few ISA devices.
Finally there are new PCI ids for some Intel chip set devices, which had
already been known to 2.1.5R, but did not make it into -current. This closes
"kern/1558: PCI probe seems to have lost a device in -current".
logic clock signal, which had been erroneously commented out by the
previous commit. This will re-enable support for sync. transfer negotiation,
which depends on one of those values.
calculate an optimum value from (constant) parameters.
This should set the SCNTL3 register of the 53c860 and 53c875 to twice
the divider it used to be, since cards based on those chips seem to use
an 80MHz clock instead of the Clock Doubler feature and a 40MHz clock.
This code applies to several systems with integrated Ethernet
chip, for example from HP or Compaq. It should also support
PCI Ethernet cards based on the AMD PCI Lance chip.
This code has been reviewed (visually) by Paul Richards and
tested (using an ISA Lance board) by Joerg Wunsch.
Since the parameters to nearly each and every single function
had to be changed (generally from unit number to lnc_soft*),
there is some potential for buglets having crept in ...
BEWARE: If you had lnc0 configured to have the ISA probe find
your PCI Lance, then it should now be found by the PCI probe,
and should be automatically configured as pci1 (!!! note the "1").
Reviewed by: paul, joerg
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn'). isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.
Ok'd by: core
Submitted by: FreeBSD(98) development team
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
Pete Bentley <pete@demon.net>,
Charles M. Hannum <mycroft@mit.edu>,
Theo de Raadt <deraadt@theos.com>
I spent the better part of a day trying to figure out why my
experiment didn't work the way I expected, only to find out that
the router was dropping huge numbers of packets because of PCI bus
priblems. This does not fix the bug that errors are counted as
input packets because my patch doesn't apply cleanly.
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...
BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!
Reviewed by: davidg
1) A spelling error pointed out by Paco Hope.
2) A bug in the range checking routing pointed out by Jim Bray.
3) Enables the setting of frames per second.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
a BIOS was not installed, this will still be true by the time we probe
the chip. We use this heuristic to determine if we should use the left
over scratch ram target settings for controllers that don't have an
SEEPROM. We also "snapshot" the host adapter SCSI id and whether ultra
is enabled or not and use these values if a BIOS was installed. The card
will act as if a BIOS was installed even if there wasn't one if you warm
reboot, but since the scratch ram area is still valid in this case, its
hardly worth the effort of writing a shutdown routing that clears out
the scratch ram. This should make users of motherboard controllers
happy.
should be <= than subordinate, not the other way around.
They are both true if the bridge is not cascaded (i.e., twin-channel
scsi/e-net adapters won't be affected by this bug), which is probably why
it was unnoticed until today.
- always use pci_conf_read() and pci_conf_write(). (This is required to
simulate non-existant devices in my system for PCI bridge code tests.)
- reorder some functions (put the main functions at the end).
- correct off by one bug in the code dealing with unitialized PCI to PCI
bridge chips. (Bug found by ASAMI Satoshi.)
- print function number for multi-function devices.
Use new XS_SELTIMEOUT error code for selection timeouts.
aic7870.c:
Move SCB walking code to aic7xxx.c and make it work for all card types.
The flag AHC_EXTSCB is no longer needed since the SCBs are walked in
all cases now.
vm_offset_t is currently unsigned long but should probably be plain
unsigned for i386's to match the choice of minimal types to represent
for fixed-width types in Lite2. Anyway, it shouldn't be assumed
to be unsigned long.
I only fixed the type mismatches that were detected when I changed
vm_offset_t to unsigned. Only pointer type mismatches were detected.
- Do not enable tagged commands by default
- Probe only 1 LUN
- Do not negotiate sync. transfer with CDROM drives
Defining FAILSAFE will result in a driver that will tolerate
marginal hardware for the price of a slight loss of performance
It is intended for use in install kernels.
Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
Use the system defined *_t types instead.
aic7870.c:
Handle Seeprom data a little better.
the S-Video input. It also has code in the driver for the meteor RGB support
and some other bug fixes. I don't have a meteor RGB but I have been told
that it works.
Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
port addresses (even though the PC architecture doesn't support them).
Add code to limit the I/O map size based on the lowest set bit of the
address. This cures the problem with the BT946C only having a 16 bit
map register, in voiolation of the PCI specs, without giving up the
general support of >65K port regions.
- fill in and use ifp->if_softc
- use if_bpf rather than private cookie variables
- change bpf interface to take advantage of this
- call ether_ifattach() directly from Ethernet drivers
- delete kludge in if_attach() that did this indirectly
that don't announce support for command queues.
SCSI_NCR_DFLT_TAGS can be specified in the kernel config file
and sets the default number of tags per disk drive.
A value of 0 means "no tags".
Minor correction in debug messages: Values from the msg_in
buffer were being printed in the msg_out trace message ...
feature in the header type register, though it is required by the PCI spec.
This should correctly probe both functions of the Intel 82371FB chip,
without the need for a special case based on the device ID.
chipset. This does not attempt to do anything special with the timing
on the hope that the BIOS will have done the right thing already. The
actual interface from the wd driver to the new facility is not
implemented yet (this commit being an attempt at prodding someone else
to do it because looking at the wd driver always confuses the h*** out of me).
includes a hack in the probe code: the 82371FB is a multifuction
device, but doesn't properly set the configuration bit which
indicates this. So, we just hard-wire all 82371FBs as multifunction
devices.
This does not actually make the bus-master IDE stuff work, although
if anyone wants to work on that, I have the databooks that tell
how to use it.
(To be replaced by sysctl accesses some time ...)
Remove a backward jump from the NCR script, which allowed a SCSI target
to receive any number of NOP messages it desired. If a target indeed
does such a silly thing, make it fail at the next instruction, instead
of causing a timeout a few seconds later.
Simplify the initialization of adapters by pulling all card specific
initialization to the card specific modules.
Set the Latency timer and Burst len to good values if thery are not
initialized during post or are reset during chip reset.
Properly identify and handle external SCB SRAM. The code was false
id'ing 255 SCBs on aic7880 chips.
Reviewed by: David Greenman <davidg@FreeBSd.org>
#includes to get prototypes.
pci now uses a different interrupt handler type for interrupts that it
dispatches and the isa interrupt handler type for the interrupts that
it handles.
Reduce default value of pcicb_membase to 0x2000000 (from 0x4000000)
since this seems to be the lower bound used by many systems.
Submitted by: Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
all the other bt_XXX() functions in i386/scsi/bt*.
This the important effect of forcing a link error if the user is
still using the old "vector btintr" which is dangerously wrong
after Justin's updates to the driver.
The correct isa vector line for the bt driver is "vector bt_isa_intr".
Justin mentioned this in the commit message and updated LINT and
GENERIC. This change is to enforce that.. :-)
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)
If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)
pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.
if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.
if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).
o Add signed/unsigned functionality to the matrox meteor device driver.
o Apply a few fixes to the sound driver.
o Add a ``SPIGOT_UNSECURE'' compile time definition so, if one defines
SPIGOT_UNSECURE in their conf file, then they can use the spigot w/o
root. There is a warning that this allows users access to the IO
page which is probably not secure.
Submitted by: james
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
incompatible with the type of a PCI interrupt handler.
Fixed the type of pdc_pci_ifintr(). The type of a PCI interrupt handler
is too generic to pass arbitrary struct pointers.
incompatible with the type of a PCI interrupt handler. A new entry
point `ahc_pci_intr()' is used for PCI. ISA and PCI interrupts are
penalized equally (:-) by calling a common handler `ahc_intr()'. This
should be reorganized. Some strings now name the wrong function...
Submitted by: fgray@rice.edu
this driver hasn't been checked but as a separate module, bringing it in won't
break anything else and it't the best way of testing it......
julian
If RAMENB is set in devconfig, walk the external SCBs. Some Intel Xpress
motherboards set this bit.
For external SCBs for the 3940. It doesn't set RAMPS or RAMENB, but does
have the ram.
"I screwed the initialization of the burstsize. Right now it will default
to 0 (which can cause corruption problems on high latency PCI buses). It
should be set to 8 longwords to avoid problems with certain PCI chipsets."
Submitted by: Matt Thomas <matt@lkg.dec.com>
for now since I don't have any documentation on this card yet and it
is software compatible with the earlier cards.
The 2940 *Ultra* is Adaptec's push to take SCSI to 20MHz bus rates. Its
based on the aic7880 chip which is the successor to the aic7870.
and for the 53c810ap, the improved version of the 53c810.
The driver should work with all those controllers, but doesn't know
about any of their advanced features.
of NCR script labels and of command control block structure components.
This allows for easy modification of the actual virtual to physical
mapping operator used ...
Make all applicable references to physical address values use the above
macros instead of calls to vtophys().
They shouldn't affect FreeBSD, since they are within #ifdef NETBSD
directives.
Changed the HAD_ERROR return code into COMPLETE according to a comment
in "/sys/scsi/scsiconf.h"
Submitted by: Andreas Wrede <andreas@planix.com>
This seems to work fine on my 53c810, but really should be tested on
a 53c825 with at least one target set to an ID >= 8.
The script is now copied to memory mapped using vm_page_alloc_contig(),
since it has to be physically contigous. This must be changed, if the
driver is converted into a loadable module !
Two of the probe messages are suppressed, unless "bootverbose" is set.