mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
If we're running newer than 3.0.16 firmware and are in target mode, tell
the firmware to not automatically issue a PRLI after a PLOGI. This should solve the problem of being in N-port topology where we have to issue a PLOGI which by default is followed by a PRLI, which makes us an illegal target. This is not the most ideal fix in that it breaks the initiator side of initiator/target mode for any local topology disks. Various other meaningless formattting changes. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp.c,v 1.219 2009/05/10 16:25:09 mjacob Exp $ */
|
||||
/* $Id: isp.c,v 1.224 2009/09/06 00:38:03 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD$");
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
__FBSDID("$FreeBSD: head/sys/dev/isp/isp.c 196008 2009-08-01 01:04:26Z mjacob $");
|
||||
#include <dev/isp/isp_freebsd.h>
|
||||
#endif
|
||||
#ifdef __OpenBSD__
|
||||
@@ -1574,24 +1574,18 @@ isp_fibre_init(ispsoftc_t *isp)
|
||||
}
|
||||
|
||||
icbp->icb_maxfrmlen = DEFAULT_FRAMESIZE(isp);
|
||||
if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN ||
|
||||
icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) {
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
"bad frame length (%d) from NVRAM- using %d",
|
||||
DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
|
||||
if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN || icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) {
|
||||
isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM- using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
|
||||
icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN;
|
||||
}
|
||||
icbp->icb_maxalloc = fcp->isp_maxalloc;
|
||||
if (icbp->icb_maxalloc < 1) {
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
"bad maximum allocation (%d)- using 16", fcp->isp_maxalloc);
|
||||
isp_prt(isp, ISP_LOGERR, "bad maximum allocation (%d)- using 16", fcp->isp_maxalloc);
|
||||
icbp->icb_maxalloc = 16;
|
||||
}
|
||||
icbp->icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp);
|
||||
if (icbp->icb_execthrottle < 1) {
|
||||
isp_prt(isp, ISP_LOGERR,
|
||||
"bad execution throttle of %d- using %d",
|
||||
DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
|
||||
isp_prt(isp, ISP_LOGERR, "bad execution throttle of %d- using %d", DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
|
||||
icbp->icb_execthrottle = ICB_DFLT_THROTTLE;
|
||||
}
|
||||
icbp->icb_retry_delay = fcp->isp_retry_delay;
|
||||
@@ -1685,18 +1679,18 @@ isp_fibre_init(ispsoftc_t *isp)
|
||||
|
||||
/*
|
||||
* For 22XX > 2.1.26 && 23XX, set some options.
|
||||
* XXX: Probably okay for newer 2100 f/w too.
|
||||
*/
|
||||
if (ISP_FW_NEWER_THAN(isp, 2, 26, 0)) {
|
||||
/*
|
||||
* Turn on LIP F8 async event (1)
|
||||
* Turn on generate AE 8013 on all LIP Resets (2)
|
||||
* Disable LIP F7 switching (8)
|
||||
*/
|
||||
MBSINIT(&mbs, MBOX_SET_FIRMWARE_OPTIONS, MBLOGALL, 0);
|
||||
mbs.param[1] = 0xb;
|
||||
mbs.param[1] = IFCOPT1_DISF7SWTCH|IFCOPT1_LIPASYNC|IFCOPT1_LIPF8;
|
||||
mbs.param[2] = 0;
|
||||
mbs.param[3] = 0;
|
||||
if (ISP_FW_NEWER_THAN(isp, 3, 16, 0)) {
|
||||
mbs.param[1] |= IFCOPT1_EQFQASYNC|IFCOPT1_CTIO_RETRY;
|
||||
if (fcp->role & ISP_ROLE_TARGET) {
|
||||
mbs.param[3] = IFCOPT3_NOPRLI;
|
||||
}
|
||||
}
|
||||
isp_mboxcmd(isp, &mbs);
|
||||
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
|
||||
return;
|
||||
@@ -2120,8 +2114,7 @@ isp_mark_portdb(ispsoftc_t *isp, int chan, int disposition)
|
||||
* or via FABRIC LOGIN/FABRIC LOGOUT for other cards.
|
||||
*/
|
||||
static int
|
||||
isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid,
|
||||
int flags, int gs)
|
||||
isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid, int flags, int gs)
|
||||
{
|
||||
mbreg_t mbs;
|
||||
uint8_t q[QENTRY_LEN];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_library.c,v 1.61 2009/05/10 16:25:09 mjacob Exp $ */
|
||||
/* $Id: isp_library.c,v 1.63 2009/08/08 19:46:31 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD$");
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
__FBSDID("$FreeBSD: head/sys/dev/isp/isp_library.c 196008 2009-08-01 01:04:26Z mjacob $");
|
||||
#include <dev/isp/isp_freebsd.h>
|
||||
#endif
|
||||
#ifdef __OpenBSD__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: isp_target.c,v 1.87 2009/05/01 22:34:13 mjacob Exp $ */
|
||||
/* $Id: isp_target.c,v 1.88 2009/08/08 19:46:31 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -68,7 +68,7 @@
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD:$");
|
||||
__FBSDID("$FreeBSD: head/sys/dev/isp/isp_target.c 196008 2009-08-01 01:04:26Z mjacob $");
|
||||
#include <dev/isp/isp_freebsd.h>
|
||||
#endif
|
||||
#ifdef __OpenBSD__
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: ispmbox.h,v 1.79 2009/05/01 22:34:13 mjacob Exp $ */
|
||||
/* $Id: ispmbox.h,v 1.80 2009/09/06 00:38:03 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
@@ -270,12 +270,38 @@
|
||||
#define ASYNC_RIO_COMP 0x8042
|
||||
#define ASYNC_RCV_ERR 0x8048
|
||||
|
||||
/*
|
||||
* Firmware Options. There are a lot of them.
|
||||
*
|
||||
* IFCOPTN - ISP Fibre Channel Option Word N
|
||||
*/
|
||||
#define IFCOPT1_EQFQASYNC (1 << 13) /* enable QFULL notification */
|
||||
#define IFCOPT1_EAABSRCVD (1 << 12)
|
||||
#define IFCOPT1_RJTASYNC (1 << 11) /* enable 8018 notification */
|
||||
#define IFCOPT1_ENAPURE (1 << 10)
|
||||
#define IFCOPT1_ENA8017 (1 << 7)
|
||||
#define IFCOPT1_DISGPIO67 (1 << 6)
|
||||
#define IFCOPT1_LIPLOSSIMM (1 << 5)
|
||||
#define IFCOPT1_DISF7SWTCH (1 << 4)
|
||||
#define IFCOPT1_CTIO_RETRY (1 << 3)
|
||||
#define IFCOPT1_LIPASYNC (1 << 1)
|
||||
#define IFCOPT1_LIPF8 (1 << 0)
|
||||
|
||||
#define IFCOPT2_LOOPBACK (1 << 1)
|
||||
#define IFCOPT2_ATIO3_ONLY (1 << 0)
|
||||
|
||||
#define IFCOPT3_NOPRLI (1 << 4) /* disable automatic sending of PRLI on local loops */
|
||||
#define IFCOPT3_RNDASYNC (1 << 1)
|
||||
/*
|
||||
* 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options
|
||||
* mailbox command to enable this.
|
||||
*/
|
||||
#define ASYNC_QFULL_SENT 0x8049
|
||||
|
||||
/*
|
||||
* Needs to be enabled
|
||||
*/
|
||||
#define ASYNC_AUTO_PLOGI_RJT 0x8018
|
||||
/*
|
||||
* 24XX only
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: ispvar.h,v 1.109 2009/05/10 16:25:09 mjacob Exp $ */
|
||||
/* $Id: ispvar.h,v 1.111 2009/06/07 04:35:31 mjacob Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997-2009 by Matthew Jacob
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user