From patchwork Thu Oct 14 05:54:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12557761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD2AC433EF for ; Thu, 14 Oct 2021 05:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2EA08610CB for ; Thu, 14 Oct 2021 05:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229506AbhJNFts (ORCPT ); Thu, 14 Oct 2021 01:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhJNFts (ORCPT ); Thu, 14 Oct 2021 01:49:48 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD69C061570 for ; Wed, 13 Oct 2021 22:47:44 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id q10-20020a17090a1b0a00b001a076a59640so4915955pjq.0 for ; Wed, 13 Oct 2021 22:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=rLKLDprZFHTdhzGl0pT9hsSYIQfrzM+H2rkksXFIf+k=; b=IKAeZSfldDCTb0x4W2zYKPrebJKmkNnVdlMgIJVKKYYdooLpI3TmY+GPLGZrV3It7h nAwzgvjEc2gGanCDDDpXXBh192KJDSvSq6nCGat6JSLl3HhIIVMqJGIYabi9qoGBjUWp gLRwd2PJLHDK/ZyECx8QP2DPI21M6+5tmXRGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=rLKLDprZFHTdhzGl0pT9hsSYIQfrzM+H2rkksXFIf+k=; b=G65BCOWRRLkMsRx5f2atoHgIff/Y5/CLzVas/Ghe93rE9maclcsLU6z9TTd9pXRYpJ GmP+EEYZC/pfoQegxWL3+M4CeHaz/xcKTYxet0H/EKV3lyxsbFokv4OZfndNu5QwrfbL SqbnZu22PSyWacMpGsq+Z1KSVCUlVyA+tdkhp+xPVEZB7Rs1Wue1PzinclDpfx7tzGE0 h/OgyGU0/UU/WSMYJH+/fbu8wiQbaPID2/P96rPjKOkzZsT4vq4ueeQQIray/x01ri2x sDRxrND45/Mu6MaDFGlGmM0QT+svZkmDn/Awln4tlMITf/veq+80A9uDrJ7DISHthijQ KmMw== X-Gm-Message-State: AOAM530dGGoWf5MbuEy9tHWPIuQesMuYh7FR0uZXTVIC+jI7mVloYZSF RgHTgVBEtEVJGAd9lm1lWK/mA3iMX2UP/XkDaDh2shyXoepteTXnKAyAPT43Wxt85vndJCsXrth e/W1q36g/jHCtSYRwjK3I3gn+DRl1Tsavs+9GBGGa48RpdgFAm4bSYsS42vikkInlBRGLyMhkGs 1DFg5NHJdQ X-Google-Smtp-Source: ABdhPJwDBs+As5nc30rkC7cgRAZd6D4yTtzNIpw0xZQ+93k9nB0hof68OPOrGNnCkM/m+3cr7hIi7g== X-Received: by 2002:a17:903:2c2:b029:101:9c88:d928 with SMTP id s2-20020a17090302c2b02901019c88d928mr3274810plk.62.1634190462917; Wed, 13 Oct 2021 22:47:42 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id v12sm1197800pjd.9.2021.10.13.22.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 22:47:41 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: thenzl@redhat.com, sathya.prakash@broadcom.com, Sreekanth Reddy Subject: [PATCH RESEND] mpi3mr:Fix duplicate device entries when scan through sysfs Date: Thu, 14 Oct 2021 11:24:25 +0530 Message-Id: <20211014055425.30719-1-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When the user scans the devices through 'scan' sysfs using below command then the user will observe duplicate device entries in lsscsi command output. echo "- - -" > /sys/class/scsi_host/host0/scan Fix is to set the shost's max_channel to zero. Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Sreekanth Reddy --- 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 2197988333fe..3cae8803383b 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3736,7 +3736,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)