Lines Matching refs:cmd_buf

773 	char *cmd_buf, *cmd_buf_tmp;  in i40e_dbg_command_write()  local
785 cmd_buf = kzalloc(count + 1, GFP_KERNEL); in i40e_dbg_command_write()
786 if (!cmd_buf) in i40e_dbg_command_write()
788 bytes_not_copied = copy_from_user(cmd_buf, buffer, count); in i40e_dbg_command_write()
790 kfree(cmd_buf); in i40e_dbg_command_write()
793 cmd_buf[count] = '\0'; in i40e_dbg_command_write()
795 cmd_buf_tmp = strchr(cmd_buf, '\n'); in i40e_dbg_command_write()
798 count = cmd_buf_tmp - cmd_buf + 1; in i40e_dbg_command_write()
801 if (strncmp(cmd_buf, "add vsi", 7) == 0) { in i40e_dbg_command_write()
803 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
826 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); in i40e_dbg_command_write()
828 } else if (strncmp(cmd_buf, "del vsi", 7) == 0) { in i40e_dbg_command_write()
829 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
846 } else if (strncmp(cmd_buf, "add relay", 9) == 0) { in i40e_dbg_command_write()
850 cnt = sscanf(&cmd_buf[9], "%i %i", &uplink_seid, &vsi_seid); in i40e_dbg_command_write()
888 } else if (strncmp(cmd_buf, "del relay", 9) == 0) { in i40e_dbg_command_write()
890 cnt = sscanf(&cmd_buf[9], "%i", &veb_seid); in i40e_dbg_command_write()
914 } else if (strncmp(cmd_buf, "add pvid", 8) == 0) { in i40e_dbg_command_write()
919 cnt = sscanf(&cmd_buf[8], "%i %u", &vsi_seid, &v); in i40e_dbg_command_write()
944 } else if (strncmp(cmd_buf, "del pvid", 8) == 0) { in i40e_dbg_command_write()
946 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
965 } else if (strncmp(cmd_buf, "dump", 4) == 0) { in i40e_dbg_command_write()
966 if (strncmp(&cmd_buf[5], "switch", 6) == 0) { in i40e_dbg_command_write()
968 } else if (strncmp(&cmd_buf[5], "vsi", 3) == 0) { in i40e_dbg_command_write()
969 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
974 } else if (strncmp(&cmd_buf[5], "veb", 3) == 0) { in i40e_dbg_command_write()
975 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
980 } else if (strncmp(&cmd_buf[5], "vf", 2) == 0) { in i40e_dbg_command_write()
981 cnt = sscanf(&cmd_buf[7], "%i", &vf_id); in i40e_dbg_command_write()
986 } else if (strncmp(&cmd_buf[5], "desc", 4) == 0) { in i40e_dbg_command_write()
988 if (strncmp(&cmd_buf[10], "rx", 2) == 0) { in i40e_dbg_command_write()
989 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
993 } else if (strncmp(&cmd_buf[10], "tx", 2) in i40e_dbg_command_write()
995 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
999 } else if (strncmp(&cmd_buf[10], "xdp", 3) in i40e_dbg_command_write()
1001 cnt = sscanf(&cmd_buf[13], "%i %i %i", in i40e_dbg_command_write()
1005 } else if (strncmp(&cmd_buf[10], "aq", 2) == 0) { in i40e_dbg_command_write()
1016 } else if (strncmp(&cmd_buf[5], "reset stats", 11) == 0) { in i40e_dbg_command_write()
1028 } else if (strncmp(&cmd_buf[5], "port", 4) == 0) { in i40e_dbg_command_write()
1138 } else if (strncmp(&cmd_buf[5], "debug fwdata", 12) == 0) { in i40e_dbg_command_write()
1147 cnt = sscanf(&cmd_buf[18], "%i %i %i", in i40e_dbg_command_write()
1193 } else if (strncmp(cmd_buf, "pfr", 3) == 0) { in i40e_dbg_command_write()
1197 } else if (strncmp(cmd_buf, "corer", 5) == 0) { in i40e_dbg_command_write()
1201 } else if (strncmp(cmd_buf, "globr", 5) == 0) { in i40e_dbg_command_write()
1205 } else if (strncmp(cmd_buf, "read", 4) == 0) { in i40e_dbg_command_write()
1209 cnt = sscanf(&cmd_buf[4], "%i", &address); in i40e_dbg_command_write()
1226 } else if (strncmp(cmd_buf, "write", 5) == 0) { in i40e_dbg_command_write()
1229 cnt = sscanf(&cmd_buf[5], "%i %i", &address, &value); in i40e_dbg_command_write()
1245 } else if (strncmp(cmd_buf, "clear_stats", 11) == 0) { in i40e_dbg_command_write()
1246 if (strncmp(&cmd_buf[12], "vsi", 3) == 0) { in i40e_dbg_command_write()
1247 cnt = sscanf(&cmd_buf[15], "%i", &vsi_seid); in i40e_dbg_command_write()
1269 } else if (strncmp(&cmd_buf[12], "port", 4) == 0) { in i40e_dbg_command_write()
1279 } else if (strncmp(cmd_buf, "send aq_cmd", 11) == 0) { in i40e_dbg_command_write()
1286 cnt = sscanf(&cmd_buf[11], in i40e_dbg_command_write()
1325 } else if (strncmp(cmd_buf, "send indirect aq_cmd", 20) == 0) { in i40e_dbg_command_write()
1334 cnt = sscanf(&cmd_buf[20], in i40e_dbg_command_write()
1391 } else if (strncmp(cmd_buf, "fd current cnt", 14) == 0) { in i40e_dbg_command_write()
1394 } else if (strncmp(cmd_buf, "lldp", 4) == 0) { in i40e_dbg_command_write()
1395 if (strncmp(&cmd_buf[5], "stop", 4) == 0) { in i40e_dbg_command_write()
1420 } else if (strncmp(&cmd_buf[5], "start", 5) == 0) { in i40e_dbg_command_write()
1446 } else if (strncmp(&cmd_buf[5], in i40e_dbg_command_write()
1474 } else if (strncmp(&cmd_buf[5], "get remote", 10) == 0) { in i40e_dbg_command_write()
1502 } else if (strncmp(&cmd_buf[5], "event on", 8) == 0) { in i40e_dbg_command_write()
1513 } else if (strncmp(&cmd_buf[5], "event off", 9) == 0) { in i40e_dbg_command_write()
1525 } else if (strncmp(cmd_buf, "nvm read", 8) == 0) { in i40e_dbg_command_write()
1532 cnt = sscanf(&cmd_buf[8], "%hx %x %hx", in i40e_dbg_command_write()
1588 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); in i40e_dbg_command_write()
1624 kfree(cmd_buf); in i40e_dbg_command_write()
1625 cmd_buf = NULL; in i40e_dbg_command_write()