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>

*** 8,27 **** * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2016 Nexenta Systems, Inc. */ #include <sys/atomic.h> #include <sys/cmn_err.h> #include <sys/conf.h> #include <sys/cpuvar.h> #include <sys/ddi.h> #include <sys/errno.h> - #include <sys/fs/dv_node.h> #include <sys/kmem.h> #include <sys/kmem_impl.h> #include <sys/list.h> #include <sys/modctl.h> #include <sys/pci.h> --- 8,26 ---- * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2018 Nexenta Systems, Inc. */ #include <sys/atomic.h> #include <sys/cmn_err.h> #include <sys/conf.h> #include <sys/cpuvar.h> #include <sys/ddi.h> #include <sys/errno.h> #include <sys/kmem.h> #include <sys/kmem_impl.h> #include <sys/list.h> #include <sys/modctl.h> #include <sys/pci.h>
*** 358,381 **** break; } if (devnode != NULL) { if (inqrc != 0) { ! /* Target disappeared, drop devnode */ ! if (i_ddi_devi_attached(devnode->pdip)) { ! char *devname; ! /* Get full devname */ ! devname = kmem_alloc(MAXPATHLEN, KM_SLEEP); ! (void) ddi_deviname(devnode->pdip, devname); ! /* Clean cache and name */ ! (void) devfs_clean(devnode->parent, devname + 1, ! DV_CLEAN_FORCE); ! kmem_free(devname, MAXPATHLEN); ! } ! ! (void) ndi_devi_offline(devnode->pdip, NDI_DEVI_REMOVE); ! list_remove(&pvs->devnodes, devnode); kmem_free(devnode, sizeof (*devnode)); } else if (childp != NULL) { /* Target exists */ *childp = devnode->pdip; --- 357,368 ---- break; } if (devnode != NULL) { if (inqrc != 0) { ! (void) ndi_devi_offline(devnode->pdip, ! NDI_DEVFS_CLEAN | NDI_DEVI_REMOVE); list_remove(&pvs->devnodes, devnode); kmem_free(devnode, sizeof (*devnode)); } else if (childp != NULL) { /* Target exists */ *childp = devnode->pdip;