All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 81861] Oops by mvsas v0.8.16: sas: ataX: end_device-Y:0:Z: dev error handler -> general protection fault, RIP: mvs_task_prep_ata+0x80/0x3a0
Date: Thu, 23 Apr 2015 11:31:26 +0000	[thread overview]
Message-ID: <bug-81861-11613-EYH9tqQv6s@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-81861-11613@https.bugzilla.kernel.org/>

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

--- Comment #23 from linux-ide@crashplan.pro ---
On the Linux-scsi mailing list a possible patch was introduced that has been
tested to fix another appearance of the mvsas port expander mvs_task_prep
panic.

In that case the resulting panics for the combination mvsas + port expander +
SATA drives were:
1. RIP  [<ffffffffa00cd7ed>] mvs_task_prep+0x78d/0xe40 [mvsas]
2. RIP  [<ffffffffa00bd90f>] mvs_task_prep+0x73f/0xd50 [mvsas]
3. RIP  [<ffffffffa006f5b0>] mvs_task_prep_ata+0x80/0x3a0 [mvsas]
4. RIP: 0010:[<ffffffffa00f1877>]  [<ffffffffa00f1877>]
mvs_task_exec.isra.13+0x827/0xf10 [mvsas]

---

James Bottomley wrote on 16-04-15 at 07:16:

Well, that narrows it down.  It looks like there's a longstanding bug in
mvs_task_prep_ata() where the physical PHY field is populated by taking
an index through the HBA phy table.  This field is ignored for STP but
the phy table is too small and it uses the expander phy number to index
it (hence the GPF as we fall off the end of the phy table trying to
dereference sas_phy->id).

This should fix the problem.

James

---

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 2d5ab6d..454536c 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -441,14 +441,11 @@ static u32 mvs_get_ncq_tag(struct sas_task *task, u32
*tag)
 static int mvs_task_prep_ata(struct mvs_info *mvi,
                  struct mvs_task_exec_info *tei)
 {
-    struct sas_ha_struct *sha = mvi->sas;
     struct sas_task *task = tei->task;
     struct domain_device *dev = task->dev;
     struct mvs_device *mvi_dev = dev->lldd_dev;
     struct mvs_cmd_hdr *hdr = tei->hdr;
     struct asd_sas_port *sas_port = dev->port;
-    struct sas_phy *sphy = dev->phy;
-    struct asd_sas_phy *sas_phy = sha->sas_phy[sphy->number];
     struct mvs_slot_info *slot;
     void *buf_prd;
     u32 tag = tei->tag, hdr_tag;
@@ -468,7 +465,7 @@ static int mvs_task_prep_ata(struct mvs_info *mvi,
     slot->tx = mvi->tx_prod;
     del_q = TXQ_MODE_I | tag |
         (TXQ_CMD_STP << TXQ_CMD_SHIFT) |
-        (MVS_PHY_ID << TXQ_PHY_SHIFT) |
+        ((sas_port->phy_mask & TXQ_PHY_MASK) << TXQ_PHY_SHIFT) |
         (mvi_dev->taskfileset << TXQ_SRS_SHIFT);
     mvi->tx[mvi->tx_prod] = cpu_to_le32(del_q);

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

  parent reply	other threads:[~2015-04-23 11:31 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 17:33 [Bug 81861] New: mvsas.ko v0.8.16 error messages and kernel crashes attaching 4 SATA drives to specific HP SAS expander ports bugzilla-daemon
2014-08-07 20:29 ` [Bug 81861] " bugzilla-daemon
2014-08-08  8:19 ` bugzilla-daemon
2014-08-08  8:24 ` [Bug 81861] Oops by mvsas v0.8.16: sas: ataX: end_device-Y:0:Z: dev error handler -> general protection fault, RIP: mvs_task_prep_ata+0x80/0x3a0 bugzilla-daemon
2014-08-08  8:34 ` bugzilla-daemon
2014-08-12 20:09 ` bugzilla-daemon
2014-08-12 22:02 ` bugzilla-daemon
2014-08-21 18:35 ` bugzilla-daemon
2014-08-22 12:13 ` bugzilla-daemon
2014-08-22 12:16 ` bugzilla-daemon
2014-08-22 12:17 ` bugzilla-daemon
2014-08-22 13:19 ` bugzilla-daemon
2014-08-22 14:05 ` bugzilla-daemon
2014-08-22 17:00 ` bugzilla-daemon
2014-08-22 17:36 ` bugzilla-daemon
2014-08-23 20:04 ` bugzilla-daemon
2014-08-23 20:06 ` bugzilla-daemon
2014-08-23 22:12 ` bugzilla-daemon
2014-09-23 21:56 ` bugzilla-daemon
2014-09-24  0:32   ` Elliott, Robert (Server Storage)
2014-09-26  7:04 ` bugzilla-daemon
2014-10-19 15:56 ` bugzilla-daemon
2014-12-17 19:49 ` bugzilla-daemon
2015-01-26 23:19 ` bugzilla-daemon
2015-01-26 23:20 ` bugzilla-daemon
2015-01-26 23:21 ` bugzilla-daemon
2015-04-23 11:31 ` bugzilla-daemon [this message]
2015-04-29 13:40 ` bugzilla-daemon
2015-04-29 14:20   ` James Bottomley
     [not found]     ` <CAC2CY-2YAy8GfjCHO+PrFWAuBnhfnMvK33KJ3YCVRZXJMEHykQ@mail.gmail.com>
2015-04-29 15:41       ` James Bottomley
2015-04-29 16:24         ` Adam Talbot
2015-04-29 18:05           ` James Bottomley
2015-04-29 18:07             ` Adam Talbot
2015-04-29 18:10               ` James Bottomley
2015-04-29 19:09             ` Nathan Rennie-Waldock
2015-10-05  0:07               ` Nathan Rennie-Waldock
2015-04-29 13:41 ` 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-81861-11613-EYH9tqQv6s@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.