/* Return codes 0 - successful EIO - The mailbox failed to complete successfully. When this error occurs, the driver is not guaranteed to have any rpi regions posted to the device and must either attempt to repost the regions or take a fatal error.  */
int lpfc_sli4_post_all_rpi_hdrs(struct lpfc_hba *phba)
/* Return codes 0 - successful EIO - The mailbox failed to complete successfully. When this error occurs, the driver is not guaranteed to have any rpi regions posted to the device and must either attempt to repost the regions or take a fatal error.  */
int lpfc_sli4_post_all_rpi_hdrs(struct lpfc_hba *phba)
{
	struct lpfc_rpi_hdr *rpi_page;
	uint32_t rc = 0;
	list_for_each_entry(rpi_page, &phba->sli4_hba.lpfc_rpi_hdr_list, list) {
		rc = lpfc_sli4_post_rpi_hdr(phba, rpi_page);
		if (rc != MBX_SUCCESS) {
			lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
					"2008 Error %d posting all rpi "
					"headers\n", rc);
			rc = -EIO;
			break;
		}
	}
	return rc;
}