From patchwork Fri Jan 25 11:56:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 10781291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BF056C2 for ; Fri, 25 Jan 2019 11:56:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ACE82EC3E for ; Fri, 25 Jan 2019 11:56:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EB732EC78; Fri, 25 Jan 2019 11:56:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 132832EC3E for ; Fri, 25 Jan 2019 11:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727721AbfAYL4T (ORCPT ); Fri, 25 Jan 2019 06:56:19 -0500 Received: from mx2.suse.de ([195.135.220.15]:58118 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725909AbfAYL4T (ORCPT ); Fri, 25 Jan 2019 06:56:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9D407AD23; Fri, 25 Jan 2019 11:56:17 +0000 (UTC) To: Himanshu Madhani Cc: SCSI Mailing List From: Hannes Reinecke Subject: qla2xxx fails to detect direct-attach devices Message-ID: <883ac14f-5932-d3a0-4afb-a5939b8dc793@suse.de> Date: Fri, 25 Jan 2019 12:56:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Himanshu, a common customer figured that the current qla2xxx code wouldn't work with direct-attached FCP SCSI devices. I've made a quick hack to re-establish operations: } but this will only work if 'ql2xnvmeenable=0' is set. The _actual_ fix will be to check the PRLI response so see which FC4 type has been successfully logged in. And I'm not sure what would be the correct way of handling this; FC-LS3 is silent as to what should happen if several FC4 types are specified. It looks as if it were possible to return LS_ACC even though only one of the specified FC4 types have been logged in. So I guess we need to revalidate the response, but I can't see how I could get access to that ... Of course, that will leave us none the wiser if _both_ FC4 types are logged in; I haven't seen any indication that the driver can handle dual-protocol target ports. But then I haven't seen any targets providing dual-protocol ports for direct attach, so it's not an urgent issue. Cheers, Hannes diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 70c7bfa2d73c..fd4043b551a2 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4863,7 +4863,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;