smp_transport.c revision 96c4a178a18cd52ee5001195f1552d9cef0c38f0
/*
* 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 <sys/byteorder.h>
static int
{
int ilen;
char *data_string;
int rv;
/* SMP information follows SCSI INQUIRY rules */
if (ilen <= 0)
return (DDI_PROP_INVAL_ARG);
/* ensure null termination */
return (rv);
}
/*
* smp_probe: probe device and create inquiry-like properties.
*/
int
{
char *component;
smp_pkt = &smp_pkt_data;
/*
* The EOVERFLOW should be excluded here, because it indicates
* the buffer (defined according to SAS1.1 Spec) to store
* response is shorter than transferred message frame.
* In this case, the smp device is alive and should be
* enumerated.
*/
return (DDI_PROBE_FAILURE);
}
/*
* NOTE: Deal with old drivers (mpt, mpt_sas) that allocate
* 'struct smp_device' on the stack. When these drivers convert to
* SCSAv3, the check for a NULL smp_sd_dev can be removed.
*/
return (DDI_PROBE_SUCCESS);
/* Save raw response data for devid */
return (DDI_PROBE_SUCCESS);
/*
* Convert smp_report_manufacturer_info_resp_t data into properties.
* NOTE: since things show up in the oposite order in prtconf, we are
* going from detailed information to generic here.
*/
if (srmir->srmir_sas_1_1_format) {
/* Establish 'component' property. */
sizeof (srmir->srmir_component_vendor_identification));
if (ilen > 0) {
/* component value format is '%s.%05d.%03d' */
"component") == 0)
(void) ndi_prop_update_string(DDI_DEV_T_NONE,
}
}
/* First one to define the property wins */
sizeof (srmir->srmir_product_revision_level));
sizeof (srmir->srmir_product_identification));
sizeof (srmir->srmir_vendor_identification));
/* NOTE: SMP_PROP_REPORT_MANUFACTURER is deleted after devid created */
SMP_PROP_REPORT_MANUFACTURER) == 0)
return (DDI_PROBE_SUCCESS);
}
int
{
return (smp_pkt->smp_pkt_address->
}