Skip to contentSkip to conversation

lpfc 8.1.10 : Add support for new lpfc soft_wwpn attribute

PATCH New James Smart 1 participant 1 message Aug 18, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 lpfc 8.1.10 : Add support for new lpfc soft_wwpn attribute

Add support for a new lpfc soft_wwpn sysfs attribute

drivers/scsi/lpfc/lpfc.h +3 -0
@@ -303,6 +303,7 @@ #define FC_BYPASSED_MODE        0x20000	
 	uint32_t cfg_poll_tmo;
 	uint32_t cfg_sg_seg_cnt;
 	uint32_t cfg_sg_dma_buf_size;
+	uint64_t cfg_soft_wwpn;
 
 	uint32_t dev_loss_tmo_changed;
 
@@ -354,6 +355,8 @@ #define VPD_PROGRAM_TYPE    0x4         
 #define VPD_PORT            0x8         /* valid vpd port data */
 #define VPD_MASK            0xf         /* mask for any vpd data */
 
+	uint8_t soft_wwpn_enable;
+
 	struct timer_list fcp_poll_timer;
 	struct timer_list els_tmofunc;
 
drivers/scsi/lpfc/lpfc_attr.c +117 -0

141 lines not on this page · raw message

drivers/scsi/lpfc/lpfc_hbadisc.c +2 -0
@@ -672,6 +672,8 @@ lpfc_mbx_cmpl_read_sparam(struct lpfc_hb
 
 	memcpy((uint8_t *) & phba->fc_sparam, (uint8_t *) mp->virt,
 	       sizeof (struct serv_parm));
+	if (phba->cfg_soft_wwpn)
+		u64_to_wwn(phba->cfg_soft_wwpn, phba->fc_sparam.portName.u.wwn);
 	memcpy((uint8_t *) & phba->fc_nodename,
 	       (uint8_t *) & phba->fc_sparam.nodeName,
 	       sizeof (struct lpfc_name));
drivers/scsi/lpfc/lpfc_init.c +2 -0
@@ -268,6 +268,8 @@ lpfc_config_port_post(struct lpfc_hba * 
 	kfree(mp);
 	pmb->context1 = NULL;
 
+	if (phba->cfg_soft_wwpn)
+		u64_to_wwn(phba->cfg_soft_wwpn, phba->fc_sparam.portName.u.wwn);
 	memcpy(&phba->fc_nodename, &phba->fc_sparam.nodeName,
 	       sizeof (struct lpfc_name));
 	memcpy(&phba->fc_portname, &phba->fc_sparam.portName,