2008-03-17 19:33:48

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 1/4] scsi: megaraid_sas - Rollback the sense info implementation

Rollback the sense info implementation

Signed-off-by Bo Yang<[email protected]>

---
drivers/scsi/megaraid/megaraid_sas.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)

diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-03-07 10:59:53.000000000 -0500
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:47:08.000000000 -0400
@@ -2909,7 +2909,6 @@ megasas_mgmt_fw_ioctl(struct megasas_ins
void *sense = NULL;
dma_addr_t sense_handle;
u32 *sense_ptr;
- unsigned long *sense_buff;

memset(kbuff_arr, 0, sizeof(kbuff_arr));

@@ -3014,14 +3013,14 @@ megasas_mgmt_fw_ioctl(struct megasas_ins
*/
if (ioc->sense_len) {
/*
- * sense_buff points to the location that has the user
+ * sense_ptr points to the location that has the user
* sense buffer address
*/
- sense_buff = (unsigned long *) ((unsigned long)ioc->frame.raw +
- ioc->sense_off);
+ sense_ptr = (u32 *) ((unsigned long)ioc->frame.raw +
+ ioc->sense_off);

- if (copy_to_user((void __user *)(unsigned long)(*sense_buff),
- sense, ioc->sense_len)) {
+ if (copy_to_user((void __user *)((unsigned long)(*sense_ptr)),
+ sense, ioc->sense_len)) {
printk(KERN_ERR "megasas: Failed to copy out to user "
"sense data\n");
error = -EFAULT;


2008-03-17 19:57:21

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 2/4] scsi: megaraid_sas - Fix the frame count calculation

Driver sent the wrong frame count to firmware. This patch fixed the frame count calculation.

Signed-off-by Bo Yang<[email protected]>

---
drivers/scsi/megaraid/megaraid_sas.c | 31 ++++++++++++++++---------
drivers/scsi/megaraid/megaraid_sas.h | 4 +++
2 files changed, 25 insertions(+), 10 deletions(-)

diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:51:18.000000000 -0400
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:50:39.000000000 -0400
@@ -488,12 +488,13 @@ megasas_make_sgl64(struct megasas_instan

/**
* megasas_get_frame_count - Computes the number of frames
+ * @frame_type : type of frame- io or pthru frame
* @sge_count : number of sg elements
*
* Returns the number of frames required for numnber of sge's (sge_count)
*/

-static u32 megasas_get_frame_count(u8 sge_count)
+static u32 megasas_get_frame_count(u8 sge_count, u8 frame_type)
{
int num_cnt;
int sge_bytes;
@@ -504,13 +505,22 @@ static u32 megasas_get_frame_count(u8 sg
sizeof(struct megasas_sge32);

/*
- * Main frame can contain 2 SGEs for 64-bit SGLs and
- * 3 SGEs for 32-bit SGLs
- */
- if (IS_DMA64)
- num_cnt = sge_count - 2;
- else
- num_cnt = sge_count - 3;
+ * Main frame can contain 2 SGEs for 64-bit SGLs and
+ * 3 SGEs for 32-bit SGLs for ldio &
+ * 1 SGEs for 64-bit SGLs and
+ * 2 SGEs for 32-bit SGLs for pthru frame
+ */
+ if (unlikely(frame_type == PTHRU_FRAME)) {
+ if (IS_DMA64)
+ num_cnt = sge_count - 1;
+ else
+ num_cnt = sge_count - 2;
+ } else {
+ if (IS_DMA64)
+ num_cnt = sge_count - 2;
+ else
+ num_cnt = sge_count - 3;
+ }

if(num_cnt>0){
sge_bytes = sge_sz * num_cnt;
@@ -592,7 +602,8 @@ megasas_build_dcdb(struct megasas_instan
* Compute the total number of frames this command consumes. FW uses
* this number to pull sufficient number of frames from host memory.
*/
- cmd->frame_count = megasas_get_frame_count(pthru->sge_count);
+ cmd->frame_count = megasas_get_frame_count(pthru->sge_count,
+ PTHRU_FRAME);

return cmd->frame_count;
}
@@ -709,7 +720,7 @@ megasas_build_ldio(struct megasas_instan
* Compute the total number of frames this command consumes. FW uses
* this number to pull sufficient number of frames from host memory.
*/
- cmd->frame_count = megasas_get_frame_count(ldio->sge_count);
+ cmd->frame_count = megasas_get_frame_count(ldio->sge_count, IO_FRAME);

return cmd->frame_count;
}
diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h 2008-03-07 13:45:43.000000000 -0500
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h 2008-03-07 14:03:41.000000000 -0500
@@ -542,6 +542,10 @@ struct megasas_ctrl_info {

#define MEGASAS_FW_BUSY 1

+/* Frame Type */
+#define IO_FRAME 0
+#define PTHRU_FRAME 1
+
/*
* When SCSI mid-layer calls driver's reset routine, driver waits for
* MEGASAS_RESET_WAIT_TIME seconds for all outstanding IO to complete. Note

2008-03-17 20:34:08

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 3/4] scsi: megaraid_sas - Add the new controller Support to Driver

Add the new Controller (ID: 007C) support to driver.

Signed-off-by Bo Yang<[email protected]>

---
drivers/scsi/megaraid/megaraid_sas.c | 7 +++++--
drivers/scsi/megaraid/megaraid_sas.h | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)

diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:53:49.000000000 -0400
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:53:10.000000000 -0400
@@ -68,6 +68,8 @@ static struct pci_device_id megasas_pci_
/* xscale IOP */
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078R)},
/* ppc IOP */
+ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078DE)},
+ /* ppc IOP */
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VERDE_ZCR)},
/* xscale IOP, vega */
{PCI_DEVICE(PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_PERC5)},
@@ -1471,7 +1473,7 @@ megasas_transition_to_ready(struct megas
instance->instancet->disable_intr(instance->reg_set);
writel(MFI_RESET_FLAGS, &instance->reg_set->inbound_doorbell);

- max_wait = 10;
+ max_wait = 60;
cur_state = MFI_STATE_OPERATIONAL;
break;

@@ -1991,7 +1993,8 @@ static int megasas_init_mfi(struct megas

switch(instance->pdev->device)
{
- case PCI_DEVICE_ID_LSI_SAS1078R:
+ case PCI_DEVICE_ID_LSI_SAS1078R:
+ case PCI_DEVICE_ID_LSI_SAS1078DE:
instance->instancet = &megasas_instance_template_ppc;
break;
case PCI_DEVICE_ID_LSI_SAS1064R:
diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h 2008-03-07 14:29:14.000000000 -0500
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h 2008-03-07 14:10:12.000000000 -0500
@@ -26,6 +26,7 @@
* Device IDs
*/
#define PCI_DEVICE_ID_LSI_SAS1078R 0x0060
+#define PCI_DEVICE_ID_LSI_SAS1078DE 0x007C
#define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413

/*

2008-03-17 20:38:52

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 4/4] scsi: megaraid_sas - Update the Version and Changelog

Update the Version and ChangeLog

Signed-off-by Bo Yang<[email protected]>

---
Documentation/scsi/ChangeLog.megaraid_sas | 22 ++++++++++++++++++++
drivers/scsi/megaraid/megaraid_sas.c | 2 -
drivers/scsi/megaraid/megaraid_sas.h | 6 ++---
3 files changed, 26 insertions(+), 4 deletions(-)

diff -rupN linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas
--- linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas 2008-03-10 10:17:25.000000000 -0400
+++ linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas 2008-03-10 10:41:39.000000000 -0400
@@ -3,6 +3,28 @@
Sumant Patro
Bo Yang

+2 Current Version : 00.00.03.20
+3 Older Version : 00.00.03.16
+
+1. Sense buffer ptr data type in the ioctl path is reverted back to
+ u32 * as in previous versions of driver.
+
+2. Fixed the driver frame count.
+ When Driver sent wrong frame count to firmware. As this particular
+ command is sent to drive, FW is seeing continuous chip resets and so
+ the command will timeout.
+
+3. Add the new controller(1078DE) support to the driver.
+
+4. Increase the max_wait to 60 from 10 in the controller operational status.
+ With this max_wait increase, driver will make sure the FW will finish
+ the pending cmd for KDUMP case.
+
+1 Release Date : Thur. Nov. 07 16:30:43 PST 2007 -
+ (emaild-id:[email protected])
+ Sumant Patro
+ Bo Yang
+
2 Current Version : 00.00.03.16
3 Older Version : 00.00.03.15

diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:54:59.000000000 -0400
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.c 2008-03-17 13:55:30.000000000 -0400
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_sas.c
- * Version : v00.00.03.16-rc1
+ * Version : v00.00.03.20-rc1
*
* Authors:
* (email-id : [email protected])
diff -rupN linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.24_orig/drivers/scsi/megaraid/megaraid_sas.h 2008-03-10 10:17:25.000000000 -0400
+++ linux-2.6.24_new/drivers/scsi/megaraid/megaraid_sas.h 2008-03-10 10:51:02.000000000 -0400
@@ -18,9 +18,9 @@
/*
* MegaRAID SAS Driver meta data
*/
-#define MEGASAS_VERSION "00.00.03.16-rc1"
-#define MEGASAS_RELDATE "Nov. 07, 2007"
-#define MEGASAS_EXT_VERSION "Thu. Nov. 07 10:09:32 PDT 2007"
+#define MEGASAS_VERSION "00.00.03.20-rc1"
+#define MEGASAS_RELDATE "March 10, 2008"
+#define MEGASAS_EXT_VERSION "Mon. March 10 11:02:31 PDT 2008"

/*
* Device IDs

2008-03-17 20:54:59

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH 4/4] scsi: megaraid_sas - Update the Version and Changelog

On Mon, 2008-03-17 at 04:18 -0400, bo yang wrote:
> Update the Version and ChangeLog
>
> Signed-off-by Bo Yang<[email protected]>
>
> ---
> Documentation/scsi/ChangeLog.megaraid_sas | 22 ++++++++++++++++++++
> drivers/scsi/megaraid/megaraid_sas.c | 2 -
> drivers/scsi/megaraid/megaraid_sas.h | 6 ++---
> 3 files changed, 26 insertions(+), 4 deletions(-)
>
> diff -rupN linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas
> --- linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas 2008-03-10 10:17:25.000000000 -0400
> +++ linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas 2008-03-10 10:41:39.000000000 -0400
> @@ -3,6 +3,28 @@
> Sumant Patro
> Bo Yang
>
> +2 Current Version : 00.00.03.20
> +3 Older Version : 00.00.03.16
> +
> +1. Sense buffer ptr data type in the ioctl path is reverted back to
> + u32 * as in previous versions of driver.
> +
> +2. Fixed the driver frame count.
> + When Driver sent wrong frame count to firmware. As this particular
> + command is sent to drive, FW is seeing continuous chip resets and so
> + the command will timeout.
> +
> +3. Add the new controller(1078DE) support to the driver.

It would be nice if the git change log were this detailed, as well
please.

> +4. Increase the max_wait to 60 from 10 in the controller operational status.
> + With this max_wait increase, driver will make sure the FW will finish
> + the pending cmd for KDUMP case.

Where did this change come from? It's not in any of this change set
that I can see.

James

2008-03-17 21:01:27

by Yang, Bo

[permalink] [raw]
Subject: RE: [PATCH 4/4] scsi: megaraid_sas - Update the Version andChangelog

James,

Sure I will send more details.

Thanks.

Bo Yang

-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Monday, March 17, 2008 4:55 PM
To: Yang, Bo
Cc: [email protected]; [email protected];
[email protected]; Patro, Sumant; Kolli, Neela
Subject: Re: [PATCH 4/4] scsi: megaraid_sas - Update the Version
andChangelog

On Mon, 2008-03-17 at 04:18 -0400, bo yang wrote:
> Update the Version and ChangeLog
>
> Signed-off-by Bo Yang<[email protected]>
>
> ---
> Documentation/scsi/ChangeLog.megaraid_sas | 22 ++++++++++++++++++++
> drivers/scsi/megaraid/megaraid_sas.c | 2 -
> drivers/scsi/megaraid/megaraid_sas.h | 6 ++---
> 3 files changed, 26 insertions(+), 4 deletions(-)
>
> diff -rupN linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas
linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas
> --- linux-2.6.24_orig/Documentation/scsi/ChangeLog.megaraid_sas
2008-03-10 10:17:25.000000000 -0400
> +++ linux-2.6.24_new/Documentation/scsi/ChangeLog.megaraid_sas
2008-03-10 10:41:39.000000000 -0400
> @@ -3,6 +3,28 @@
> Sumant Patro
> Bo Yang
>
> +2 Current Version : 00.00.03.20
> +3 Older Version : 00.00.03.16
> +
> +1. Sense buffer ptr data type in the ioctl path is reverted back to
> + u32 * as in previous versions of driver.
> +
> +2. Fixed the driver frame count.
> + When Driver sent wrong frame count to firmware. As this
particular
> + command is sent to drive, FW is seeing continuous chip resets
and so
> + the command will timeout.
> +
> +3. Add the new controller(1078DE) support to the driver.

It would be nice if the git change log were this detailed, as well
please.

> +4. Increase the max_wait to 60 from 10 in the controller operational
status.
> + With this max_wait increase, driver will make sure the FW will
finish
> + the pending cmd for KDUMP case.

Where did this change come from? It's not in any of this change set
that I can see.

James

2008-08-01 16:49:48

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 2/4] scsi: megaraid_sas - Add the shutdown DCMD cmd to driver shutdown routine

Add the shutdown DCMD cmd to driver shutdown routine to make megaraid sas FW shutdown proper.

Signed-off-by Bo Yang<[email protected]>

---
drivers/scsi/megaraid/megaraid_sas.c | 1 +
1 files changed, 1 insertion(+)

diff -rupN linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-07-31 12:51:06.000000000 -0400
+++ linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.c 2008-07-31 12:54:09.000000000 -0400
@@ -2863,6 +2863,7 @@ static void megasas_shutdown(struct pci_
{
struct megasas_instance *instance = pci_get_drvdata(pdev);
megasas_flush_cache(instance);
+ megasas_shutdown_controller(instance, MR_DCMD_CTRL_SHUTDOWN);
}

/**

2008-08-01 21:27:12

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 3/4] scsi: megaraid_sas - Add the new controllers support

Add the new controllers (0x78 0x79) support to the driver. Those controllers are LSI's next generation (gen2) SAS controllers.

Signed-off-by Bo Yang<[email protected]>

---
drivers/scsi/megaraid/megaraid_sas.c | 111 ++++++++++++++++++++++++++++++++++-
drivers/scsi/megaraid/megaraid_sas.h | 4 +
2 files changed, 113 insertions(+), 2 deletions(-)

diff -rupN linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.c 2008-07-31 12:56:07.000000000 -0400
+++ linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.c 2008-07-31 13:32:02.000000000 -0400
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_sas.c
- * Version : v00.00.03.20-rc1
+ * Version : v00.00.04.01-rc1
*
* Authors:
* (email-id : [email protected])
@@ -71,6 +71,10 @@ static struct pci_device_id megasas_pci_
/* ppc IOP */
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078DE)},
/* ppc IOP */
+ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078GEN2)},
+ /* gen2*/
+ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS0079GEN2)},
+ /* gen2*/
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VERDE_ZCR)},
/* xscale IOP, vega */
{PCI_DEVICE(PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_PERC5)},
@@ -324,6 +328,100 @@ static struct megasas_instance_template
};

