Project

General

Profile

Actions

Bug #9702

open

HBA drivers don't need the redundant devfs_clean step

Added by Yuri Pankov almost 3 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2018-08-03
Due date:
% Done:

50%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

It looks like the following piece of code gets carried into new HBA drivers (this one is from mpt_sas):

        if (i_ddi_devi_attached(cdip)) {

                /* Get full devname */
                devname = kmem_alloc(MAXNAMELEN + 1, KM_SLEEP);
                (void) ddi_deviname(cdip, devname);
                /* Clean cache */
                (void) devfs_clean(parent, devname + 1,
                    DV_CLEAN_FORCE);
                kmem_free(devname, MAXNAMELEN + 1);
        }

The problem here is that if we are using MDI, there's no point in cleaning up the client for every path down event as ndi_devi_offline() will be called only with all paths down in mdi_pi_offline(), and for the "physical" disk case ndi_devi_offline() should take care of that itself, we simply need to pass it NDI_DEVFS_CLEAN flag.

Remove all these devfs_clean() calls from HBA drivers to reduce code duplication.

No data to display

Actions

Also available in: Atom PDF