pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Subsystems (2)
PATCH v3 2/12 pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Quoted 1 line
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001
From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Updated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities.
--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210 ++++++++++++++++++++++--------------- drivers/scsi/pm8001/pm8001_init.c | 52 ++++++++- drivers/scsi/pm8001/pm8001_sas.h | 93 ++++++++++++++-- 5 files changed, 324 insertions(+), 119 deletions(-)
drivers/scsi/pm8001/pm8001_ctl.c +54 -15
@@ -1,5 +1,5 @@/* -* PMC-Sierra SPC 8001 SAS/SATA based host adapters driver +* PMC-Sierra 8001/8081/8088/8089 SAS/SATA based host adapters driver * * Copyright (c) 2008-2009 USI Co., Ltd. * All rights reserved.
@@ -58,8 +58,13 @@ static ssize_t pm8001_ctl_mpi_interface_rev_show(struct device *cdev,struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; -return snprintf (buf,PAGE_SIZE ,"%d\n" , - pm8001_ha->main_cfg_tbl.interface_rev); +if (pm8001_ha->chip_id == chip_8001) { +return snprintf (buf,PAGE_SIZE ,"%d\n" , + pm8001_ha->main_cfg_tbl.pm8001_tbl.interface_rev); + }else { +return snprintf (buf,PAGE_SIZE ,"%d\n" , + pm8001_ha->main_cfg_tbl.pm80xx_tbl.interface_rev); + } }static DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL);
@@ -78,11 +83,19 @@ static ssize_t pm8001_ctl_fw_version_show(struct device *cdev,struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; -return snprintf (buf,PAGE_SIZE ,"%02x.%02x.%02x.%02x\n" , - (u8)(pm8001_ha->main_cfg_tbl.firmware_rev >>24 ), - (u8)(pm8001_ha->main_cfg_tbl.firmware_rev >>16 ), - (u8)(pm8001_ha->main_cfg_tbl.firmware_rev >>8 ), - (u8)(pm8001_ha->main_cfg_tbl.firmware_rev)); +if (pm8001_ha->chip_id == chip_8001) { +return snprintf (buf,PAGE_SIZE ,"%02x.%02x.%02x.%02x\n" , + (u8)(pm8001_ha->main_cfg_tbl.pm8001_tbl.firmware_rev >>24 ), + (u8)(pm8001_ha->main_cfg_tbl.pm8001_tbl.firmware_rev >>16 ), + (u8)(pm8001_ha->main_cfg_tbl.pm8001_tbl.firmware_rev >>8 ), + (u8)(pm8001_ha->main_cfg_tbl.pm8001_tbl.firmware_rev)); + }else { +return snprintf (buf,PAGE_SIZE ,"%02x.%02x.%02x.%02x\n" , + (u8)(pm8001_ha->main_cfg_tbl.pm80xx_tbl.firmware_rev >>24 ), + (u8)(pm8001_ha->main_cfg_tbl.pm80xx_tbl.firmware_rev >>16 ), + (u8)(pm8001_ha->main_cfg_tbl.pm80xx_tbl.firmware_rev >>8 ), + (u8)(pm8001_ha->main_cfg_tbl.pm80xx_tbl.firmware_rev)); + } } static DEVICE_ATTR(fw_version, S_IRUGO, pm8001_ctl_fw_version_show, NULL);/**
@@ -99,8 +112,13 @@ static ssize_t pm8001_ctl_max_out_io_show(struct device *cdev,struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; -return snprintf (buf,PAGE_SIZE ,"%d\n" , - pm8001_ha->main_cfg_tbl.max_out_io); +if (pm8001_ha->chip_id == chip_8001) { +return snprintf (buf,PAGE_SIZE ,"%d\n" , + pm8001_ha->main_cfg_tbl.pm8001_tbl.max_out_io); + }else { +return snprintf (buf,PAGE_SIZE ,"%d\n" , + pm8001_ha->main_cfg_tbl.pm80xx_tbl.max_out_io); + } } static DEVICE_ATTR(max_out_io, S_IRUGO, pm8001_ctl_max_out_io_show, NULL);/**
@@ -117,8 +135,15 @@ static ssize_t pm8001_ctl_max_devices_show(struct device *cdev,struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; -return snprintf (buf,PAGE_SIZE ,"%04d\n" , - (u16)(pm8001_ha->main_cfg_tbl.max_sgl >>16 )); +if (pm8001_ha->chip_id == chip_8001) { +return snprintf (buf,PAGE_SIZE ,"%04d\n" , + (u16)(pm8001_ha->main_cfg_tbl.pm8001_tbl.max_sgl >>16 ) + ); + }else { +return snprintf (buf,PAGE_SIZE ,"%04d\n" , + (u16)(pm8001_ha->main_cfg_tbl.pm80xx_tbl.max_sgl >>16 ) + ); + } } static DEVICE_ATTR(max_devices, S_IRUGO, pm8001_ctl_max_devices_show, NULL);/**
@@ -136,8 +161,15 @@ static ssize_t pm8001_ctl_max_sg_list_show(struct device *cdev,struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; -return snprintf (buf,PAGE_SIZE ,"%04d\n" , - pm8001_ha->main_cfg_tbl.max_sgl &0x0000FFFF ); +if (pm8001_ha->chip_id == chip_8001) { +return snprintf (buf,PAGE_SIZE ,"%04d\n" , + pm8001_ha->main_cfg_tbl.pm8001_tbl.max_sgl &0x0000FFFF + ); + }else { +return snprintf (buf,PAGE_SIZE ,"%04d\n" , + pm8001_ha->main_cfg_tbl.pm80xx_tbl.max_sgl &0x0000FFFF + ); + } } static DEVICE_ATTR(max_sg_list, S_IRUGO, pm8001_ctl_max_sg_list_show, NULL);
@@ -173,7 +205,14 @@ static ssize_t pm8001_ctl_sas_spec_support_show(struct device *cdev,struct Scsi_Host *shost =class_to_shost (cdev);struct sas_ha_struct *sha =SHOST_TO_SAS_HA (shost);struct pm8001_hba_info *pm8001_ha = sha->lldd_ha; - mode = (pm8001_ha->main_cfg_tbl.ctrl_cap_flag &0xfe000000 )>>25 ; +/* fe000000 means supports SAS2.1 */ +if (pm8001_ha->chip_id == chip_8001) + mode = (pm8001_ha->main_cfg_tbl.pm8001_tbl.ctrl_cap_flag & +0xfe000000 )>>25 ; +else +/* fe000000 means supports SAS2.1 */ + mode = (pm8001_ha->main_cfg_tbl.pm80xx_tbl.ctrl_cap_flag & +0xfe000000 )>>25 ;return show_sas_spec_support_status (mode, buf); } static DEVICE_ATTR(sas_spec_support, S_IRUGO,
drivers/scsi/pm8001/pm8001_defs.h +15 -4
@@ -1,5 +1,5 @@/* -* PMC-Sierra SPC 8001 SAS/SATA based host adapters driver +* PMC-Sierra 8001/8081/8088/8089 SAS/SATA based host adapters driver * * Copyright (c) 2008-2009 USI Co., Ltd. * All rights reserved.
@@ -43,6 +43,10 @@enum chip_flavors { chip_8001, + chip_8008, + chip_8009, + chip_8018, + chip_8019 };#define USI_MAX_MEMCNT 9#define PM8001_MAX_DMA_SG SG_ALL
@@ -69,12 +73,19 @@ enum port_type {#define PM8001_MPI_QUEUE 1024/* maximum mpi queue entries */ #define PM8001_MAX_INB_NUM 1#define PM8001_MAX_OUTB_NUM 1 +#define PM8001_MAX_SPCV_INB_NUM 1 +#define PM8001_MAX_SPCV_OUTB_NUM 4#define PM8001_CAN_QUEUE 508/* SCSI Queue depth */ +/* Inbound/Outbound queue size */ +#define IOMB_SIZE_SPC 64 +#define IOMB_SIZE_SPCV 128 +/* unchangeable hardware details */ -#define PM8001_MAX_PHYS 8/* max. possible phys */ -#define PM8001_MAX_PORTS 8/* max. possible ports */ -#define PM8001_MAX_DEVICES 1024/* max supported device */ +#define PM8001_MAX_PHYS 16/* max. possible phys */ +#define PM8001_MAX_PORTS 16/* max. possible ports */ +#define PM8001_MAX_DEVICES 2048/* max supported device */ +#define PM8001_MAX_MSIX_VEC 64/* max msi-x int for spcv/ve */ enum memory_region_num {AAP1 =0x0 ,/* application acceleration processor */
drivers/scsi/pm8001/pm8001_hwi.c +128 -84
278 lines not on this page · raw message
drivers/scsi/pm8001/pm8001_init.c +46 -6
80 lines not on this page · raw message
drivers/scsi/pm8001/pm8001_sas.h +82 -11
145 lines not on this page · raw message
Signature · 1 line
1.7.1
Quoted 1 line
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001
From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Updated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities.
--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210 ++++++++++++++++++++++--------------- drivers/scsi/pm8001/pm8001_init.c | 52 ++++++++- drivers/scsi/pm8001/pm8001_sas.h | 93 ++++++++++++++-- 5 files changed, 324 insertions(+), 119 deletions(-)
drivers/scsi/pm8001/pm8001_ctl.c +54 -15
109 lines not on this page · raw message
drivers/scsi/pm8001/pm8001_defs.h +15 -4
@@ -1,5 +1,5 @@/* -* PMC-Sierra SPC 8001 SAS/SATA based host adapters driver +* PMC-Sierra 8001/8081/8088/8089 SAS/SATA based host adapters driver * * Copyright (c) 2008-2009 USI Co., Ltd. * All rights reserved.
@@ -43,6 +43,10 @@enum chip_flavors { chip_8001, + chip_8008, + chip_8009, + chip_8018, + chip_8019 };#define USI_MAX_MEMCNT 9#define PM8001_MAX_DMA_SG SG_ALL
@@ -69,12 +73,19 @@ enum port_type {#define PM8001_MPI_QUEUE 1024/* maximum mpi queue entries */ #define PM8001_MAX_INB_NUM 1#define PM8001_MAX_OUTB_NUM 1 +#define PM8001_MAX_SPCV_INB_NUM 1 +#define PM8001_MAX_SPCV_OUTB_NUM 4#define PM8001_CAN_QUEUE 508/* SCSI Queue depth */ +/* Inbound/Outbound queue size */ +#define IOMB_SIZE_SPC 64 +#define IOMB_SIZE_SPCV 128 +/* unchangeable hardware details */ -#define PM8001_MAX_PHYS 8/* max. possible phys */ -#define PM8001_MAX_PORTS 8/* max. possible ports */ -#define PM8001_MAX_DEVICES 1024/* max supported device */ +#define PM8001_MAX_PHYS 16/* max. possible phys */ +#define PM8001_MAX_PORTS 16/* max. possible ports */ +#define PM8001_MAX_DEVICES 2048/* max supported device */ +#define PM8001_MAX_MSIX_VEC 64/* max msi-x int for spcv/ve */ enum memory_region_num {AAP1 =0x0 ,/* application acceleration processor */
drivers/scsi/pm8001/pm8001_hwi.c +128 -84
278 lines not on this page · raw message
drivers/scsi/pm8001/pm8001_init.c +46 -6
80 lines not on this page · raw message
drivers/scsi/pm8001/pm8001_sas.h +82 -11
145 lines not on this page · raw message
Signature · 1 line
1.7.1
James Bottomley
maintainerQuoted 10 lines · Anand
Quoted 1 line
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCUpdated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities.
Quoted 7 lines
Signed-off-by Sakthivel K <[email protected]>Signed-off-by Anand Kumar S <[email protected]>--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210 ++++++++++++++++++++++---------------
neither git nor diffstat on the patch agrees with this ... they both think 212 lines changed. Please fix the diff tool you're using.
Thanks,
James
Hi James,
Did you take the patch attachment from the email? Pls let us know as to which version of diff tool you are using.
I used the patch command to apply this patch against 3.8-rc6 tree to check whether the patch is applying properly.
Regards
Anand
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, April 11, 2013 12:51 AM
To: Anand Kumar Santhanam
Cc: [email protected]; Harry Yang; Rich Bono; [email protected]; Sangeetha Gnanasekaran; [email protected]; Vishwanath Maram
Subject: Re: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Quoted 9 lines · Anand
Quoted 2 lines
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCUpdated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related
macros.
Quoted 2 lines
Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware
functionalities.
Quoted 9 lines
Signed-off-by Sakthivel K <[email protected]>Signed-off-by Anand Kumar S <[email protected]>--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210++++++++++++++++++++++---------------
neither git nor diffstat on the patch agrees with this ... they both think 212 lines changed. Please fix the diff tool you're using.
Thanks,
James
James Bottomley
maintainerQuoted 6 lines · Anand Kumar Santhanam
Hi James,
Did you take the patch attachment from the email? Pls let us know as to which version of diff tool you are using.
I used the patch command to apply this patch against 3.8-rc6 tree to check whether the patch is applying properly.
The problem I quoted in the email below was in what you sent to the list. If there were multiple versions in the email, then please just resend a clean series to the list that can be applied.
Thanks,
James
Quoted 46 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, April 11, 2013 12:51 AM
To: Anand Kumar Santhanam
Cc: [email protected]; Harry Yang; Rich Bono; [email protected]; Sangeetha Gnanasekaran; [email protected]; Vishwanath Maram
Subject: Re: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCQuoted 9 lines · Anand
Quoted 2 lines
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCUpdated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related
macros.
Quoted 2 lines
Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware
functionalities.
Quoted 9 lines
Signed-off-by Sakthivel K <[email protected]>Signed-off-by Anand Kumar S <[email protected]>--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210++++++++++++++++++++++---------------
neither git nor diffstat on the patch agrees with this ... they both think 212 lines changed. Please fix the diff tool you're using.
Thanks,
James
--
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
Hi James,
I will double check the same. Also can you pls provide the tool which you are using to apply the patch and also the kernel version? I will ensure that we locally apply the patches before sending to the list.
Regards
Anand
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Friday, April 12, 2013 2:44 AM
To: Anand Kumar Santhanam
Cc: [email protected]; Harry Yang; Rich Bono; [email protected]; Sangeetha Gnanasekaran; [email protected]; Vishwanath Maram
Subject: Re: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Quoted 6 lines · Anand Kumar Santhanam
Hi James,
Did you take the patch attachment from the email? Pls let us know as to which version of diff tool you are using.
I used the patch command to apply this patch against 3.8-rc6 tree to check whether the patch is applying properly.
The problem I quoted in the email below was in what you sent to the list. If there were multiple versions in the email, then please just resend a clean series to the list that can be applied.
Thanks,
James
Quoted 46 lines
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Thursday, April 11, 2013 12:51 AM
To: Anand Kumar Santhanam
Cc: [email protected]; Harry Yang; Rich Bono; [email protected]; Sangeetha Gnanasekaran; [email protected]; Vishwanath Maram
Subject: Re: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCQuoted 9 lines · Anand
Quoted 2 lines
From
ef678e2188866af926f2a089719c24ec99e4e88cMon Sep 17 00:00:00 2001From: Sakthivel K <[email protected]>
Date: Wed, 27 Feb 2013 20:22:50 +0530
Subject: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCUpdated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related
macros.
Quoted 2 lines
Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware
functionalities.
Quoted 9 lines
Signed-off-by Sakthivel K <[email protected]>Signed-off-by Anand Kumar S <[email protected]>--- drivers/scsi/pm8001/pm8001_ctl.c | 69 ++++++++++--- drivers/scsi/pm8001/pm8001_defs.h | 19 +++- drivers/scsi/pm8001/pm8001_hwi.c | 210++++++++++++++++++++++---------------
neither git nor diffstat on the patch agrees with this ... they both think 212 lines changed. Please fix the diff tool you're using.
Thanks,
James
--
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
James Bottomley
maintainerQuoted 4 lines · Anand Kumar Santhanam
Hi James,
I will double check the same. Also can you pls provide the tool which you are using to apply the patch and also the kernel version?
It's git and the tip of the SCSI misc branch
Quoted 2 lines
I will ensure that we locally apply the patches before sending to the list.
Thanks,
James
Hi James,
I have resubmitted the patchset v4 after fixing the patch format problems.
Pls apply from patch 1 of the series onwards.
Regards
Anand
-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Friday, April 12, 2013 8:37 AM
To: Anand Kumar Santhanam
Cc: [email protected]; Harry Yang; Rich Bono; [email protected]; Sangeetha Gnanasekaran; [email protected]; Vishwanath Maram
Subject: Re: [PATCH V3 02/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Quoted 4 lines · Anand Kumar Santhanam
Hi James,
I will double check the same. Also can you pls provide the tool which you are using to apply the patch and also the kernel version?
It's git and the tip of the SCSI misc branch
Quoted 2 lines
I will ensure that we locally apply the patches before sending to the list.
Thanks,
James