Print this page
9702 HBA drivers don't need the redundant devfs_clean step
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
*** 42,52 ****
*/
/*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Bayard G. Bell. All rights reserved.
! * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright 2015, 2017 Citrus IT Limited. All rights reserved.
* Copyright 2015 Garrett D'Amore <garrett@damore.org>
*/
#include <sys/types.h>
--- 42,52 ----
*/
/*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Bayard G. Bell. All rights reserved.
! * Copyright 2018 Nexenta Systems, Inc.
* Copyright 2015, 2017 Citrus IT Limited. All rights reserved.
* Copyright 2015 Garrett D'Amore <garrett@damore.org>
*/
#include <sys/types.h>
*** 68,78 ****
#include <sys/sunddi.h>
#include <sys/atomic.h>
#include <sys/signal.h>
#include <sys/byteorder.h>
#include <sys/sdt.h>
- #include <sys/fs/dv_node.h> /* devfs_clean */
#include "mr_sas.h"
/*
* FMA header files
--- 68,77 ----
*** 7740,7752 ****
static void
mrsas_issue_evt_taskq(struct mrsas_eventinfo *mrevt)
{
struct mrsas_instance *instance = mrevt->instance;
! dev_info_t *dip, *pdip;
int circ1 = 0;
- char *devname;
con_log(CL_ANN1, (CE_NOTE, "mrsas_issue_evt_taskq: called for"
" tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
--- 7739,7750 ----
static void
mrsas_issue_evt_taskq(struct mrsas_eventinfo *mrevt)
{
struct mrsas_instance *instance = mrevt->instance;
! dev_info_t *dip;
int circ1 = 0;
con_log(CL_ANN1, (CE_NOTE, "mrsas_issue_evt_taskq: called for"
" tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
*** 7763,7773 ****
ndi_devi_enter(instance->dip, &circ1);
switch (mrevt->event) {
case MRSAS_EVT_CONFIG_TGT:
if (dip == NULL) {
-
if (mrevt->lun == 0) {
(void) mrsas_config_ld(instance, mrevt->tgt,
0, NULL);
} else if (instance->tbolt || instance->skinny) {
(void) mrsas_tbolt_config_pd(instance,
--- 7761,7770 ----
*** 7776,7807 ****
}
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_CONFIG_TGT called:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
-
} else {
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_CONFIG_TGT dip != NULL:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
}
break;
case MRSAS_EVT_UNCONFIG_TGT:
if (dip) {
! if (i_ddi_devi_attached(dip)) {
!
! pdip = ddi_get_parent(dip);
!
! devname = kmem_zalloc(MAXNAMELEN + 1, KM_SLEEP);
! (void) ddi_deviname(dip, devname);
!
! (void) devfs_clean(pdip, devname + 1,
! DV_CLEAN_FORCE);
! kmem_free(devname, MAXNAMELEN + 1);
! }
! (void) ndi_devi_offline(dip, NDI_DEVI_REMOVE);
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_UNCONFIG_TGT called:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
} else {
--- 7773,7793 ----
}
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_CONFIG_TGT called:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
} else {
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_CONFIG_TGT dip != NULL:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
}
break;
case MRSAS_EVT_UNCONFIG_TGT:
if (dip) {
! (void) ndi_devi_offline(dip,
! NDI_DEVFS_CLEAN | NDI_DEVI_REMOVE);
con_log(CL_ANN1, (CE_NOTE,
"mr_sas: EVT_UNCONFIG_TGT called:"
" for tgt %d lun %d event %d",
mrevt->tgt, mrevt->lun, mrevt->event));
} else {