From patchwork Mon Aug 31 20:48:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 7101611 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4FD0BBEEC1 for ; Mon, 31 Aug 2015 20:48:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80907206A3 for ; Mon, 31 Aug 2015 20:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9FBF206A9 for ; Mon, 31 Aug 2015 20:48:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753277AbbHaUso (ORCPT ); Mon, 31 Aug 2015 16:48:44 -0400 Received: from mail-qg0-f45.google.com ([209.85.192.45]:32887 "EHLO mail-qg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753231AbbHaUsg (ORCPT ); Mon, 31 Aug 2015 16:48:36 -0400 Received: by qgp105 with SMTP id 105so21787880qgp.0 for ; Mon, 31 Aug 2015 13:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avagotech.com; s=google; h=date:from:to:subject:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=wEq0nBnTFbQpzoSi0/uIdK0VQ/gIDcCJ1KxETr5PtHA=; b=po4IleMzIRRXQZq4TJQXRakZnmDrcpHl9YgmR0hPDCpc6tOr6k3c7Xik0Y5OEZ9BaU YseuOXNumgoF0QiNuFQvQcXjWybT399QPFB4tkTgqmobHLQfnWVOAvaOp9Fy3mJiM4nq Lfq1OK5AEbaeH5cll7gmlUWI5c/ijSJjZ25sE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=wEq0nBnTFbQpzoSi0/uIdK0VQ/gIDcCJ1KxETr5PtHA=; b=AxTgePdTbT0N1KLaWimzXsvpkjrwGtCuMjtZOfJHR1LVnVE2/XALhycA7zq+2YN6hE yu9ltTQDlWARkk+000diiXEuSarUwEz5FCWOebAy8sPkE87QclNjO3gk3DwNE94D6H6U YC+vHfKWDIiPiyLAHG9UxbbJPqzeo3JlEdcw8Hx/NSAXLBwDwAuEjpc5782tToMlscR4 X5DxXpxFHuN2IiT2a3BNk7zMPJkERyNLKsOtJ9QzzgFQ6PJ5N4HEz8KxkgRCyQWn0R/k R/jaOfm6R9Z2TzVVQVQIyjM7UQOyV3vi5LowPbZjAj1o1HZMYXoVwJA5MF1NH0vDhLJY 2Kxw== X-Gm-Message-State: ALoCoQlOZuOEsqL4rsaAgiJthXdrH+kigroKJmdyqCi9nSZW6eSpJLQRClatQZb+FlEGXTZTKIxQ X-Received: by 10.141.28.80 with SMTP id f77mr43033456qhe.100.1441054115100; Mon, 31 Aug 2015 13:48:35 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by smtp.gmail.com with ESMTPSA id m18sm9508071qgd.24.2015.08.31.13.48.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 31 Aug 2015 13:48:34 -0700 (PDT) Date: Mon, 31 Aug 2015 16:48:19 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH 12/14] lpfc: The linux driver does not reinitiate discovery after a failed FLOGI Message-ID: <55e4bd93.oKGQ536ViqN6PeJn%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The linux driver does not reinitiate discovery after a failed FLOGI Forgot to clear FCF Discovery in-progress flag upon FLOGI failures. Thus we didn't restart FLOGI. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_els.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 759fa9b..3feeb44 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1026,9 +1026,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, stop_rr_fcf_flogi: /* FLOGI failure */ lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, - "2858 FLOGI failure Status:x%x/x%x TMO:x%x\n", + "2858 FLOGI failure Status:x%x/x%x TMO:x%x " + "Data x%x x%x\n", irsp->ulpStatus, irsp->un.ulpWord[4], - irsp->ulpTimeout); + irsp->ulpTimeout, phba->hba_flag, + phba->fcf.fcf_flag); /* Check for retry */ if (lpfc_els_retry(phba, cmdiocb, rspiocb)) @@ -1152,6 +1154,9 @@ stop_rr_fcf_flogi: } flogifail: + spin_lock_irq(&phba->hbalock); + phba->fcf.fcf_flag &= ~FCF_DISCOVERY; + spin_unlock_irq(&phba->hbalock); lpfc_nlp_put(ndlp); if (!lpfc_error_lost_link(irsp)) {