From patchwork Wed Mar 22 17:20:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 13183722 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FBA1C6FD1C for ; Wed, 22 Mar 2023 09:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbjCVJVt (ORCPT ); Wed, 22 Mar 2023 05:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbjCVJVe (ORCPT ); Wed, 22 Mar 2023 05:21:34 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9276B5F6DF for ; Wed, 22 Mar 2023 02:20:37 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id qe8-20020a17090b4f8800b0023f07253a2cso18510949pjb.3 for ; Wed, 22 Mar 2023 02:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20210112.gappssmtp.com; s=20210112; t=1679476837; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gk7upXiG6tQnjmAbZAy+2hfQqQURaFjrDuWcXF2d57c=; b=bwVOwT65dBMPO57hdlbzNA8a+HC+4eI5z+X3CqQNXfyDMQqvecrsm/6Ll4T8b4NLzb PFE2sSJh4UwLSnRabI1Nuj4ZPOcBtg6K7RLRZ3/EqCLDKELF+sLmz+5xjNPtijnPs56x 4cg0RtbFmfo36Qt7KICrkga4NXCFUN3A5bXnkiRBWeT/hcMZ/tbRt56E8HrCcPYJ6iE2 lPX5e27oCLNLo95+pfV9wS6+800zaRVlYo9iRFfXm63v+4yjcdWtIN2EoyGFJZsmRTXP q9mMmwN7mBe3CCR/Qf8Qjqs8wGBldD8F0Z2IDPiSU097+/b+kSyjB4nLyRpyXhphCvwL tTfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679476837; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gk7upXiG6tQnjmAbZAy+2hfQqQURaFjrDuWcXF2d57c=; b=08Pefw1mUZGnemJ9oDHSLAbkVW45nB+ttzopBqR4lLY5T+PJFXp0vSydnqki6G8mku ip3Fu1+XPK+XL39SvXqxpwftvxytX81iTKS/L2TXaD2Q0UigIMiUv/lQk6W5u01tWUJN W3nADGNgot5PygGAitsZHJUVPKt68k7Upe4axJeLID/Rv8kwyxt3onzfw4oGMlCGtAmJ l7d9+bJ9cqzIVoJMpfdI42HvSckTyLDPACrV58WDAvdtIOx/jRKntOAyfwrztpwDRKfF PTnYaEb0uIOYiqjvE29cDPPV0fxsym+TueYykOq5C8qiWzTXZ5OgZvNQCtvTIAv+d7s5 VlOQ== X-Gm-Message-State: AO0yUKUMKljNA82wE85rAaSplOU2XIq6HENGLrpGYmn6A50IPmLkYf0A +wa4Q2q0wQFl5gwk5kR+yUxzyA== X-Google-Smtp-Source: AK7set9MFydPJqupCVJggyqn3s+4qT8rXRYcfEljHNZyGCEqVhJz/knR7egq9Ufkj8oItyOEMpbNfQ== X-Received: by 2002:a17:90b:3852:b0:23d:449a:db70 with SMTP id nl18-20020a17090b385200b0023d449adb70mr2992722pjb.28.1679476836770; Wed, 22 Mar 2023 02:20:36 -0700 (PDT) Received: from centos78 (60-248-88-209.hinet-ip.hinet.net. [60.248.88.209]) by smtp.googlemail.com with ESMTPSA id cv18-20020a17090afd1200b0022335f1dae2sm9279596pjb.22.2023.03.22.02.20.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2023 02:20:36 -0700 (PDT) Message-ID: <4aec4385abc6eab10b575c28130ec615a144492d.camel@areca.com.tw> Subject: [PATCH 3/5] scsi: arcmsr: fixed reading buffer empty length error From: ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, Linux Kernel Mailing List Date: Thu, 23 Mar 2023 01:20:35 +0800 X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: ching Huang This patch fixed reading buffer empty length error which cause areca CLI app command timeout. Signed-off-by: ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index d387a38..587332e 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -2254,8 +2254,11 @@ static void arcmsr_iop2drv_data_wrote_handle(struct AdapterControlBlock *acb) spin_lock_irqsave(&acb->rqbuffer_lock, flags); prbuffer = arcmsr_get_iop_rqbuffer(acb); - buf_empty_len = (acb->rqbuf_putIndex - acb->rqbuf_getIndex - 1) & - (ARCMSR_MAX_QBUFFER - 1); + if (acb->rqbuf_putIndex >= acb->rqbuf_getIndex) { + buf_empty_len = (ARCMSR_MAX_QBUFFER - 1) - + (acb->rqbuf_putIndex - acb->rqbuf_getIndex); + } else + buf_empty_len = acb->rqbuf_getIndex - acb->rqbuf_putIndex - 1; if (buf_empty_len >= readl(&prbuffer->data_len)) { if (arcmsr_Read_iop_rqbuffer_data(acb, prbuffer) == 0) acb->acb_flags |= ACB_F_IOPDATA_OVERFLOW; From patchwork Wed Mar 22 17:24:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 13183723 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1919EC6FD1F for ; Wed, 22 Mar 2023 09:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbjCVJYx (ORCPT ); Wed, 22 Mar 2023 05:24:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbjCVJYv (ORCPT ); Wed, 22 Mar 2023 05:24:51 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CDDA26CC4 for ; Wed, 22 Mar 2023 02:24:43 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id c18so18682235ple.11 for ; Wed, 22 Mar 2023 02:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20210112.gappssmtp.com; s=20210112; t=1679477082; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:from:to:cc:subject:date:message-id:reply-to; bh=r7Tb2rdVk0Kq0Lhn7b5PfhTYo+vgtmNEVNavpXN3n3k=; b=6smBdnihOsEk9BxUHC1/nojaQmx36N9G0PJhWdIq7GFozFJQOUIbK2lQbt8U+2VaBy EZeunEtyjqOhidxR8pL/1/1KK3UN61JnYNDA51E2rr8ap5Xs3YqqQDvj5IZbiS9FlgFW OZmmwGm1a9vHZEEi8FezQ/nXQTcaJf1n2jW6QwAVhRUiJA1rVQOYqVKklIZXrnmKawqc vmaJhbi+h9VO/zuF6SVkZIwJ4PJaqlEtrmcR5J+7YvWSyOtQtgF7NyNbEMBdUyr2iUrc hib9eZR7Pt4pCZBT20IPPu7aV1X1iDnppXE/0MMFG4bGfRrWRGS/V9MNhTeNeRFc1kTb yiUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679477082; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r7Tb2rdVk0Kq0Lhn7b5PfhTYo+vgtmNEVNavpXN3n3k=; b=odKqoHMb4QOmi7pALUFknswoaAPvJYyqIQFS8hAJ3xUPOTdWvJ3AJIWrBSDwH0AW4m bc4fhtvOpVyL5q6TAwj06Ncd0kKsIM3JrSxh9QOCbZlomgtDptSNlYQz33iDcdWHD5An UXoqLBT7BREmQxr+Xa+gG+yGjnKVKB4THcIZTLnsuqw+yfI4hLmaQWNlQ002pkMpIv41 2V88g9YWKgDHFO4Lq678dV10oWhe+zZ6UgEXX6icqIOQ3Nq9ZzkHggYt7L5qH8r2GoIl EvsLnFbuW7bYL9975+lbcCqc6h+U4pphJKvv1kxQk4q4cGr/nU8pL70Xdfi2urk49+4r kpdw== X-Gm-Message-State: AO0yUKVoo55sU001horMUFiwVRZNFLP9KckFnMcbccNO5vAI6HTNgXWX T9ZKfosw/dFc4OlcVbjc81Kx6Q== X-Google-Smtp-Source: AK7set8Iyjh8pDLJgi4hcNTBdjsXlGImuI55mESA98K1dApFxr7fvforGjCKwsBhYAXT14pb3gbD+Q== X-Received: by 2002:a05:6a20:3391:b0:d8:fd3b:f1ba with SMTP id f17-20020a056a20339100b000d8fd3bf1bamr4592413pzd.3.1679477082543; Wed, 22 Mar 2023 02:24:42 -0700 (PDT) Received: from centos78 (60-248-88-209.hinet-ip.hinet.net. [60.248.88.209]) by smtp.googlemail.com with ESMTPSA id l19-20020a63f313000000b0050bd71ed66fsm9201894pgh.92.2023.03.22.02.24.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2023 02:24:42 -0700 (PDT) Message-ID: <045a0b360bd963987d9be08c1f0f785b47724caf.camel@areca.com.tw> Subject: [PATCH 4/5] scsi: arcmsr: added driver proc_name From: ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, Linux Kernel Mailing List Date: Thu, 23 Mar 2023 01:24:41 +0800 X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: ching Huang This patch added driver proc_name. Signed-off-by: ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 07df255..6af8ae6 100644 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -45,6 +45,7 @@ #include struct device_attribute; /*The limit of outstanding scsi command that firmware can handle*/ +#define ARCMSR_NAME "arcmsr" #define ARCMSR_MAX_FREECCB_NUM 1024 #define ARCMSR_MAX_OUTSTANDING_CMD 1024 #define ARCMSR_DEFAULT_OUTSTANDING_CMD 128 diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 587332e..6a0951d 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -153,6 +153,7 @@ static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, int queue_de static struct scsi_host_template arcmsr_scsi_host_template = { .module = THIS_MODULE, + .proc_name = ARCMSR_NAME, .name = "Areca SAS/SATA RAID driver", .info = arcmsr_info, .queuecommand = arcmsr_queue_command, From patchwork Wed Mar 22 17:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 13183725 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1098C6FD1F for ; Wed, 22 Mar 2023 09:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbjCVJ1y (ORCPT ); Wed, 22 Mar 2023 05:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjCVJ1x (ORCPT ); Wed, 22 Mar 2023 05:27:53 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6385679C for ; Wed, 22 Mar 2023 02:27:53 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id gp15-20020a17090adf0f00b0023d1bbd9f9eso23036349pjb.0 for ; Wed, 22 Mar 2023 02:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20210112.gappssmtp.com; s=20210112; t=1679477272; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:from:to:cc:subject:date:message-id:reply-to; bh=FQeTeTFky5skaAol2n4vXrcosGiX/c8ISuilp18ejQ0=; b=2cFFI+HLeF4277uuvBjJmfWDZMzz3Rzpj1vHUiKs899y0KieftIQiCLOLKsQ4wmBly eruDF9nzddnd/0A1pi/WZqWahAhIjPtt3oZKsv+U0nAeR1cpQq6Lv/CcKVXnPOaaUncb NMVxfuf2pGXDD7U7T3qUoJdHc2/76LHQMr3yzB3NbyZe8UsiBSti3laf22KIXW+kjntC cmMqRaqo7qZv4W+xu2T7eN0mjIP6PJdAAKGao5cGCoS4L9ikcJDgEwN2qpnRLKLk3KZ8 svLrwcGP+4XdfsvgO7WAquDtz+eNo6edDEX09BVodkDEQTl4khVXnhhRpaaNetohRbr0 Rspg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679477272; h=content-transfer-encoding:mime-version:date:to:from:subject :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FQeTeTFky5skaAol2n4vXrcosGiX/c8ISuilp18ejQ0=; b=f+NT7KHmDtUO+k4w7BXGZzXFnjEFkZgjZXnF7fYiVhp/CWrzZK1DICTsl/zKWXctgJ F/RAMLi2yFMvFx7ecR6Jmeo7jOuxBxWkBVogUYmmik1p+/3lGkj0DxFJ5xhvcRGLVt7X Ci9/9sWD4WZ+JKitlKWW3zB1hOB9yzqCST+oyIf754tCEDBj6qE0XNrS6qgdDNUiehNA 6NY2ibRJSQRstf7Wl7+er+bthR/Iby3+eUp/WnOQEMTqF5LiV+JtXU5yaH6PvXsnNO6v juiFgsW31PKl0KEmPGOIReEMs37KZBODG8jHAS3fprmiHv2UsF0zeMu1rWBtnn9fOsaM p8wQ== X-Gm-Message-State: AO0yUKVmoA2C0sFq3Xf9Re+WIetn+VzayEN+q7ma76xLRzxRN8VpBIyY XokuqdyKSE/O5iPgapFGZ6k3DA== X-Google-Smtp-Source: AK7set9vi1Kudu+mfwaGAQzzDqcG6Oi4AzoBF2AJW7EP/W22utNw41IONnw/9PDyo3r41Cec+H1Shw== X-Received: by 2002:a17:902:c949:b0:19c:e405:4446 with SMTP id i9-20020a170902c94900b0019ce4054446mr2787974pla.30.1679477272647; Wed, 22 Mar 2023 02:27:52 -0700 (PDT) Received: from centos78 (60-248-88-209.hinet-ip.hinet.net. [60.248.88.209]) by smtp.googlemail.com with ESMTPSA id x8-20020a170902820800b0019a7ef5e9a8sm10203309pln.82.2023.03.22.02.27.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2023 02:27:52 -0700 (PDT) Message-ID: <8022803536481106bbeca2f8eb33712668f41217.camel@areca.com.tw> Subject: [PATCH 5/5] scsi: arcmsr: update driver's version to v1.50.00.13-20230206 From: ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, Linux Kernel Mailing List Date: Thu, 23 Mar 2023 01:27:51 +0800 X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: ching Huang This patch update driver's version to v1.50.00.13-20230206 Signed-off-by: ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 6af8ae6..ed8d931 100644 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -50,7 +50,7 @@ struct device_attribute; #define ARCMSR_MAX_OUTSTANDING_CMD 1024 #define ARCMSR_DEFAULT_OUTSTANDING_CMD 128 #define ARCMSR_MIN_OUTSTANDING_CMD 32 -#define ARCMSR_DRIVER_VERSION "v1.50.00.05-20210429" +#define ARCMSR_DRIVER_VERSION "v1.50.00.13-20230206" #define ARCMSR_SCSI_INITIATOR_ID 255 #define ARCMSR_MAX_XFER_SECTORS 512 #define ARCMSR_MAX_XFER_SECTORS_B 4096