Revert previous commit. Violates Maintainer (O'Brien knows how to

reach me directly), but more importantly, breaks compiles on
non-FreeBSD platforms.
This commit is contained in:
mjacob 2003-08-25 17:58:23 +00:00
parent 2b92492b44
commit aae16cc96e

View File

@ -1,3 +1,4 @@
/* $FreeBSD$ */
/*
* Machine and OS Independent (well, as best as possible)
* code for the Qlogic ISP SCSI adapters.
@ -34,9 +35,6 @@
* ideas dredged from the Solaris driver.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
/*
* Include header file appropriate for platform we're building on.
*/
@ -401,7 +399,7 @@ isp_reset(struct ispsoftc *isp)
isp_prt(isp, ISP_LOGCONFIG, "Ultra Mode Capable");
sdp->isp_ultramode = 1;
/*
* If we're in Ultra Mode, we have to be 60Mhz clock-
* If we're in Ultra Mode, we have to be 60MHz clock-
* even for the SBus version.
*/
isp->isp_clock = 60;
@ -1286,7 +1284,19 @@ isp_fibre_init(struct ispsoftc *isp)
* If we set ZIO, it will disable fast posting,
* so we don't need to clear it in fwoptions.
*/
#ifndef ISP_NO_ZIO
icbp->icb_xfwoptions |= ICBXOPT_ZIO;
#else
icbp->icb_fwoptions |= ICBOPT_FAST_POST;
#endif
#if 0
/*
* Values, in 100us increments. The default
* is 2 (200us) if a value 0 (default) is
* selected.
*/
icbp->icb_idelaytimer = 2;
#endif
if (isp->isp_confopts & ISP_CFG_ONEGB) {
icbp->icb_zfwoptions |= ICBZOPT_RATE_ONEGB;
@ -4290,10 +4300,8 @@ isp_handle_other_response(struct ispsoftc *isp, int type,
if (isp_target_notify(isp, (ispstatusreq_t *) hp, optrp)) {
return (1);
}
#else
optrp = optrp;
/* FALLTHROUGH */
#endif
/* FALLTHROUGH */
case RQSTYPE_REQUEST:
default:
if (isp_async(isp, ISPASYNC_UNHANDLED_RESPONSE, hp)) {
@ -4773,7 +4781,7 @@ isp_mbox_continue(struct ispsoftc *isp)
#define HIBYT(x) ((x) >> 0x8)
#define LOBYT(x) ((x) & 0xff)
#define ISPOPMAP(a, b) (((a) << 8) | (b))
static u_int16_t mbpscsi[] = {
static const u_int16_t mbpscsi[] = {
ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */
ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */
ISPOPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */
@ -4969,7 +4977,7 @@ static char *scsi_mbcmd_names[] = {
};
#endif
static u_int16_t mbpfc[] = {
static const u_int16_t mbpfc[] = {
ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */
ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */
ISPOPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */
@ -5242,7 +5250,7 @@ static void
isp_mboxcmd_qnw(struct ispsoftc *isp, mbreg_t *mbp, int nodelay)
{
unsigned int ibits, obits, box, opcode;
u_int16_t *mcp;
const u_int16_t *mcp;
if (IS_FC(isp)) {
mcp = mbpfc;
@ -5281,7 +5289,7 @@ isp_mboxcmd(struct ispsoftc *isp, mbreg_t *mbp, int logmask)
{
char *cname, *xname, tname[16], mname[16];
unsigned int lim, ibits, obits, box, opcode;
u_int16_t *mcp;
const u_int16_t *mcp;
if (IS_FC(isp)) {
mcp = mbpfc;
@ -5805,6 +5813,9 @@ isp_reinit(struct ispsoftc *isp)
XS_T *xs;
u_int16_t handle;
if (IS_FC(isp)) {
isp_mark_getpdb_all(isp);
}
isp_reset(isp);
if (isp->isp_state != ISP_RESETSTATE) {
isp_prt(isp, ISP_LOGERR, "isp_reinit cannot reset card");
@ -6524,7 +6535,7 @@ isp2200_fw_dump(struct ispsoftc *isp)
}
ptr = isp->isp_mbxworkp; /* finish fetch of final word */
*ptr++ = isp->isp_mboxtmp[2];
isp_prt(isp, ISP_LOGALL, "isp_fw_dump: SRAM dumped succesfully");
isp_prt(isp, ISP_LOGALL, "isp_fw_dump: SRAM dumped successfully");
FCPARAM(isp)->isp_dump_data[0] = isp->isp_type; /* now used */
(void) isp_async(isp, ISPASYNC_FW_DUMPED, 0);
}
@ -6687,7 +6698,7 @@ isp2300_fw_dump(struct ispsoftc *isp)
}
ptr = isp->isp_mbxworkp; /* finish final word */
*ptr++ = mbs.param[2];
isp_prt(isp, ISP_LOGALL, "isp_fw_dump: SRAM dumped succesfully");
isp_prt(isp, ISP_LOGALL, "isp_fw_dump: SRAM dumped successfully");
FCPARAM(isp)->isp_dump_data[0] = isp->isp_type; /* now used */
(void) isp_async(isp, ISPASYNC_FW_DUMPED, 0);
}