/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <io/xdf_shell.h>
/*
* We're emulating (and possibly layering on top of) sd devices, so xdf
* disk unit mappings must match up with sd disk unit mappings'.
*/
#if !defined(XDF_PSHIFT)
#error "can't find definition for xdf unit mappings - XDF_PSHIFT"
#endif /* XDF_PSHIFT */
#if !defined(SDUNIT_SHIFT)
#error "can't find definition for cmdk unit mappings - SDUNIT_SHIFT"
#endif /* SDUNIT_SHIFT */
#if ((XDF_PSHIFT - SDUNIT_SHIFT) != 0)
#error "sd and xdf unit mappings don't match."
#endif /* ((XDF_PSHIFT - SDUNIT_SHIFT) != 0) */
extern void *sd_state;
/*
* Globals required by xdf_shell.c
*/
{ NULL, 0 }
};
/*ARGSUSED*/
int
{
int rv;
switch (cmd) {
case DKIOCINFO: {
/* Pass on the ioctl request, save the response */
return (rv);
/* Update controller info */
/* Update unit info. */
/*
* Normally a real scsi device would report the
* controller type as DKC_SCSI_CCS. But we don't
* emulate a real scsi controller. (Which becomes
* apparent if anyone tries to issue us a uscsi(7i)
* command.) So instead of reporting DKC_SCSI_CCS,
* we report DKC_UNKNOWN.
*/
}
return (EFAULT);
return (0);
}
default:
return (0);
} /* switch (cmd) */
/*NOTREACHED*/
}
/*ARGSUSED*/
void
{
/*
* Currently we only support cdrom devices, which don't have
* devids associated with them.
*/
ASSERT("cdrom devices don't have a devid");
}
/*ARGSUSED*/
int
{
/*
* Currently we only support cdrom devices, which don't have
* a physical geometry, so this routine should never get
* invoked.
*/
ASSERT("cdrom devices don't have any physical geometry");
return (-1);
}
/*ARGSUSED*/
{
/*
* Currently we only support cdrom devices, which don't have
* bad blocks, so this routine should never get invoked.
*/
ASSERT("cdrom devices don't support bad block mappings");
return (B_TRUE);
}
char *
{
}
/*ARGSUSED*/
int
{
return (0);
}
void
{
if (xsp->xdfss_tgt_is_cd) {
}
/*
* We use ndi_* instead of ddi_* because it will result in
* INQUIRY_DEVICE_TYPE being a hardware property instead
* or a driver property
*/
}