From patchwork Wed Apr 17 21:44:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906201 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 32DD61390 for ; Wed, 17 Apr 2019 21:45:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D1482867C for ; Wed, 17 Apr 2019 21:45:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 115A228818; Wed, 17 Apr 2019 21:45:04 +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 9BF5E2867C for ; Wed, 17 Apr 2019 21:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387912AbfDQVo6 (ORCPT ); Wed, 17 Apr 2019 17:44:58 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35459 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729500AbfDQVoz (ORCPT ); Wed, 17 Apr 2019 17:44:55 -0400 Received: by mail-pg1-f195.google.com with SMTP id g8so160064pgf.2 for ; Wed, 17 Apr 2019 14:44:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WRsWrzqgGL4+SFAKJWYYCDKH8IgmTPPozutdobF3+uA=; b=C/bdi1f9zhEgJO2YXMGGtTo3hj6oC3VN3F+Xh1QVSHqR6qF0fG3E8Y0qCUj9COSDOg gbsJxK2xWQ98Kojwnli/KWmEHmRusS6m5S7EfxRbyXak737eMmyO68cCT2HkveyQJCAc OyZZ4Y0LEzhDyAoAoH0PNOSHK6myPgGrOMYRf2qBHH5yJpqorGDPFaZK8zersF9q7e7x n+iOvaugSKbnkiceayMo1UULJuUf9khiI1Up36ZAVxq15q/uwJYKNZcjfnfE4MS86kek 5P+y9BEPnlHXj/bKcFuslamBsLsfdVaNO9RIrm86GwZra94FuHfmfwIF0SnZ+MX4KngE abEg== X-Gm-Message-State: APjAAAXlSQVNe/yqFZhH+kyiOwDl4HBAtOizObDKz+fsozOkylWZhj3Q EPJXY3N+EhWDTwRMaFqFIzg= X-Google-Smtp-Source: APXvYqyRgnT6i7F4t7/Ys34kHfTYEH8fVeHgTb/P8gvfa47o9rqv3c3+0aAd/cW3xHk9r9aFYCUPLA== X-Received: by 2002:aa7:9ab7:: with SMTP id x23mr71257516pfi.27.1555537494346; Wed, 17 Apr 2019 14:44:54 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.44.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:44:53 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche Subject: [PATCH 00/35] qla2xxx source code cleanup and bug fixes Date: Wed, 17 Apr 2019 14:44:09 -0700 Message-Id: <20190417214443.243152-1-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT MIME-Version: 1.0 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 Martin, This patch series includes source code cleanup patches and also several bug fixes. These patches are the result of manual code inspection, static source code analysis and testing with lockdep and KASAN enabled. Please consider this patch series for kernel v5.2. Thanks, Bart. Bart Van Assche (34): qla2xxx: Update two source code comments qla2xxx: Fix a format specifier qla2xxx: Move qla2x00_set_reserved_loop_ids() definition qla2xxx: Declare qla2x00_find_new_loop_id() static qla2xxx: Remove a set-but-not-used variable qla2xxx: Move qla2x00_clear_loop_id() from qla_inline.h into qla_init.c qla2xxx: Move qla2x00_is_reserved_id() from qla_inline.h into qla_init.c qla2xxx: Uninline qla2x00_init_timer() qla2xxx: Remove the fcport test from qla_nvme_abort_work() qla2xxx: Avoid that Coverity complains about dereferencing a NULL rport pointer qla2xxx: Log the status code if a firmware command fails qla2xxx: Increase the size of the mailbox arrays from 4 to 8 qla2xxx: Make qla2x00_mem_free() easier to verify qla2xxx: Avoid that qla2x00_mem_free() crashes if called twice qla2xxx: Fix a qla24xx_enable_msix() error path qla2xxx: Fix use-after-free issues in qla2xxx_qpair_sp_free_dma() qla2xxx: Simplify qlt_send_term_imm_notif() qla2xxx: Fix error handling in qlt_alloc_qfull_cmd() qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending() qla2xxx, target: Fix offline port handling and host reset handling qla2xxx: Complain if a command is released that is owned by the firmware qla2xxx: Remove qla_tgt_cmd.released qla2xxx: Remove unnecessary locking from the target code qla2xxx: Make qla24xx_async_abort_cmd() static qla2xxx: Use an on-stack completion in qla24xx_control_vp() qla2xxx: Fix race conditions in the code for aborting SCSI commands qla2xxx: Pass little-endian values to the firmware qla2xxx: Check the size of firmware data structures at compile time qla2xxx: Introduce the dsd32 and dsd64 data structures qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware qla2xxx: Complain loudly about reference count underflow qla2xxx: Fix hardirq-unsafe locking qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory qla2xxx: Avoid that lockdep complains about unsafe locking in tcm_qla2xxx_close_session() drivers/scsi/qla2xxx/qla_bsg.c | 10 +- drivers/scsi/qla2xxx/qla_def.h | 67 ++---- drivers/scsi/qla2xxx/qla_dsd.h | 30 +++ drivers/scsi/qla2xxx/qla_fw.h | 67 +++--- drivers/scsi/qla2xxx/qla_gbl.h | 11 +- drivers/scsi/qla2xxx/qla_gs.c | 47 ++--- drivers/scsi/qla2xxx/qla_init.c | 279 +++++++++++++------------ drivers/scsi/qla2xxx/qla_inline.h | 49 ----- drivers/scsi/qla2xxx/qla_iocb.c | 316 +++++++++++----------------- drivers/scsi/qla2xxx/qla_isr.c | 10 +- drivers/scsi/qla2xxx/qla_mbx.c | 4 +- drivers/scsi/qla2xxx/qla_mid.c | 9 +- drivers/scsi/qla2xxx/qla_mr.c | 63 ++---- drivers/scsi/qla2xxx/qla_mr.h | 11 +- drivers/scsi/qla2xxx/qla_nvme.c | 74 ++----- drivers/scsi/qla2xxx/qla_nvme.h | 14 +- drivers/scsi/qla2xxx/qla_nx.c | 12 +- drivers/scsi/qla2xxx/qla_nx2.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 323 +++++++++++++---------------- drivers/scsi/qla2xxx/qla_target.c | 165 ++++----------- drivers/scsi/qla2xxx/qla_target.h | 29 ++- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 50 ++--- 22 files changed, 662 insertions(+), 980 deletions(-) create mode 100644 drivers/scsi/qla2xxx/qla_dsd.h Acked-by: Himanshu Madhani