Lines Matching refs:res

344 	int res;  in nvme_trans_status_code()  local
517 res = nvme_trans_completion(hdr, status, sense_key, asc, ascq); in nvme_trans_status_code()
518 return res ? res : nvme_sc; in nvme_trans_status_code()
529 int res; in nvme_trans_standard_inquiry_page() local
539 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_standard_inquiry_page()
540 if (res) in nvme_trans_standard_inquiry_page()
541 return res; in nvme_trans_standard_inquiry_page()
607 int res; in nvme_trans_device_id_page() local
620 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_device_id_page()
621 if (res) in nvme_trans_device_id_page()
622 return res; in nvme_trans_device_id_page()
673 int res; in nvme_trans_ext_inq_page() local
692 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_ext_inq_page()
693 if (res) in nvme_trans_ext_inq_page()
708 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_ext_inq_page()
709 if (res) in nvme_trans_ext_inq_page()
727 res = nvme_trans_copy_to_user(hdr, inq_response, xfer_len); in nvme_trans_ext_inq_page()
731 return res; in nvme_trans_ext_inq_page()
758 int res; in nvme_trans_bdev_char_page() local
763 res = -ENOMEM; in nvme_trans_bdev_char_page()
775 res = nvme_trans_copy_to_user(hdr, inq_response, xfer_len); in nvme_trans_bdev_char_page()
779 return res; in nvme_trans_bdev_char_page()
787 int res; in nvme_trans_log_supp_pages() local
793 res = -ENOMEM; in nvme_trans_log_supp_pages()
805 res = nvme_trans_copy_to_user(hdr, log_response, xfer_len); in nvme_trans_log_supp_pages()
809 return res; in nvme_trans_log_supp_pages()
815 int res; in nvme_trans_log_info_exceptions() local
827 res = nvme_get_log_page(dev, &smart_log); in nvme_trans_log_info_exceptions()
828 if (res < 0) in nvme_trans_log_info_exceptions()
831 if (res != NVME_SC_SUCCESS) { in nvme_trans_log_info_exceptions()
852 res = nvme_trans_copy_to_user(hdr, log_response, xfer_len); in nvme_trans_log_info_exceptions()
856 return res; in nvme_trans_log_info_exceptions()
862 int res; in nvme_trans_log_temperature() local
875 res = nvme_get_log_page(dev, &smart_log); in nvme_trans_log_temperature()
876 if (res < 0) in nvme_trans_log_temperature()
879 if (res != NVME_SC_SUCCESS) { in nvme_trans_log_temperature()
889 res = nvme_get_features(dev, NVME_FEAT_TEMP_THRESH, 0, 0, in nvme_trans_log_temperature()
891 if (res != NVME_SC_SUCCESS) in nvme_trans_log_temperature()
913 res = nvme_trans_copy_to_user(hdr, log_response, xfer_len); in nvme_trans_log_temperature()
917 return res; in nvme_trans_log_temperature()
949 int res; in nvme_trans_fill_blk_desc() local
962 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_fill_blk_desc()
963 if (res) in nvme_trans_fill_blk_desc()
964 return res; in nvme_trans_fill_blk_desc()
986 return res; in nvme_trans_fill_blk_desc()
1015 int res = 0; in nvme_trans_fill_caching_page() local
1026 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_fill_caching_page()
1027 if (res) in nvme_trans_fill_caching_page()
1028 return res; in nvme_trans_fill_caching_page()
1070 int res; in nvme_trans_fill_all_pages() local
1078 res = nvme_trans_fill_caching_page(ns, hdr, &resp[mode_pages_offset_1], in nvme_trans_fill_all_pages()
1080 if (res) in nvme_trans_fill_all_pages()
1081 return res; in nvme_trans_fill_all_pages()
1082 res = nvme_trans_fill_control_page(ns, hdr, &resp[mode_pages_offset_2], in nvme_trans_fill_all_pages()
1084 if (res) in nvme_trans_fill_all_pages()
1085 return res; in nvme_trans_fill_all_pages()
1086 res = nvme_trans_fill_pow_cnd_page(ns, hdr, &resp[mode_pages_offset_3], in nvme_trans_fill_all_pages()
1088 if (res) in nvme_trans_fill_all_pages()
1089 return res; in nvme_trans_fill_all_pages()
1112 int res; in nvme_trans_mode_page_create() local
1136 res = -ENOMEM; in nvme_trans_mode_page_create()
1140 res = nvme_trans_fill_mode_parm_hdr(&response[0], mph_size, cdb10, in nvme_trans_mode_page_create()
1142 if (res) in nvme_trans_mode_page_create()
1145 res = nvme_trans_fill_blk_desc(ns, hdr, in nvme_trans_mode_page_create()
1148 if (res) in nvme_trans_mode_page_create()
1151 res = mode_page_fill_func(ns, hdr, &response[mode_pages_offset_1], in nvme_trans_mode_page_create()
1153 if (res) in nvme_trans_mode_page_create()
1157 res = nvme_trans_copy_to_user(hdr, response, xfer_len); in nvme_trans_mode_page_create()
1162 return res; in nvme_trans_mode_page_create()
1208 int res; in nvme_trans_power_state() local
1216 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_power_state()
1217 if (res) in nvme_trans_power_state()
1218 return res; in nvme_trans_power_state()
1254 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_power_state()
1365 int res = 0; in nvme_trans_modesel_get_mp() local
1375 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_modesel_get_mp()
1382 res = nvme_trans_completion(hdr, in nvme_trans_modesel_get_mp()
1391 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_modesel_get_mp()
1397 return res; in nvme_trans_modesel_get_mp()
1404 int res; in nvme_trans_modesel_data() local
1415 res = -ENOMEM; in nvme_trans_modesel_data()
1419 res = nvme_trans_copy_from_user(hdr, parm_list, parm_list_len); in nvme_trans_modesel_data()
1420 if (res) in nvme_trans_modesel_data()
1441 res = nvme_trans_completion(hdr, in nvme_trans_modesel_data()
1456 res = nvme_trans_modesel_get_mp(ns, hdr, &parm_list[index], in nvme_trans_modesel_data()
1458 if (res) in nvme_trans_modesel_data()
1466 return res; in nvme_trans_modesel_data()
1474 int res = 0; in nvme_trans_fmt_set_blk_size_count() local
1490 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_fmt_set_blk_size_count()
1491 if (res) in nvme_trans_fmt_set_blk_size_count()
1492 return res; in nvme_trans_fmt_set_blk_size_count()
1511 int res; in nvme_trans_fmt_get_parm_header() local
1517 res = -ENOMEM; in nvme_trans_fmt_get_parm_header()
1520 res = nvme_trans_copy_from_user(hdr, parm_list, len); in nvme_trans_fmt_get_parm_header()
1521 if (res) in nvme_trans_fmt_get_parm_header()
1526 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_fmt_get_parm_header()
1534 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_fmt_get_parm_header()
1556 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_fmt_get_parm_header()
1565 return res; in nvme_trans_fmt_get_parm_header()
1571 int res; in nvme_trans_fmt_send_cmd() local
1583 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_fmt_send_cmd()
1584 if (res) in nvme_trans_fmt_send_cmd()
1585 return res; in nvme_trans_fmt_send_cmd()
1597 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_fmt_send_cmd()
1602 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_fmt_send_cmd()
1615 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_fmt_send_cmd()
1618 return res; in nvme_trans_fmt_send_cmd()
1724 int res = 0; in nvme_trans_io() local
1778 res = -EIO; in nvme_trans_io()
1793 res = nvme_trans_completion(hdr, in nvme_trans_io()
1810 res = -EINVAL; in nvme_trans_io()
1819 res = nvme_trans_do_nvme_io(ns, hdr, &cdb_info, is_write); in nvme_trans_io()
1820 if (res) in nvme_trans_io()
1824 return res; in nvme_trans_io()
1830 int res = 0; in nvme_trans_inquiry() local
1843 res = -ENOMEM; in nvme_trans_inquiry()
1849 res = nvme_trans_standard_inquiry_page(ns, hdr, in nvme_trans_inquiry()
1852 res = nvme_trans_completion(hdr, in nvme_trans_inquiry()
1861 res = nvme_trans_supported_vpd_pages(ns, hdr, in nvme_trans_inquiry()
1865 res = nvme_trans_unit_serial_page(ns, hdr, inq_response, in nvme_trans_inquiry()
1869 res = nvme_trans_device_id_page(ns, hdr, inq_response, in nvme_trans_inquiry()
1873 res = nvme_trans_ext_inq_page(ns, hdr, alloc_len); in nvme_trans_inquiry()
1876 res = nvme_trans_bdev_limits_page(ns, hdr, inq_response, in nvme_trans_inquiry()
1880 res = nvme_trans_bdev_char_page(ns, hdr, alloc_len); in nvme_trans_inquiry()
1883 res = nvme_trans_completion(hdr, in nvme_trans_inquiry()
1893 return res; in nvme_trans_inquiry()
1899 int res; in nvme_trans_log_sense() local
1905 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_log_sense()
1914 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_log_sense()
1922 res = nvme_trans_log_supp_pages(ns, hdr, alloc_len); in nvme_trans_log_sense()
1925 res = nvme_trans_log_info_exceptions(ns, hdr, alloc_len); in nvme_trans_log_sense()
1928 res = nvme_trans_log_temperature(ns, hdr, alloc_len); in nvme_trans_log_sense()
1931 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_log_sense()
1938 return res; in nvme_trans_log_sense()
1974 int res = 0; in nvme_trans_mode_sense() local
1987 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_mode_sense()
1995 res = nvme_trans_mode_page_create(ns, hdr, cmd, alloc_len, in nvme_trans_mode_sense()
2001 res = nvme_trans_mode_page_create(ns, hdr, cmd, alloc_len, in nvme_trans_mode_sense()
2007 res = nvme_trans_mode_page_create(ns, hdr, cmd, alloc_len, in nvme_trans_mode_sense()
2013 res = nvme_trans_mode_page_create(ns, hdr, cmd, alloc_len, in nvme_trans_mode_sense()
2019 res = nvme_trans_mode_page_create(ns, hdr, cmd, alloc_len, in nvme_trans_mode_sense()
2025 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_mode_sense()
2032 return res; in nvme_trans_mode_sense()
2038 int res; in nvme_trans_read_capacity() local
2056 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_read_capacity()
2057 if (res) in nvme_trans_read_capacity()
2058 return res; in nvme_trans_read_capacity()
2062 res = -ENOMEM; in nvme_trans_read_capacity()
2068 res = nvme_trans_copy_to_user(hdr, response, xfer_len); in nvme_trans_read_capacity()
2073 return res; in nvme_trans_read_capacity()
2079 int res; in nvme_trans_report_luns() local
2098 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_report_luns()
2099 if (res) in nvme_trans_report_luns()
2100 return res; in nvme_trans_report_luns()
2107 res = nvme_trans_completion(hdr, in nvme_trans_report_luns()
2116 res = -ENOMEM; in nvme_trans_report_luns()
2135 res = nvme_trans_copy_to_user(hdr, response, xfer_len); in nvme_trans_report_luns()
2140 return res; in nvme_trans_report_luns()
2146 int res; in nvme_trans_request_sense() local
2158 res = -ENOMEM; in nvme_trans_request_sense()
2185 res = nvme_trans_copy_to_user(hdr, response, xfer_len); in nvme_trans_request_sense()
2189 return res; in nvme_trans_request_sense()
2233 int res = nvme_trans_synchronize_cache(ns, hdr); in nvme_trans_start_stop() local
2234 if (res) in nvme_trans_start_stop()
2235 return res; in nvme_trans_start_stop()
2245 int res; in nvme_trans_format_unit() local
2262 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_format_unit()
2274 res = nvme_trans_fmt_get_parm_header(hdr, parm_hdr_len, in nvme_trans_format_unit()
2276 if (res) in nvme_trans_format_unit()
2281 res = nvme_trans_send_activate_fw_cmd(ns, hdr, 0); in nvme_trans_format_unit()
2284 res = nvme_trans_fmt_set_blk_size_count(ns, hdr); in nvme_trans_format_unit()
2285 if (res) in nvme_trans_format_unit()
2288 res = nvme_trans_fmt_send_cmd(ns, hdr, nvme_pf_code); in nvme_trans_format_unit()
2291 return res; in nvme_trans_format_unit()
2311 int res = 0; in nvme_trans_write_buffer() local
2318 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_write_buffer()
2325 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_write_buffer()
2335 res = nvme_trans_send_download_fw_cmd(ns, hdr, nvme_admin_download_fw, in nvme_trans_write_buffer()
2338 if (res) in nvme_trans_write_buffer()
2340 res = nvme_trans_send_activate_fw_cmd(ns, hdr, buffer_id); in nvme_trans_write_buffer()
2343 res = nvme_trans_send_download_fw_cmd(ns, hdr, nvme_admin_download_fw, in nvme_trans_write_buffer()
2348 res = nvme_trans_send_activate_fw_cmd(ns, hdr, buffer_id); in nvme_trans_write_buffer()
2351 res = nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION, in nvme_trans_write_buffer()
2358 return res; in nvme_trans_write_buffer()
2380 int i, nvme_sc, res; in nvme_trans_unmap() local
2391 res = nvme_trans_copy_from_user(hdr, plist, list_len); in nvme_trans_unmap()
2392 if (res) in nvme_trans_unmap()
2397 res = -EINVAL; in nvme_trans_unmap()
2403 res = -ENOMEM; in nvme_trans_unmap()
2421 res = nvme_trans_status_code(hdr, nvme_sc); in nvme_trans_unmap()
2426 return res; in nvme_trans_unmap()