}
retval = rtsx_read_register(chip, MS_TRANS_CFG, &val);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if (!(val & MS_INT_BREQ)) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
retval = ms_transfer_data(chip, MS_TM_AUTO_READ, PRO_READ_LONG_DATA,
}
}
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
do {
retval = rtsx_read_register(chip, MS_TRANS_CFG, &val);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
retval = ms_transfer_tpc(chip, MS_TM_NORMAL_READ, PRO_READ_LONG_DATA, 0, WAIT_INT);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
} while (i < 1024);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if ((buf[0] != 0xa5) && (buf[1] != 0xc3)) {
/* Signature code is wrong */
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if ((buf[4] < 1) || (buf[4] > 12)) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
RTSX_DEBUGP("sys_info_addr = 0x%x, sys_info_size = 0x%x\n",
sys_info_addr, sys_info_size);
if (sys_info_size != 96) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if (sys_info_addr < 0x1A0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if ((sys_info_size + sys_info_addr) > 0x8000) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
RTSX_DEBUGP("model_name_addr = 0x%x, model_name_size = 0x%x\n",
model_name_addr, model_name_size);
if (model_name_size != 48) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if (model_name_addr < 0x1A0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
if ((model_name_size + model_name_addr) > 0x8000) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
}
if (i == buf[4]) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
memcpy(ms_card->raw_model_name, buf + model_name_addr, 48);
#endif
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
#ifdef SUPPORT_MSXC
if (CHK_MSXC(ms_card)) {
GetEKBFinish:
if (buf) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
}
return retval;
}
GetICVFinish:
if (buf) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
}
return retval;
}
SetICVFinish:
if (buf) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
}
return retval;
}
retval = rtsx_transfer_data(chip, 0, buf, pagelen, 0, DMA_FROM_DEVICE, 10000);
if (retval < 0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
rtsx_clear_spi_error(chip);
spi_set_err_code(chip, SPI_HW_ERR);
TRACE_RET(chip, STATUS_FAIL);
}
scsi_set_resid(srb, 0);
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
return STATUS_SUCCESS;
}
while (len) {
retval = sf_enable_write(chip, SPI_WREN);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
retval = rtsx_send_cmd(chip, 0, 100);
if (retval < 0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
rtsx_clear_spi_error(chip);
spi_set_err_code(chip, SPI_HW_ERR);
TRACE_RET(chip, STATUS_FAIL);
retval = sf_polling_status(chip, 100);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
len--;
}
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
} else if (program_mode == AAI_PROGRAM) {
int first_byte = 1;
retval = rtsx_send_cmd(chip, 0, 100);
if (retval < 0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
rtsx_clear_spi_error(chip);
spi_set_err_code(chip, SPI_HW_ERR);
TRACE_RET(chip, STATUS_FAIL);
retval = sf_polling_status(chip, 100);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
len--;
}
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
retval = sf_disable_write(chip, SPI_WRDI);
if (retval != STATUS_SUCCESS)
retval = sf_enable_write(chip, SPI_WREN);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
retval = rtsx_transfer_data(chip, 0, buf, pagelen, 0, DMA_TO_DEVICE, 100);
if (retval < 0) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
rtsx_clear_spi_error(chip);
spi_set_err_code(chip, SPI_HW_ERR);
TRACE_RET(chip, STATUS_FAIL);
retval = sf_polling_status(chip, 100);
if (retval != STATUS_SUCCESS) {
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
TRACE_RET(chip, STATUS_FAIL);
}
len -= pagelen;
}
- rtsx_free_dma_buf(chip, buf);
+ kfree(buf);
} else {
spi_set_err_code(chip, SPI_INVALID_COMMAND);
TRACE_RET(chip, STATUS_FAIL);