All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 85151] pm80xx + 7805H + HP SAS port expander = mpi_smp_completion 2604:smp IO status 0x2 and sas: expander ... discovery failed(0xffffffa6)
Date: Fri, 10 Oct 2014 21:11:47 +0000	[thread overview]
Message-ID: <bug-85151-11613-AtvNNpvD2A@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-85151-11613@https.bugzilla.kernel.org/>

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

--- Comment #11 from linux-ide@crashplan.pro ---
Created attachment 153151
  --> https://bugzilla.kernel.org/attachment.cgi?id=153151&action=edit
pm80xx dmesg even more verbose output after patching pm80xx.ko

This is the applied patch:
===
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c
b/drivers/scsi/pm8001/pm80xx_hwi.c
index b06443a..c696fdc 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -2613,10 +2613,10 @@ mpi_smp_completion(struct pm8001_hba_info *pm8001_ha,
void *piomb)
         ts->stat = SAM_STAT_GOOD;
         if (pm8001_dev)
             pm8001_dev->running_req--;
+        PM8001_FAIL_DBG(pm8001_ha,
+            pm8001_printk("RESPONSE Length:%d\n",
+                    param));
         if (pm8001_ha->smp_exp_mode == SMP_DIRECT) {
-            PM8001_IO_DBG(pm8001_ha,
-                pm8001_printk("DIRECT RESPONSE Length:%d\n",
-                        param));
             pdma_respaddr = (char *)(phys_to_virt(cpu_to_le64
                         ((u64)sg_dma_address
                         (&t->smp_task.smp_resp))));
@@ -2628,6 +2628,17 @@ mpi_smp_completion(struct pm8001_hba_info *pm8001_ha,
void *piomb)
                     psmpPayload->_r_a[i]));
             }
         }
+        else if (pm8001_ha->smp_exp_mode == SMP_INDIRECT) {
+            pdma_respaddr = (char *)(phys_to_virt(cpu_to_le64
+                        ((u64)sg_dma_address
+                        (&t->smp_task.smp_resp))));
+            for (i = 0; i < param; i++) {
+                PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
+                    "SMP Byte%d DMA data 0x%x psmp 0x%x\n",
+                    i, *(pdma_respaddr+i),
+                    psmpPayload->_r_a[i]));
+            }
+        }
         break;
     case IO_ABORTED:
         PM8001_IO_DBG(pm8001_ha,
@@ -2638,12 +2649,21 @@ mpi_smp_completion(struct pm8001_hba_info *pm8001_ha,
void *piomb)
             pm8001_dev->running_req--;
         break;
     case IO_OVERFLOW:
-        PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_UNDERFLOW\n"));
+        PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_OVERFLOW\n"));
         ts->resp = SAS_TASK_COMPLETE;
-        ts->stat = SAS_DATA_OVERRUN;
+        ts->stat = SAM_STAT_GOOD;
         ts->residual = 0;
         if (pm8001_dev)
             pm8001_dev->running_req--;
+        pdma_respaddr = (char *)(phys_to_virt(cpu_to_le64
+                                                ((u64)sg_dma_address
+                                                (&t->smp_task.smp_resp))));
+                for (i = 0; i < param; i++) {
+                            PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
+                                    "SMP Byte%d DMA data 0x%x psmp 0x%x\n",
+                                    i, *(pdma_respaddr+i),
+                                    psmpPayload->_r_a[i]));
+        }
         break;
     case IO_NO_DEVICE:
         PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_NO_DEVICE\n"));
@@ -3809,24 +3829,20 @@ static int pm80xx_chip_smp_req(struct pm8001_hba_info
*pm8001_ha,
             cpu_to_le32
             ((u32)sg_dma_len(&task->smp_task.smp_resp)-4);
     }
-    if (pm8001_ha->smp_exp_mode == SMP_DIRECT) {
-        PM8001_IO_DBG(pm8001_ha,
-            pm8001_printk("SMP REQUEST DIRECT MODE\n"));
         for (i = 0; i < length; i++)
             if (i < 16) {
                 smp_cmd.smp_req16[i] = *(preq_dma_addr+i);
-                PM8001_IO_DBG(pm8001_ha, pm8001_printk(
+                PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
                     "Byte[%d]:%x (DMA data:%x)\n",
                     i, smp_cmd.smp_req16[i],
                     *(preq_dma_addr)));
             } else {
                 smp_cmd.smp_req[i] = *(preq_dma_addr+i);
-                PM8001_IO_DBG(pm8001_ha, pm8001_printk(
+                PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
                     "Byte[%d]:%x (DMA data:%x)\n",
                     i, smp_cmd.smp_req[i],
                     *(preq_dma_addr)));
             }
-    }

     build_smp_cmd(pm8001_dev->device_id, smp_cmd.tag,
                 &smp_cmd, pm8001_ha->smp_exp_mode, length);

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

  parent reply	other threads:[~2014-10-10 21:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 14:44 [Bug 85151] New: pm80xx + 7805H + HP SAS port expander = mpi_smp_completion 2604:smp IO status 0x2 and sas: expander ... discovery failed(0xffffffa6) bugzilla-daemon
2014-09-25 15:05 ` [Bug 85151] " bugzilla-daemon
2014-09-25 15:26 ` bugzilla-daemon
2014-09-25 15:33 ` bugzilla-daemon
2014-09-25 15:53 ` bugzilla-daemon
2014-09-25 16:06 ` bugzilla-daemon
2014-09-25 16:20 ` bugzilla-daemon
2014-09-26  8:33   ` Jack Wang
2014-09-26  8:34 ` bugzilla-daemon
2014-09-26  9:03 ` bugzilla-daemon
2014-09-26 10:16 ` bugzilla-daemon
2014-09-30 10:27 ` bugzilla-daemon
2014-10-10 21:11 ` bugzilla-daemon [this message]
2014-10-10 21:32 ` bugzilla-daemon
2014-10-10 22:00 ` bugzilla-daemon
2014-10-14 16:33 ` bugzilla-daemon
2014-10-19 12:17 ` bugzilla-daemon
2014-10-19 12:18 ` 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-85151-11613-AtvNNpvD2A@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.