diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-07-19 10:01:10 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:51:57 -0400 |
commit | a0c87cbdb52467a16343b31251f2722643db603c (patch) | |
tree | 0242b3b51f1984ca3f8d59390487f39a865812aa /drivers/scsi/lpfc/lpfc_mbox.c | |
parent | 8fa38513ddc1076f3e26c651f3567b084c273ba2 (diff) |
[SCSI] lpfc 8.3.4: Consistently Implement persistent port disable
Consistently implement persistent port disable.
Ability was to be managed in the adapter via firmware via flash settings.
However, not all firmware images supported it. Uniformly support it
everywhere.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 42b4f3841697..245945f2f3a0 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -79,21 +79,37 @@ lpfc_dump_static_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * lpfc_dump_mem - Prepare a mailbox command for retrieving HBA's VPD memory | 82 | * lpfc_down_link - Bring down HBAs link. |
83 | * @phba: pointer to lpfc hba data structure. | 83 | * @phba: pointer to lpfc hba data structure. |
84 | * @pmb: pointer to the driver internal queue element for mailbox command. | 84 | * @pmb: pointer to the driver internal queue element for mailbox command. |
85 | * @offset: offset for dumping VPD memory mailbox command. | 85 | * |
86 | * This routine prepares a mailbox command to bring down HBA link. | ||
87 | **/ | ||
88 | void | ||
89 | lpfc_down_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | ||
90 | { | ||
91 | MAILBOX_t *mb; | ||
92 | memset(pmb, 0, sizeof(LPFC_MBOXQ_t)); | ||
93 | mb = &pmb->u.mb; | ||
94 | mb->mbxCommand = MBX_DOWN_LINK; | ||
95 | mb->mbxOwner = OWN_HOST; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * lpfc_dump_mem - Prepare a mailbox command for reading a region. | ||
100 | * @phba: pointer to lpfc hba data structure. | ||
101 | * @pmb: pointer to the driver internal queue element for mailbox command. | ||
102 | * @offset: offset into the region. | ||
103 | * @region_id: config region id. | ||
86 | * | 104 | * |
87 | * The dump mailbox command provides a method for the device driver to obtain | 105 | * The dump mailbox command provides a method for the device driver to obtain |
88 | * various types of information from the HBA device. | 106 | * various types of information from the HBA device. |
89 | * | 107 | * |
90 | * This routine prepares the mailbox command for dumping HBA Vital Product | 108 | * This routine prepares the mailbox command for dumping HBA's config region. |
91 | * Data (VPD) memory. This mailbox command is to be used for retrieving a | ||
92 | * portion (DMP_RSP_SIZE bytes) of a HBA's VPD from the HBA at an address | ||
93 | * offset specified by the offset parameter. | ||
94 | **/ | 109 | **/ |
95 | void | 110 | void |
96 | lpfc_dump_mem(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, uint16_t offset) | 111 | lpfc_dump_mem(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, uint16_t offset, |
112 | uint16_t region_id) | ||
97 | { | 113 | { |
98 | MAILBOX_t *mb; | 114 | MAILBOX_t *mb; |
99 | void *ctx; | 115 | void *ctx; |
@@ -107,7 +123,7 @@ lpfc_dump_mem(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, uint16_t offset) | |||
107 | mb->un.varDmp.cv = 1; | 123 | mb->un.varDmp.cv = 1; |
108 | mb->un.varDmp.type = DMP_NV_PARAMS; | 124 | mb->un.varDmp.type = DMP_NV_PARAMS; |
109 | mb->un.varDmp.entry_index = offset; | 125 | mb->un.varDmp.entry_index = offset; |
110 | mb->un.varDmp.region_id = DMP_REGION_VPD; | 126 | mb->un.varDmp.region_id = region_id; |
111 | mb->un.varDmp.word_cnt = (DMP_RSP_SIZE / sizeof (uint32_t)); | 127 | mb->un.varDmp.word_cnt = (DMP_RSP_SIZE / sizeof (uint32_t)); |
112 | mb->un.varDmp.co = 0; | 128 | mb->un.varDmp.co = 0; |
113 | mb->un.varDmp.resp_offset = 0; | 129 | mb->un.varDmp.resp_offset = 0; |
@@ -1864,8 +1880,8 @@ lpfc_dump_fcoe_param(struct lpfc_hba *phba, | |||
1864 | 1880 | ||
1865 | mb->mbxCommand = MBX_DUMP_MEMORY; | 1881 | mb->mbxCommand = MBX_DUMP_MEMORY; |
1866 | mb->un.varDmp.type = DMP_NV_PARAMS; | 1882 | mb->un.varDmp.type = DMP_NV_PARAMS; |
1867 | mb->un.varDmp.region_id = DMP_REGION_FCOEPARAM; | 1883 | mb->un.varDmp.region_id = DMP_REGION_23; |
1868 | mb->un.varDmp.sli4_length = DMP_FCOEPARAM_RGN_SIZE; | 1884 | mb->un.varDmp.sli4_length = DMP_RGN23_SIZE; |
1869 | mb->un.varWords[3] = putPaddrLow(mp->phys); | 1885 | mb->un.varWords[3] = putPaddrLow(mp->phys); |
1870 | mb->un.varWords[4] = putPaddrHigh(mp->phys); | 1886 | mb->un.varWords[4] = putPaddrHigh(mp->phys); |
1871 | return 0; | 1887 | return 0; |