dcd_confsubr.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Utility DCD configuration routines.
*/
extern struct mod_ops mod_miscops;
&mod_miscops, /* Type of module */
" ATA Bus Utility Routines"
};
static struct modlinkage modlinkage = {
};
int
_init()
{
(void) dcd_initialize_hba_interface();
return (mod_install(&modlinkage));
}
/*
* There is no _fini() routine because this module is never unloaded.
*/
int
{
}
/*
* The implementation of dcd_probe allows a particular HBA to intercept the call
* for any post or pre-processing it may need. The default, if the HBA does not
* override it, is to call dcd_hba_probe.
*/
int
{
} else {
}
}
/*
* Undo the dcd_probe
*/
void
{
}
}
int
{
int rval = DCDPROBE_NOMEM;
int (*cb_flag)();
#ifdef DEBUG1
printf("Dcd_ident is NULL\n");
#endif
KM_SLEEP : KM_NOSLEEP));
goto out;
}
}
} else {
}
goto out;
}
goto out;
}
SUN_IDENTSIZE, DATA_READ, 0);
/*
* The first identify will tell us whether the target responded
* or not.
*/
#ifdef DEBUG1
printf("dcd_test: failed\n");
#endif
goto out;
} else {
/*
* retry one more time
*/
goto out;
}
}
}
#ifdef DEBUG1
#endif
/*
* If we are lucky, this identify succeeded
*/
goto done;
}
/*
* the second inquiry, allows the host adapters to try again.
*/
else
goto out;
}
/*
* At this point we are guarenteed that something responded
* to this target. We don't know yest what kind of device it is.
*/
goto out;
}
done:
/*
* If we got no error then receive the indentify data,
*/
} else {
}
out:
if (ident_pkt) {
}
if (ident_bp) {
}
return (rval);
}
static int
{
int rval = -1;
#ifdef DEBUG1
#endif
goto error;
goto error;
goto error;
rval = 0;
} else {
rval = 0;
}
#ifdef DEBUG1
#endif
return (rval);
}
void
int flags,
{
#ifdef DEBUG1
printf("command %x, flags %x, block %x, address_mode %x, size %x\n",
#endif
}