Skip to contentSkip to conversation

ipr: add MSI support

PATCH In review Wayne Boyer 3 participants 6 messages Jan 23, 2009 – Jan 28, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/2 ipr: add MSI support

Enable MSI if available/supported.

---
 drivers/scsi/ipr.c |    7 +++++++
 drivers/scsi/ipr.h |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/scsi/ipr.c +7 -0
Index: linux-2.6/drivers/scsi/ipr.c
===================================================================
@@ -7147,6 +7147,7 @@
 
 	ENTER;
 	free_irq(pdev->irq, ioa_cfg);
+	pci_disable_msi(pdev);
 	iounmap(ioa_cfg->hdw_dma_regs);
 	pci_release_regions(pdev);
 	ipr_free_mem(ioa_cfg);
@@ -7432,6 +7433,11 @@
 		goto out;
 	}
 
+	if (!(rc = pci_enable_msi(pdev)))
+		dev_info(&pdev->dev, "MSI enabled\n");
+	else if (ipr_debug)
+		dev_info(&pdev->dev, "Cannot enable MSI\n");
+
 	dev_info(&pdev->dev, "Found IOA with IRQ: %d\n", pdev->irq);
 
 	host = scsi_host_alloc(&driver_template, sizeof(*ioa_cfg));
@@ -7574,6 +7580,7 @@
 out_scsi_host_put:
 	scsi_host_put(host);
 out_disable:
+	pci_disable_msi(pdev);
 	pci_disable_device(pdev);
 	goto out;
 }
