Re: [EXT] Re: [PATCH] qla2xxx: Fixup dual-protocol FCP connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin, 


On 2/8/19, 2:58 PM, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> wrote:

    External Email
    
    ----------------------------------------------------------------------
    
    Himanshu?
    
    > The driver is sending a PRLI to each target port with both,
    > FCP _and_ NVMe enabled. The target is now free to respond with
    > either of those types logged in.
    > When evaluating the response we need to check which of the FC4
    > type had been logged in, and update the port properties accordingly.
    > Not doing so will cause the port to be removed due to a property
    > mismatch.
    >
    > Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
    > ---
    >  drivers/scsi/qla2xxx/qla_init.c | 8 ++++++--
    >  drivers/scsi/qla2xxx/qla_os.c   | 3 ++-
    >  2 files changed, 8 insertions(+), 3 deletions(-)
    >
    > diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
    > index aeeb0144bd55..88279c4d4d5e 100644
    > --- a/drivers/scsi/qla2xxx/qla_init.c
    > +++ b/drivers/scsi/qla2xxx/qla_init.c
    > @@ -1228,10 +1228,14 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea)
    >  	if (fcport->disc_state == DSC_DELETE_PEND)
    >  		return;
    >  
    > -	if (fcport->fc4f_nvme)
    > +	if (fcport->fc4f_nvme &&
    > +	    (pd->current_login_state >> 4) == PDS_PRLI_COMPLETE)
    >  		ls = pd->current_login_state >> 4;
    > -	else

NACK for this patch. 

We are working internally to fix this correctly.  Checking here seems to say,
if the NVME connection did not reach completion (PRLI complete), then pick FCP 
as a backup choice.

If NVME login state is not successful (current_login_state != PDS_PRLI_COMPLETE),
then we’re default to grabbing stale FCP login state. We'll send patch when we have
come up with mechanism to handle this properly. 

    > +	else {
    > +		fcport->fc4_type = FC4_TYPE_FCP_SCSI;
    > +		fcport->fc4f_nvme = 0;
    >  		ls = pd->current_login_state & 0xf;
    > +	}
    >  
    >  	if (ea->sp->gen2 != fcport->login_gen) {
    >  		/* target side must have changed it. */
    > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
    > index c6ef83d0d99b..93191e323d06 100644
    > --- a/drivers/scsi/qla2xxx/qla_os.c
    > +++ b/drivers/scsi/qla2xxx/qla_os.c
    > @@ -4871,7 +4871,8 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
    >  			if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)
    >  				fcport->fc4_type = FC4_TYPE_FCP_SCSI;
    >  
    > -			if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
    > +			if (vha->flags.nvme_enabled &&
    > +			    e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
    >  				fcport->fc4_type = FC4_TYPE_OTHER;
    >  				fcport->fc4f_nvme = FC4_TYPE_NVME;
    >  			}
    -- 
    Martin K. Petersen	Oracle Linux Engineering
    





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux