From: Bart Van Assche Subject: Re: [PATCH 02/22] libfc: additional debugging messages Date: Wed, 3 Aug 2016 10:33:27 -0700 Message-ID: References: <1470230002-37737-1-git-send-email-hare@suse.de> <1470230002-37737-3-git-send-email-hare@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-co1nam03on0047.outbound.protection.outlook.com ([104.47.40.47]:7845 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932860AbcHCRdn (ORCPT ); Wed, 3 Aug 2016 13:33:43 -0400 In-Reply-To: <1470230002-37737-3-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Hannes Reinecke , "Martin K. Petersen" Cc: Christoph Hellwig , linux-scsi@vger.kernel.org, Johannes Thumshirn , Chad Dupuis , Hannes Reinecke On 08/03/2016 06:13 AM, Hannes Reinecke wrote: > @@ -1121,8 +1124,10 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp, > fc_rport_enter_rtv(rdata); > > } else { > - FC_RPORT_DBG(rdata, "Bad ELS response for PRLI command\n"); > - fc_rport_error_retry(rdata, fp); > + rjt = fc_frame_payload_get(fp, sizeof (*rjt)); > + FC_RPORT_DBG(rdata, "PRLI ELS rejected, reason %x expl %x\n", > + rjt->er_reason, rjt->er_explan); > + fc_rport_error_retry(rdata, NULL); > } Shouldn't the type of the frame be checked in this code instead of assuming that it's a reject? Bart.