/**
+* The following functions are defined for gen2 (deviceid : 0x78 0x79)
+* controllers
+*/
+
+/**
+ * megasas_enable_intr_gen2 - Enables interrupts
+ * @regs: MFI register set
+ */
+static inline void
+megasas_enable_intr_gen2(struct megasas_register_set __iomem *regs)
+{
+ writel(0xFFFFFFFF, &(regs)->outbound_doorbell_clear);
+
+ /* write ~0x00000005 (4 & 1) to the intr mask*/
+ writel(~MFI_GEN2_ENABLE_INTERRUPT_MASK, &(regs)->outbound_intr_mask);
+
+ /* Dummy readl to force pci flush */
+ readl(&regs->outbound_intr_mask);
+}
+
+/**
+ * megasas_disable_intr_gen2 - Disables interrupt
+ * @regs: MFI register set
+ */
+static inline void
+megasas_disable_intr_gen2(struct megasas_register_set __iomem *regs)
+{
+ u32 mask = 0xFFFFFFFF;
+ writel(mask, &regs->outbound_intr_mask);
+ /* Dummy readl to force pci flush */
+ readl(&regs->outbound_intr_mask);
+}
+
+/**
+ * megasas_read_fw_status_reg_gen2 - returns the current FW status value
+ * @regs: MFI register set
+ */
+static u32
+megasas_read_fw_status_reg_gen2(struct megasas_register_set __iomem *regs)
+{
+ return readl(&(regs)->outbound_scratch_pad);
+}
+
+/**
+ * megasas_clear_interrupt_gen2 - Check & clear interrupt
+ * @regs: MFI register set
+ */
+static int
+megasas_clear_intr_gen2(struct megasas_register_set __iomem *regs)
+{
+ u32 status;
+ /*
+ * Check if it is our interrupt
+ */
+ status = readl(&regs->outbound_intr_status);
+
+ if (!(status & MFI_GEN2_ENABLE_INTERRUPT_MASK)) {
+ return 1;
+ }
+
+ /*
+ * Clear the interrupt by writing back the same value
+ */
+ writel(status, &regs->outbound_doorbell_clear);
+
+ /* Dummy readl to force pci flush */
+ readl(&regs->outbound_intr_status);
+
+ return 0;
+}
+/**
+ * megasas_fire_cmd_gen2 - Sends command to the FW
+ * @frame_phys_addr : Physical address of cmd
+ * @frame_count : Number of frames for the command
+ * @regs : MFI register set
+ */
+static inline void
+megasas_fire_cmd_gen2(dma_addr_t frame_phys_addr, u32 frame_count,
+ struct megasas_register_set __iomem *regs)
+{
+ writel((frame_phys_addr | (frame_count<<1))|1,
+ &(regs)->inbound_queue_port);
+}
+
+static struct megasas_instance_template megasas_instance_template_gen2 = {
+
+ .fire_cmd = megasas_fire_cmd_gen2,
+ .enable_intr = megasas_enable_intr_gen2,
+ .disable_intr = megasas_disable_intr_gen2,
+ .clear_intr = megasas_clear_intr_gen2,
+ .read_fw_status_reg = megasas_read_fw_status_reg_gen2,
+};
+
+/**
* This is the end of set of functions & definitions
* specific to ppc (deviceid : 0x60) controllers
*/
@@ -1982,7 +2080,12 @@ static int megasas_init_mfi(struct megas
/*
* Map the message registers
*/
- instance->base_addr = pci_resource_start(instance->pdev, 0);
+ if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS1078GEN2) ||
+ (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0079GEN2)) {
+ instance->base_addr = pci_resource_start(instance->pdev, 1);
+ } else {
+ instance->base_addr = pci_resource_start(instance->pdev, 0);
+ }