drivers/scsi/ipr.h +2 -2
Index: linux-2.6/drivers/scsi/ipr.h
===================================================================
@@ -37,8 +37,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.4.1"
-#define IPR_DRIVER_DATE "(April 24, 2007)"
+#define IPR_DRIVER_VERSION "2.4.2"
+#define IPR_DRIVER_DATE "(January 21, 2009)"
 
 /*
  * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
#2 lore raw

Acked by: Brian King <[email protected]>

Quoted 60 lines · Wayne Boyer

Enable MSI if available/supported.

---
 drivers/scsi/ipr.c |    7 +++++++
 drivers/scsi/ipr.h |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/scsi/ipr.c
===================================================================

drivers/scsi/ipr.c +7 -0
@@ -7147,6 +7147,7 @@
 
 	ENTER;
 	free_irq(pdev->irq, ioa_cfg);
+	pci_disable_msi(pdev);
 	iounmap(ioa_cfg->hdw_dma_regs);
 	pci_release_regions(pdev);
 	ipr_free_mem(ioa_cfg);
@@ -7432,6 +7433,11 @@
 		goto out;
 	}
 
+	if (!(rc = pci_enable_msi(pdev)))
+		dev_info(&pdev->dev, "MSI enabled\n");
+	else if (ipr_debug)
+		dev_info(&pdev->dev, "Cannot enable MSI\n");
+
 	dev_info(&pdev->dev, "Found IOA with IRQ: %d\n", pdev->irq);
 
 	host = scsi_host_alloc(&driver_template, sizeof(*ioa_cfg));
@@ -7574,6 +7580,7 @@
 out_scsi_host_put:
 	scsi_host_put(host);
 out_disable:
+	pci_disable_msi(pdev);
 	pci_disable_device(pdev);
 	goto out;
 }

Index: linux-2.6/drivers/scsi/ipr.h
===================================================================

drivers/scsi/ipr.h +2 -3
@@ -37,8 +37,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.4.1"
-#define IPR_DRIVER_DATE "(April 24, 2007)"
+#define IPR_DRIVER_VERSION "2.4.2"
+#define IPR_DRIVER_DATE "(January 21, 2009)"
 
 /*
  * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
 
--

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

Signature · 3 lines
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
#3 lore raw

PATCH 2/2 ipr: add message to error table

In reply to a message not in the archive

Adds a message to the error table for an error that wasn't previously handled.

---

 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/ipr.c +2 -0
Index: linux-2.6/drivers/scsi/ipr.c
===================================================================
@@ -354,6 +354,8 @@
 	"9076: Configuration error, missing remote IOA"},
 	{0x06679100, 0, IPR_DEFAULT_LOG_LEVEL,
 	"4050: Enclosure does not support a required multipath function"},
+	{0x06690000, 0, IPR_DEFAULT_LOG_LEVEL,
+	"4070: Logically bad written to device"},
 	{0x06690200, 0, IPR_DEFAULT_LOG_LEVEL,
 	"9041: Array protection temporarily suspended"},
 	{0x06698200, 0, IPR_DEFAULT_LOG_LEVEL,
#4 lore raw

Re: [PATCH 2/2] ipr: add message to error table

Acked by: Brian King <[email protected]>

Quoted 26 lines · Wayne Boyer

Adds a message to the error table for an error that wasn't previously handled.

---

 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/scsi/ipr.c
===================================================================

drivers/scsi/ipr.c +2 -1
@@ -354,6 +354,8 @@
 	"9076: Configuration error, missing remote IOA"},
 	{0x06679100, 0, IPR_DEFAULT_LOG_LEVEL,
 	"4050: Enclosure does not support a required multipath function"},
+	{0x06690000, 0, IPR_DEFAULT_LOG_LEVEL,
+	"4070: Logically bad written to device"},
 	{0x06690200, 0, IPR_DEFAULT_LOG_LEVEL,
 	"9041: Array protection temporarily suspended"},
 	{0x06698200, 0, IPR_DEFAULT_LOG_LEVEL,
 
--

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

Signature · 3 lines
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
maintainer
#5 lore raw

Re: [PATCH 2/2] ipr: add message to error table

In reply to Wayne Boyer
Quoted 13 lines · Wayne Boyer

Adds a message to the error table for an error that wasn't previously handled.

---

 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/scsi/ipr.c
===================================================================

drivers/scsi/ipr.c line 358

Quoted 5 lines
drivers/scsi/ipr.c +2 -0
@@ -354,6 +354,8 @@
 	"9076: Configuration error, missing remote IOA"},
 	{0x06679100, 0, IPR_DEFAULT_LOG_LEVEL,
 	"4050: Enclosure does not support a required multipath function"},
+	{0x06690000, 0, IPR_DEFAULT_LOG_LEVEL,
+	"4070: Logically bad written to device"},

Neither from the change log nor from the actual text can I tell what the problem is ... is there a word missing (like block or sector)?

James

#6 lore raw

Re: [PATCH 2/2] ipr: add message to error table

Quoted 9 lines · James Bottomley
Quoted 8 lines · Wayne Boyer

Adds a message to the error table for an error that wasn't previously handled.

---

 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)
Quoted 14 lines

drivers/scsi/ipr.c line 358

Quoted 10 lines

Index: linux-2.6/drivers/scsi/ipr.c
===================================================================

drivers/scsi/ipr.c +2 -0
@@ -354,6 +354,8 @@
 	"9076: Configuration error, missing remote IOA"},
 	{0x06679100, 0, IPR_DEFAULT_LOG_LEVEL,
 	"4050: Enclosure does not support a required multipath function"},
+	{0x06690000, 0, IPR_DEFAULT_LOG_LEVEL,
+	"4070: Logically bad written to device"},

Neither from the change log nor from the actual text can I tell what the problem is ... is there a word missing (like block or sector)?

After some discussion, I've come up with a more descriptive message and better change log. Updated patch below...

Quoted 2 lines

James

Adds a message to the error table for an error that wasn't previously handled. In some cases the I/O Adapter will detect an error condition and mark a block as "logically bad".

---

 drivers/scsi/ipr.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/ipr.c +2 -0
Index: linux-2.6/drivers/scsi/ipr.c
===================================================================
@@ -354,6 +354,8 @@
 	"9076: Configuration error, missing remote IOA"},
 	{0x06679100, 0, IPR_DEFAULT_LOG_LEVEL,
 	"4050: Enclosure does not support a required multipath function"},
+	{0x06690000, 0, IPR_DEFAULT_LOG_LEVEL,
+	"4070: Logically bad block written on device"},
 	{0x06690200, 0, IPR_DEFAULT_LOG_LEVEL,
 	"9041: Array protection temporarily suspended"},
 	{0x06698200, 0, IPR_DEFAULT_LOG_LEVEL,
Signature · 4 lines
Wayne Boyer
IBM - Beaverton, Oregon
LTC S/W Development - eServerIO
(503) 578-5236, T/L 775-5236