0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * CDDL HEADER START
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * The contents of this file are subject to the terms of the
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Common Development and Distribution License (the "License").
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * You may not use this file except in compliance with the License.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * See the License for the specific language governing permissions
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * and limitations under the License.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * When distributing Covered Code, include this CDDL HEADER in each
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * If applicable, add the following below this CDDL HEADER, with the
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * fields enclosed by brackets "[]" replaced with your own identifying
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * information: Portions Copyright [yyyy] [name of copyright owner]
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * CDDL HEADER END
55e592a20765db6f52a590785ae2390c3b12fda9Randall Ralphs * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Use is subject to license terms.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Implementation of "scsi_vhci_f_tape" tape failover_ops.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * This file was historically meant for only tape implementation. It has
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * been extended to manage SUN "supported" tape controllers. The supported
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * VID/PID shall be listed in the tape_dev_table.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* Supported device table entries. */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* " 111111" */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* "012345670123456789012345" */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* "|-VID--||-----PID------|" */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs "IBM ULTRIUM-TD3",
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs "IBM ULTRIUM-TD4",
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* Failover module plumbing. */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_device_probe(struct scsi_device *sd, struct scsi_inquiry *inquiry,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs VHCI_DEBUG(6, (CE_NOTE, NULL, "!tape_device_probe: inquiry string %s\n",
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * See if this a device type that we want to care about.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Not interested.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * If it reports that it supports tpgs and it got here it may have
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * failed the tpgs commands. It might or might not support dual port
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * but we'll go with it.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs VHCI_DEBUG(6, (CE_NOTE, NULL, "!has tpgs bits: %s\n",
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * Looks like it claims to have more then one port.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs VHCI_DEBUG(6, (CE_NOTE, NULL, "!has dual port bits: %s\n",
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * See if this device is on the list.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs for (i = 0; tape_dev_table[i]; i++) {
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs "!was on the list: %s\n",
55e592a20765db6f52a590785ae2390c3b12fda9Randall Ralphs * Policy only applies to 'client' probe, not
55e592a20765db6f52a590785ae2390c3b12fda9Randall Ralphs * vhci_is_dev_supported() pHCI probe. Detect difference
55e592a20765db6f52a590785ae2390c3b12fda9Randall Ralphs * based on ctpriv.
55e592a20765db6f52a590785ae2390c3b12fda9Randall Ralphs (mdi_set_lb_policy(sd->sd_dev, LOAD_BALANCE_NONE) !=
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs VHCI_DEBUG(6, (CE_NOTE, NULL, "!fail load balance none"
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_device_unprobe(struct scsi_device *sd, void *ctpriv)
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs * NO OP for tape.
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_path_activate(struct scsi_device *sd, char *pathclass, void *ctpriv)
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs return (0);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_path_deactivate(struct scsi_device *sd, char *pathclass, void *ctpriv)
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs return (0);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_path_get_opinfo(struct scsi_device *sd, struct scsi_path_opinfo *opinfo,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs (void) strcpy(opinfo->opinfo_path_attr, PCLASS_PRIMARY);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs return (0);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs return (1);
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0c45178b5714d692c44817c2235320c3f2b030abwltape_analyze_sense(struct scsi_device *sd, uint8_t *sense,
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs/* ARGSUSED */
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphstape_pathclass_next(char *cur, char **nxt, void *ctpriv)
0205780bc43902d17f94f07ceacb0cd8d5eab20frralphs return (0);