Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp676274pxy; Sat, 14 Aug 2021 20:14:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+DYJKE0aCJoHIFNohqe8BLWRE9lZy6PosnWL7+NcMyc9Jp+QRjPQZADjyydge3MSTcA3O X-Received: by 2002:aa7:d896:: with SMTP id u22mr11982142edq.290.1628997299251; Sat, 14 Aug 2021 20:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628997299; cv=none; d=google.com; s=arc-20160816; b=LLmk58rxcc3qKqlUYAFZ6PrVpJ8Q1lCNvQMDQjbXs7k2LXvQz1b4MwS3c6tlvHAZSI 5auSkYA7WYHahLv4snFyrc+gr8lfZaUUlynP1ivp7YIuoUd46QBwWtRzOP0G83mbUiZx ciHzw1YfgcHTQKyhHuDAs7syWxhWIFQzeXmvCu7UOq29F1HHiQqC1S5t9v7BH4s2VAch 1Oi2PP9JLTWTLapueCd+OaMLdZu8KvzS4DqIasi4ArD0qqskpw+ixRy0BD1MTkoYTM4/ TLKZG7ifFRR6KwC+tbIlK+skGgqghmQH3qWYdyzxSoaA86IZEbtgcLL0yaestSCmByFz E1xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:date:cc:to:from:subject:message-id:dkim-signature :dkim-signature; bh=K1S33JXVgqM9dhC3Gy3+psk4WirRr933RPChNUUiWB4=; b=bvHiPR7QeoytdTrViT0wF64r6qR6Crj9y9mSNgTvdYztt9P0hFuP7w1e1iRQqbMBp7 azctFgK2o0dBzDRDtmMOBfs544gjCZZd2k1G0qzMxostGNHgglcK5fdaSzDEcfU+3usS FldfEZq0UIuh6Okmzkri2sIzEYaxKYInuMw58Rrh1zJncj1dew618CS+LUh5Thk93Xi/ GtUzmGgw7JiHXeRM10cFz8lo529e8eP6JB2Rf5Gw3qo2AtApy3aN57A6pSzI/WJka3ft HzMregJddIuMRiSyCePt2AE4QUWU1lCE6dQnFETVpAML9TwwS7RVlcEEyU2TPzL3BgCj n/AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=IsDZ14ar; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=IsDZ14ar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc21si6245516edb.493.2021.08.14.20.14.35; Sat, 14 Aug 2021 20:14:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=IsDZ14ar; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=IsDZ14ar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235079AbhHODNg (ORCPT + 99 others); Sat, 14 Aug 2021 23:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbhHODNf (ORCPT ); Sat, 14 Aug 2021 23:13:35 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CD7EC061764; Sat, 14 Aug 2021 20:13:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 8DE67128037B; Sat, 14 Aug 2021 20:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1628997178; bh=rl9kYc74n8lnrEkjB/p9JncXEvAWK+gLVnJIzKpjUmY=; h=Message-ID:Subject:From:To:Date:From; b=IsDZ14arqq9SmNETfHTANCZAHYil4LZKkXTY/tNdKX/8qNaMc6OcYyNUFSVNblN7j pjwridy5rempAN5XI8ZWD4XZ5/bbAQ6PDqxLKBSWt7GDZlbg6XH4n1SRFINDxNbdfa 6TQOEF97qqiyFbedhWD5xoI2XpCG0YbasZ2xGSYI= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a75EmV1lwCc8; Sat, 14 Aug 2021 20:12:58 -0700 (PDT) Received: from [172.20.3.52] (unknown [216.54.114.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 90FAD128035C; Sat, 14 Aug 2021 20:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1628997178; bh=rl9kYc74n8lnrEkjB/p9JncXEvAWK+gLVnJIzKpjUmY=; h=Message-ID:Subject:From:To:Date:From; b=IsDZ14arqq9SmNETfHTANCZAHYil4LZKkXTY/tNdKX/8qNaMc6OcYyNUFSVNblN7j pjwridy5rempAN5XI8ZWD4XZ5/bbAQ6PDqxLKBSWt7GDZlbg6XH4n1SRFINDxNbdfa 6TQOEF97qqiyFbedhWD5xoI2XpCG0YbasZ2xGSYI= Message-ID: <9672767623d4ca908c9405c0e7242b6e3131df7d.camel@HansenPartnership.com> Subject: [GIT PULL] SCSI fixes for 5.14-rc5 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Date: Sat, 14 Aug 2021 23:12:55 -0400 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Three minor fixes, all in drivers. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Colin Ian King (1): scsi: mpt3sas: Fix incorrectly assigned error return and check Ewan D. Milne (1): scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash Michael Kelley (1): scsi: storvsc: Log TEST_UNIT_READY errors as warnings And the diffstat: drivers/scsi/lpfc/lpfc_init.c | 3 ++- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/storvsc_drv.c | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) With full diff below. James --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 5983e05b648f..e29523a1b530 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -13193,6 +13193,8 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) if (!phba) return -ENOMEM; + INIT_LIST_HEAD(&phba->poll_list); + /* Perform generic PCI device enabling operation */ error = lpfc_enable_pci_dev(phba); if (error) @@ -13327,7 +13329,6 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) /* Enable RAS FW log support */ lpfc_sli4_ras_setup(phba); - INIT_LIST_HEAD(&phba->poll_list); timer_setup(&phba->cpuhp_poll_timer, lpfc_sli4_poll_hbtimer, 0); cpuhp_state_add_instance_nocalls(lpfc_cpuhp_state, &phba->cpuhp); diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 19b1c0cf5f2a..cf4a3a2c22ad 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -7851,7 +7851,7 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc) return r; } - rc = _base_static_config_pages(ioc); + r = _base_static_config_pages(ioc); if (r) return r; diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 328bb961c281..37506b3fe5a9 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1199,14 +1199,24 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device, vstor_packet->vm_srb.sense_info_length); if (vstor_packet->vm_srb.scsi_status != 0 || - vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) - storvsc_log(device, STORVSC_LOGGING_ERROR, + vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) { + + /* + * Log TEST_UNIT_READY errors only as warnings. Hyper-V can + * return errors when detecting devices using TEST_UNIT_READY, + * and logging these as errors produces unhelpful noise. + */ + int loglevel = (stor_pkt->vm_srb.cdb[0] == TEST_UNIT_READY) ? + STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR; + + storvsc_log(device, loglevel, "tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n", request->cmd->request->tag, stor_pkt->vm_srb.cdb[0], vstor_packet->vm_srb.scsi_status, vstor_packet->vm_srb.srb_status, vstor_packet->status); + } if (vstor_packet->vm_srb.scsi_status == SAM_STAT_CHECK_CONDITION && (vstor_packet->vm_srb.srb_status & SRB_STATUS_AUTOSENSE_VALID))