Lines Matching refs:cmd_buf

781 	char *cmd_buf, *cmd_buf_tmp;  in i40e_dbg_command_write()  local
793 cmd_buf = kzalloc(count + 1, GFP_KERNEL); in i40e_dbg_command_write()
794 if (!cmd_buf) in i40e_dbg_command_write()
796 bytes_not_copied = copy_from_user(cmd_buf, buffer, count); in i40e_dbg_command_write()
798 kfree(cmd_buf); in i40e_dbg_command_write()
801 cmd_buf[count] = '\0'; in i40e_dbg_command_write()
803 cmd_buf_tmp = strchr(cmd_buf, '\n'); in i40e_dbg_command_write()
806 count = cmd_buf_tmp - cmd_buf + 1; in i40e_dbg_command_write()
809 if (strncmp(cmd_buf, "add vsi", 7) == 0) { in i40e_dbg_command_write()
811 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
834 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); in i40e_dbg_command_write()
836 } else if (strncmp(cmd_buf, "del vsi", 7) == 0) { in i40e_dbg_command_write()
837 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
854 } else if (strncmp(cmd_buf, "add relay", 9) == 0) { in i40e_dbg_command_write()
858 cnt = sscanf(&cmd_buf[9], "%i %i", &uplink_seid, &vsi_seid); in i40e_dbg_command_write()
896 } else if (strncmp(cmd_buf, "del relay", 9) == 0) { in i40e_dbg_command_write()
898 cnt = sscanf(&cmd_buf[9], "%i", &veb_seid); in i40e_dbg_command_write()
922 } else if (strncmp(cmd_buf, "add pvid", 8) == 0) { in i40e_dbg_command_write()
927 cnt = sscanf(&cmd_buf[8], "%i %u", &vsi_seid, &v); in i40e_dbg_command_write()
952 } else if (strncmp(cmd_buf, "del pvid", 8) == 0) { in i40e_dbg_command_write()
954 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
973 } else if (strncmp(cmd_buf, "dump", 4) == 0) { in i40e_dbg_command_write()
974 if (strncmp(&cmd_buf[5], "switch", 6) == 0) { in i40e_dbg_command_write()
976 } else if (strncmp(&cmd_buf[5], "vsi", 3) == 0) { in i40e_dbg_command_write()
977 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
982 } else if (strncmp(&cmd_buf[5], "veb", 3) == 0) { in i40e_dbg_command_write()
983 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
988 } else if (strncmp(&cmd_buf[5], "vf", 2) == 0) { in i40e_dbg_command_write()
989 cnt = sscanf(&cmd_buf[7], "%i", &vf_id); in i40e_dbg_command_write()
994 } else if (strncmp(&cmd_buf[5], "desc", 4) == 0) { in i40e_dbg_command_write()
996 if (strncmp(&cmd_buf[10], "rx", 2) == 0) { in i40e_dbg_command_write()
997 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
1001 } else if (strncmp(&cmd_buf[10], "tx", 2) in i40e_dbg_command_write()
1003 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
1007 } else if (strncmp(&cmd_buf[10], "xdp", 3) in i40e_dbg_command_write()
1009 cnt = sscanf(&cmd_buf[13], "%i %i %i", in i40e_dbg_command_write()
1013 } else if (strncmp(&cmd_buf[10], "aq", 2) == 0) { in i40e_dbg_command_write()
1024 } else if (strncmp(&cmd_buf[5], "reset stats", 11) == 0) { in i40e_dbg_command_write()
1036 } else if (strncmp(&cmd_buf[5], "port", 4) == 0) { in i40e_dbg_command_write()
1146 } else if (strncmp(&cmd_buf[5], "debug fwdata", 12) == 0) { in i40e_dbg_command_write()
1155 cnt = sscanf(&cmd_buf[18], "%i %i %i", in i40e_dbg_command_write()
1201 } else if (strncmp(cmd_buf, "pfr", 3) == 0) { in i40e_dbg_command_write()
1205 } else if (strncmp(cmd_buf, "corer", 5) == 0) { in i40e_dbg_command_write()
1209 } else if (strncmp(cmd_buf, "globr", 5) == 0) { in i40e_dbg_command_write()
1213 } else if (strncmp(cmd_buf, "read", 4) == 0) { in i40e_dbg_command_write()
1217 cnt = sscanf(&cmd_buf[4], "%i", &address); in i40e_dbg_command_write()
1234 } else if (strncmp(cmd_buf, "write", 5) == 0) { in i40e_dbg_command_write()
1237 cnt = sscanf(&cmd_buf[5], "%i %i", &address, &value); in i40e_dbg_command_write()
1253 } else if (strncmp(cmd_buf, "clear_stats", 11) == 0) { in i40e_dbg_command_write()
1254 if (strncmp(&cmd_buf[12], "vsi", 3) == 0) { in i40e_dbg_command_write()
1255 cnt = sscanf(&cmd_buf[15], "%i", &vsi_seid); in i40e_dbg_command_write()
1277 } else if (strncmp(&cmd_buf[12], "port", 4) == 0) { in i40e_dbg_command_write()
1287 } else if (strncmp(cmd_buf, "send aq_cmd", 11) == 0) { in i40e_dbg_command_write()
1294 cnt = sscanf(&cmd_buf[11], in i40e_dbg_command_write()
1333 } else if (strncmp(cmd_buf, "send indirect aq_cmd", 20) == 0) { in i40e_dbg_command_write()
1342 cnt = sscanf(&cmd_buf[20], in i40e_dbg_command_write()
1399 } else if (strncmp(cmd_buf, "fd current cnt", 14) == 0) { in i40e_dbg_command_write()
1402 } else if (strncmp(cmd_buf, "lldp", 4) == 0) { in i40e_dbg_command_write()
1403 if (strncmp(&cmd_buf[5], "stop", 4) == 0) { in i40e_dbg_command_write()
1428 } else if (strncmp(&cmd_buf[5], "start", 5) == 0) { in i40e_dbg_command_write()
1454 } else if (strncmp(&cmd_buf[5], in i40e_dbg_command_write()
1482 } else if (strncmp(&cmd_buf[5], "get remote", 10) == 0) { in i40e_dbg_command_write()
1510 } else if (strncmp(&cmd_buf[5], "event on", 8) == 0) { in i40e_dbg_command_write()
1521 } else if (strncmp(&cmd_buf[5], "event off", 9) == 0) { in i40e_dbg_command_write()
1533 } else if (strncmp(cmd_buf, "nvm read", 8) == 0) { in i40e_dbg_command_write()
1540 cnt = sscanf(&cmd_buf[8], "%hx %x %hx", in i40e_dbg_command_write()
1596 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); in i40e_dbg_command_write()
1632 kfree(cmd_buf); in i40e_dbg_command_write()
1633 cmd_buf = NULL; in i40e_dbg_command_write()