lkml.org 
[lkml]   [2018]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v5 2/4] mpt3sas: Fix Sync cache command failure during driver unload
On Wed, Oct 17, 2018 at 8:59 AM Suganath Prabu
<suganath-prabu.subramani@broadcom.com> 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

\
 
 \ /
  Last update: 2018-10-17 10:33    [W:0.062 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site