From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8FFCC2D0B1 for ; Thu, 6 Feb 2020 12:46:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8613A20661 for ; Thu, 6 Feb 2020 12:46:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbgBFMqq (ORCPT ); Thu, 6 Feb 2020 07:46:46 -0500 Received: from mx2.suse.de ([195.135.220.15]:45906 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727138AbgBFMqq (ORCPT ); Thu, 6 Feb 2020 07:46:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8EAA9AE2D; Thu, 6 Feb 2020 12:46:44 +0000 (UTC) Date: Thu, 6 Feb 2020 13:46:44 +0100 From: Daniel Wagner To: mwilck@suse.com Cc: "Martin K. Petersen" , Himanshu Madhani , Quinn Tran , Roman Bolshakov , Hannes Reinecke , Bart Van Assche , James Bottomley , linux-scsi@vger.kernel.org Subject: Re: [PATCH v2 3/3] scsi: qla2xxx: set UNLOADING before waiting for session deletion Message-ID: <20200206124644.kcd2ilfksmjkjppo@beryllium.lan> References: <20200205214422.3657-1-mwilck@suse.com> <20200205214422.3657-4-mwilck@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200205214422.3657-4-mwilck@suse.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On Wed, Feb 05, 2020 at 10:44:22PM +0100, mwilck@suse.com wrote: > From: Martin Wilck > > The purpose of the UNLOADING flag is to avoid port login procedures > to continue when a controller is in the process of shutting down. > It makes sense to set this flag before starting session teardown. > The only operations that must be able to continue are LOGO, PRLO, > and the like. > > Furthermore, use atomic test_and_set_bit() to avoid the shutdown > being run multiple times in parallel. In qla2x00_disable_board_on_pci_error(), > the test for UNLOADING is postponed until after the check for an already > disabled PCI board. > > Signed-off-by: Martin Wilck Reviewed-by: Daniel Wagner