iser.c revision 30e7468f8f41aa30ada067b2c1d5d284046514da
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson/*
6fb9b25791778f69002eb72be6235e20d98ec452Tinderbox User * CDDL HEADER START
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * You may not use this file except in compliance with the License.
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson *
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt * or http://www.opensolaris.org/os/licensing.
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence * See the License for the specific language governing permissions
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * and limitations under the License.
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson *
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * When distributing Covered Code, include this CDDL HEADER in each
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d4034b48fd112ef43933f1455b194b5249a88ee6Mark Andrews * If applicable, add the following below this CDDL HEADER, with the
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * fields enclosed by brackets "[]" replaced with your own identifying
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson * information: Portions Copyright [yyyy] [name of copyright owner]
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson *
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont * CDDL HEADER END
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David Lawrence */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence/*
364a82f7c25b62967678027043425201a5e5171aBob Halley * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * Use is subject to license terms.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson#include <sys/types.h>
911ed0d3bee586b3bec42cb6c376d5cc6c0e1e24Brian Wellington#include <sys/stat.h>
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson#include <sys/conf.h>
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson#include <sys/ddi.h>
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson#include <sys/sunddi.h>
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson#include <sys/modctl.h>
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson#include <sys/socket.h>
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson#include <netinet/in.h>
e7a4f58d55042cbc981a70b5071aaea46b9ebf7fAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson#include <sys/ib/clients/iser/iser.h>
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updater
47b7dfffe5d806c6a5e99ef17f07bcde812c2132Francis Dupont/*
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * iser.c
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * DDI and core routines for Solaris iSER implementation.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeiniser_state_t *iser_state = NULL; /* global state */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinddi_taskq_t *iser_taskq = NULL; /* global taskq */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* set B_TRUE for console logging */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinboolean_t iser_logging = B_FALSE;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* Driver functions */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_attach(dev_info_t *, ddi_attach_cmd_t);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_detach(dev_info_t *, ddi_detach_cmd_t);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_open(dev_t *, int, int, cred_t *);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_close(dev_t, int, int, cred_t *);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic int iser_ioctl(dev_t, int, intptr_t, int, cred_t *, int *);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* static int iser_close(dev_t, int, int, cred_t *); */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* Char/Block operations */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeinstatic struct cb_ops iser_cb_ops = {
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_open, /* open */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_close, /* close */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* strategy */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* print */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* dump */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* read */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* write */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_ioctl, /* ioctl */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* devmap */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* mmap */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nodev, /* segmap */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein nochpoll, /* poll */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ddi_prop_op, /* prop_op */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein NULL, /* stream */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein D_MP, /* cb_flag */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson CB_REV, /* rev */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson nodev, /* int (*cb_aread)() */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson nodev, /* int (*cb_awrite)() */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson};
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson/* Device operations */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic struct dev_ops iser_ops = {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson DEVO_REV, /* devo_rev, */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson 0, /* refcnt */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_getinfo, /* getinfo */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson nulldev, /* identify */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson nulldev, /* probe */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson iser_attach, /* attach */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson iser_detach, /* detach */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson nodev, /* reset */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson &iser_cb_ops, /* cb_ops */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson NULL, /* bus ops */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein NULL, /* power */
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence ddi_quiesce_not_needed /* quiesce */
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence};
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence/* Module Driver Info */
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence#define ISER_NAME_VERSION "iSCSI Extensions for RDMA"
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrencestatic struct modldrv iser_modldrv = {
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence &mod_driverops,
f2fdfe7c42f3b10f3653f851ce5a0a90ee5ac1f9David Lawrence ISER_NAME_VERSION,
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson &iser_ops,
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson};
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updater
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafsson/* Module Linkage */
9e933a78a3177fab864723ee9a2aab8aad1be526Andreas Gustafssonstatic struct modlinkage iser_modlinkage = {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson MODREV_1,
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt &iser_modldrv,
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt NULL
5fe1a246cfa89172966e356199ff3a1bfd961207Mark Andrews};
5fe1a246cfa89172966e356199ff3a1bfd961207Mark Andrews
f266030dc395daad3614ca732e8c044fa8b048bdAndreas Gustafsson/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * _init()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonint
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson_init(void)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int status;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence iser_state = kmem_zalloc(sizeof (iser_state_t), KM_SLEEP);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson status = mod_install(&iser_modlinkage);
f0131db6c395757c88526db8e8071921e33a5211David Lawrence if (status != DDI_SUCCESS) {
f0131db6c395757c88526db8e8071921e33a5211David Lawrence kmem_free(iser_state, sizeof (iser_state_t));
f0131db6c395757c88526db8e8071921e33a5211David Lawrence }
f0131db6c395757c88526db8e8071921e33a5211David Lawrence
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (status);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * _info()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graffint
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson_info(struct modinfo *modinfop)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
c03bb27f0675a6e60ceea66b451548e8481bc05cMark Andrews return (mod_info(&iser_modlinkage, modinfop));
a8da00ef95ba37b9d071c2b8db1a0c967e060106Mark Andrews}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence/*
a8da00ef95ba37b9d071c2b8db1a0c967e060106Mark Andrews * _fini()
a8da00ef95ba37b9d071c2b8db1a0c967e060106Mark Andrews */
a8da00ef95ba37b9d071c2b8db1a0c967e060106Mark Andrewsint
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence_fini(void)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int status;
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff
2bbbbfaeb84b9355b94a95052eba0edf34e3f70bAndreas Gustafsson status = mod_remove(&iser_modlinkage);
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence if (status != DDI_SUCCESS) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (status);
732e0731dec1922747bb3b3147cf2c3d16b22eaaBob Halley }
56a2bee13318d8bb4578434d60c82a65c32ace28David Lawrence kmem_free(iser_state, sizeof (iser_state_t));
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updater
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_SUCCESS);
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updater/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_attach()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic int
a8da00ef95ba37b9d071c2b8db1a0c967e060106Mark Andrewsiser_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int instance;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int status;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson switch (cmd) {
c398950a4213de27d70d5d8d1ed5df463e0b3902Andreas Gustafsson case DDI_ATTACH:
0874abad14e3e9ecfc3dc1a1a2b9969f2f027724Mark Andrews ISER_LOG(CE_CONT, "iser_attach: DDI_ATTACH");
2bbbbfaeb84b9355b94a95052eba0edf34e3f70bAndreas Gustafsson instance = ddi_get_instance(dip);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_state->is_dip = dip;
2bbbbfaeb84b9355b94a95052eba0edf34e3f70bAndreas Gustafsson iser_state->is_instance = instance;
2bbbbfaeb84b9355b94a95052eba0edf34e3f70bAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson /* Initialize the open refcnt and it's lock */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_state->is_open_refcnt = 0;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_init(&iser_state->is_refcnt_lock, NULL, MUTEX_DRIVER,
47b7dfffe5d806c6a5e99ef17f07bcde812c2132Francis Dupont NULL);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_taskq = ddi_taskq_create(dip, "iser_taskq",
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_TASKQ_NTHREADS, TASKQ_DEFAULTPRI, 0);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson if (iser_taskq == NULL) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_LOG(CE_CONT, "%s%d: failed to create taskq",
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson "iser", instance);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_destroy(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence /* initialize iSER as IB service */
f266030dc395daad3614ca732e8c044fa8b048bdAndreas Gustafsson status = iser_ib_init();
f266030dc395daad3614ca732e8c044fa8b048bdAndreas Gustafsson if (status != DDI_SUCCESS) {
f266030dc395daad3614ca732e8c044fa8b048bdAndreas Gustafsson ddi_taskq_destroy(iser_taskq);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_destroy(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ISER_LOG(CE_CONT, "%s%d: failed to initialize IB",
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson "iser", instance);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson status = ddi_create_minor_node(
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson dip, ddi_get_name(dip), S_IFCHR, instance,
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson DDI_PSEUDO, 0);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson if (status != DDI_SUCCESS) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson (void) iser_ib_fini();
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ddi_taskq_destroy(iser_taskq);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein mutex_destroy(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ISER_LOG(CE_CONT, "%s%d: failed ddi_create_minor_node",
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein "iser", instance);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ddi_report_dev(dip);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_SUCCESS);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence case DDI_RESUME:
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein ISER_LOG(CE_CONT, "iser_detach: DDI_RESUME unsupported");
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews default:
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt ISER_LOG(CE_CONT, "%s%d: unknown cmd in attach (0x%x)", "iser",
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson instance, cmd);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_detach()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic int
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_detach(dev_info_t *dip, ddi_detach_cmd_t cmd)
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein{
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein mutex_enter(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein if (iser_state->is_open_refcnt > 0) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_exit(&iser_state->is_refcnt_lock);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_exit(&iser_state->is_refcnt_lock);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_destroy(&iser_state->is_refcnt_lock);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson switch (cmd) {
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein case DDI_DETACH:
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_LOG(CE_CONT, "iser_detach: DDI_DETACH");
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein if (iser_ib_fini() != DDI_SUCCESS) {
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence ISER_LOG(CE_CONT, "iser_ib_fini failed");
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence if (iser_taskq != NULL) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ddi_taskq_destroy(iser_taskq);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_taskq = NULL;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ddi_remove_minor_node(dip, NULL);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_SUCCESS);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson case DDI_SUSPEND:
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_LOG(CE_CONT, "iser_detach: DDI_SUSPEND unsupported");
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt default:
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_LOG(CE_CONT, "iser: unknown cmd in detach (0x%x)", cmd);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein }
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence}
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_getinfo()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence/* ARGSUSED */
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencestatic int
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein switch (cmd) {
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence case DDI_INFO_DEVT2DEVINFO:
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence *result = (void *)iser_state->is_dip;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_SUCCESS);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson case DDI_INFO_DEVT2INSTANCE:
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson *result = NULL;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_SUCCESS);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson default:
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (DDI_FAILURE);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson }
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_open()
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence/* ARGSUSED */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic int
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntiser_open(dev_t *devp, int flag, int otyp, cred_t *credp)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson minor_t instance;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int status;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson instance = getminor(*devp);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson /* Register the transport with IDM */
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews status = iser_idm_register();
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews if (status != DDI_SUCCESS) {
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ISER_LOG(CE_CONT, "%s%d: failed to register with IDM",
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson "iser", instance);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (ENXIO);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein }
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson /* Increment our open refcnt */
18df9e628ea10c7d607f43fcfd935e7924731f24Evan Hunt mutex_enter(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_state->is_open_refcnt++;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein mutex_exit(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein return (DDI_SUCCESS);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein}
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_close()
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/* ARGSUSED */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic int
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrenceiser_close(dev_t devp, int flag, int otyp, cred_t *credp)
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson ASSERT(iser_state->is_open_refcnt != 0);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein mutex_enter(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein iser_state->is_open_refcnt--;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson mutex_exit(&iser_state->is_refcnt_lock);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein return (DDI_SUCCESS);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein}
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeiniser_status_t
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeiniser_register_service(idm_svc_t *idm_svc)
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein{
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein return (iser_ib_register_service(idm_svc));
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_status_t
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_bind_service(idm_svc_t *idm_svc)
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence{
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return (iser_ib_bind_service(idm_svc));
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonvoid
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_unbind_service(idm_svc_t *idm_svc)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_ib_unbind_service(idm_svc);
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonvoid
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_deregister_service(idm_svc_t *idm_svc)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence iser_ib_deregister_service(idm_svc);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
e851ea826066ac5a5b01c2c23218faa0273a12e8Evan Hunt
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_path_exists
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * This function takes in a pair of endpoints and determines if an iSER path
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews * exists between the two. The actual path information (required for creating
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt * a RC channel) is not returned, instead a boolean value indicating if a path
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * exists is returned.
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson *
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * To use an implicit source, a value of NULL is allowed for laddr.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence */
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntboolean_t
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Huntiser_path_exists(idm_sockaddr_t *laddr, idm_sockaddr_t *raddr)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
e851ea826066ac5a5b01c2c23218faa0273a12e8Evan Hunt ibt_ip_addr_t remote_ip, local_ip;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence ibt_path_info_t path;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson int status;
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
91ed1cc821ccef38c30f3fcaad32d78233fad94bMark Andrews iser_ib_conv_sockaddr2ibtaddr(raddr, &remote_ip);
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt iser_ib_conv_sockaddr2ibtaddr(laddr, &local_ip);
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt
f30785f506a522ed6a5e394af2bb13b6f883927eEvan Hunt status = iser_ib_get_paths(&local_ip, &remote_ip, &path, NULL);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson return ((status == IBT_SUCCESS) ? B_TRUE : B_FALSE);
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence}
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence
e13efecaa524364f9bc8706c79e90ad2525616f7David Lawrence/*
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff * iser_channel_alloc
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * This function allocates a reliable communication channel between the
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson * given endpoints.
31707708c585c53b61ca1edb2e224e6bb1b985a5Evan Hunt */
31707708c585c53b61ca1edb2e224e6bb1b985a5Evan Huntiser_chan_t *
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafssoniser_channel_alloc(idm_sockaddr_t *laddr, idm_sockaddr_t *raddr)
ec9f7bd203028162522b225d7731f0a52aca7727Andreas Gustafsson{
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson ibt_ip_addr_t remote_ip, local_ip;
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff iser_ib_conv_sockaddr2ibtaddr(raddr, &remote_ip);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson iser_ib_conv_sockaddr2ibtaddr(laddr, &local_ip);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff return (iser_ib_alloc_rc_channel(&local_ip, &remote_ip));
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_channel_open
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson * This function opens the already allocated communication channel between the
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * two endpoints.
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David Lawrence */
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafssoniser_status_t
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafssoniser_channel_open(iser_chan_t *chan)
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff{
ec9f7bd203028162522b225d7731f0a52aca7727Andreas Gustafsson return (iser_ib_open_rc_channel(chan));
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson}
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff/*
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson * iser_channel_close
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews * This function closes the already opened communication channel between the
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff * two endpoints.
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonvoid
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graffiser_channel_close(iser_chan_t *chan)
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson{
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson iser_ib_close_rc_channel(chan);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David Lawrence
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson/*
ec9f7bd203028162522b225d7731f0a52aca7727Andreas Gustafsson * iser_channel_free
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson * This function frees the channel between the given endpoints
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson */
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffvoid
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssoniser_channel_free(iser_chan_t *chan)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews{
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff iser_ib_free_rc_channel(chan);
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson}
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafsson
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff/* ARGSUSED */
3532ed3bbda3b7daa2373513e51a6f04d0dd3ddaAndreas Gustafssonstatic int
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafssoniser_ioctl(dev_t devp, int cmd, intptr_t arg, int mode, cred_t *credp,
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David Lawrence int *rvalp)
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson{
ec9f7bd203028162522b225d7731f0a52aca7727Andreas Gustafsson return (DDI_SUCCESS);
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson}
996f4a8bc34cb0203ce6a40ff82bca8bf32423ccAndreas Gustafsson