diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2014-02-10 22:41:28 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2014-02-10 22:41:28 +0000 |
commit | 3c9ee15104feb68b7719d1877d640d5f9af67c75 (patch) | |
tree | 1506099fd77a3dcd8f76ec60c792722546cf8f01 /sys/dev | |
parent | ac165f3c3b3b5ba36058c9e163a0a05dec3b7009 (diff) |
Build isp2xxx firmware into separate object files so we only include
one copy when both isp(4) and qla(4) are enabled. This is a temporary
measure until qla(4) takes over completely.
looked at by miod@ and kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/qla.c | 8 | ||||
-rw-r--r-- | sys/dev/microcode/isp/asm_2100.h | 6 | ||||
-rw-r--r-- | sys/dev/microcode/isp/asm_2200.h | 4 | ||||
-rw-r--r-- | sys/dev/microcode/isp/asm_2300.h | 4 | ||||
-rw-r--r-- | sys/dev/microcode/isp/isp_fw2100.c | 8 | ||||
-rw-r--r-- | sys/dev/microcode/isp/isp_fw2200.c | 8 | ||||
-rw-r--r-- | sys/dev/microcode/isp/isp_fw2300.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/isp_pci.c | 8 | ||||
-rw-r--r-- | sys/dev/sbus/isp_sbus.c | 4 |
9 files changed, 41 insertions, 17 deletions
diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c index 54d4426f6d0..62e0a5fb4db 100644 --- a/sys/dev/ic/qla.c +++ b/sys/dev/ic/qla.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla.c,v 1.18 2014/02/06 09:51:42 jmatthew Exp $ */ +/* $OpenBSD: qla.c,v 1.19 2014/02/10 22:41:27 jmatthew Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -39,9 +39,9 @@ #include <dev/ic/qlavar.h> #ifndef ISP_NOFIRMWARE -#include <dev/microcode/isp/asm_2100.h> -#include <dev/microcode/isp/asm_2200.h> -#include <dev/microcode/isp/asm_2300.h> +extern const u_int16_t isp_2100_risc_code[]; +extern const u_int16_t isp_2200_risc_code[]; +extern const u_int16_t isp_2300_risc_code[]; #endif struct cfdriver qla_cd = { diff --git a/sys/dev/microcode/isp/asm_2100.h b/sys/dev/microcode/isp/asm_2100.h index 0b1b7d95c04..b5281131d70 100644 --- a/sys/dev/microcode/isp/asm_2100.h +++ b/sys/dev/microcode/isp/asm_2100.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm_2100.h,v 1.6 2008/07/11 14:46:24 sobrado Exp $ */ +/* $OpenBSD: asm_2100.h,v 1.7 2014/02/10 22:41:27 jmatthew Exp $ */ /* * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 QLogic, Inc. * All rights reserved. @@ -44,7 +44,7 @@ /* * Firmware Version 1.19.24 (14:02 Jul 16, 2002) */ -static const u_int16_t isp_2100_risc_code[] = { +const u_int16_t isp_2100_risc_code[] = { 0x0078, 0x102d, 0x0000, 0x95f1, 0x0000, 0x0001, 0x0013, 0x0018, 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, @@ -4849,7 +4849,7 @@ static const u_int16_t isp_2100_risc_code[] = { /* * Firmware Version 1.15.37 (15:36 May 03, 1999) */ -static const u_int16_t isp_2100_risc_code[] = { +const u_int16_t isp_2100_risc_code[] = { 0x0078, 0x1029, 0x0000, 0x66e6, 0x0000, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2031, 0x3939, 0x3620, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, diff --git a/sys/dev/microcode/isp/asm_2200.h b/sys/dev/microcode/isp/asm_2200.h index 2949d77314a..07c454b4f8b 100644 --- a/sys/dev/microcode/isp/asm_2200.h +++ b/sys/dev/microcode/isp/asm_2200.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm_2200.h,v 1.7 2008/07/11 14:46:25 sobrado Exp $ */ +/* $OpenBSD: asm_2200.h,v 1.8 2014/02/10 22:41:27 jmatthew Exp $ */ /* $FreeBSD: src/sys/dev/ispfw/asm_2200.h,v 1.7 2005/01/06 01:42:50 imp Exp $ */ /*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 QLogic, Inc. @@ -36,7 +36,7 @@ /* * Firmware Version 2.02.06 (08:39 Jun 26, 2003) */ -static const u_int16_t isp_2200_risc_code[] = { +const u_int16_t isp_2200_risc_code[] = { 0x0470, 0x0000, 0x0000, 0x96cf, 0x0000, 0x0002, 0x0002, 0x0006, 0x0007, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, diff --git a/sys/dev/microcode/isp/asm_2300.h b/sys/dev/microcode/isp/asm_2300.h index 0df7a294062..367c2ce63e5 100644 --- a/sys/dev/microcode/isp/asm_2300.h +++ b/sys/dev/microcode/isp/asm_2300.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm_2300.h,v 1.5 2008/07/11 14:46:25 sobrado Exp $ */ +/* $OpenBSD: asm_2300.h,v 1.6 2014/02/10 22:41:27 jmatthew Exp $ */ /* $FreeBSD: src/sys/dev/ispfw/asm_2300.h,v 1.10 2006/11/02 03:23:01 mjacob Exp $ */ /*- * Copyright (C) 2001, 2002, 2003, 2004, 2005 by QLogic, Inc. @@ -38,7 +38,7 @@ * Firmware Version 3.03.19 (09:41 Nov 30, 2005) */ -static const u_int16_t isp_2300_risc_code[] = { +const u_int16_t isp_2300_risc_code[] = { 0x0470, 0x0000, 0x0000, 0xcd3b, 0x0000, 0x0003, 0x0003, 0x0013, 0x0107, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, diff --git a/sys/dev/microcode/isp/isp_fw2100.c b/sys/dev/microcode/isp/isp_fw2100.c new file mode 100644 index 00000000000..0b7a9f0313b --- /dev/null +++ b/sys/dev/microcode/isp/isp_fw2100.c @@ -0,0 +1,8 @@ +/* $OpenBSD: isp_fw2100.c,v 1.1 2014/02/10 22:41:27 jmatthew Exp $ */ +/* public domain */ + +#include <sys/types.h> + +#ifndef ISP_NOFIRMWARE +#include <dev/microcode/isp/asm_2100.h> +#endif diff --git a/sys/dev/microcode/isp/isp_fw2200.c b/sys/dev/microcode/isp/isp_fw2200.c new file mode 100644 index 00000000000..a0aba10044c --- /dev/null +++ b/sys/dev/microcode/isp/isp_fw2200.c @@ -0,0 +1,8 @@ +/* $OpenBSD: isp_fw2200.c,v 1.1 2014/02/10 22:41:27 jmatthew Exp $ */ +/* public domain */ + +#include <sys/types.h> + +#ifndef ISP_NOFIRMWARE +#include <dev/microcode/isp/asm_2200.h> +#endif diff --git a/sys/dev/microcode/isp/isp_fw2300.c b/sys/dev/microcode/isp/isp_fw2300.c new file mode 100644 index 00000000000..31301f26da3 --- /dev/null +++ b/sys/dev/microcode/isp/isp_fw2300.c @@ -0,0 +1,8 @@ +/* $OpenBSD: isp_fw2300.c,v 1.1 2014/02/10 22:41:27 jmatthew Exp $ */ +/* public domain */ + +#include <sys/types.h> + +#ifndef ISP_NOFIRMWARE +#include <dev/microcode/isp/asm_2300.h> +#endif diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index 456d58f17fa..c6e5040f515 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_pci.c,v 1.57 2011/06/23 22:02:26 oga Exp $ */ +/* $OpenBSD: isp_pci.c,v 1.58 2014/02/10 22:41:27 jmatthew Exp $ */ /* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.148 2007/06/26 23:08:57 mjacob Exp $*/ /*- * Copyright (c) 1997-2006 by Matthew Jacob @@ -75,22 +75,22 @@ #endif #if defined(ISP_FIRMWARE_2100) +extern const u_int16_t isp_2100_risc_code[]; #define ISP_2100_RISC_CODE (u_int16_t *) isp_2100_risc_code -#include <dev/microcode/isp/asm_2100.h> #else #define ISP_2100_RISC_CODE NULL #endif #if defined(ISP_FIRMWARE_2200) +extern const u_int16_t isp_2200_risc_code[]; #define ISP_2200_RISC_CODE (u_int16_t *) isp_2200_risc_code -#include <dev/microcode/isp/asm_2200.h> #else #define ISP_2200_RISC_CODE NULL #endif #if defined(ISP_FIRMWARE_2300) +extern const u_int16_t isp_2300_risc_code[]; #define ISP_2300_RISC_CODE (u_int16_t *) isp_2300_risc_code -#include <dev/microcode/isp/asm_2300.h> #else #define ISP_2300_RISC_CODE NULL #endif diff --git a/sys/dev/sbus/isp_sbus.c b/sys/dev/sbus/isp_sbus.c index 39bd2ef8bff..cdbbf1b9d04 100644 --- a/sys/dev/sbus/isp_sbus.c +++ b/sys/dev/sbus/isp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_sbus.c,v 1.18 2011/04/22 23:19:55 deraadt Exp $ */ +/* $OpenBSD: isp_sbus.c,v 1.19 2014/02/10 22:41:27 jmatthew Exp $ */ /* $NetBSD: isp_sbus.c,v 1.46 2001/09/26 20:53:14 eeh Exp $ */ /* * SBus specific probe and attach routines for QLogic ISP SCSI adapters. @@ -56,8 +56,8 @@ #endif #if defined(ISP_FIRMWARE_2200) +extern const u_int16_t isp_2200_risc_code[]; #define ISP_2200_RISC_CODE (u_int16_t *) isp_2200_risc_code -#include <dev/microcode/isp/asm_2200.h> #else #define ISP_2200_RISC_CODE NULL #endif |