All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] [SCSI] mvsas: fix expander link error
       [not found] <mvsas>
@ 2011-09-29  7:32 ` yxlraid
  2011-09-29  7:33 ` [PATCH 2/8] [SCSI] mvsas: add support for 9480 device id yxlraid
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:32 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- fix expander link error

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_sas.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 4958fef..86847c6 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -426,7 +426,7 @@ static int mvs_task_prep_smp(struct mvs_info *mvi,
 	/* generate open address frame hdr (first 12 bytes) */
 	/* initiator, SMP, ftype 1h */
 	buf_oaf[0] = (1 << 7) | (PROTOCOL_SMP << 4) | 0x01;
-	buf_oaf[1] = dev->linkrate & 0xf;
+	buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
 	*(u16 *)(buf_oaf + 2) = 0xFFFF;		/* SAS SPEC */
 	memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
 
@@ -571,7 +571,7 @@ static int mvs_task_prep_ata(struct mvs_info *mvi,
 	/* generate open address frame hdr (first 12 bytes) */
 	/* initiator, STP, ftype 1h */
 	buf_oaf[0] = (1 << 7) | (PROTOCOL_STP << 4) | 0x1;
-	buf_oaf[1] = dev->linkrate & 0xf;
+	buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
 	*(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1);
 	memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
 
@@ -679,7 +679,7 @@ static int mvs_task_prep_ssp(struct mvs_info *mvi,
 	/* generate open address frame hdr (first 12 bytes) */
 	/* initiator, SSP, ftype 1h */
 	buf_oaf[0] = (1 << 7) | (PROTOCOL_SSP << 4) | 0x1;
-	buf_oaf[1] = dev->linkrate & 0xf;
+	buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
 	*(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1);
 	memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/8] [SCSI] mvsas: add support for 9480 device id
       [not found] <mvsas>
  2011-09-29  7:32 ` [PATCH 1/8] [SCSI] mvsas: fix expander link error yxlraid
@ 2011-09-29  7:33 ` yxlraid
  2011-09-29  7:33 ` [PATCH 3/8] [SCSI] mvsas: fixed some disk spin up issue yxlraid
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:33 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- Add support for Marvell 88SE9480 SAS/SATA HBA

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_init.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 4e9af66..2bbf43c 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -707,6 +707,15 @@ static struct pci_device_id __devinitdata mvs_pci_table[] = {
 	{ PCI_VDEVICE(TTI, 0x2760), chip_9480 },
 	{
 		.vendor		= 0x1b4b,
+		.device		= 0x9480,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= 0x9480,
+		.class		= 0,
+		.class_mask	= 0,
+		.driver_data	= chip_9480,
+	},
+	{
+		.vendor		= 0x1b4b,
 		.device		= 0x9445,
 		.subvendor	= PCI_ANY_ID,
 		.subdevice	= 0x9480,
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/8] [SCSI] mvsas: fixed some disk spin up issue
       [not found] <mvsas>
  2011-09-29  7:32 ` [PATCH 1/8] [SCSI] mvsas: fix expander link error yxlraid
  2011-09-29  7:33 ` [PATCH 2/8] [SCSI] mvsas: add support for 9480 device id yxlraid
@ 2011-09-29  7:33 ` yxlraid
  2011-09-29  7:34 ` [PATCH 4/8] [SCSI] mvsas: fixed wrong destination when hiting NAK for command frame yxlraid
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:33 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- spin up issue: some direct attached SAS device can't spin up

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_94xx.c |    4 ++++
 drivers/scsi/mvsas/mv_sas.c  |   12 ++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 3501291..8f32c7c 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -823,6 +823,10 @@ static void mvs_94xx_fix_phy_info(struct mvs_info *mvi, int i,
 		phy->att_dev_info = PORT_DEV_STP_TRGT | 1;
 	}
 
+	/* enable spin up bit */
+	mvs_write_port_cfg_addr(mvi, i, PHYR_PHY_STAT);
+	mvs_write_port_cfg_data(mvi, i, 0x04);
+
 }
 
 void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id,
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 86847c6..15e9a31 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -265,6 +265,12 @@ static void mvs_bytes_dmaed(struct mvs_info *mvi, int i)
 		id->dev_type = phy->identify.device_type;
 		id->initiator_bits = SAS_PROTOCOL_ALL;
 		id->target_bits = phy->identify.target_port_protocols;
+
+		/* direct attached SAS device */
+		if(phy->att_dev_info & PORT_SSP_TRGT_MASK) {
+			MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT);
+			MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x00);
+		}
 	} else if (phy->phy_type & PORT_TYPE_SATA) {
 		/*Nothing*/
 	}
@@ -1241,6 +1247,12 @@ static void mvs_port_notify_formed(struct asd_sas_phy *sas_phy, int lock)
 		port->wide_port_phymap = sas_port->phy_mask;
 		mv_printk("set wide port phy map %x\n", sas_port->phy_mask);
 		mvs_update_wideport(mvi, sas_phy->id);
+
+		/* direct attached SAS device */
+		if(phy->att_dev_info & PORT_SSP_TRGT_MASK) {
+			MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT);
+			MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x04);
+		}
 	}
 	if (lock)
 		spin_unlock_irqrestore(&mvi->lock, flags);
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/8] [SCSI] mvsas: fixed wrong destination when hiting NAK for command frame
       [not found] <mvsas>
                   ` (2 preceding siblings ...)
  2011-09-29  7:33 ` [PATCH 3/8] [SCSI] mvsas: fixed some disk spin up issue yxlraid
@ 2011-09-29  7:34 ` yxlraid
  2011-09-29  7:34 ` [PATCH 5/8] [SCSI] mvsas: change SL mode0 register value yxlraid
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:34 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- disable non data frame retry

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_94xx.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 8f32c7c..ca2b9d9 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -398,6 +398,17 @@ static int __devinit mvs_94xx_init(struct mvs_info *mvi)
 	/* init phys */
 	mvs_phy_hacks(mvi);
 
+	/* disable non data frame retry */
+	tmp = mvs_cr32(mvi, CMD_SAS_CTL1);
+	if((revision == VANIR_A0_REV) ||
+		(revision == VANIR_B0_REV) ||
+		(revision == VANIR_C0_REV))
+	{
+		tmp &= ~0xffff;
+		tmp |= 0x007f;
+		mvs_cw32(mvi, CMD_SAS_CTL1, tmp);
+	}
+
 	/* set LED blink when IO*/
 	mw32(MVS_PA_VSR_ADDR, VSR_PHY_ACT_LED);
 	tmp = mr32(MVS_PA_VSR_PORT);
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/8] [SCSI] mvsas: change SL mode0 register value
       [not found] <mvsas>
                   ` (3 preceding siblings ...)
  2011-09-29  7:34 ` [PATCH 4/8] [SCSI] mvsas: fixed wrong destination when hiting NAK for command frame yxlraid
@ 2011-09-29  7:34 ` yxlraid
  2011-09-29  7:34 ` [PATCH 6/8] [SCSI] mvsas: expander write performance enhancement yxlraid
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:34 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- change connection behavior
-- set bit8 to 1 for performance tuning
-- set bit0 to 0 to enable retry for no_dest reject case.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_94xx.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index ca2b9d9..4d1a8c7 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -511,6 +511,14 @@ static int __devinit mvs_94xx_init(struct mvs_info *mvi)
 	tmp |= CINT_PHY_MASK;
 	mw32(MVS_INT_MASK, tmp);
 
+	/* change the connection open-close behavior (bit 9) 
+	 * set bit8 to 1 for performance tuning */
+	tmp = mvs_cr32(mvi, CMD_SL_MODE0);
+	tmp |= 0x00000300;
+	/* set bit0 to 0 to enable retry for no_dest reject case */
+	tmp &= 0xFFFFFFFE;
+	mvs_cw32(mvi, CMD_SL_MODE0, tmp);
+
 	/* Enable SRS interrupt */
 	mw32(MVS_INT_MASK_SRS_0, 0xFFFF);
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/8] [SCSI] mvsas: expander write performance enhancement
       [not found] <mvsas>
                   ` (4 preceding siblings ...)
  2011-09-29  7:34 ` [PATCH 5/8] [SCSI] mvsas: change SL mode0 register value yxlraid
@ 2011-09-29  7:34 ` yxlraid
  2011-09-29  7:35 ` [PATCH 7/8] [SCSI] mvsas: fixed SMP request watchdog timeout issue yxlraid
  2011-09-29  7:35 ` [PATCH 8/8] [SCSI] mvsas: update driver version yxlraid
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:34 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- with 1 expander, connect 8 HDD, the write performance will be
   improved by 80%.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_94xx.c |    9 +++++++++
 drivers/scsi/mvsas/mv_defs.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index 4d1a8c7..ba667db 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -511,6 +511,15 @@ static int __devinit mvs_94xx_init(struct mvs_info *mvi)
 	tmp |= CINT_PHY_MASK;
 	mw32(MVS_INT_MASK, tmp);
 
+	/* tune STP performance */
+	tmp = 0x003F003F;
+	mvs_cw32(mvi, CMD_PL_TIMER, tmp);
+
+	/* This can improve expander large block size seq write performance */
+	tmp = mvs_cr32(mvi, CMD_PORT_LAYER_TIMER1);
+	tmp |= 0xFFFF007F;
+	mvs_cw32(mvi, CMD_PORT_LAYER_TIMER1, tmp);
+
 	/* change the connection open-close behavior (bit 9) 
 	 * set bit8 to 1 for performance tuning */
 	tmp = mvs_cr32(mvi, CMD_SL_MODE0);
diff --git a/drivers/scsi/mvsas/mv_defs.h b/drivers/scsi/mvsas/mv_defs.h
index dec7cad..8e21482 100644
--- a/drivers/scsi/mvsas/mv_defs.h
+++ b/drivers/scsi/mvsas/mv_defs.h
@@ -387,6 +387,7 @@ enum sas_cmd_port_registers {
 	CMD_SL_MODE0		= 0x1BC, /* SL Mode 0 */
 	CMD_SL_MODE1		= 0x1C0, /* SL Mode 1 */
 	CMD_PND_FIFO_CTL1	= 0x1C4, /* Pending FIFO Control 1 */
+	CMD_PORT_LAYER_TIMER1	= 0x1E0, /* Port Layer Timer 1 */
 };
 
 enum mvs_info_flags {
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/8] [SCSI] mvsas: fixed SMP request watchdog timeout issue.
       [not found] <mvsas>
                   ` (5 preceding siblings ...)
  2011-09-29  7:34 ` [PATCH 6/8] [SCSI] mvsas: expander write performance enhancement yxlraid
@ 2011-09-29  7:35 ` yxlraid
  2011-09-29  7:35 ` [PATCH 8/8] [SCSI] mvsas: update driver version yxlraid
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:35 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- set SMP link timeout value to maximum.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_94xx.c |    4 ++++
 drivers/scsi/mvsas/mv_defs.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c
index ba667db..49088d5 100644
--- a/drivers/scsi/mvsas/mv_94xx.c
+++ b/drivers/scsi/mvsas/mv_94xx.c
@@ -511,6 +511,10 @@ static int __devinit mvs_94xx_init(struct mvs_info *mvi)
 	tmp |= CINT_PHY_MASK;
 	mw32(MVS_INT_MASK, tmp);
 
+	tmp = mvs_cr32(mvi, CMD_LINK_TIMER);
+	tmp |= 0xFFFF0000;
+	mvs_cw32(mvi, CMD_LINK_TIMER, tmp);
+
 	/* tune STP performance */
 	tmp = 0x003F003F;
 	mvs_cw32(mvi, CMD_PL_TIMER, tmp);
diff --git a/drivers/scsi/mvsas/mv_defs.h b/drivers/scsi/mvsas/mv_defs.h
index 8e21482..f545194 100644
--- a/drivers/scsi/mvsas/mv_defs.h
+++ b/drivers/scsi/mvsas/mv_defs.h
@@ -388,6 +388,7 @@ enum sas_cmd_port_registers {
 	CMD_SL_MODE1		= 0x1C0, /* SL Mode 1 */
 	CMD_PND_FIFO_CTL1	= 0x1C4, /* Pending FIFO Control 1 */
 	CMD_PORT_LAYER_TIMER1	= 0x1E0, /* Port Layer Timer 1 */
+	CMD_LINK_TIMER		= 0x1E4, /* Link Timer */
 };
 
 enum mvs_info_flags {
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 8/8] [SCSI] mvsas: update driver version
       [not found] <mvsas>
                   ` (6 preceding siblings ...)
  2011-09-29  7:35 ` [PATCH 7/8] [SCSI] mvsas: fixed SMP request watchdog timeout issue yxlraid
@ 2011-09-29  7:35 ` yxlraid
  7 siblings, 0 replies; 8+ messages in thread
From: yxlraid @ 2011-09-29  7:35 UTC (permalink / raw)
  To: JBottomley
  Cc: jack_wang, lucas.demarchi, maciej.trela, dan.j.williams,
	linux-scsi, linux-kernel, Xiangliang Yu

From: Xiangliang Yu <yuxiangl@marvell.com>

-- This will synchronize the version string with internal driver.

Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
---
 drivers/scsi/mvsas/mv_sas.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h
index 44d7885..876c329 100644
--- a/drivers/scsi/mvsas/mv_sas.h
+++ b/drivers/scsi/mvsas/mv_sas.h
@@ -47,7 +47,7 @@
 #include "mv_defs.h"
 
 #define DRV_NAME		"mvsas"
-#define DRV_VERSION		"0.8.2"
+#define DRV_VERSION		"0.8.16"
 #define MVS_ID_NOT_MAPPED	0x7f
 #define WIDE_PORT_MAX_PHY		4
 #define mv_printk(fmt, arg ...)	\
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-29  7:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mvsas>
2011-09-29  7:32 ` [PATCH 1/8] [SCSI] mvsas: fix expander link error yxlraid
2011-09-29  7:33 ` [PATCH 2/8] [SCSI] mvsas: add support for 9480 device id yxlraid
2011-09-29  7:33 ` [PATCH 3/8] [SCSI] mvsas: fixed some disk spin up issue yxlraid
2011-09-29  7:34 ` [PATCH 4/8] [SCSI] mvsas: fixed wrong destination when hiting NAK for command frame yxlraid
2011-09-29  7:34 ` [PATCH 5/8] [SCSI] mvsas: change SL mode0 register value yxlraid
2011-09-29  7:34 ` [PATCH 6/8] [SCSI] mvsas: expander write performance enhancement yxlraid
2011-09-29  7:35 ` [PATCH 7/8] [SCSI] mvsas: fixed SMP request watchdog timeout issue yxlraid
2011-09-29  7:35 ` [PATCH 8/8] [SCSI] mvsas: update driver version yxlraid

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.