/*
* 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
*/
/*
*/
/*
* SCSI FMA implementation
*/
#include <sys/ddi_impldefs.h>
/* consolidation private interface to generate dev scheme ereport */
extern char *mdi_pi_pathname_by_instance(int);
/*
* scsi_fm_init: Initialize fma capabilities and register with IO
* fault services.
*/
void
{
/*
* fm-capable in driver.conf can be used to set fm_capabilities.
* If fm-capable is not defined, then the last argument passed to
* ddi_prop_get_int will be returned as the capabilities.
*
* NOTE: by default scsi_fm_capable sets DDI_FM_EREPORT_CAPABLE.
*/
/*
* Register capabilities with IO Fault Services. The capabilities
* set above may not be supported by the parent nexus, in that
*
* NOTE: iblock cookies are not important because scsi HBAs
* always interrupt below LOCK_LEVEL.
*/
}
/*
* scsi_fm_fini: un-register with IO fault services.
*/
void
{
}
/*
*
* scsi_fm_ereport_post - Post an ereport
*/
void
{
char *minor_name;
/*
* If the scsi_device eqdip is not yet ereport capable, send the
* report based on parent capabilities. This is needed for
* telemetry during enumeration.
*/
/* Add "scsi." as a prefix to the class */
/*
* Get the path:
*
* If path_instance is non-zero then the packet was
* sent to scsi_vhci. We return the pathinfo path_string associated
* with the path_instance path - which refers to the actual hardware.
*
* If path_instance is zero then use the devpath provided by the
* caller; if it was NULL then this will cause fm_dev_ereport_post
* to use the devinfo path of the first devi we pass to it, ie
* sd->sd_dev.
*/
if (path_instance)
/*
* Set the minor_name to NULL. The block location of a media error
* is described by the 'lba' property. We use the 'lba' instead of
* the partition (minor_name) because the defect stays in the same
* place even when a repartition operation may result in the defect
* showing up in a different partition (minor_name). To support
* should map the 'lba' to the current effected partition.
*/
minor_name = NULL;
/*
* NOTE: If there is a 'linked' ena to be had, it should likely come
* from the buf structure via the scsi_pkt pkt->pkt_bp.
*/
/* Post the ereport */
}