fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteusing namespace std;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteFCHBANPIVPort::FCHBANPIVPort(string thePath) : HBANPIVPort() {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log.debug("Initializing HBA NPIV port %s", thePath.c_str());
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } catch (...) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log.debug("Unable to lookup controller path and number for %s",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HBA_NPIVATTRIBUTES attrs = getPortAttributes(tmp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHBA_NPIVATTRIBUTES FCHBANPIVPort::getPortAttributes(uint64_t &stateChange) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid FCHBANPIVPort::fp_ioctl(string path, int cmd, fcio_t *fcio) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } catch (...) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte transportError(fcio->fcio_errno, fcioErrorString);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log.genericIOError("NPIV Port ioctl (0x%x) failed. Transport: \"%s\"", cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Interpret the error code in the fcio_t structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * message must be at least MAX_FCIO_MSG_LEN in length.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteFCHBANPIVPort::transportError(uint32_t fcio_errno, char *message) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "general failure but fail silently";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "invalid packet specified/supplied";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "invalid unsolicited buffer token";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "ULP not registered to handle this FC4 type";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "port number is out of bounds";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcioErrorString = "transport working on this device";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte snprintf(message, MAX_FCIO_MSG_LEN, "Unknown error code 0x%x",