On Wed, Oct 17, 2018 at 8:59 AM Suganath Prabu <suganath-prabu.subramani@xxxxxxxxxxxx> wrote: > > This is to fix Sync cache and start stop command > failures with DID_NO_CONNECT during driver unload. > > 1) Release drives first from SML, then remove internally > in driver. > 2) And allow sync cache and Start stop commands to firmware, > even when remove_host flag is set. > + if (ioc->hba_mpi_version_belonged == MPI2_VERSION) { > + if (ioc->remove_host) > + return false; > + > + return true; > + } > + > + if (ioc->remove_host) { > + > + switch (scmd->cmnd[0]) { > + case SYNCHRONIZE_CACHE: > + case START_STOP: > + return true; > + default: > + return false; > + } > + } > + > + return true; Wouldn't be the same as if (!ioc->remove_host || ioc->hba_mpi_version_belonged == MPI2_VERSION) return !ioc->remove_host; switch (scmd->cmnd[0]) { case SYNCHRONIZE_CACHE: case START_STOP: return true; default: return false; } ? -- With Best Regards, Andy Shevchenko