isp->isp_sendmarker = 1 << bus;
isp->isp_sendmarker |= (1 << bus);
isp_control(isp, ctl, arg)	struct ispsoftc *isp;	ispctl_t ctl;	void *arg;{	ISP_SCSI_XFER_T *xs;	mbreg_t mbs;	int bus, tgt;	u_int32_t handle;	switch (ctl) {	default:		PRINTF("%s: isp_control unknown control op %x\n",		    isp->isp_name, ctl);		break;	case ISPCTL_RESET_BUS:		/*		 * Issue a bus reset.		 */		mbs.param[0] = MBOX_BUS_RESET;		mbs.param[2] = 0;		if (IS_SCSI(isp)) {			mbs.param[1] =			    ((sdparam *) isp->isp_param)->isp_bus_reset_delay;			if (mbs.param[1] < 2)				mbs.param[1] = 2;			bus = *((int *) arg);			if (IS_DUALBUS(isp))				mbs.param[2] = bus;		} else {			mbs.param[1] = 10;			bus = 0;		}		isp->isp_sendmarker = 1 << bus;		isp_mboxcmd(isp, &mbs);		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {			isp_dumpregs(isp, "isp_control SCSI bus reset failed");			break;		}		CFGPRINTF("%s: driver initiated bus reset of bus %d\n",		    isp->isp_name, bus);		return (0);	case ISPCTL_RESET_DEV:		tgt = (*((int *) arg)) & 0xffff;		bus = (*((int *) arg)) >> 16;		mbs.param[0] = MBOX_ABORT_TARGET;		mbs.param[1] = (tgt << 8) | (bus << 15);		mbs.param[2] = 3;	/* 'delay', in seconds */		isp_mboxcmd(isp, &mbs);		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {			PRINTF("%s: isp_control MBOX_RESET_DEV failure (code "			    "%x)\n", isp->isp_name, mbs.param[0]);			break;		}		PRINTF("%s: Target %d on Bus %d Reset Succeeded\n",		    isp->isp_name, tgt, bus);		isp->isp_sendmarker = 1 << bus;		return (0);	case ISPCTL_ABORT_CMD:		xs = (ISP_SCSI_XFER_T *) arg;		handle = isp_find_handle(isp, xs);		if (handle == 0) {			PRINTF("%s: isp_control- cannot find command to abort "			    "in active list\n", isp->isp_name);			break;		}		bus = XS_CHANNEL(xs);		mbs.param[0] = MBOX_ABORT;		if (IS_FC(isp)) {#ifdef	ISP2100_SCCLUN			mbs.param[1] = XS_TGT(xs) << 8;			mbs.param[4] = 0;			mbs.param[5] = 0;			mbs.param[6] = XS_LUN(xs);#else			mbs.param[1] = XS_TGT(xs) << 8 | XS_LUN(xs);#endif		} else {			mbs.param[1] =			    (bus << 15) | (XS_TGT(xs) << 8) | XS_LUN(xs);		}		mbs.param[3] = handle >> 16;		mbs.param[2] = handle & 0xffff;		isp_mboxcmd(isp, &mbs);		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {			PRINTF("%s: isp_control MBOX_ABORT failure (code %x)\n",			    isp->isp_name, mbs.param[0]);			break;		}		PRINTF("%s: command for target %d lun %d was aborted\n",		    isp->isp_name, XS_TGT(xs), XS_LUN(xs));		return (0);	case ISPCTL_UPDATE_PARAMS:		isp_update(isp);		return (0);	case ISPCTL_FCLINK_TEST:		return (isp_fclink_test(isp, FC_FW_READY_DELAY));	case ISPCTL_PDB_SYNC:		return (isp_pdb_sync(isp, -1));#ifdef	ISP_TARGET_MODE	case ISPCTL_TOGGLE_TMODE:		if (IS_SCSI(isp)) {			int ena = *(int *)arg;			mbs.param[0] = MBOX_ENABLE_TARGET_MODE;			mbs.param[1] = (ena)? ENABLE_TARGET_FLAG : 0;			isp_mboxcmd(isp, &mbs);			if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {				PRINTF("%s: cannot %sable target mode (0x%x)\n",				    isp->isp_name, ena? "en" : "dis",				    mbs.param[0]);				break;			}		}		return (0);#endif	}	return (-1);}