From patchwork Sun Oct 7 08:35:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 10629413 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 9799014BD for ; Sun, 7 Oct 2018 08:35:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ACD129199 for ; Sun, 7 Oct 2018 08:35:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6ABA1291A0; Sun, 7 Oct 2018 08:35:48 +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 172C729150 for ; Sun, 7 Oct 2018 08:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbeJGPmT (ORCPT ); Sun, 7 Oct 2018 11:42:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:47106 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726402AbeJGPmT (ORCPT ); Sun, 7 Oct 2018 11:42:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 920B9AE6E; Sun, 7 Oct 2018 08:35:45 +0000 (UTC) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Chad Dupuis , Arun Easi , Hannes Reinecke Subject: [PATCH 0/3] libfc state machine fixes Date: Sun, 7 Oct 2018 10:35:34 +0200 Message-Id: <20181007083537.89131-1-hare@suse.de> X-Mailer: git-send-email 2.16.4 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 all, here are some patches for PRLI issues in libfc we've come across recently. The libfc ones are pretty straightforward, but the scsi state machine one probably warrants some discussion. What happened was that in some fabrics the RSCN might get lost or incompletely reseived. This will then cause SCSI EH to be triggered for the lost rports, setting the devices to offline. But later on we do get an RSCN, which would reinstate the rports, but unfortunately the devices will remain in OFFLINE as we cannot transition back to running. The solution I've came up with was to allow transitions from OFFLINE to BLOCKED, as during RSCN processing the devices will be set to blocked, and so I found it only reasonable to allow this transition. But as usual, comments and reviews are welcome. Hannes Reinecke (2): scsi: Allow state transitions from OFFLINE to BLOCKED libfc: retry PRLI if we cannot analyse the payload Thomas Abraham (1): libfc: check fc_frame_payload_get() return value for null drivers/scsi/libfc/fc_rport.c | 22 ++++++++++++++++------ drivers/scsi/scsi_lib.c | 1 + 2 files changed, 17 insertions(+), 6 deletions(-)