Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ee1ec42 authored by Jitendra Bhivare's avatar Jitendra Bhivare Committed by Martin K. Petersen
Browse files

scsi: be2iscsi: Add FUNCTION_RESET during driver unload



Driver unload should call COMMON_FUNCTION_RESET. For TPE feature, this
ensures that FW has knowledge about driver getting unloaded and can
reset its bit vector.

Signed-off-by: default avatarJitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 10e1a44a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1595,7 +1595,7 @@ int beiscsi_check_fw_rdy(struct beiscsi_hba *phba)
	return rdy;
}

static int beiscsi_cmd_function_reset(struct beiscsi_hba  *phba)
int beiscsi_cmd_function_reset(struct beiscsi_hba *phba)
{
	struct be_ctrl_info *ctrl = &phba->ctrl;
	struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem);
+2 −0
Original line number Diff line number Diff line
@@ -762,6 +762,8 @@ struct be_cmd_set_features {
	} param;
} __packed;

int beiscsi_cmd_function_reset(struct beiscsi_hba *phba);

int beiscsi_cmd_special_wrb(struct be_ctrl_info *ctrl, u32 load);

int beiscsi_check_fw_rdy(struct beiscsi_hba *phba);
+3 −0
Original line number Diff line number Diff line
@@ -3771,9 +3771,12 @@ static void hwi_cleanup_port(struct beiscsi_hba *phba)
			beiscsi_cmd_q_destroy(ctrl, q, QTYPE_EQ);
		}
	}
	/* this ensures complete FW cleanup */
	beiscsi_cmd_function_reset(phba);
	/* last communication, indicate driver is unloading */
	beiscsi_cmd_special_wrb(&phba->ctrl, 0);
}

static int hwi_init_port(struct beiscsi_hba *phba)
{
	struct hwi_controller *phwi_ctrlr;