Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp737366pxb; Mon, 25 Oct 2021 17:48:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/hptxmNb1oYmJmwnEP9ZviIMev8ZRFWo42rTQaK8HHB7zZzMv3e4AJPORYxJlquBNjKbj X-Received: by 2002:a17:906:28cd:: with SMTP id p13mr26252763ejd.568.1635209328633; Mon, 25 Oct 2021 17:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635209328; cv=none; d=google.com; s=arc-20160816; b=LZ6A94g+2xgz53BK2WRF1rEs/jgOagSd9vdh8P/g2uzKq0AmCOyuPGhWDELNw3nW6M fzaNBJGnPI9zijxUcNjijFaQAhwJze4iGQ4IACm+yz1V/0Z4S5KVNfhm0LEvCR389SoV LjUw2VIR+UXyizCD8iYZOnuomyE0vZ3d3uVlaoOet/JFF96sBnQkBhEl+0AStKCD81bP iHp/TorBscxeVCydajeYSjQVJhcBmWpWT2OSwAOLA7wkAuCcou/uew9WFnSMpa2XDTk8 Tl6MpRX7/8k4gm9+di1yAJUrNzaL1N+6DZgpiQnkAnAKBi4SuC/1wlc3FXHpZ7/3JJTD rD5Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j8rwJKJcG8Zr9fHBHINIz+MDoiXdnfsmtKL1821Dw0k=; b=Wm0w/ypjgcPvo/SizdbZwqOXisKkmbKF4UvYv3hUq8pV+AvpieSWWu+uaRkyTVx/v1 5V5DsKRQOTtx/aCXhi2wY0XjZhqVXIqn9dr6NugA8U4bXwg0bXqUuyZLCIp/x0B6OX4L G4O7xw51J6ea1/M78oKfioFV+UgWEEAJbph8GkdOpAMZxABsTlDJMVWpVwQzIFW3Ma4j kXY4WHX/biom1K5n2NLBQSnepwjmnQACsEfSa47T0n0PavjaVQFtJWQi5A6yKMCmO6jl enpIwhv8B3Ic+OeVn9IgsVRT8Vp/x4kqTwIc3yHUWRLp1EXM5u1OBbljYihTCclT0ERH XhYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jg3vUNB4; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si31270292eje.551.2021.10.25.17.48.24; Mon, 25 Oct 2021 17:48:48 -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=@linuxfoundation.org header.s=korg header.b=jg3vUNB4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237238AbhJYUBG (ORCPT + 99 others); Mon, 25 Oct 2021 16:01:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:45100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239409AbhJYT4j (ORCPT ); Mon, 25 Oct 2021 15:56:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4AD3B61073; Mon, 25 Oct 2021 19:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635191203; bh=IkMDFOmc7IMCVP3I5vGYPaPzbfUgdwu1oriSfnoUNtk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jg3vUNB4/4antVBnX7Zwtkz8LjK3M01tWMH6DInx2QhM8VxxIL3j0kQ2N+JAmettN 3rEgA+wEpX3rvg0K6311WADlSgS5SP1OCI4o/tuUWpyBGCUvPk1DsOMcoH1MpkplO4 xQSniusjFw9xSlqScbptIdcTNFObCUvbvvmM+17U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sreekanth Reddy , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.14 151/169] scsi: mpi3mr: Fix duplicate device entries when scanning through sysfs Date: Mon, 25 Oct 2021 21:15:32 +0200 Message-Id: <20211025191036.664596019@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211025191017.756020307@linuxfoundation.org> References: <20211025191017.756020307@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sreekanth Reddy [ Upstream commit 97e6ea6d78064e7f1e9e19c45dc690aabbb71297 ] When scanning devices through the 'scan' attribute in sysfs, the user will observe duplicate device entries in lsscsi command output. Set the shost's max_channel to zero to avoid this. Link: https://lore.kernel.org/r/20211014055425.30719-1-sreekanth.reddy@broadcom.com Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 24ac7ddec749..206c2598ade3 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3755,7 +3755,7 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id) shost->max_lun = -1; shost->unique_id = mrioc->id; - shost->max_channel = 1; + shost->max_channel = 0; shost->max_id = 0xFFFFFFFF; if (prot_mask >= 0) -- 2.33.0