[PATCH 1/6] cxlflash: Scan host only after the port is ready for I/O

Matthew R. Ochs mrochs at linux.vnet.ibm.com
Thu Sep 8 09:46:12 AEST 2016


> On Sep 2, 2016, at 3:38 PM, Uma Krishnan <ukrishn at linux.vnet.ibm.com> wrote:
> 
> When a port link is established, the AFU sends a 'link up' interrupt.
> After the link is up, corresponding initialization steps are performed
> on the card. Following that, when the card is ready for I/O, the AFU
> sends 'login succeeded' interrupt. Today, cxlflash invokes
> scsi_scan_host() upon receipt of both interrupts.
> 
> SCSI commands sent to the port prior to the 'login succeeded' interrupt
> will fail with 'port not available' error. This is not desirable.
> Moreover, when async_scan is active for the host, subsequent scan calls
> are terminated with error. Due to this, the scsi_scan_host() call
> performed after 'login succeeded' interrupt could portentially return
> error and the devices may not be scanned properly.
> 
> To avoid this problem, scsi_scan_host() should be called only after the
> 'login succeeded' interrupt.
> 
> Signed-off-by: Uma Krishna <ukrishn at linux.vnet.ibm.com>

Acked-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>



More information about the Linuxppc-dev mailing list