summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-11-27 23:35:46 +0000
committerobrien <obrien@FreeBSD.org>1999-11-27 23:35:46 +0000
commit34af1d86ec911868acc0aa0cebfa90661e094cdf (patch)
tree4dfbe1140ef185c3129af165e21eea9c8958768b /sys/dev/sym
parent803caabbaede720914303e79f48b362e2fd9db31 (diff)
downloadFreeBSD-src-34af1d86ec911868acc0aa0cebfa90661e094cdf.zip
FreeBSD-src-34af1d86ec911868acc0aa0cebfa90661e094cdf.tar.gz
Update to the SYM-0.10.0-19991111 patch.
Submitted by: Gerard Roudier <groudier@club-internet.fr>
Diffstat (limited to 'sys/dev/sym')
-rw-r--r--sys/dev/sym/README.sym50
-rw-r--r--sys/dev/sym/sym_hipd.c63
2 files changed, 88 insertions, 25 deletions
diff --git a/sys/dev/sym/README.sym b/sys/dev/sym/README.sym
index 8ce3c85..c1920e2 100644
--- a/sys/dev/sym/README.sym
+++ b/sys/dev/sym/README.sym
@@ -56,19 +56,22 @@
* SUCH DAMAGE.
*/
-Status: (switched back to EXPERIMENTAL due to some heavy changes)
- EXPERIMENTAL
+Status:
+ BETA-RELEASE
This driver is currently developped under the following O/S:
FreeBSD 4.0 SNAPSHOT July 5th 1999
+ FreeBSD 4.0 current October 1999
Starting with version 0.9.0, the driver contains conditionnal code
for using pre-4.0 BUS stuff for PCI. I have successfully tested driver
version 0.9.0 under:
FreeBSD 3.2 RELEASE
- Given that the old bus stuff is still supported under FreeBSD, the driver
- should also compile and work just fine under FreeBSD 3.3 RELEASE.
+ FreeBSD 3.3 RELEASE
Latest revision:
- sym-0.9.0-19991024
+ sym-0.10.0-19991111
+ Files to download:
+ SYM-0.9.0-19991024.tar.gz
+ PATCH-SYM-0.10.0-19991111.tar.gz
Supported SCSI features:
- Initiator mode
@@ -100,7 +103,7 @@ Others:
Notes:
(1) Only supported by the LSI53C1010 and not yet
tested due to lack of C1010 based controller.
-(2) Not yet checked. May not work as expected.
+(2) Not yet reported. May not work as expected.
Files:
README.sym this file
@@ -125,9 +128,24 @@ Installation:
If FreeBSD-3, apply the unified patch sym_sys_3.patch
(patch -p0 <sym_sys_3.patch)
Otherwise, leave here. ;)
- 5) Add sym0 to your kernel configuration as indicated in patched LINT file.
+ 5) Change to /usr/src/sys/pci directory
+ 6) Update to SYM-0.10.0-19991111
+ gzip -d <PATCH-SYM-0.10.0-19991111.gz | patch -p0
+ 7) Add sym0 to your kernel configuration as indicated in patched LINT file.
Configure and make your kernel.
+As seen from the shell history file (driver material assumed from /tmp),
+installation should proceed as follow (modulo mistakes from me:)):
+
+cd /tmp
+tar zxvf SYM-0.9.0-19991024.tar.gz
+cp SYM-0.9.0-19991024/* /usr/src/sys/pci
+cd /usr/src/sys
+patch -p0 <pci/sym_sys.patch # use sym_sys_3.patch if FreeBSD-3.X
+cd pci
+gzip -d </tmp/PATCH-SYM-0.10.0-19991111.gz | patch -p0
+
+
Warnings:
- This driver uses LOAD/STORE instructions from SCRIPTS and therefore does
not support earliest NCR chips (NCR53C810, NCR53C815, NCR53C825).
@@ -139,7 +157,10 @@ Versionning:
- Incremental diff files are of the following pattern:
PATCH-SYM-X.Y.Z-YYYYMMDD
They must be applied from directory: /usr/src/sys/pci/
-- Version 1.0.0 will add support for the C1010 (Ultra-3 DT data transfers)
+- Version 1.0.0 will happen when the driver will be tested enough but this
+ driver version will probably not officially support the C1010 (Ultra-3)
+ since the testing hasn't started yet. Some 1.X.0 version will support the
+ C1010 (DT data transfer).
- Version 2.0.0 is not planned for now, but will add support for host target
mode if it will ever exist.
@@ -183,7 +204,7 @@ Change log:
* SYM-0.8.0-19991016 (diff file PATCH-SYM-0.8.0-19991016)
Heavy rewrite/rewamping of the error handling code in order to conform
to FreeBSD-CAM expectation of commands having to be requeued and device
- queue to be freezed on any kind of error. Driver status switched back
+ queue to be frozen on any kind of error. Driver status switched back
to EXPERIMENTAL due to these changes.
Warn user about targets that are not flagged for SCAN AT BOOT in the
NVRAM, since the driver will not allow the corresponding devices to be
@@ -197,4 +218,13 @@ Change log:
Tested under RELENG_3_2_0_RELEASE, but should also be just fine for 3.3.
Other changes against version 0.8.0 are only minor buglet fixes.
-October 24 1999. "Gerard Roudier"<groudier@club-internet.fr>
+* SYM-0.10.0-19991111 (diff file PATCH-SYM-0.10.0-19991111)
+ Add support for Alpha - UNTESTED. Consists in some minor changes picked
+ mostly from the ncr driver and some others as ahc_pci.c.
+ Fix the LED support through GPIO0 for pre-896 chips. In fact some code
+ was wrongly conditionned by something that was never met.
+ Switch driver status to BETA-RELEASE given that this driver has been rock
+ solid even if s small number of users seems to actually use it.
+
+
+November 11 1999. "Gerard Roudier"<groudier@club-internet.fr>
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 14307d9..e3845c1 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -56,7 +56,7 @@
* SUCH DAMAGE.
*/
-#define SYM_DRIVER_NAME "sym-0.9.0-19991024"
+#define SYM_DRIVER_NAME "sym-0.10.0-19991111"
#include <pci.h>
#include <stddef.h> /* For offsetof */
@@ -137,10 +137,13 @@ typedef u_int32_t u32;
* ensure that accesses from the CPU to the start and done
* queues are not reordered by either the compiler or the
* CPU and uses 'volatile' for this purpose.
- * -> Only x86 architecture is supported, for now.
*/
+#ifdef __alpha__
+#define MEMORY_BARRIER() alpha_mb()
+#else /*__i386__*/
#define MEMORY_BARRIER() do { ; } while(0)
+#endif
/*
* A la VMS/CAM-3 queue management.
@@ -359,14 +362,21 @@ static int sym_debug = 0;
/*
* Virtual to bus address translation.
- * Only x86 supported.
*/
+#ifdef __alpha__
+#define vtobus(p) alpha_XXX_dmamap((vm_offset_t)(p))
+#else /*__i386__*/
#define vtobus(p) vtophys(p)
+#endif
/*
* Copy from main memory to PCI memory space.
*/
+#ifdef __alpha__
+#define memcpy_to_pci(d, s, n) memcpy_toio((u32)(d), (void *)(s), (n))
+#else /*__i386__*/
#define memcpy_to_pci(d, s, n) bcopy((s), (void *)(d), (n))
+#endif
/*
* Insert a delay in micro-seconds and milli-seconds.
@@ -637,8 +647,6 @@ struct sym_nvram {
* If SYMCONF_IOMAPPED is defined, the driver will use
* normal IOs instead of the MEMORY MAPPED IO method
* recommended by PCI specifications.
- * For now, we only support flat memory model that should
- * limited support to x86 architecture.
*/
/*
@@ -652,13 +660,25 @@ struct sym_nvram {
#define io_write16(p, v) outw((p), cpu_to_scr(v))
#define io_write32(p, v) outl((p), cpu_to_scr(v))
-#define mmio_read8(a) scr_to_cpu((*(volatile unsigned char *) (a)))
-#define mmio_read16(a) scr_to_cpu((*(volatile unsigned short *) (a)))
-#define mmio_read32(a) scr_to_cpu((*(volatile unsigned int *) (a)))
+#ifdef __alpha__
+
+#define mmio_read8(a) readb(a)
+#define mmio_read16(a) readw(a)
+#define mmio_read32(a) readl(a)
+#define mmio_write8(a, b) writeb(a, b)
+#define mmio_write16(a, b) writew(a, b)
+#define mmio_write32(a, b) writel(a, b)
-#define mmio_write8(a, b) (*(volatile unsigned char *) (a)) = cpu_to_scr(b)
-#define mmio_write16(a, b) (*(volatile unsigned short *) (a)) = cpu_to_scr(b)
-#define mmio_write32(a, b) (*(volatile unsigned int *) (a)) = cpu_to_scr(b)
+#else /*__i386__*/
+
+#define mmio_read8(a) scr_to_cpu((*(volatile unsigned char *) (a)))
+#define mmio_read16(a) scr_to_cpu((*(volatile unsigned short *) (a)))
+#define mmio_read32(a) scr_to_cpu((*(volatile unsigned int *) (a)))
+#define mmio_write8(a, b) (*(volatile unsigned char *) (a)) = cpu_to_scr(b)
+#define mmio_write16(a, b) (*(volatile unsigned short *) (a)) = cpu_to_scr(b)
+#define mmio_write32(a, b) (*(volatile unsigned int *) (a)) = cpu_to_scr(b)
+
+#endif
/*
* Normal IO
@@ -672,7 +692,7 @@ struct sym_nvram {
#define OUTW_OFF(o, v) io_write16(np->io_port + sym_offw(o), (v))
#define INL_OFF(o) io_read32(np->io_port + (o))
-#define OUTL_OFF(o, v) io_write32(np->base_io + (o), (v))
+#define OUTL_OFF(o, v) io_write32(np->io_port + (o), (v))
#else /* Memory mapped IO */
@@ -9773,7 +9793,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit)
#else
if ((command & PCI_COMMAND_IO_ENABLE) != 0) {
pci_port_t io_port;
- if (!pci_map_port (pci_tag, SYM_PCI_IO, &io_port))
+ if (!pci_map_port (pci_tag, SYM_PCI_IO, &io_port)) {
printf("%s: failed to map IO window\n", sym_name(np));
goto attach_failed;
}
@@ -9942,7 +9962,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit)
np->scripth0->pm0_data_addr[0] = cpu_to_scr(SCRIPT_BA(np,pm0_data));
np->scripth0->pm1_data_addr[0] = cpu_to_scr(SCRIPT_BA(np,pm1_data));
-#ifdef SYM_OPT_LED0
+
/*
* Still some for LED support.
*/
@@ -9954,7 +9974,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit)
np->script0->start[0] =
cpu_to_scr(SCR_REG_REG(gpreg, SCR_AND, 0xfe));
}
-#endif
+
/*
* Load SCNTL4 on reselection for the C10.
*/
@@ -10219,6 +10239,19 @@ int sym_cam_attach(hcb_p np)
}
np->path = path;
+ /*
+ * Hmmm... This should be useful, but I donnot want to
+ * know about.
+ */
+#ifdef __alpha__
+#ifdef FreeBSD_4_Bus
+ alpha_register_pci_scsi(pci_get_bus(np->device),
+ pci_get_slot(np->device), np->sim);
+#else /*__i386__*/
+ alpha_register_pci_scsi(pci_tag->bus, pci_tag->slot, np->sim);
+#endif
+#endif
+
#if 0
/*
* Establish our async notification handler.
OpenPOWER on IntegriCloud