Home | History | Annotate | Download | only in hpc
History log of /src/sys/arch/sgimips/hpc/wdsc.c
RevisionDateAuthorComments
 1.35  02-Sep-2018  tsutsui Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12).

The alignment adjustment code was removed in rev 1.36 for common
mips bus_space changes, but the code was not bus_space related
but used for uint32_t register acccess during probe.

Reported and tested by Naruaki Etomi in PR port-sgimips/53522.
Should be pulled up to netbsd-8.
 1.34  18-Feb-2015  macallan branches: 1.34.10; 1.34.16; 1.34.18;
switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.33  27-Oct-2012  chs branches: 1.33.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32  01-Jul-2011  dyoung branches: 1.32.2; 1.32.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.31  25-Jan-2011  tsutsui Some KNF and cosmetics.
 1.30  25-Jan-2011  tsutsui - MAXPHYS is enough for DMA xfer size (hpc->scsi_max_xfer seems too large)
- switch BUS_DMASYNC_*READ and BUS_DMASYNC_*WRITE properly in
bus_dmamap_sync(9) ops per each xfer dir

Tested on R5000 Indy.
 1.29  14-Dec-2009  matt branches: 1.29.4; 1.29.6; 1.29.8;
Merge from matt-nb5-mips64
Merge mips-specific arch files.
 1.28  12-Feb-2009  rumble WD33C93 has only two registers, which often times aren't mapped to adjacent
bus space locations. Map them individually, instead.
 1.27  27-Jan-2009  tsutsui branches: 1.27.2;
- use device_t and cfdata_t
- rename variables for readability after device_t/softc split
- use proper pointer types

No binary changes.
 1.26  25-Jan-2009  bjh21 Split device_t from wd33c93_softc. Reviewed by cube; tested on sgimips
by tsutsui.
 1.25  10-May-2008  martin branches: 1.25.6; 1.25.14;
Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.24  28-Apr-2008  martin branches: 1.24.2;
Remove clause 3 and 4 from TNF licenses
 1.23  17-Oct-2007  garbled branches: 1.23.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.22  06-May-2007  rumble branches: 1.22.10;
Use burst dma for all systems, since it's supported by all HPCs and runs
with about 25% higher throughput on my Indy and ST32430N.
 1.21  30-Mar-2007  rumble branches: 1.21.4;
The wd33c93 chip appears to be clocked at 20MHz for all systems with a HPC.
 1.20  04-Mar-2007  christos branches: 1.20.2; 1.20.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19  20-Feb-2007  rumble Add probe for wdsc so that we do not falsely attach wdsc(4) devices to E++
ethernet adapters.

By resetting the chip we also allow the wd33c93 attach routines to succeed.
Otherwise, device register accesses would result in a bus error.
 1.18  22-Dec-2006  rumble branches: 1.18.2;
Prefix 'dma_data{in,out}_cmd' with 'scsi_', since that's what they're used
for. Also, remove the 'clk_freq' variable, since this value differs on a
per-platform (IP12 is 20MHz, others are 10MHz) basis.

NB: I have no idea what frequency the GIO SCSI cards use. We'll have to
re-investigate this if we ever come across one.
 1.17  01-Oct-2006  bjh21 Allow wd33c93 attachments to choose what DMA mode it should use, and arrange
to use burst mode on sec(4), which makes it slightly but significantly faster.
 1.16  26-Aug-2006  bjh21 branches: 1.16.2; 1.16.4;
Move the sgimips "sbic" driver from arch/sgimips/hpc/sbic.c to
dev/ic/wd33c93.c. This may not be the best WD33C93 driver we've
got, but it's the most recently worked on and probably the most
portable, so it seems like a good basis for further work (and in
particular an acorn26 driver for the Acorn SCSI card). There's
no functional change in this commit, and sgimips kernels still
compile.
 1.15  11-Dec-2005  christos branches: 1.15.4; 1.15.8;
merge ktrace-lwp.
 1.14  10-Jan-2004  sekiya branches: 1.14.16;
