/* ibmvfc_npiv_logout_done - Completion handler for NPIV Logout @vhost: ibmvfc host struct  */
static void ibmvfc_npiv_logout_done(struct ibmvfc_event *evt)
/* ibmvfc_npiv_logout_done - Completion handler for NPIV Logout @vhost: ibmvfc host struct  */
static void ibmvfc_npiv_logout_done(struct ibmvfc_event *evt)
{
	struct ibmvfc_host *vhost = evt->vhost;
	u32 mad_status = evt->xfer_iu->npiv_logout.common.status;
	ibmvfc_free_event(evt);
	switch (mad_status) {
	case IBMVFC_MAD_SUCCESS:
		if (list_empty(&vhost->sent) &&
		    vhost->action == IBMVFC_HOST_ACTION_LOGO_WAIT) {
			ibmvfc_init_host(vhost);
			return;
		}
		break;
	case IBMVFC_MAD_FAILED:
	case IBMVFC_MAD_NOT_SUPPORTED:
	case IBMVFC_MAD_CRQ_ERROR:
	case IBMVFC_MAD_DRIVER_FAILED:
	default:
		ibmvfc_dbg(vhost, "NPIV Logout failed. 0x%X\n", mad_status);
		break;
	}
	ibmvfc_hard_reset_host(vhost);
}