Lines Matching refs:ret
305 int i, ret, ec, sn, addr;
314 ret = csio_pci_capability(hw->pdev, PCI_CAP_ID_VPD,
316 if (ret)
327 ret = csio_hw_seeprom_read(hw, VPD_BASE, (uint32_t *)(vpd));
331 ret = csio_hw_seeprom_read(hw, addr + i, (uint32_t *)(vpd + i));
332 if (ret) {
334 return ret;
395 int ret;
404 ret = csio_hw_wait_op_done_val(hw, SF_OP_A, SF_BUSY_F, 0, SF_ATTEMPTS,
406 if (!ret)
408 return ret;
451 int ret;
455 ret = csio_hw_sf1_write(hw, 1, 1, 1, SF_RD_STATUS);
456 if (ret != 0)
457 return ret;
459 ret = csio_hw_sf1_read(hw, 1, 0, 1, &status);
460 if (ret != 0)
461 return ret;
489 int ret;
496 ret = csio_hw_sf1_write(hw, 4, 1, 0, addr);
497 if (ret != 0)
498 return ret;
500 ret = csio_hw_sf1_read(hw, 1, 1, 0, data);
501 if (ret != 0)
502 return ret;
505 ret = csio_hw_sf1_read(hw, 4, nwords > 1, nwords == 1, data);
508 if (ret)
509 return ret;
530 int ret = -EINVAL;
539 ret = csio_hw_sf1_write(hw, 1, 0, 1, SF_WR_ENABLE);
540 if (ret != 0)
543 ret = csio_hw_sf1_write(hw, 4, 1, 1, val);
544 if (ret != 0)
552 ret = csio_hw_sf1_write(hw, c, c != left, 1, val);
553 if (ret)
556 ret = csio_hw_flash_wait_op(hw, 8, 1);
557 if (ret)
563 ret = csio_hw_read_flash(hw, addr & ~0xff, ARRAY_SIZE(buf), buf, 1);
564 if (ret)
565 return ret;
578 return ret;
592 int ret = 0;
596 ret = csio_hw_sf1_write(hw, 1, 0, 1, SF_WR_ENABLE);
597 if (ret != 0)
600 ret = csio_hw_sf1_write(hw, 4, 0, 1,
602 if (ret != 0)
605 ret = csio_hw_flash_wait_op(hw, 14, 500);
606 if (ret != 0)
612 if (ret)
614 start, ret);
672 int ret;
719 ret = csio_hw_flash_erase_sectors(hw, FLASH_FW_START_SEC,
721 if (ret) {
733 ret = csio_hw_write_flash(hw, FLASH_FW_START, SF_PAGE_SIZE, first_page);
734 if (ret)
744 ret = csio_hw_write_flash(hw, addr, SF_PAGE_SIZE, fw_data);
745 if (ret)
749 ret = csio_hw_write_flash(hw,
756 if (ret)
757 csio_err(hw, "firmware download failed, error %d\n", ret);
758 return ret;
777 int ret;
779 ret = csio_hw_sf1_write(hw, 1, 1, 0, SF_RD_ID);
780 if (!ret)
781 ret = csio_hw_sf1_read(hw, 3, 0, 1, &flashid);
783 if (ret)
784 return ret;
940 csio_err(hw, "failed to issue HELLO cmd. ret:%d.\n", rv);
946 csio_err(hw, "HELLO cmd failed with ret: %d\n", retval);
1132 csio_err(hw, "RESET cmd failed with ret:0x%x.\n", retval);
1326 int reset, ret;
1328 ret = csio_hw_fw_halt(hw, mbox, force);
1329 if (ret != 0 && !force)
1330 return ret;
1332 ret = csio_hw_fw_dload(hw, (uint8_t *) fw_data, size);
1333 if (ret != 0)
1334 return ret;
1397 csio_err(hw, "FW_PARAMS_CMD(read) failed with ret:0x%x!\n",
1898 csio_err(hw, "FW_FCOE_RES_INFO_CMD failed with ret x%x\n",
1955 csio_err(hw, "FW_PARAMS_CMD(read) failed with ret:0x%x!\n",
1970 int ret = 0;
1986 fw_cfg_file, ret);
1995 ret = -ENOMEM;
2001 ret = -EINVAL;
2008 ret = csio_memory_write(hw, mtype, maddr,
2011 if ((ret == 0) && (value_to_add != 0)) {
2022 ret = csio_memory_write(hw, mtype, maddr + size, 4, &last.word);
2024 if (ret == 0) {
2032 return ret;
2319 int ret, card_fw_usable, fs_fw_usable;
2326 ret = csio_hw_read_flash(hw, FLASH_FW_START,
2329 if (ret == 0) {
2333 "Unable to read card's firmware header: %d\n", ret);
2355 ret = csio_hw_fw_upgrade(hw, hw->pfn, fw_data,
2357 if (ret != 0) {
2359 "failed to install firmware: %d\n", ret);
2387 ret = -EINVAL;
2396 return ret;
2408 int ret = -ECANCELED;
2443 fw_bin_file, ret);
2450 ret = csio_hw_prep_fw(hw, fw_info, fw_data, fw_size, card_fw,
2457 return ret;
3823 int n, ret = 0;
3833 ret = -EINVAL;
3840 ret = -ENOMEM;
3868 return ret;