diff options
author | James Smart <james.smart@emulex.com> | 2010-11-20 23:11:37 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:23:59 -0500 |
commit | 085c647c3377c3e39c8c572278507b1e1c7e7bf7 (patch) | |
tree | b2b79117bace491f764a77a06e0f0fe093d823f6 /drivers/scsi/lpfc | |
parent | 63e801ce685d151c5faca8f491adc2ad2e732259 (diff) |
[SCSI] lpfc 8.3.19: Add latest SLI4 Hardware initialization support
- Add the Lancer FC and FCoE PCI IDs
- Add new SLI4 INTF register definitions
- Implement new SLI4 doorbell register
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 | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 128 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 48 |
3 files changed, 149 insertions, 33 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 9b8333456465..1044c438bb95 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -1172,7 +1172,10 @@ typedef struct { | |||
1172 | #define PCI_VENDOR_ID_EMULEX 0x10df | 1172 | #define PCI_VENDOR_ID_EMULEX 0x10df |
1173 | #define PCI_DEVICE_ID_FIREFLY 0x1ae5 | 1173 | #define PCI_DEVICE_ID_FIREFLY 0x1ae5 |
1174 | #define PCI_DEVICE_ID_PROTEUS_VF 0xe100 | 1174 | #define PCI_DEVICE_ID_PROTEUS_VF 0xe100 |
1175 | #define PCI_DEVICE_ID_BALIUS 0xe131 | ||
1175 | #define PCI_DEVICE_ID_PROTEUS_PF 0xe180 | 1176 | #define PCI_DEVICE_ID_PROTEUS_PF 0xe180 |
1177 | #define PCI_DEVICE_ID_LANCER_FC 0xe200 | ||
1178 | #define PCI_DEVICE_ID_LANCER_FCOE 0xe260 | ||
1176 | #define PCI_DEVICE_ID_SAT_SMB 0xf011 | 1179 | #define PCI_DEVICE_ID_SAT_SMB 0xf011 |
1177 | #define PCI_DEVICE_ID_SAT_MID 0xf015 | 1180 | #define PCI_DEVICE_ID_SAT_MID 0xf015 |
1178 | #define PCI_DEVICE_ID_RFLY 0xf095 | 1181 | #define PCI_DEVICE_ID_RFLY 0xf095 |
@@ -1189,6 +1192,7 @@ typedef struct { | |||
1189 | #define PCI_DEVICE_ID_SAT 0xf100 | 1192 | #define PCI_DEVICE_ID_SAT 0xf100 |
1190 | #define PCI_DEVICE_ID_SAT_SCSP 0xf111 | 1193 | #define PCI_DEVICE_ID_SAT_SCSP 0xf111 |
1191 | #define PCI_DEVICE_ID_SAT_DCSP 0xf112 | 1194 | #define PCI_DEVICE_ID_SAT_DCSP 0xf112 |
1195 | #define PCI_DEVICE_ID_FALCON 0xf180 | ||
1192 | #define PCI_DEVICE_ID_SUPERFLY 0xf700 | 1196 | #define PCI_DEVICE_ID_SUPERFLY 0xf700 |
1193 | #define PCI_DEVICE_ID_DRAGONFLY 0xf800 | 1197 | #define PCI_DEVICE_ID_DRAGONFLY 0xf800 |
1194 | #define PCI_DEVICE_ID_CENTAUR 0xf900 | 1198 | #define PCI_DEVICE_ID_CENTAUR 0xf900 |
@@ -1210,8 +1214,6 @@ typedef struct { | |||
1210 | #define PCI_VENDOR_ID_SERVERENGINE 0x19a2 | 1214 | #define PCI_VENDOR_ID_SERVERENGINE 0x19a2 |
1211 | #define PCI_DEVICE_ID_TIGERSHARK 0x0704 | 1215 | #define PCI_DEVICE_ID_TIGERSHARK 0x0704 |
1212 | #define PCI_DEVICE_ID_TOMCAT 0x0714 | 1216 | #define PCI_DEVICE_ID_TOMCAT 0x0714 |
1213 | #define PCI_DEVICE_ID_FALCON 0xf180 | ||
1214 | #define PCI_DEVICE_ID_BALIUS 0xe131 | ||
1215 | 1217 | ||
1216 | #define JEDEC_ID_ADDRESS 0x0080001c | 1218 | #define JEDEC_ID_ADDRESS 0x0080001c |
1217 | #define FIREFLY_JEDEC_ID 0x1ACC | 1219 | #define FIREFLY_JEDEC_ID 0x1ACC |
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 6e4bc34e1d0d..7fbc58713f19 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -64,29 +64,39 @@ struct lpfc_sli_intf { | |||
64 | #define lpfc_sli_intf_valid_MASK 0x00000007 | 64 | #define lpfc_sli_intf_valid_MASK 0x00000007 |
65 | #define lpfc_sli_intf_valid_WORD word0 | 65 | #define lpfc_sli_intf_valid_WORD word0 |
66 | #define LPFC_SLI_INTF_VALID 6 | 66 | #define LPFC_SLI_INTF_VALID 6 |
67 | #define lpfc_sli_intf_featurelevel2_SHIFT 24 | 67 | #define lpfc_sli_intf_sli_hint2_SHIFT 24 |
68 | #define lpfc_sli_intf_featurelevel2_MASK 0x0000001F | 68 | #define lpfc_sli_intf_sli_hint2_MASK 0x0000001F |
69 | #define lpfc_sli_intf_featurelevel2_WORD word0 | 69 | #define lpfc_sli_intf_sli_hint2_WORD word0 |
70 | #define lpfc_sli_intf_featurelevel1_SHIFT 16 | 70 | #define LPFC_SLI_INTF_SLI_HINT2_NONE 0 |
71 | #define lpfc_sli_intf_featurelevel1_MASK 0x000000FF | 71 | #define lpfc_sli_intf_sli_hint1_SHIFT 16 |
72 | #define lpfc_sli_intf_featurelevel1_WORD word0 | 72 | #define lpfc_sli_intf_sli_hint1_MASK 0x000000FF |
73 | #define LPFC_SLI_INTF_FEATURELEVEL1_1 1 | 73 | #define lpfc_sli_intf_sli_hint1_WORD word0 |
74 | #define LPFC_SLI_INTF_FEATURELEVEL1_2 2 | 74 | #define LPFC_SLI_INTF_SLI_HINT1_NONE 0 |
75 | #define LPFC_SLI_INTF_SLI_HINT1_1 1 | ||
76 | #define LPFC_SLI_INTF_SLI_HINT1_2 2 | ||
77 | #define lpfc_sli_intf_if_type_SHIFT 12 | ||
78 | #define lpfc_sli_intf_if_type_MASK 0x0000000F | ||
79 | #define lpfc_sli_intf_if_type_WORD word0 | ||
80 | #define LPFC_SLI_INTF_IF_TYPE_0 0 | ||
81 | #define LPFC_SLI_INTF_IF_TYPE_1 1 | ||
82 | #define LPFC_SLI_INTF_IF_TYPE_2 2 | ||
75 | #define lpfc_sli_intf_sli_family_SHIFT 8 | 83 | #define lpfc_sli_intf_sli_family_SHIFT 8 |
76 | #define lpfc_sli_intf_sli_family_MASK 0x000000FF | 84 | #define lpfc_sli_intf_sli_family_MASK 0x0000000F |
77 | #define lpfc_sli_intf_sli_family_WORD word0 | 85 | #define lpfc_sli_intf_sli_family_WORD word0 |
78 | #define LPFC_SLI_INTF_FAMILY_BE2 0 | 86 | #define LPFC_SLI_INTF_FAMILY_BE2 0x0 |
79 | #define LPFC_SLI_INTF_FAMILY_BE3 1 | 87 | #define LPFC_SLI_INTF_FAMILY_BE3 0x1 |
88 | #define LPFC_SLI_INTF_FAMILY_LNCR_A0 0xa | ||
89 | #define LPFC_SLI_INTF_FAMILY_LNCR_B0 0xb | ||
80 | #define lpfc_sli_intf_slirev_SHIFT 4 | 90 | #define lpfc_sli_intf_slirev_SHIFT 4 |
81 | #define lpfc_sli_intf_slirev_MASK 0x0000000F | 91 | #define lpfc_sli_intf_slirev_MASK 0x0000000F |
82 | #define lpfc_sli_intf_slirev_WORD word0 | 92 | #define lpfc_sli_intf_slirev_WORD word0 |
83 | #define LPFC_SLI_INTF_REV_SLI3 3 | 93 | #define LPFC_SLI_INTF_REV_SLI3 3 |
84 | #define LPFC_SLI_INTF_REV_SLI4 4 | 94 | #define LPFC_SLI_INTF_REV_SLI4 4 |
85 | #define lpfc_sli_intf_if_type_SHIFT 0 | 95 | #define lpfc_sli_intf_func_type_SHIFT 0 |
86 | #define lpfc_sli_intf_if_type_MASK 0x00000007 | 96 | #define lpfc_sli_intf_func_type_MASK 0x00000001 |
87 | #define lpfc_sli_intf_if_type_WORD word0 | 97 | #define lpfc_sli_intf_func_type_WORD word0 |
88 | #define LPFC_SLI_INTF_IF_TYPE_0 0 | 98 | #define LPFC_SLI_INTF_IF_TYPE_PHYS 0 |
89 | #define LPFC_SLI_INTF_IF_TYPE_1 1 | 99 | #define LPFC_SLI_INTF_IF_TYPE_VIRT 1 |
90 | }; | 100 | }; |
91 | 101 | ||
92 | #define LPFC_SLI4_MBX_EMBED true | 102 | #define LPFC_SLI4_MBX_EMBED true |
@@ -450,13 +460,15 @@ struct lpfc_register { | |||
450 | uint32_t word0; | 460 | uint32_t word0; |
451 | }; | 461 | }; |
452 | 462 | ||
463 | /* The SLI4 INTF register offset is common to all if_type values. */ | ||
464 | #define LPFC_SLI_INTF 0x0058 | ||
465 | |||
466 | /* The following BAR0 Registers apply to SLI4 if_type 0 UCNAs. */ | ||
453 | #define LPFC_UERR_STATUS_HI 0x00A4 | 467 | #define LPFC_UERR_STATUS_HI 0x00A4 |
454 | #define LPFC_UERR_STATUS_LO 0x00A0 | 468 | #define LPFC_UERR_STATUS_LO 0x00A0 |
455 | #define LPFC_UE_MASK_HI 0x00AC | 469 | #define LPFC_UE_MASK_HI 0x00AC |
456 | #define LPFC_UE_MASK_LO 0x00A8 | 470 | #define LPFC_UE_MASK_LO 0x00A8 |
457 | #define LPFC_SLI_INTF 0x0058 | ||
458 | 471 | ||
459 | /* BAR0 Registers */ | ||
460 | #define LPFC_HST_STATE 0x00AC | 472 | #define LPFC_HST_STATE 0x00AC |
461 | #define lpfc_hst_state_perr_SHIFT 31 | 473 | #define lpfc_hst_state_perr_SHIFT 31 |
462 | #define lpfc_hst_state_perr_MASK 0x1 | 474 | #define lpfc_hst_state_perr_MASK 0x1 |
@@ -480,6 +492,10 @@ struct lpfc_register { | |||
480 | #define lpfc_hst_state_port_status_MASK 0xFFFF | 492 | #define lpfc_hst_state_port_status_MASK 0xFFFF |
481 | #define lpfc_hst_state_port_status_WORD word0 | 493 | #define lpfc_hst_state_port_status_WORD word0 |
482 | 494 | ||
495 | /* | ||
496 | * The following Port Status Values apply to SLI4, if_type 0 and 2 | ||
497 | * UCNAs. | ||
498 | */ | ||
483 | #define LPFC_POST_STAGE_POWER_ON_RESET 0x0000 | 499 | #define LPFC_POST_STAGE_POWER_ON_RESET 0x0000 |
484 | #define LPFC_POST_STAGE_AWAITING_HOST_RDY 0x0001 | 500 | #define LPFC_POST_STAGE_AWAITING_HOST_RDY 0x0001 |
485 | #define LPFC_POST_STAGE_HOST_RDY 0x0002 | 501 | #define LPFC_POST_STAGE_HOST_RDY 0x0002 |
@@ -514,6 +530,64 @@ struct lpfc_register { | |||
514 | #define LPFC_POST_STAGE_ARMFW_READY 0xC000 | 530 | #define LPFC_POST_STAGE_ARMFW_READY 0xC000 |
515 | #define LPFC_POST_STAGE_ARMFW_UE 0xF000 | 531 | #define LPFC_POST_STAGE_ARMFW_UE 0xF000 |
516 | 532 | ||
533 | |||
534 | /* The following BAR0 register sets are defined for if_type 2 UCNAs. */ | ||
535 | #define LPFC_SLIPORT_SEMAPHORE 0x0400 | ||
536 | #define lpfc_sliport_smphr_perr_SHIFT 31 | ||
537 | #define lpfc_sliport_smphr_perr_MASK 0x1 | ||
538 | #define lpfc_sliport_smphr_perr_WORD word0 | ||
539 | #define lpfc_sliport_smphr_sfi_SHIFT 30 | ||
540 | #define lpfc_sliport_smphr_sfi_MASK 0x1 | ||
541 | #define lpfc_sliport_smphr_sfi_WORD word0 | ||
542 | #define lpfc_sliport_smphr_nip_SHIFT 29 | ||
543 | #define lpfc_sliport_smphr_nip_MASK 0x1 | ||
544 | #define lpfc_sliport_smphr_nip_WORD word0 | ||
545 | #define lpfc_sliport_smphr_ipc_SHIFT 28 | ||
546 | #define lpfc_sliport_smphr_ipc_MASK 0x1 | ||
547 | #define lpfc_sliport_smphr_ipc_WORD word0 | ||
548 | #define lpfc_sliport_smphr_scr1_SHIFT 27 | ||
549 | #define lpfc_sliport_smphr_scr1_MASK 0x1 | ||
550 | #define lpfc_sliport_smphr_scr1_WORD word0 | ||
551 | #define lpfc_sliport_smphr_scr2_SHIFT 26 | ||
552 | #define lpfc_sliport_smphr_scr2_MASK 0x1 | ||
553 | #define lpfc_sliport_smphr_scr2_WORD word0 | ||
554 | #define lpfc_sliport_smphr_host_scratch_SHIFT 16 | ||
555 | #define lpfc_sliport_smphr_host_scratch_MASK 0xFF | ||
556 | #define lpfc_sliport_smphr_host_scratch_WORD word0 | ||
557 | #define lpfc_sliport_smphr_port_status_SHIFT 0 | ||
558 | #define lpfc_sliport_smphr_port_status_MASK 0xFFFF | ||
559 | #define lpfc_sliport_smphr_port_status_WORD word0 | ||
560 | |||
561 | #define LPFC_SLIPORT_STATUS 0x0404 | ||
562 | #define lpfc_sliport_status_err_SHIFT 31 | ||
563 | #define lpfc_sliport_status_err_MASK 0x1 | ||
564 | #define lpfc_sliport_status_err_WORD word0 | ||
565 | #define lpfc_sliport_status_end_SHIFT 30 | ||
566 | #define lpfc_sliport_status_end_MASK 0x1 | ||
567 | #define lpfc_sliport_status_end_WORD word0 | ||
568 | #define lpfc_sliport_status_oti_SHIFT 29 | ||
569 | #define lpfc_sliport_status_oti_MASK 0x1 | ||
570 | #define lpfc_sliport_status_oti_WORD word0 | ||
571 | #define lpfc_sliport_status_rn_SHIFT 24 | ||
572 | #define lpfc_sliport_status_rn_MASK 0x1 | ||
573 | #define lpfc_sliport_status_rn_WORD word0 | ||
574 | #define lpfc_sliport_status_rdy_SHIFT 23 | ||
575 | #define lpfc_sliport_status_rdy_MASK 0x1 | ||
576 | #define lpfc_sliport_status_rdy_WORD word0 | ||
577 | |||
578 | #define LPFC_SLIPORT_CONTROL 0x0408 | ||
579 | #define lpfc_sliport_ctrl_end_SHIFT 30 | ||
580 | #define lpfc_sliport_ctrl_end_MASK 0x1 | ||
581 | #define lpfc_sliport_ctrl_end_WORD word0 | ||
582 | #define LPFC_SLIPORT_LITTLE_ENDIAN 0 | ||
583 | #define LPFC_SLIPORT_BIG_ENDIAN 1 | ||
584 | #define lpfc_sliport_ctrl_ip_SHIFT 27 | ||
585 | #define lpfc_sliport_ctrl_ip_MASK 0x1 | ||
586 | #define lpfc_sliport_ctrl_ip_WORD word0 | ||
587 | |||
588 | #define LPFC_SLIPORT_ERROR_1 0x040C | ||
589 | #define LPFC_SLIPORT_ERROR_2 0x0410 | ||
590 | |||
517 | /* BAR1 Registers */ | 591 | /* BAR1 Registers */ |
518 | #define LPFC_IMR_MASK_ALL 0xFFFFFFFF | 592 | #define LPFC_IMR_MASK_ALL 0xFFFFFFFF |
519 | #define LPFC_ISCR_CLEAR_ALL 0xFFFFFFFF | 593 | #define LPFC_ISCR_CLEAR_ALL 0xFFFFFFFF |
@@ -569,14 +643,21 @@ struct lpfc_register { | |||
569 | #define LPFC_SLI4_INTR30 BIT30 | 643 | #define LPFC_SLI4_INTR30 BIT30 |
570 | #define LPFC_SLI4_INTR31 BIT31 | 644 | #define LPFC_SLI4_INTR31 BIT31 |
571 | 645 | ||
572 | /* BAR2 Registers */ | 646 | /* |
647 | * The Doorbell registers defined here exist in different BAR | ||
648 | * register sets depending on the UCNA Port's reported if_type | ||
649 | * value. For UCNA ports running SLI4 and if_type 0, they reside in | ||
650 | * BAR2. For UCNA ports running SLI4 and if_type 2, they reside in | ||
651 | * BAR0. The offsets are the same so the driver must account for | ||
652 | * any base address difference. | ||
653 | */ | ||
573 | #define LPFC_RQ_DOORBELL 0x00A0 | 654 | #define LPFC_RQ_DOORBELL 0x00A0 |
574 | #define lpfc_rq_doorbell_num_posted_SHIFT 16 | 655 | #define lpfc_rq_doorbell_num_posted_SHIFT 16 |
575 | #define lpfc_rq_doorbell_num_posted_MASK 0x3FFF | 656 | #define lpfc_rq_doorbell_num_posted_MASK 0x3FFF |
576 | #define lpfc_rq_doorbell_num_posted_WORD word0 | 657 | #define lpfc_rq_doorbell_num_posted_WORD word0 |
577 | #define LPFC_RQ_POST_BATCH 8 /* RQEs to post at one time */ | 658 | #define LPFC_RQ_POST_BATCH 8 /* RQEs to post at one time */ |
578 | #define lpfc_rq_doorbell_id_SHIFT 0 | 659 | #define lpfc_rq_doorbell_id_SHIFT 0 |
579 | #define lpfc_rq_doorbell_id_MASK 0x03FF | 660 | #define lpfc_rq_doorbell_id_MASK 0xFFFF |
580 | #define lpfc_rq_doorbell_id_WORD word0 | 661 | #define lpfc_rq_doorbell_id_WORD word0 |
581 | 662 | ||
582 | #define LPFC_WQ_DOORBELL 0x0040 | 663 | #define LPFC_WQ_DOORBELL 0x0040 |
@@ -591,6 +672,11 @@ struct lpfc_register { | |||
591 | #define lpfc_wq_doorbell_id_WORD word0 | 672 | #define lpfc_wq_doorbell_id_WORD word0 |
592 | 673 | ||
593 | #define LPFC_EQCQ_DOORBELL 0x0120 | 674 | #define LPFC_EQCQ_DOORBELL 0x0120 |
675 | #define lpfc_eqcq_doorbell_se_SHIFT 31 | ||
676 | #define lpfc_eqcq_doorbell_se_MASK 0x0001 | ||
677 | #define lpfc_eqcq_doorbell_se_WORD word0 | ||
678 | #define LPFC_EQCQ_SOLICIT_ENABLE_OFF 0 | ||
679 | #define LPFC_EQCQ_SOLICIT_ENABLE_ON 1 | ||
594 | #define lpfc_eqcq_doorbell_arm_SHIFT 29 | 680 | #define lpfc_eqcq_doorbell_arm_SHIFT 29 |
595 | #define lpfc_eqcq_doorbell_arm_MASK 0x0001 | 681 | #define lpfc_eqcq_doorbell_arm_MASK 0x0001 |
596 | #define lpfc_eqcq_doorbell_arm_WORD word0 | 682 | #define lpfc_eqcq_doorbell_arm_WORD word0 |
@@ -628,7 +714,7 @@ struct lpfc_register { | |||
628 | #define lpfc_mq_doorbell_num_posted_MASK 0x3FFF | 714 | #define lpfc_mq_doorbell_num_posted_MASK 0x3FFF |
629 | #define lpfc_mq_doorbell_num_posted_WORD word0 | 715 | #define lpfc_mq_doorbell_num_posted_WORD word0 |
630 | #define lpfc_mq_doorbell_id_SHIFT 0 | 716 | #define lpfc_mq_doorbell_id_SHIFT 0 |
631 | #define lpfc_mq_doorbell_id_MASK 0x03FF | 717 | #define lpfc_mq_doorbell_id_MASK 0xFFFF |
632 | #define lpfc_mq_doorbell_id_WORD word0 | 718 | #define lpfc_mq_doorbell_id_WORD word0 |
633 | 719 | ||
634 | struct lpfc_sli4_cfg_mhdr { | 720 | struct lpfc_sli4_cfg_mhdr { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index ec8e8e819236..912b5959f068 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1853,6 +1853,14 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
1853 | m = (typeof(m)){"LPVe12002", "PCIe Shared I/O", | 1853 | m = (typeof(m)){"LPVe12002", "PCIe Shared I/O", |
1854 | "Fibre Channel Adapter"}; | 1854 | "Fibre Channel Adapter"}; |
1855 | break; | 1855 | break; |
1856 | case PCI_DEVICE_ID_LANCER_FC: | ||
1857 | oneConnect = 1; | ||
1858 | m = (typeof(m)){"Undefined", "PCIe", "Fibre Channel Adapter"}; | ||
1859 | break; | ||
1860 | case PCI_DEVICE_ID_LANCER_FCOE: | ||
1861 | oneConnect = 1; | ||
1862 | m = (typeof(m)){"Undefined", "PCIe", "FCoE"}; | ||
1863 | break; | ||
1856 | default: | 1864 | default: |
1857 | m = (typeof(m)){"Unknown", "", ""}; | 1865 | m = (typeof(m)){"Unknown", "", ""}; |
1858 | break; | 1866 | break; |
@@ -3950,7 +3958,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) | |||
3950 | int rc, i, hbq_count, buf_size, dma_buf_size, max_buf_size; | 3958 | int rc, i, hbq_count, buf_size, dma_buf_size, max_buf_size; |
3951 | uint8_t pn_page[LPFC_MAX_SUPPORTED_PAGES] = {0}; | 3959 | uint8_t pn_page[LPFC_MAX_SUPPORTED_PAGES] = {0}; |
3952 | struct lpfc_mqe *mqe; | 3960 | struct lpfc_mqe *mqe; |
3953 | int longs; | 3961 | int longs, sli_family; |
3954 | 3962 | ||
3955 | /* Before proceed, wait for POST done and device ready */ | 3963 | /* Before proceed, wait for POST done and device ready */ |
3956 | rc = lpfc_sli4_post_status_check(phba); | 3964 | rc = lpfc_sli4_post_status_check(phba); |
@@ -4012,12 +4020,22 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) | |||
4012 | */ | 4020 | */ |
4013 | buf_size = (sizeof(struct fcp_cmnd) + sizeof(struct fcp_rsp) + | 4021 | buf_size = (sizeof(struct fcp_cmnd) + sizeof(struct fcp_rsp) + |
4014 | ((phba->cfg_sg_seg_cnt + 2) * sizeof(struct sli4_sge))); | 4022 | ((phba->cfg_sg_seg_cnt + 2) * sizeof(struct sli4_sge))); |
4015 | /* Feature Level 1 hardware is limited to 2 pages */ | 4023 | |
4016 | if ((bf_get(lpfc_sli_intf_featurelevel1, &phba->sli4_hba.sli_intf) == | 4024 | sli_family = bf_get(lpfc_sli_intf_sli_family, &phba->sli4_hba.sli_intf); |
4017 | LPFC_SLI_INTF_FEATURELEVEL1_1)) | 4025 | max_buf_size = LPFC_SLI4_MAX_BUF_SIZE; |
4018 | max_buf_size = LPFC_SLI4_FL1_MAX_BUF_SIZE; | 4026 | switch (sli_family) { |
4019 | else | 4027 | case LPFC_SLI_INTF_FAMILY_BE2: |
4020 | max_buf_size = LPFC_SLI4_MAX_BUF_SIZE; | 4028 | case LPFC_SLI_INTF_FAMILY_BE3: |
4029 | /* There is a single hint for BE - 2 pages per BPL. */ | ||
4030 | if (bf_get(lpfc_sli_intf_sli_hint1, &phba->sli4_hba.sli_intf) == | ||
4031 | LPFC_SLI_INTF_SLI_HINT1_1) | ||
4032 | max_buf_size = LPFC_SLI4_FL1_MAX_BUF_SIZE; | ||
4033 | break; | ||
4034 | case LPFC_SLI_INTF_FAMILY_LNCR_A0: | ||
4035 | case LPFC_SLI_INTF_FAMILY_LNCR_B0: | ||
4036 | default: | ||
4037 | break; | ||
4038 | } | ||
4021 | for (dma_buf_size = LPFC_SLI4_MIN_BUF_SIZE; | 4039 | for (dma_buf_size = LPFC_SLI4_MIN_BUF_SIZE; |
4022 | dma_buf_size < max_buf_size && buf_size > dma_buf_size; | 4040 | dma_buf_size < max_buf_size && buf_size > dma_buf_size; |
4023 | dma_buf_size = dma_buf_size << 1) | 4041 | dma_buf_size = dma_buf_size << 1) |
@@ -5233,16 +5251,22 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba) | |||
5233 | &phba->sli4_hba.sli_intf) == LPFC_SLI_INTF_VALID) { | 5251 | &phba->sli4_hba.sli_intf) == LPFC_SLI_INTF_VALID) { |
5234 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 5252 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
5235 | "2534 Device Info: ChipType=0x%x, SliRev=0x%x, " | 5253 | "2534 Device Info: ChipType=0x%x, SliRev=0x%x, " |
5236 | "FeatureL1=0x%x, FeatureL2=0x%x\n", | 5254 | "IFType=0x%x, SLIHint_1=0x%x, SLIHint_2=0x%x, " |
5255 | "FT=0x%x\n", | ||
5237 | bf_get(lpfc_sli_intf_sli_family, | 5256 | bf_get(lpfc_sli_intf_sli_family, |
5238 | &phba->sli4_hba.sli_intf), | 5257 | &phba->sli4_hba.sli_intf), |
5239 | bf_get(lpfc_sli_intf_slirev, | 5258 | bf_get(lpfc_sli_intf_slirev, |
5240 | &phba->sli4_hba.sli_intf), | 5259 | &phba->sli4_hba.sli_intf), |
5241 | bf_get(lpfc_sli_intf_featurelevel1, | 5260 | bf_get(lpfc_sli_intf_if_type, |
5261 | &phba->sli4_hba.sli_intf), | ||
5262 | bf_get(lpfc_sli_intf_sli_hint1, | ||
5242 | &phba->sli4_hba.sli_intf), | 5263 | &phba->sli4_hba.sli_intf), |
5243 | bf_get(lpfc_sli_intf_featurelevel2, | 5264 | bf_get(lpfc_sli_intf_sli_hint2, |
5265 | &phba->sli4_hba.sli_intf), | ||
5266 | bf_get(lpfc_sli_intf_func_type, | ||
5244 | &phba->sli4_hba.sli_intf)); | 5267 | &phba->sli4_hba.sli_intf)); |
5245 | } | 5268 | } |
5269 | |||
5246 | phba->sli4_hba.ue_mask_lo = readl(phba->sli4_hba.UEMASKLOregaddr); | 5270 | phba->sli4_hba.ue_mask_lo = readl(phba->sli4_hba.UEMASKLOregaddr); |
5247 | phba->sli4_hba.ue_mask_hi = readl(phba->sli4_hba.UEMASKHIregaddr); | 5271 | phba->sli4_hba.ue_mask_hi = readl(phba->sli4_hba.UEMASKHIregaddr); |
5248 | /* With uncoverable error, log the error message and return error */ | 5272 | /* With uncoverable error, log the error message and return error */ |
@@ -8992,6 +9016,10 @@ static struct pci_device_id lpfc_id_table[] = { | |||
8992 | PCI_ANY_ID, PCI_ANY_ID, }, | 9016 | PCI_ANY_ID, PCI_ANY_ID, }, |
8993 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BALIUS, | 9017 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BALIUS, |
8994 | PCI_ANY_ID, PCI_ANY_ID, }, | 9018 | PCI_ANY_ID, PCI_ANY_ID, }, |
9019 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FC, | ||
9020 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
9021 | {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FCOE, | ||
9022 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
8995 | { 0 } | 9023 | { 0 } |
8996 | }; | 9024 | }; |
8997 | 9025 | ||