de-__P, sprinkle some KNF.
 1.13  29-Dec-2003  sekiya Fixes to HPC abstraction layer from Steve Rumble:

- hpc1_hdd_{ctl,bufptr} and hpc3_hdd_{ctl,bufptr} are
established in hpcreg.h. All references to these fields
are updated with the exception of if_sq: (haltwo,
hpcdma). This makes reading the code and spotting bugs
easier.
- hpcdma.c was applying EOCHAIN to the wrong descriptor
word for the hpc1 case.
- I added scsi_max_xfer to the abstraction layer, and it
allows some crusty #defines in wdsc.c to be removed.
hpc1 now doesn't waste descriptors as it once did.
- hpcreg.h was updated to reflect the lack of XMITDONE
bit in hpc1. HPC1_REV15 added for a test in hpc.c
- hpc.c now verifies HPC1 revisions (1.0 vs 1.5) and
prints the output a little prettier ;)
- power interrupts shouldn't establish on non-IP22
platforms.
 1.12  16-Dec-2003  sekiya Introduce abstraction layer for HPC registers and values, which addresses the
divergence between HPC revision 1.5 and revision 3.

The wdsc driver has been updated to reflect this layer (and may now work on
IP20). The sq driver needs a bit more work before it can be committed.
 1.11  15-Jul-2003  lukem __KERNEL_RCSID()
 1.10  02-Oct-2002  thorpej branches: 1.10.6;
Use CFATTACH_DECL().
 1.9  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.7  13-Mar-2002  simonb Replace lots of 8x<space> with <tabs> and other miscellaneous indentation
fixes.
Wrap a couple of long lines.
Use <return-type>\n<function name> as per KNF in a few places.
 1.6  21-Nov-2001  thorpej sbic -> wd33c93, in preparation for the core driver going into
sys/dev/ic.
 1.5  20-Nov-2001  thorpej The 2nd SCSI controller is now supported; remove it from the TODO list.
 1.4  18-Nov-2001  thorpej * Clean up HPC autoconfiguration a little. Pass device register and
DMA register offsets, as well as IRQ, to children. Use direct
config. Use machine type/subtype to determine which devices are
present.
* Add support for the second SCSI controller on the Indigo2.
 1.3  18-Nov-2001  thorpej * Add a callback to the front-end for the 33c93 driver to reset
the controller/SCSI bus.
* Implement controller/SCSI bus reset on SGI HPC3 SCSI using the
"channel reset" bit in the SCSI DMA channel control register.
 1.2  10-Nov-2001  wdk branches: 1.2.2;
Complete overhaul of WD33c93 SCSI driver

- Full support for SCSI-2 Tagged commands (enabled by default)
- Implement save and restore datapointer messages
- Formalize interface between MI and MD drivers.
- decouple interface between MD driver and DMA routines
- Use scsipi layer where appropriate (Tags, Sync Negotiations etc)
- control blocks stored using kernel pool(9) functions
- evcnt(9) compliant counters
- Enable advanced features on later WD33c93 chips.
(Identify message out phase is hardware assisted)
- Improved timeout support (one per active control block)
- Improved MESG_IN and MESG_OUT handling
- Start to tidy up debugging output
- Numerous bug fixes and cleanups throughout

Changes are based largely on the NCR53c9x MI driver for ideas on
how to DTRT.
 1.1  19-Aug-2001  wdk branches: 1.1.2; 1.1.6;
Initial implementation of WD33C9x SCSI driver for SGI IP22 platforms.

Based on mvme68k and Atari drivers for the same chipset with the
addition of bus_space support. Attempts have been made to seperate out the
machine dependent dma components and more work is required in this area.

