Skip to contentSkip to conversation

mvsas: mvs_lu_reset iterates phy num times when releasing task

PATCH In review David Milburn 4 participants 16 messages Aug 6, 2010 – Sep 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mvsas: mvs_lu_reset iterates phy num times when releasing task

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka <[email protected]>
Cc Srinivas <[email protected]>
Cc Andy Yan <[email protected]>
---
 drivers/scsi/mvsas/mv_sas.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +2 -4
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct domain_device *dev)
 int mvs_lu_reset(struct domain_device *dev, u8 *lun)
 {
 	unsigned long flags;
-	int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+	int rc = TMF_RESP_FUNC_FAILED;
 	struct mvs_tmf_task tmf_task;
 	struct mvs_device * mvi_dev = dev->lldd_dev;
 	struct mvs_info *mvi = mvi_dev->mvi_info;
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, u8 *lun)
 	mvi_dev->dev_status = MVS_DEV_EH;
 	rc = mvs_debug_issue_ssp_tmf(dev, lun, &tmf_task);
 	if (rc == TMF_RESP_FUNC_COMPLETE) {
-		num = mvs_find_dev_phyno(dev, phyno);
 		spin_lock_irqsave(&mvi->lock, flags);
-		for (i = 0; i < num; i++)
-			mvs_release_task(mvi, dev);
+		mvs_release_task(mvi, dev);
 		spin_unlock_irqrestore(&mvi->lock, flags);
 	}
 	/* If failed, fall-through I_T_Nexus reset */
#1 lore raw

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please see http://marc.info/?l=linux-scsi&m=127583131805429&w=2

Quoted 37 lines · David Milburn

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka<[email protected]>
Cc Srinivas<[email protected]>
Cc Andy Yan<[email protected]>
---
  drivers/scsi/mvsas/mv_sas.c |    6 ++----
  1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +2 -5
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct domain_device *dev)
  int mvs_lu_reset(struct domain_device *dev, u8 *lun)
  {
  	unsigned long flags;
-	int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+	int rc = TMF_RESP_FUNC_FAILED;
  	struct mvs_tmf_task tmf_task;
  	struct mvs_device * mvi_dev = dev->lldd_dev;
  	struct mvs_info *mvi = mvi_dev->mvi_info;
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, u8 *lun)
  	mvi_dev->dev_status = MVS_DEV_EH;
  	rc = mvs_debug_issue_ssp_tmf(dev, lun,&tmf_task);
  	if (rc == TMF_RESP_FUNC_COMPLETE) {
-		num = mvs_find_dev_phyno(dev, phyno);
  		spin_lock_irqsave(&mvi->lock, flags);
-		for (i = 0; i<  num; i++)
-			mvs_release_task(mvi, dev);
+		mvs_release_task(mvi, dev);
  		spin_unlock_irqrestore(&mvi->lock, flags);
  	}
  	/* If failed, fall-through I_T_Nexus reset */
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 3 lines · Konstantinos Skarlatos

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please see http://marc.info/?l=linux-scsi&m=127583131805429&w=2

No, these problems begin with the warning from ata_qc_issue, it says that a non-NCQ command is being issued, but there is an active NCQ command on the link.

BTW, I should have added:

David

Quoted 36 lines · David Milburn
Quoted 34 lines

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka<[email protected]>
Cc Srinivas<[email protected]>
Cc Andy Yan<[email protected]>
---
  drivers/scsi/mvsas/mv_sas.c |    6 ++----
  1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +1 -1
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct 
 domain_device *dev)
  int mvs_lu_reset(struct domain_device *dev, u8 *lun)
  {
      unsigned long flags;
-    int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+    int rc = TMF_RESP_FUNC_FAILED;
      struct mvs_tmf_task tmf_task;
      struct mvs_device * mvi_dev = dev->lldd_dev;
      struct mvs_info *mvi = mvi_dev->mvi_info;
drivers/scsi/mvsas/mv_sas.c +0 -3
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, u8 
 *lun)
      mvi_dev->dev_status = MVS_DEV_EH;
      rc = mvs_debug_issue_ssp_tmf(dev, lun,&tmf_task);
      if (rc == TMF_RESP_FUNC_COMPLETE) {
-        num = mvs_find_dev_phyno(dev, phyno);
          spin_lock_irqsave(&mvi->lock, flags);
-        for (i = 0; i<  num; i++)
-            mvs_release_task(mvi, dev);
Quoted 9 lines
Quoted 8 lines
drivers/scsi/mvsas/mv_sas.c +1 -0
+        mvs_release_task(mvi, dev);
          spin_unlock_irqrestore(&mvi->lock, flags);
      }
      /* If failed, fall-through I_T_Nexus reset */
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Thanks for your answer, I was just asking because this driver is used
by an inexpensive and quite popular SAS/SATA controller (Supermicro AOC-SASLP-MV8), but unfortunately nobody has responded to the various reports of bugs and general instability.

I am willing to do my part in helping out, including testing patches and maybe a small donation to a developer.

Quoted 9 lines · David Milburn
Quoted 3 lines · Konstantinos Skarlatos

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please see http://marc.info/?l=linux-scsi&m=127583131805429&w=2

No, these problems begin with the warning from ata_qc_issue, it says that a non-NCQ command is being issued, but there is an active NCQ command on the link.

Quoted 52 lines

BTW, I should have added:

David

Quoted 45 lines · David Milburn
Quoted 42 lines

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka<[email protected]>
Cc Srinivas<[email protected]>
Cc Andy Yan<[email protected]>
---
  drivers/scsi/mvsas/mv_sas.c |    6 ++----
  1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +1 -1
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct 
 domain_device *dev)
  int mvs_lu_reset(struct domain_device *dev, u8 *lun)
  {
      unsigned long flags;
-    int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+    int rc = TMF_RESP_FUNC_FAILED;
      struct mvs_tmf_task tmf_task;
      struct mvs_device * mvi_dev = dev->lldd_dev;
      struct mvs_info *mvi = mvi_dev->mvi_info;
drivers/scsi/mvsas/mv_sas.c +1 -3
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, 
 u8 *lun)
      mvi_dev->dev_status = MVS_DEV_EH;
      rc = mvs_debug_issue_ssp_tmf(dev, lun,&tmf_task);
      if (rc == TMF_RESP_FUNC_COMPLETE) {
-        num = mvs_find_dev_phyno(dev, phyno);
          spin_lock_irqsave(&mvi->lock, flags);
-        for (i = 0; i<  num; i++)
-            mvs_release_task(mvi, dev);
+        mvs_release_task(mvi, dev);
          spin_unlock_irqrestore(&mvi->lock, flags);
      }
      /* If failed, fall-through I_T_Nexus reset */
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Konstantinos Skarlatos
Quoted 6 lines · Konstantinos Skarlatos

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please see http://marc.info/?l=linux-scsi&m=127583131805429&w=2