if (pci_request_regions(instance->pdev, "megasas: LSI")) {
printk(KERN_DEBUG "megasas: IO memory region busy!\n");
@@ -2004,6 +2107,10 @@ static int megasas_init_mfi(struct megas
case PCI_DEVICE_ID_LSI_SAS1078DE:
instance->instancet = &megasas_instance_template_ppc;
break;
+ case PCI_DEVICE_ID_LSI_SAS1078GEN2:
+ case PCI_DEVICE_ID_LSI_SAS0079GEN2:
+ instance->instancet = &megasas_instance_template_gen2;
+ break;
case PCI_DEVICE_ID_LSI_SAS1064R:
case PCI_DEVICE_ID_DELL_PERC5:
default:
diff -rupN linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.h 2008-07-31 12:50:41.000000000 -0400
+++ linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.h 2008-07-31 12:50:41.000000000 -0400
@@ -28,6 +28,8 @@
#define PCI_DEVICE_ID_LSI_SAS1078R 0x0060
#define PCI_DEVICE_ID_LSI_SAS1078DE 0x007C
#define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413
+#define PCI_DEVICE_ID_LSI_SAS1078GEN2 0x0078
+#define PCI_DEVICE_ID_LSI_SAS0079GEN2 0x0079

/*
* =====================================
@@ -580,6 +582,8 @@ struct megasas_ctrl_info {
#define MEGASAS_COMPLETION_TIMER_INTERVAL (HZ/10)

#define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000
+#define MFI_REPLY_GEN2_MESSAGE_INTERRUPT 0x00000001
+#define MFI_GEN2_ENABLE_INTERRUPT_MASK 0x00000001 | 0x00000004

/*
* register set for both 1068 and 1078 controllers

2008-08-01 21:28:45

by Yang, Bo

[permalink] [raw]
Subject: [PATCH 4/4] scsi: megaraid_sas - Version and Documentation Update

Update the Version and Documentation.

Signed-off-by Bo Yang<[email protected]>

---
Documentation/scsi/ChangeLog.megaraid_sas | 23 +++++++++++++++++++++++
drivers/scsi/megaraid/megaraid_sas.h | 6 +++---
2 files changed, 26 insertions(+), 3 deletions(-)

diff -rupN linux-2.6.28_orig/Documentation/scsi/ChangeLog.megaraid_sas linux-2.6.28_new/Documentation/scsi/ChangeLog.megaraid_sas
--- linux-2.6.28_orig/Documentation/scsi/ChangeLog.megaraid_sas 2008-07-31 13:34:16.000000000 -0400
+++ linux-2.6.28_new/Documentation/scsi/ChangeLog.megaraid_sas 2008-07-31 14:18:36.000000000 -0400
@@ -1,3 +1,26 @@
+
+1 Release Date : Thur.July. 24 11:41:51 PST 2008 -
+ (emaild-id:[email protected])
+ Sumant Patro
+ Bo Yang
+
+2 Current Version : 00.00.04.01
+3 Older Version : 00.00.03.22
+
+1. Add the new controller (0078, 0079) support to the driver
+ Those controllers are LSI's next generatation(gen2) SAS controllers.
+
+1 Release Date : Mon.June. 23 10:12:45 PST 2008 -
+ (emaild-id:[email protected])
+ Sumant Patro
+ Bo Yang
+
+2 Current Version : 00.00.03.22
+3 Older Version : 00.00.03.20
+
+1. Add shutdown DCMD cmd to the shutdown routine to make FW shutdown proper.
+2. Unexpected interrupt occurs in HWR Linux driver, add the dumy readl pci flush will fix this issue.
+
1 Release Date : Mon. March 10 11:02:31 PDT 2008 -
(emaild-id:[email protected])
Sumant Patro
diff -rupN linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.28_orig/drivers/scsi/megaraid/megaraid_sas.h 2008-07-31 13:34:16.000000000 -0400
+++ linux-2.6.28_new/drivers/scsi/megaraid/megaraid_sas.h 2008-07-31 13:41:56.000000000 -0400
@@ -18,9 +18,9 @@
/*
* MegaRAID SAS Driver meta data
*/
-#define MEGASAS_VERSION "00.00.03.20-rc1"
-#define MEGASAS_RELDATE "March 10, 2008"
-#define MEGASAS_EXT_VERSION "Mon. March 10 11:02:31 PDT 2008"
+#define MEGASAS_VERSION "00.00.04.01"
+#define MEGASAS_RELDATE "July 24, 2008"
+#define MEGASAS_EXT_VERSION "Thu July 24 11:41:51 PST 2008"

/*
* Device IDs