Tested on SGI R4K Indy, but has little testing on other platforms.
 1.1.6.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.5  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.4  16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.3  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.2.2  25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.1.2.1  19-Aug-2001  thorpej file wdsc.c was added on branch kqueue on 2001-08-25 06:15:50 +0000
 1.2.2.4  18-Oct-2002  nathanw Catch up to -current.
 1.2.2.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.2  08-Jan-2002  nathanw Catch up to -current.
 1.2.2.1  10-Nov-2001  nathanw file wdsc.c was added on branch nathanw_sa on 2002-01-08 00:27:29 +0000
 1.10.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1  03-Aug-2004  skrll Sync with HEAD
 1.14.16.3  03-Sep-2007  yamt sync with head.
 1.14.16.2  26-Feb-2007  yamt sync with head.
 1.14.16.1  30-Dec-2006  yamt sync with head.
 1.15.8.1  03-Sep-2006  yamt sync with head.
 1.15.4.1  09-Sep-2006  rpaulo sync with head
 1.16.4.1  22-Oct-2006  yamt sync with head
 1.16.2.2  12-Jan-2007  ad Sync with head.
 1.16.2.1  18-Nov-2006  ad Sync with head.
 1.18.2.4  07-May-2007  yamt sync with head.
 1.18.2.3  15-Apr-2007  yamt sync with head.
 1.18.2.2  12-Mar-2007  rmind Sync with HEAD.
 1.18.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.20.4.1  11-Jul-2007  mjf Sync with head.
 1.20.2.2  27-May-2007  ad Sync with head.
 1.20.2.1  10-Apr-2007  ad Sync with head.
 1.21.4.1  22-May-2007  matt Update to HEAD.
 1.22.10.1  06-Nov-2007  matt sync with HEAD
 1.23.20.2  11-Mar-2010  yamt sync with head
 1.23.20.1  04-May-2009  yamt sync with head.
 1.24.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.25.14.1  10-Sep-2009  matt Add preliminary LP64 support for sgimips
 1.25.6.1  03-Mar-2009  skrll Sync with HEAD.
 1.27.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.29.8.1  08-Feb-2011  bouyer Sync with HEAD
 1.29.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.29.4.1  05-Mar-2011  rmind sync with head
 1.32.12.2  03-Dec-2017  jdolecek update from HEAD
 1.32.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.2.1  30-Oct-2012  yamt sync with head
 1.33.14.1  06-Apr-2015  skrll Sync with HEAD
 1.34.18.1  10-Jun-2019  christos Sync with HEAD
 1.34.16.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.34.10.1  10-Sep-2018  martin Pull up following revision(s) (requested by tsutsui in ticket #1017):

sys/arch/sgimips/conf/INSTALL32_IP2x: revision 1.10
sys/arch/sgimips/stand/boot/Makefile: revision 1.20
sys/arch/sgimips/sgimips/machdep.c: revision 1.146
sys/arch/sgimips/hpc/wdsc.c: revision 1.35
distrib/sgimips/instkernel/Makefile: revision 1.13

Disable misc options to shrink an INSTALL kernel for IP2x.

The ARC BIOS on Indy seems to have ~8MB limit.

Fixes PR port-sgimips/53378 from Naruaki Etomi.
Should be pulled up to netbsd-7 and netbsd-8.

-

Fix build failure without options DDB and with pseudo-device ksyms.
There is a typo for ksyms (NKSYMS vs NKSYM).

Also use consistent "#if NKSYMS" rather than "#if NKSYMS > 0" etc.
and add comments after corresponding #endif for readability.

Fixes PR port-sgimips/53521 from Naruaki Etomi.
Should be pulled up to (at least) netbsd-8.

-

Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines.
objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9
but it looks ELF binaries generated by recent binutils are too complicated
to convert them to ecoff for old machines by objcopy(1).

Reported by Naruaki Etomi in PR port-sgimips/53519.
Should be pulled up to at least netbsd-8.

-

Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12).

The alignment adjustment code was removed in rev 1.36 for common
mips bus_space changes, but the code was not bus_space related
but used for uint32_t register acccess during probe.

Reported and tested by Naruaki Etomi in PR port-sgimips/53522.
Should be pulled up to netbsd-8.

-

Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel.

Reported by Naruaki Etomi in PR port-sgimips/53518.

Should be pulled up to netbsd-7 and netbsd-8.

RSS XML Feed