/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1996,1999-2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Main Transport Routine for DADA.
*
*/
extern kmutex_t dcd_flag_nointr_mutex;
extern kcondvar_t dcd_flag_nointr_cv;
static void
{
/*
* We need cv_broadcast, because there can be more than
* one thread sleeping on the cv. We will wake all of them.
* The correct one will continue and the reset will again go to
* sleep.
*/
}
int
{
extern int do_polled_io;
int rval;
/*
* Check if we are required to do polled I/O. We can
* get dcd_pkts that don't have the FLAG_NOINTR bit
* set in the pkt_flags. When do_polled_io is set
* we will probably be at a high IPL and not get any
* for such packets and do a callback of the completion
* routine ourselves.
*/
/*
* FLAG_FORCENOINTR means we do not want to rely on
* device interrupts. Set the FLAG_NOINTR
* so the command gets completed in polled mode.
*/
}
/*
* If its an interrupt thread or we already have the
* the FLAG_NOINTR flag set, we go ahead and call the
* the hba's start routine directly. We force polling
* only if we have do_polled_io set and FLAG_NOINTR
* not set.
*/
} else {
void (*savec)();
/*
* save the completion routine and pkt_flags
*/
/*
* Restore the pkt_completion routine
* and pkt flags and call the completion
* routine.
*/
return (rval);
}
} else {
void (*savec)();
int status;
TRAN_ACCEPT) {
}
}
return (status);
}
}