Hello,

Can you see if this patch prevents the ata_qc_issue warning?

Thanks,
David

 drivers/scsi/libsas/sas_ata.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/libsas/sas_ata.c +1 -0
index 042153c..ddbade7 100644
@@ -347,6 +347,7 @@ static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in,
 static struct ata_port_operations sas_sata_ops = {
 	.phy_reset		= sas_ata_phy_reset,
 	.post_internal_cmd	= sas_ata_post_internal,
+	.qc_defer               = ata_std_qc_defer,
 	.qc_prep		= ata_noop_qc_prep,
 	.qc_issue		= sas_ata_qc_issue,
 	.qc_fill_rtf		= sas_ata_qc_fill_rtf,
#5 lore raw

Thanks for the patch, i will test it today if i manage to find some time.

I should mention that 2.6.35 has solved most of the problems i had with mvsas, but i will still try my best to test it as much as i can.

Wooter if you can please test this patch, because it seems that your configuration still has problems with 2.6.36

Kind regards

Quoted 22 lines · David Milburn
Quoted 6 lines · Konstantinos Skarlatos

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please see http://marc.info/?l=linux-scsi&m=127583131805429&w=2

Hello,

Can you see if this patch prevents the ata_qc_issue warning?

Thanks,
David

  drivers/scsi/libsas/sas_ata.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/libsas/sas_ata.c +0 -0
index 042153c..ddbade7 100644

drivers/scsi/libsas/sas_ata.c static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in, · line 353

Quoted 7 lines
drivers/scsi/libsas/sas_ata.c +1 -0
@@ -347,6 +347,7 @@ static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in,
  static struct ata_port_operations sas_sata_ops = {
  	.phy_reset		= sas_ata_phy_reset,
  	.post_internal_cmd	= sas_ata_post_internal,
+	.qc_defer               = ata_std_qc_defer,
  	.qc_prep		= ata_noop_qc_prep,
  	.qc_issue		= sas_ata_qc_issue,
  	.qc_fill_rtf		= sas_ata_qc_fill_rtf,

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to David Milburn
Quoted 22 lines · David Milburn
Quoted 6 lines · Konstantinos Skarlatos
Quoted 6 lines

Hello,

Does this patch fix any of the mvs_abort_task:rc= 5 and the other problems that are being reported for this driver? for more info please seehttp://marc.info/?l=linux-scsi&m=127583131805429&w=2

Hello,

Can you see if this patch prevents the ata_qc_issue warning?

Thanks,
David

  drivers/scsi/libsas/sas_ata.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/libsas/sas_ata.c +0 -0
index 042153c..ddbade7 100644

drivers/scsi/libsas/sas_ata.c static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in, · line 353

Quoted 7 lines
drivers/scsi/libsas/sas_ata.c +1 -0
@@ -347,6 +347,7 @@ static int sas_ata_scr_read(struct ata_link *link, unsigned int sc_reg_in,
  static struct ata_port_operations sas_sata_ops = {
  	.phy_reset		= sas_ata_phy_reset,
  	.post_internal_cmd	= sas_ata_post_internal,
+	.qc_defer               = ata_std_qc_defer,
  	.qc_prep		= ata_noop_qc_prep,
  	.qc_issue		= sas_ata_qc_issue,
  	.qc_fill_rtf		= sas_ata_qc_fill_rtf,

Hello,

I have been unable to patch my kernel, I am a noob at this and the method i used a few months ago to apply Srinivas patches for mvsas does not work now. I have asked for help from my distro (arch linux), but if you have a quick and easy way for me to patch sas_ata.c and reload the module without reboots or complete kernel recompilations I would be grateful to hear it.

Kind regards
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 34 lines · Konstantinos Skarlatos
Quoted 29 lines · David Milburn
Quoted 6 lines · Konstantinos Skarlatos
Quoted 3 lines

Hello,

Quoted 1 line

Does this patch fix any of the mvs_abort_task:rc= 5 and the other

problems that are being reported for this driver? for more info

please

Quoted 2 lines

seehttp://marc.info/?l=linux-scsi&m=127583131805429&w=2

Hello,

Can you see if this patch prevents the ata_qc_issue warning?

Thanks,
David

  drivers/scsi/libsas/sas_ata.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/libsas/sas_ata.c +1 -0
index 042153c..ddbade7 100644
@@ -347,6 +347,7 @@ static int sas_ata_scr_read(struct ata_link 
 *link, unsigned int sc_reg_in,
  static struct ata_port_operations sas_sata_ops = {
      .phy_reset        = sas_ata_phy_reset,
      .post_internal_cmd    = sas_ata_post_internal,
+    .qc_defer               = ata_std_qc_defer,
      .qc_prep        = ata_noop_qc_prep,
      .qc_issue        = sas_ata_qc_issue,
Quoted 1 line

.qc_fill_rtf = sas_ata_qc_fill_rtf,

Hello,

Quoted 3 lines

I have been unable to patch my kernel, I am a noob at this and the method i used a few months ago to apply Srinivas patches for mvsas does not work now. I have asked for help from my distro (arch linux), but if you have a quick and easy way for me to patch sas_ata.c and reload the module without reboots or complete kernel recompilations I would be grateful to hear it.

Kind regards

Hi, I finally managed to compile libsas. Here is dmesg output when loading mvsas (BTW what do the messages about ata38.00 mean?). I will report back when I do more testing

mvsas 0000:05:00.0: mvsas: driver version 0.8.2
mvsas 0000:05:00.0: PCI INT A -> Link[APC3] -> GSI 18 (level, low) -> IRQ 18 mvsas 0000:05:00.0: setting latency timer to 64
mvsas 0000:05:00.0: mvsas: PCI-E x4, Bandwidth Usage: 2.5 Gbps
scsi13 : mvsas
drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 1 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 3 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 7 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map f
ata38.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata38.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata38.00: qc timeout (cmd 0xec)
ata38.00: failed to IDENTIFY (I/O error, err_mask=0x4)
ata38.00: revalidation failed (errno=-5)
drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[1]:rc= 0 ata38.00: failed to IDENTIFY (I/O error, err_mask=0x100)
ata38: limiting SATA link speed to 1.5 Gbps
ata38.00: limiting speed to UDMA/133:PIO3
drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[1]:rc= 0 ata38.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata38.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata38.00: configured for UDMA/133
scsi 13:0:0:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:0:0: Attached scsi generic sg1 type 0
sd 13:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:0:0: [sdb] Write Protect is off
sd 13:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 13:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb:
ata39.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata39.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
sdb1
sd 13:0:0:0: [sdb] Attached SCSI disk
ata39.00: configured for UDMA/133
scsi 13:0:1:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:1:0: Attached scsi generic sg2 type 0
sd 13:0:1:0: [sdc] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:1:0: [sdc] Write Protect is off
sd 13:0:1:0: [sdc] Mode Sense: 00 3a 00 00
sd 13:0:1:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1
sd 13:0:1:0: [sdc] Attached SCSI disk
ata40.00: ATA-8: WDC WD15EADS-00S2B0, 01.00A01, max UDMA/133
ata40.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata40.00: configured for UDMA/133
scsi 13:0:2:0: Direct-Access ATA WDC WD15EADS-00S 01.0 PQ: 0 ANSI: 5
sd 13:0:2:0: Attached scsi generic sg3 type 0
sd 13:0:2:0: [sdd] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:2:0: [sdd] Write Protect is off
sd 13:0:2:0: [sdd] Mode Sense: 00 3a 00 00
sd 13:0:2:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd:
ata41.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata41.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata41.00: configured for UDMA/133
scsi 13:0:3:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:3:0: Attached scsi generic sg4 type 0
sd 13:0:3:0: [sde] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:3:0: [sde] Write Protect is off
sd 13:0:3:0: [sde] Mode Sense: 00 3a 00 00
sd 13:0:3:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sde: sde1
sd 13:0:3:0: [sde] Attached SCSI disk
ata42.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata42.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata42.00: configured for UDMA/133
scsi 13:0:4:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:4:0: [sdf] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:4:0: [sdf] Write Protect is off
sd 13:0:4:0: [sdf] Mode Sense: 00 3a 00 00
sd 13:0:4:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 13:0:4:0: Attached scsi generic sg5 type 0
sdf:
ata43.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata43.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata43.00: configured for UDMA/133
scsi 13:0:5:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:5:0: Attached scsi generic sg6 type 0
sd 13:0:5:0: [sdg] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:5:0: [sdg] Write Protect is off
sd 13:0:5:0: [sdg] Mode Sense: 00 3a 00 00
sd 13:0:5:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdg:
ata44.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata44.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata44.00: configured for UDMA/133
scsi 13:0:6:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:6:0: Attached scsi generic sg7 type 0
sd 13:0:6:0: [sdh] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:6:0: [sdh] Write Protect is off
sd 13:0:6:0: [sdh] Mode Sense: 00 3a 00 00
sd 13:0:6:0: [sdh] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdh: sdh1
sd 13:0:6:0: [sdh] Attached SCSI disk
ata45.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata45.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata45.00: configured for UDMA/133
scsi 13:0:7:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:7:0: Attached scsi generic sg8 type 0
sd 13:0:7:0: [sdi] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:7:0: [sdi] Write Protect is off
sd 13:0:7:0: [sdi] Mode Sense: 00 3a 00 00
sd 13:0:7:0: [sdi] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdi:
ata46.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata46.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata46.00: configured for UDMA/133
scsi 13:0:8:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:8:0: Attached scsi generic sg9 type 0
sd 13:0:8:0: [sdj] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:8:0: [sdj] Write Protect is off
sd 13:0:8:0: [sdj] Mode Sense: 00 3a 00 00
sd 13:0:8:0: [sdj] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdj: sdj1
sd 13:0:8:0: [sdj] Attached SCSI disk
ata47.00: qc timeout (cmd 0x27)
ata47.00: failed to read native max address (err_mask=0x4)
ata47.00: HPA support seems broken, skipping HPA handling drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[a]:rc= 0
sdi1
sd 13:0:7:0: [sdi] Attached SCSI disk
ata47.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
ata47.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata47.00: configured for UDMA/133
scsi 13:0:9:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
sd 13:0:9:0: Attached scsi generic sg10 type 0
sd 13:0:9:0: [sdk] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:9:0: [sdk] Write Protect is off
sd 13:0:9:0: [sdk] Mode Sense: 00 3a 00 00
sd 13:0:9:0: [sdk] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdk: sdk1
sd 13:0:9:0: [sdk] Attached SCSI disk
sdf1
sd 13:0:4:0: [sdf] Attached SCSI disk
sdg1
sd 13:0:5:0: [sdg] Attached SCSI disk
sdd1
sd 13:0:2:0: [sdd] Attached SCSI disk
ata48.00: qc timeout (cmd 0x27)
ata48.00: failed to read native max address (err_mask=0x4)
ata48.00: HPA support seems broken, skipping HPA handling drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[b]:rc= 0 ata48.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
ata48.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata48.00: configured for UDMA/133
scsi 13:0:10:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
sd 13:0:10:0: Attached scsi generic sg11 type 0
sd 13:0:10:0: [sdl] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:10:0: [sdl] Write Protect is off
sd 13:0:10:0: [sdl] Mode Sense: 00 3a 00 00
sd 13:0:10:0: [sdl] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdl:
ata49.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata49.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
sdl1
sd 13:0:10:0: [sdl] Attached SCSI disk
ata49.00: configured for UDMA/133
scsi 13:0:11:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:11:0: Attached scsi generic sg12 type 0
sd 13:0:11:0: [sdm] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:11:0: [sdm] Write Protect is off
sd 13:0:11:0: [sdm] Mode Sense: 00 3a 00 00
sd 13:0:11:0: [sdm] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdm: sdm1
sd 13:0:11:0: [sdm] Attached SCSI disk
ata50.00: ATA-8: WDC WD15EADS-00P8B0, 01.00A01, max UDMA/133
ata50.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata50.00: configured for UDMA/133
scsi 13:0:12:0: Direct-Access ATA WDC WD15EADS-00P 01.0 PQ: 0 ANSI: 5
sd 13:0:12:0: Attached scsi generic sg13 type 0
sd 13:0:12:0: [sdn] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:12:0: [sdn] Write Protect is off
sd 13:0:12:0: [sdn] Mode Sense: 00 3a 00 00
sd 13:0:12:0: [sdn] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdn:
scsi 13:0:13:0: Enclosure HP HP SAS EXP Card 1.00 PQ: 0 ANSI: 5
ses 13:0:13:0: Attached Enclosure device
ses 13:0:13:0: Attached scsi generic sg14 type 13
sdn1
sd 13:0:12:0: [sdn] Attached SCSI disk

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 35 lines · Konstantinos Skarlatos
Quoted 34 lines · Konstantinos Skarlatos
Quoted 29 lines · David Milburn
Quoted 6 lines · Konstantinos Skarlatos
Quoted 3 lines

Hello,

Quoted 1 line

Does this patch fix any of the mvs_abort_task:rc= 5 and the other

problems that are being reported for this driver? for more info

please

Quoted 2 lines

seehttp://marc.info/?l=linux-scsi&m=127583131805429&w=2

Hello,

Can you see if this patch prevents the ata_qc_issue warning?

Thanks,
David

  drivers/scsi/libsas/sas_ata.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/libsas/sas_ata.c +1 -0
index 042153c..ddbade7 100644
@@ -347,6 +347,7 @@ static int sas_ata_scr_read(struct ata_link 
 *link, unsigned int sc_reg_in,
  static struct ata_port_operations sas_sata_ops = {
      .phy_reset        = sas_ata_phy_reset,
      .post_internal_cmd    = sas_ata_post_internal,
+    .qc_defer               = ata_std_qc_defer,
      .qc_prep        = ata_noop_qc_prep,
      .qc_issue        = sas_ata_qc_issue,
Quoted 1 line

.qc_fill_rtf = sas_ata_qc_fill_rtf,

Hello,

Quoted 4 lines
Quoted 3 lines

I have been unable to patch my kernel, I am a noob at this and the method i used a few months ago to apply Srinivas patches for mvsas does not work now. I have asked for help from my distro (arch linux), but if you have a quick and easy way for me to patch sas_ata.c and reload the module without reboots or complete kernel recompilations I would be grateful to hear it.

Kind regards

Hi, I finally managed to compile libsas. Here is dmesg output when loading mvsas (BTW what do the messages about ata38.00 mean?). I will report back when I do more testing

Hi, looks like the first couple of attempts to IDENTIFY DEVICE failed. This patch should prevent mixing NCQ and non-NCQ commands so you shouldn't see the warning from ata_qc_issue(). Thanks.

Quoted 173 lines

mvsas 0000:05:00.0: mvsas: driver version 0.8.2
mvsas 0000:05:00.0: PCI INT A -> Link[APC3] -> GSI 18 (level, low) -> IRQ 18 mvsas 0000:05:00.0: setting latency timer to 64
mvsas 0000:05:00.0: mvsas: PCI-E x4, Bandwidth Usage: 2.5 Gbps
scsi13 : mvsas
drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 1 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 3 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map 7 drivers/scsi/mvsas/mv_sas.c 1260:set wide port phy map f
ata38.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata38.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata38.00: qc timeout (cmd 0xec)
ata38.00: failed to IDENTIFY (I/O error, err_mask=0x4)
ata38.00: revalidation failed (errno=-5)
drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[1]:rc= 0 ata38.00: failed to IDENTIFY (I/O error, err_mask=0x100)
ata38: limiting SATA link speed to 1.5 Gbps
ata38.00: limiting speed to UDMA/133:PIO3
drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[1]:rc= 0 ata38.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata38.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata38.00: configured for UDMA/133
scsi 13:0:0:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:0:0: Attached scsi generic sg1 type 0
sd 13:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:0:0: [sdb] Write Protect is off
sd 13:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 13:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb:
ata39.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata39.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
sdb1
sd 13:0:0:0: [sdb] Attached SCSI disk
ata39.00: configured for UDMA/133
scsi 13:0:1:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:1:0: Attached scsi generic sg2 type 0
sd 13:0:1:0: [sdc] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:1:0: [sdc] Write Protect is off
sd 13:0:1:0: [sdc] Mode Sense: 00 3a 00 00
sd 13:0:1:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1
sd 13:0:1:0: [sdc] Attached SCSI disk
ata40.00: ATA-8: WDC WD15EADS-00S2B0, 01.00A01, max UDMA/133
ata40.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata40.00: configured for UDMA/133
scsi 13:0:2:0: Direct-Access ATA WDC WD15EADS-00S 01.0 PQ: 0 ANSI: 5
sd 13:0:2:0: Attached scsi generic sg3 type 0
sd 13:0:2:0: [sdd] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:2:0: [sdd] Write Protect is off
sd 13:0:2:0: [sdd] Mode Sense: 00 3a 00 00
sd 13:0:2:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd:
ata41.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata41.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata41.00: configured for UDMA/133
scsi 13:0:3:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:3:0: Attached scsi generic sg4 type 0
sd 13:0:3:0: [sde] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:3:0: [sde] Write Protect is off
sd 13:0:3:0: [sde] Mode Sense: 00 3a 00 00
sd 13:0:3:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sde: sde1
sd 13:0:3:0: [sde] Attached SCSI disk
ata42.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata42.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata42.00: configured for UDMA/133
scsi 13:0:4:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:4:0: [sdf] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:4:0: [sdf] Write Protect is off
sd 13:0:4:0: [sdf] Mode Sense: 00 3a 00 00
sd 13:0:4:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 13:0:4:0: Attached scsi generic sg5 type 0
sdf:
ata43.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata43.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata43.00: configured for UDMA/133
scsi 13:0:5:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:5:0: Attached scsi generic sg6 type 0
sd 13:0:5:0: [sdg] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:5:0: [sdg] Write Protect is off
sd 13:0:5:0: [sdg] Mode Sense: 00 3a 00 00
sd 13:0:5:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdg:
ata44.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata44.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata44.00: configured for UDMA/133
scsi 13:0:6:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:6:0: Attached scsi generic sg7 type 0
sd 13:0:6:0: [sdh] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:6:0: [sdh] Write Protect is off
sd 13:0:6:0: [sdh] Mode Sense: 00 3a 00 00
sd 13:0:6:0: [sdh] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdh: sdh1
sd 13:0:6:0: [sdh] Attached SCSI disk
ata45.00: ATA-8: ST31500541AS, CC34, max UDMA/133
ata45.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata45.00: configured for UDMA/133
scsi 13:0:7:0: Direct-Access ATA ST31500541AS CC34 PQ: 0 ANSI: 5
sd 13:0:7:0: Attached scsi generic sg8 type 0
sd 13:0:7:0: [sdi] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:7:0: [sdi] Write Protect is off
sd 13:0:7:0: [sdi] Mode Sense: 00 3a 00 00
sd 13:0:7:0: [sdi] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdi:
ata46.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata46.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata46.00: configured for UDMA/133
scsi 13:0:8:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:8:0: Attached scsi generic sg9 type 0
sd 13:0:8:0: [sdj] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:8:0: [sdj] Write Protect is off
sd 13:0:8:0: [sdj] Mode Sense: 00 3a 00 00
sd 13:0:8:0: [sdj] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdj: sdj1
sd 13:0:8:0: [sdj] Attached SCSI disk
ata47.00: qc timeout (cmd 0x27)
ata47.00: failed to read native max address (err_mask=0x4)
ata47.00: HPA support seems broken, skipping HPA handling drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[a]:rc= 0
sdi1
sd 13:0:7:0: [sdi] Attached SCSI disk
ata47.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
ata47.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata47.00: configured for UDMA/133
scsi 13:0:9:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
sd 13:0:9:0: Attached scsi generic sg10 type 0
sd 13:0:9:0: [sdk] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:9:0: [sdk] Write Protect is off
sd 13:0:9:0: [sdk] Mode Sense: 00 3a 00 00
sd 13:0:9:0: [sdk] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdk: sdk1
sd 13:0:9:0: [sdk] Attached SCSI disk
sdf1
sd 13:0:4:0: [sdf] Attached SCSI disk
sdg1
sd 13:0:5:0: [sdg] Attached SCSI disk
sdd1
sd 13:0:2:0: [sdd] Attached SCSI disk
ata48.00: qc timeout (cmd 0x27)
ata48.00: failed to read native max address (err_mask=0x4)
ata48.00: HPA support seems broken, skipping HPA handling drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[b]:rc= 0 ata48.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
ata48.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata48.00: configured for UDMA/133
scsi 13:0:10:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
sd 13:0:10:0: Attached scsi generic sg11 type 0
sd 13:0:10:0: [sdl] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:10:0: [sdl] Write Protect is off
sd 13:0:10:0: [sdl] Mode Sense: 00 3a 00 00
sd 13:0:10:0: [sdl] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdl:
ata49.00: ATA-8: ST31500541AS, CC32, max UDMA/133
ata49.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
sdl1
sd 13:0:10:0: [sdl] Attached SCSI disk
ata49.00: configured for UDMA/133
scsi 13:0:11:0: Direct-Access ATA ST31500541AS CC32 PQ: 0 ANSI: 5
sd 13:0:11:0: Attached scsi generic sg12 type 0
sd 13:0:11:0: [sdm] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:11:0: [sdm] Write Protect is off
sd 13:0:11:0: [sdm] Mode Sense: 00 3a 00 00
sd 13:0:11:0: [sdm] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdm: sdm1
sd 13:0:11:0: [sdm] Attached SCSI disk
ata50.00: ATA-8: WDC WD15EADS-00P8B0, 01.00A01, max UDMA/133
ata50.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata50.00: configured for UDMA/133
scsi 13:0:12:0: Direct-Access ATA WDC WD15EADS-00P 01.0 PQ: 0 ANSI: 5
sd 13:0:12:0: Attached scsi generic sg13 type 0
sd 13:0:12:0: [sdn] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB) sd 13:0:12:0: [sdn] Write Protect is off

Quoted 9 lines

sd 13:0:12:0: [sdn] Mode Sense: 00 3a 00 00
sd 13:0:12:0: [sdn] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdn:
scsi 13:0:13:0: Enclosure HP HP SAS EXP Card 1.00 PQ: 0 ANSI: 5
ses 13:0:13:0: Attached Enclosure device
ses 13:0:13:0: Attached scsi generic sg14 type 13
sdn1
sd 13:0:12:0: [sdn] Attached SCSI disk

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Unfortunately after some heavy io and use of hddtemp/smartmontools, i
got this:

------------[ cut here ]------------
WARNING: at drivers/ata/libata-core.c:5124 ata_qc_issue+0x30b/0x320 [libata]()
Hardware name:
Modules linked in: aufs exportfs ipv6 hwmon_vid jfs cpufreq_powersave evdev fan usbhid firewire_ohci psmouse serio_raw pcspkr hid firewire_core button crc_itu_t cpufreq_ondemand thermal skge sg k8temp powernow_k8 freq_table i2c_nforce2 i2c_core processor mperf edac_core edac_mce_amd fuse forcedeth rtc_cmos rtc_core rtc_lib ext2 mbcache dm_crypt dm_mod ses enclosure sd_mod usb_storage mvsas ohci_hcd libsas sata_sil ehci_hcd scsi_transport_sas sata_nv usbcore pata_amd sata_via ata_generic pata_via pata_acpi libata scsi_mod
Pid: 2592, comm: hddtemp Not tainted 2.6.35-ARCH #1
Call Trace:
 [<ffffffff8105284a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff81052895>] warn_slowpath_null+0x15/0x20
 [<ffffffffa00334fb>] ata_qc_issue+0x30b/0x320 [libata]
 [<ffffffffa000828d>] ? scsi_init_sgtable+0x4d/0x90 [scsi_mod]
 [<ffffffffa003ae10>] ? ata_scsi_pass_thru+0x0/0x2e0 [libata]
 [<ffffffffa0039126>] ata_scsi_translate+0xa6/0x180 [libata]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa003c390>] ata_sas_queuecmd+0x100/0x270 [libata]
 [<ffffffffa013c6f8>] sas_queuecommand+0x98/0x300 [libsas]
 [<ffffffffa000296d>] scsi_dispatch_cmd+0xfd/0x320 [scsi_mod]
 [<ffffffffa00096d2>] scsi_request_fn+0x322/0x410 [scsi_mod]
 [<ffffffff81062a66>] ? lock_timer_base.clone.26+0x36/0x70
 [<ffffffff811b8b2e>] __blk_run_queue+0x5e/0x160
 [<ffffffff811b2aba>] elv_insert+0x18a/0x270
 [<ffffffff811b2c02>] __elv_add_request+0x62/0xc0
 [<ffffffff811bd3f0>] blk_execute_rq_nowait+0x60/0xb0
 [<ffffffff811bd4c1>] blk_execute_rq+0x81/0xf0
 [<ffffffff811bd274>] ? blk_rq_map_user+0x194/0x270
 [<ffffffff811c1a9a>] sg_io+0x28a/0x3d0
 [<ffffffff811c2245>] scsi_cmd_ioctl+0x255/0x4a0
 [<ffffffff811a243a>] ? security_inode_permission+0x1a/0x20
 [<ffffffffa0003bdc>] ? scsi_ioctl+0x27c/0x3a0 [scsi_mod]
 [<ffffffffa017ee80>] sd_ioctl+0x90/0xe0 [sd_mod]
 [<ffffffff811bf0df>] __blkdev_driver_ioctl+0x8f/0xb0
 [<ffffffff811bf5c6>] blkdev_ioctl+0x236/0x7f0
 [<ffffffff81151fcc>] block_ioctl+0x3c/0x40
 [<ffffffff8113351c>] vfs_ioctl+0x3c/0xd0
 [<ffffffff81133b1c>] do_vfs_ioctl+0x7c/0x520
 [<ffffffff81134041>] sys_ioctl+0x81/0xa0
 [<ffffffff81009e82>] system_call_fastpath+0x16/0x1b
---[ end trace fc0747b97329c42f ]---
#10 lore raw
Quoted 6 lines · Konstantinos Skarlatos

Unfortunately after some heavy io and use of hddtemp/smartmontools, i
got this:

------------[ cut here ]------------
WARNING: at drivers/ata/libata-core.c:5124 ata_qc_issue+0x30b/0x320 [libata]()

This does look like the same warning from ata_qc_issue(), it is complaining that a non-NCQ command is sent down but there is already an active NCQ command on the link.

With the patch ata_scsi_translate would check ata_std_qc_defer (qc_defer) which should have deferred the command since it was a non-NCQ and there was already an active NCQ command (link->sactive). I thought this would definitely prevent this case.

Thanks,
David

Quoted 36 lines

Hardware name:

Modules linked in: aufs exportfs ipv6 hwmon_vid jfs cpufreq_powersave evdev fan usbhid firewire_ohci psmouse serio_raw pcspkr hid firewire_core button crc_itu_t cpufreq_ondemand thermal skge sg k8temp powernow_k8 freq_table i2c_nforce2 i2c_core processor mperf edac_core edac_mce_amd fuse forcedeth rtc_cmos rtc_core rtc_lib ext2 mbcache dm_crypt dm_mod ses enclosure sd_mod usb_storage mvsas ohci_hcd libsas sata_sil ehci_hcd scsi_transport_sas sata_nv usbcore pata_amd sata_via ata_generic pata_via pata_acpi libata scsi_mod
Pid: 2592, comm: hddtemp Not tainted 2.6.35-ARCH #1
Call Trace:
 [<ffffffff8105284a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff81052895>] warn_slowpath_null+0x15/0x20
 [<ffffffffa00334fb>] ata_qc_issue+0x30b/0x320 [libata]
 [<ffffffffa000828d>] ? scsi_init_sgtable+0x4d/0x90 [scsi_mod]
 [<ffffffffa003ae10>] ? ata_scsi_pass_thru+0x0/0x2e0 [libata]
 [<ffffffffa0039126>] ata_scsi_translate+0xa6/0x180 [libata]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa003c390>] ata_sas_queuecmd+0x100/0x270 [libata]
 [<ffffffffa013c6f8>] sas_queuecommand+0x98/0x300 [libsas]
 [<ffffffffa000296d>] scsi_dispatch_cmd+0xfd/0x320 [scsi_mod]
 [<ffffffffa00096d2>] scsi_request_fn+0x322/0x410 [scsi_mod]
 [<ffffffff81062a66>] ? lock_timer_base.clone.26+0x36/0x70
 [<ffffffff811b8b2e>] __blk_run_queue+0x5e/0x160
 [<ffffffff811b2aba>] elv_insert+0x18a/0x270
 [<ffffffff811b2c02>] __elv_add_request+0x62/0xc0
 [<ffffffff811bd3f0>] blk_execute_rq_nowait+0x60/0xb0
 [<ffffffff811bd4c1>] blk_execute_rq+0x81/0xf0
 [<ffffffff811bd274>] ? blk_rq_map_user+0x194/0x270
 [<ffffffff811c1a9a>] sg_io+0x28a/0x3d0
 [<ffffffff811c2245>] scsi_cmd_ioctl+0x255/0x4a0
 [<ffffffff811a243a>] ? security_inode_permission+0x1a/0x20
 [<ffffffffa0003bdc>] ? scsi_ioctl+0x27c/0x3a0 [scsi_mod]
 [<ffffffffa017ee80>] sd_ioctl+0x90/0xe0 [sd_mod]
 [<ffffffff811bf0df>] __blkdev_driver_ioctl+0x8f/0xb0
 [<ffffffff811bf5c6>] blkdev_ioctl+0x236/0x7f0
 [<ffffffff81151fcc>] block_ioctl+0x3c/0x40
 [<ffffffff8113351c>] vfs_ioctl+0x3c/0xd0
 [<ffffffff81133b1c>] do_vfs_ioctl+0x7c/0x520
 [<ffffffff81134041>] sys_ioctl+0x81/0xa0
 [<ffffffff81009e82>] system_call_fastpath+0x16/0x1b
---[ end trace fc0747b97329c42f ]---
#11 lore raw
Quoted 8 lines · David Milburn
Quoted 6 lines · Konstantinos Skarlatos

Unfortunately after some heavy io and use of hddtemp/smartmontools,
i got this:

------------[ cut here ]------------
WARNING: at drivers/ata/libata-core.c:5124 ata_qc_issue+0x30b/0x320 [libata]()

After all it turns out that I did not have the patched module loaded during that test. After making sure that the correct module is loaded, and tons of testing, I can now say that this patch solves this issue and mvsas is from now on a very usable and stable driver.

Thanks David :)

Quoted 4 lines

This does look like the same warning from ata_qc_issue(), it is complaining that a non-NCQ command is sent down but there is already an active NCQ command on the link.

Quoted 46 lines

With the patch ata_scsi_translate would check ata_std_qc_defer (qc_defer) which should have deferred the command since it was a non-NCQ and there was already an active NCQ command (link->sactive). I thought this would definitely prevent this case.

Thanks,
David

Quoted 36 lines

Hardware name:

Modules linked in: aufs exportfs ipv6 hwmon_vid jfs cpufreq_powersave evdev fan usbhid firewire_ohci psmouse serio_raw pcspkr hid firewire_core button crc_itu_t cpufreq_ondemand thermal skge sg k8temp powernow_k8 freq_table i2c_nforce2 i2c_core processor mperf edac_core edac_mce_amd fuse forcedeth rtc_cmos rtc_core rtc_lib ext2 mbcache dm_crypt dm_mod ses enclosure sd_mod usb_storage mvsas ohci_hcd libsas sata_sil ehci_hcd scsi_transport_sas sata_nv usbcore pata_amd sata_via ata_generic pata_via pata_acpi libata scsi_mod
Pid: 2592, comm: hddtemp Not tainted 2.6.35-ARCH #1
Call Trace:
 [<ffffffff8105284a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff81052895>] warn_slowpath_null+0x15/0x20
 [<ffffffffa00334fb>] ata_qc_issue+0x30b/0x320 [libata]
 [<ffffffffa000828d>] ? scsi_init_sgtable+0x4d/0x90 [scsi_mod]
 [<ffffffffa003ae10>] ? ata_scsi_pass_thru+0x0/0x2e0 [libata]
 [<ffffffffa0039126>] ata_scsi_translate+0xa6/0x180 [libata]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa00020f0>] ? scsi_done+0x0/0x90 [scsi_mod]
 [<ffffffffa003c390>] ata_sas_queuecmd+0x100/0x270 [libata]
 [<ffffffffa013c6f8>] sas_queuecommand+0x98/0x300 [libsas]
 [<ffffffffa000296d>] scsi_dispatch_cmd+0xfd/0x320 [scsi_mod]
 [<ffffffffa00096d2>] scsi_request_fn+0x322/0x410 [scsi_mod]
 [<ffffffff81062a66>] ? lock_timer_base.clone.26+0x36/0x70
 [<ffffffff811b8b2e>] __blk_run_queue+0x5e/0x160
 [<ffffffff811b2aba>] elv_insert+0x18a/0x270
 [<ffffffff811b2c02>] __elv_add_request+0x62/0xc0
 [<ffffffff811bd3f0>] blk_execute_rq_nowait+0x60/0xb0
 [<ffffffff811bd4c1>] blk_execute_rq+0x81/0xf0
 [<ffffffff811bd274>] ? blk_rq_map_user+0x194/0x270
 [<ffffffff811c1a9a>] sg_io+0x28a/0x3d0
 [<ffffffff811c2245>] scsi_cmd_ioctl+0x255/0x4a0
 [<ffffffff811a243a>] ? security_inode_permission+0x1a/0x20
 [<ffffffffa0003bdc>] ? scsi_ioctl+0x27c/0x3a0 [scsi_mod]
 [<ffffffffa017ee80>] sd_ioctl+0x90/0xe0 [sd_mod]
 [<ffffffff811bf0df>] __blkdev_driver_ioctl+0x8f/0xb0
 [<ffffffff811bf5c6>] blkdev_ioctl+0x236/0x7f0
 [<ffffffff81151fcc>] block_ioctl+0x3c/0x40
 [<ffffffff8113351c>] vfs_ioctl+0x3c/0xd0
 [<ffffffff81133b1c>] do_vfs_ioctl+0x7c/0x520
 [<ffffffff81134041>] sys_ioctl+0x81/0xa0
 [<ffffffff81009e82>] system_call_fastpath+0x16/0x1b
---[ end trace fc0747b97329c42f ]---

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
In reply to Konstantinos Skarlatos

Dear David,

After a few days of testing your patch i think it is pretty solid. The only troubling messages I got are these

ata61.00: qc timeout (cmd 0x27)
ata61.00: failed to read native max address (err_mask=0x4) ata61.00: HPA support seems broken, skipping HPA handling drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[b]:rc= 0

ata61: translated ATA stat/err 0x01/04 to SCSI SK/ASC/ASCQ 0xb/00/00 ata61.00: device reported invalid CHS sector 0
ata61: status=0x01 { Error }
ata61: error=0x04 { DriveStatusError }

Acked-by on v1 1/1
#13 lore raw
In reply to David Milburn
Quoted 10 lines · David Milburn

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka<[email protected]>
Cc Srinivas<[email protected]>
Cc Andy Yan<[email protected]>
---
  drivers/scsi/mvsas/mv_sas.c |    6 ++----
  1 files changed, 2 insertions(+), 4 deletions(-)
#14 lore raw
In reply to David Milburn

Hello David,

Does this patch solve the Unplug Notice issues ?

When copying lots of large video files in sequence to a 6 TB XFS filesystem on top of a 8 TB software raid6 set, I frequently see my copy (over samba) being stalled for a while, then the following is reported:

drivers/scsi/mvsas/mv_sas.c 1701:<7>mv_abort_task() mvi=ffff88003d1c0000 task=ffff880004285080 slot=ffff88003d1de478 slot_idx=x1
drivers/scsi/mvsas/mv_sas.c 1632:mvs_query_task:rc= 5 drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x89800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x1001 drivers/scsi/mvsas/mv_sas.c 2109:phy4 Unplug Notice drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x199800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x1081 drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x199800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x10000 drivers/scsi/mvsas/mv_sas.c 2136:notify plug in on phy[4] drivers/scsi/mvsas/mv_sas.c 1224:port 4 attach dev info is 4 drivers/scsi/mvsas/mv_sas.c 1226:port 4 attach sas addr is 4 drivers/scsi/mvsas/mv_sas.c 378:phy 4 byte dmaded. drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[4]:rc= 0
ata13: translated ATA stat/err 0x01/04 to SCSI SK/ASC/ASCQ 0xb/00/00
ata13: status=0x01 { Error }
ata13: error=0x04 { DriveStatusError }

I'm using the SuperMicro AOC-SASLP-MV8 to control 8 1TB disks, which are never physically unplugged. Used kernel is 2.6.35.
Raid never breaks so no data loss occurs, but the samba copy frequently breaks when the above error occurs, so copying always needs a double check, which is quite annoying.

Best regards,

Frederic Vanden Poel

Quoted 37 lines · David Milburn

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka <[email protected]>
Cc Srinivas <[email protected]>
Cc Andy Yan <[email protected]>

---
 drivers/scsi/mvsas/mv_sas.c |    6 ++----

 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +2 -5
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct domain_device *dev)
  int mvs_lu_reset(struct domain_device *dev, u8 *lun)
  {
        unsigned long flags;
-       int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+       int rc = TMF_RESP_FUNC_FAILED;
        struct mvs_tmf_task tmf_task;
        struct mvs_device * mvi_dev = dev->lldd_dev;
        struct mvs_info *mvi = mvi_dev->mvi_info;
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, u8 *lun)
        mvi_dev->dev_status = MVS_DEV_EH;
        rc = mvs_debug_issue_ssp_tmf(dev, lun, &tmf_task);
        if (rc == TMF_RESP_FUNC_COMPLETE) {
-               num = mvs_find_dev_phyno(dev, phyno);
                spin_lock_irqsave(&mvi->lock, flags);
-               for (i = 0; i < num; i++)
-                       mvs_release_task(mvi, dev);
+               mvs_release_task(mvi, dev);
                spin_unlock_irqrestore(&mvi->lock, flags);
        }
        /* If failed, fall-through I_T_Nexus reset */
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw
Quoted 1 line · Audio Haven

Hello David,

Hello Frederic,

Quoted 2 lines

Does this patch solve the Unplug Notice issues ?

No, it is not directly related to the problem you are seeing.

Quoted 9 lines

When copying lots of large video files in sequence to a 6 TB XFS filesystem on top of a 8 TB software raid6 set, I frequently see my copy (over samba) being stalled for a while, then the following is reported:

drivers/scsi/mvsas/mv_sas.c 1701:<7>mv_abort_task() mvi=ffff88003d1c0000 task=ffff880004285080 slot=ffff88003d1de478 slot_idx=x1

The abort task is initiated from the error handler.

Quoted 4 lines

drivers/scsi/mvsas/mv_sas.c 1632:mvs_query_task:rc= 5 drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x89800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x1001 drivers/scsi/mvsas/mv_sas.c 2109:phy4 Unplug Notice

Here the driver read interrupt status which showed

PHYEV_POOF (phy ready from 1 -> 0) | PHYEV_RDY_CH (phy ready changed state)

Then mvs_is_phy_ready reports phy is not ready resulting in the "Unplug Notice".

David

Quoted 66 lines

drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x199800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x1081 drivers/scsi/mvsas/mv_sas.c 2081:port 4 ctrl sts=0x199800. drivers/scsi/mvsas/mv_sas.c 2083:Port 4 irq sts = 0x10000 drivers/scsi/mvsas/mv_sas.c 2136:notify plug in on phy[4] drivers/scsi/mvsas/mv_sas.c 1224:port 4 attach dev info is 4 drivers/scsi/mvsas/mv_sas.c 1226:port 4 attach sas addr is 4 drivers/scsi/mvsas/mv_sas.c 378:phy 4 byte dmaded. drivers/scsi/mvsas/mv_sas.c 1586:mvs_I_T_nexus_reset for device[4]:rc= 0
ata13: translated ATA stat/err 0x01/04 to SCSI SK/ASC/ASCQ 0xb/00/00
ata13: status=0x01 { Error }
ata13: error=0x04 { DriveStatusError }

I'm using the SuperMicro AOC-SASLP-MV8 to control 8 1TB disks, which are never physically unplugged. Used kernel is 2.6.35.
Raid never breaks so no data loss occurs, but the samba copy frequently breaks when the above error occurs, so copying always needs a double check, which is quite annoying.

Best regards,

Frederic Vanden Poel

Quoted 41 lines · David Milburn

mvs_lu_reset should not call mvs_release_task phy number of times, each phy is handled in mvs_release_task.

Cc Stanislaw Gruszka <[email protected]>
Cc Srinivas <[email protected]>
Cc Andy Yan <[email protected]>
---
 drivers/scsi/mvsas/mv_sas.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/mvsas/mv_sas.c +2 -5
index adedaa9..013ab8d 100644
@@ -1551,7 +1551,7 @@ static int mvs_debug_I_T_nexus_reset(struct domain_device *dev)
 int mvs_lu_reset(struct domain_device *dev, u8 *lun)
 {
       unsigned long flags;
-       int i, phyno[WIDE_PORT_MAX_PHY], num , rc = TMF_RESP_FUNC_FAILED;
+       int rc = TMF_RESP_FUNC_FAILED;
       struct mvs_tmf_task tmf_task;
       struct mvs_device * mvi_dev = dev->lldd_dev;
       struct mvs_info *mvi = mvi_dev->mvi_info;
@@ -1560,10 +1560,8 @@ int mvs_lu_reset(struct domain_device *dev, u8 *lun)
       mvi_dev->dev_status = MVS_DEV_EH;
       rc = mvs_debug_issue_ssp_tmf(dev, lun, &tmf_task);
       if (rc == TMF_RESP_FUNC_COMPLETE) {
-               num = mvs_find_dev_phyno(dev, phyno);
               spin_lock_irqsave(&mvi->lock, flags);
-               for (i = 0; i < num; i++)
-                       mvs_release_task(mvi, dev);
+               mvs_release_task(mvi, dev);
               spin_unlock_irqrestore(&mvi->lock, flags);
       }
       /* If failed, fall-through I_T_Nexus reset */
--

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html