diff options
author | James Smart <james.smart@emulex.com> | 2010-06-07 15:24:29 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:33 -0400 |
commit | 98fc5dd952ecfd3abff7c06e7a55a5eab4dd95b7 (patch) | |
tree | 58c28d09e771d4f590bf161efc71b2cf7a25f95b /drivers/scsi/lpfc | |
parent | b92938b41ee84b83347b62baa6daa0d06a742e94 (diff) |
[SCSI] lpfc 8.3.13: Misc fixes
- Change the Max receive size on CIN FCFs to 0x800
- (From linux community) Check boundary before checking for NULL.
- Update last completion time for completed I/O to prevent heartbeat.
- Add Balius PCI Device IDs
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli4.h | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 2 |
5 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 8887fd831a2c..f5dbf2be3eab 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -1170,6 +1170,7 @@ typedef struct { | |||
1170 | #define PCI_DEVICE_ID_TIGERSHARK 0x0704 | 1170 | #define PCI_DEVICE_ID_TIGERSHARK 0x0704 |
1171 | #define PCI_DEVICE_ID_TOMCAT 0x0714 | 1171 | #define PCI_DEVICE_ID_TOMCAT 0x0714 |
1172 | #define PCI_DEVICE_ID_FALCON 0xf180 | 1172 | #define PCI_DEVICE_ID_FALCON 0xf180 |
1173 | #define PCI_DEVICE_ID_BALIUS 0xe131 | ||
1173 | 1174 | ||
1174 | #define JEDEC_ID_ADDRESS 0x0080001c | 1175 | #define JEDEC_ID_ADDRESS 0x0080001c |
1175 | #define FIREFLY_JEDEC_ID 0x1ACC | 1176 | #define FIREFLY_JEDEC_ID 0x1ACC |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 62585870f083..7dc55989b8ff 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1826,6 +1826,10 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
1826 | m = (typeof(m)){"LPSe12002-ML1-E", "PCIe", | 1826 | m = (typeof(m)){"LPSe12002-ML1-E", "PCIe", |
1827 | "EmulexSecure Fibre"}; | 1827 | "EmulexSecure Fibre"}; |
1828 | break; | 1828 | break; |
1829 | case PCI_DEVICE_ID_BALIUS: | ||
1830 | m = (typeof(m)){"LPVe12002", "PCIe Shared I/O", | ||
1831 | "Fibre Channel Adapter"}; | ||
1832 | break; | ||
1829 | default: | 1833 | default: |
1830 | m = (typeof(m)){"Unknown", "", ""}; | 1834 | m = (typeof(m)){"Unknown", "", ""}; |
1831 | break; | 1835 | break; |
@@ -8835,6 +8839,8 @@ static struct pci_device_id lpfc_id_table[] = { | |||
8835 | PCI_ANY_ID, PCI_ANY_ID, }, | 8839 | PCI_ANY_ID, PCI_ANY_ID, }, |
8836 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FALCON, | 8840 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FALCON, |
8837 | PCI_ANY_ID, PCI_ANY_ID, }, | 8841 | PCI_ANY_ID, PCI_ANY_ID, }, |
8842 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BALIUS, | ||
8843 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
8838 | { 0 } | 8844 | { 0 } |
8839 | }; | 8845 | }; |
8840 | 8846 | ||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 87ae175a0830..103a5aa4ae81 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -9194,6 +9194,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
9194 | { | 9194 | { |
9195 | struct lpfc_wcqe_release wcqe; | 9195 | struct lpfc_wcqe_release wcqe; |
9196 | bool workposted = false; | 9196 | bool workposted = false; |
9197 | unsigned long iflag; | ||
9197 | 9198 | ||
9198 | /* Copy the work queue CQE and convert endian order if needed */ | 9199 | /* Copy the work queue CQE and convert endian order if needed */ |
9199 | lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe)); | 9200 | lpfc_sli_pcimem_bcopy(cqe, &wcqe, sizeof(struct lpfc_cqe)); |
@@ -9202,6 +9203,9 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
9202 | switch (bf_get(lpfc_wcqe_c_code, &wcqe)) { | 9203 | switch (bf_get(lpfc_wcqe_c_code, &wcqe)) { |
9203 | case CQE_CODE_COMPL_WQE: | 9204 | case CQE_CODE_COMPL_WQE: |
9204 | /* Process the WQ complete event */ | 9205 | /* Process the WQ complete event */ |
9206 | spin_lock_irqsave(&phba->hbalock, iflag); | ||
9207 | phba->last_completion_time = jiffies; | ||
9208 | spin_unlock_irqrestore(&phba->hbalock, iflag); | ||
9205 | lpfc_sli4_fp_handle_fcp_wcqe(phba, | 9209 | lpfc_sli4_fp_handle_fcp_wcqe(phba, |
9206 | (struct lpfc_wcqe_complete *)&wcqe); | 9210 | (struct lpfc_wcqe_complete *)&wcqe); |
9207 | break; | 9211 | break; |
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index 58bb4c81b54e..1f8ec72c5dcb 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define LPFC_FCOE_FCF_MAP0 0x0E | 58 | #define LPFC_FCOE_FCF_MAP0 0x0E |
59 | #define LPFC_FCOE_FCF_MAP1 0xFC | 59 | #define LPFC_FCOE_FCF_MAP1 0xFC |
60 | #define LPFC_FCOE_FCF_MAP2 0x00 | 60 | #define LPFC_FCOE_FCF_MAP2 0x00 |
61 | #define LPFC_FCOE_MAX_RCV_SIZE 0x5AC | 61 | #define LPFC_FCOE_MAX_RCV_SIZE 0x800 |
62 | #define LPFC_FCOE_FKA_ADV_PER 0 | 62 | #define LPFC_FCOE_FKA_ADV_PER 0 |
63 | #define LPFC_FCOE_FIP_PRIORITY 0x80 | 63 | #define LPFC_FCOE_FIP_PRIORITY 0x80 |
64 | 64 | ||
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index ab91359bde20..1655507a682c 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -782,7 +782,7 @@ lpfc_destroy_vport_work_array(struct lpfc_hba *phba, struct lpfc_vport **vports) | |||
782 | int i; | 782 | int i; |
783 | if (vports == NULL) | 783 | if (vports == NULL) |
784 | return; | 784 | return; |
785 | for (i = 0; vports[i] != NULL && i <= phba->max_vports; i++) | 785 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) |
786 | scsi_host_put(lpfc_shost_from_vport(vports[i])); | 786 | scsi_host_put(lpfc_shost_from_vport(vports[i])); |
787 | kfree(vports); | 787 | kfree(vports); |
788 | } | 788 | } |