mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
qla2x00t-32gbit: Change the return type of qla24xx_read_flash_dword()
Return a QLA_* status code instead of returning a pointer. This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -558,7 +558,7 @@ fc_port_t *qla2x00_find_fcport_by_nportid(scsi_qla_host_t *, port_id_t *, u8);
|
||||
* Global Function Prototypes in qla_sup.c source file.
|
||||
*/
|
||||
extern void qla2x00_release_nvram_protection(scsi_qla_host_t *);
|
||||
extern uint32_t *qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
|
||||
extern int qla24xx_read_flash_data(scsi_qla_host_t *, uint32_t *,
|
||||
uint32_t, uint32_t);
|
||||
extern uint8_t *qla2x00_read_nvram_data(scsi_qla_host_t *, void *, uint32_t,
|
||||
uint32_t);
|
||||
|
||||
@@ -473,22 +473,24 @@ qla24xx_read_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t *data)
|
||||
return QLA_FUNCTION_TIMEOUT;
|
||||
}
|
||||
|
||||
uint32_t *
|
||||
int
|
||||
qla24xx_read_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
|
||||
uint32_t dwords)
|
||||
{
|
||||
ulong i;
|
||||
int ret = QLA_SUCCESS;
|
||||
struct qla_hw_data *ha = vha->hw;
|
||||
|
||||
/* Dword reads to flash. */
|
||||
faddr = flash_data_addr(ha, faddr);
|
||||
for (i = 0; i < dwords; i++, faddr++, dwptr++) {
|
||||
if (qla24xx_read_flash_dword(ha, faddr, dwptr))
|
||||
ret = qla24xx_read_flash_dword(ha, faddr, dwptr);
|
||||
if (ret != QLA_SUCCESS)
|
||||
break;
|
||||
cpu_to_le32s(dwptr);
|
||||
}
|
||||
|
||||
return dwptr;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user