public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 212007] New: wrong timeout calculation in scsi device_handler (scsi_dh_emc.c and scsi_dh_rdac.c)
Date: Mon, 01 Mar 2021 12:49:47 +0000	[thread overview]
Message-ID: <bug-212007-11613@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=212007

            Bug ID: 212007
           Summary: wrong timeout calculation in scsi device_handler
                    (scsi_dh_emc.c and scsi_dh_rdac.c)
           Product: SCSI Drivers
           Version: 2.5
    Kernel Version: 5.11.2 (all kernels since 4.11)
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
          Assignee: scsi_drivers-other@kernel-bugs.osdl.org
          Reporter: t.wede@kw-reneg.de
        Regression: No

Created attachment 295549
  --> https://bugzilla.kernel.org/attachment.cgi?id=295549&action=edit
patch to correct wrong timeout calculations in scsi device handler

scsi_dh_emc.c:
--------------

In scsi_dh_emc.c (line 34) CLARIION_TIMEOUT ist defined as (60 * HZ).

In send_trespass_cmd (lines 279 - 281) the following is calculated:

err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL,
                        &sshdr, CLARIION_TIMEOUT * HZ, CLARIION_RETRIES,
                        req_flags, 0, NULL);

The result is "(60 * HZ) * HZ".


scsi_dh_rdac.c:
---------------

In scsi_dh_rdac.c (line 55) RDAC_TIMEOUT is defined as (60 * HZ).

In send_mode_select (lines 558 - 566) the following is calculated:

        if (scsi_execute(sdev, cdb, DMA_TO_DEVICE, &h->ctlr->mode_select,
                        data_size, NULL, &sshdr, RDAC_TIMEOUT * HZ,
                        RDAC_RETRIES, req_flags, 0, NULL)) {
                err = mode_select_handle_sense(sdev, &sshdr);
                if (err == SCSI_DH_RETRY && retry_cnt--)
                        goto retry;
                if (err == SCSI_DH_IMM_RETRY)
                        goto retry;
        }

The result is "(60 * HZ) * HZ".

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2021-03-01 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 12:49 bugzilla-daemon [this message]
2021-03-03 20:34 ` [Bug 212007] wrong timeout calculation in scsi device_handler (scsi_dh_emc.c and scsi_dh_rdac.c) bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-212007-11613@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox