From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Vasquez Subject: [PATCH] qla2xxx: Add a filter to compare port_name against the physical on vport creation. Date: Thu, 17 Jan 2008 09:02:14 -0800 Message-ID: <1200589340-19499-8-git-send-email-andrew.vasquez@qlogic.com> References: <20080117165940.GA19033@plap3.qlogic.org> Return-path: Received: from avexch1.qlogic.com ([198.70.193.115]:20849 "EHLO avexch1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbYAQRCe (ORCPT ); Thu, 17 Jan 2008 12:02:34 -0500 In-Reply-To: <20080117165940.GA19033@plap3.qlogic.org> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Linux SCSI Mailing List , James Bottomley Cc: Andrew Vasquez , Seokmann Ju From: Seokmann Ju During vport creation, there was a possibility to get create a vport with same port_name as pport. A new filter has added to compare given port_name with the port_name of the pport. Signed-Off-by: Seokmann Ju Signed-off-by: Andrew Vasquez --- drivers/scsi/qla2xxx/qla_mid.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 325bdab..dea3768 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -341,6 +341,8 @@ qla24xx_vport_create_req_sanity_check(struct fc_vport *fc_vport) /* Check up unique WWPN */ u64_to_wwn(fc_vport->port_name, port_name); + if (!memcmp(port_name, ha->port_name, WWN_SIZE)) + return VPCERR_BAD_WWN; vha = qla24xx_find_vhost_by_name(ha, port_name); if (vha) return VPCERR_BAD_WWN; -- 1.5.4.rc3.14.g44397