Lines Matching refs:cmd_buf
969 char *cmd_buf, *cmd_buf_tmp; in i40e_dbg_command_write() local
980 cmd_buf = kzalloc(count + 1, GFP_KERNEL); in i40e_dbg_command_write()
981 if (!cmd_buf) in i40e_dbg_command_write()
983 bytes_not_copied = copy_from_user(cmd_buf, buffer, count); in i40e_dbg_command_write()
985 kfree(cmd_buf); in i40e_dbg_command_write()
990 cmd_buf[count] = '\0'; in i40e_dbg_command_write()
992 cmd_buf_tmp = strchr(cmd_buf, '\n'); in i40e_dbg_command_write()
995 count = cmd_buf_tmp - cmd_buf + 1; in i40e_dbg_command_write()
998 if (strncmp(cmd_buf, "add vsi", 7) == 0) { in i40e_dbg_command_write()
1000 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
1024 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); in i40e_dbg_command_write()
1026 } else if (strncmp(cmd_buf, "del vsi", 7) == 0) { in i40e_dbg_command_write()
1027 cnt = sscanf(&cmd_buf[7], "%i", &vsi_seid); in i40e_dbg_command_write()
1044 } else if (strncmp(cmd_buf, "add relay", 9) == 0) { in i40e_dbg_command_write()
1048 cnt = sscanf(&cmd_buf[9], "%i %i", &uplink_seid, &vsi_seid); in i40e_dbg_command_write()
1086 } else if (strncmp(cmd_buf, "del relay", 9) == 0) { in i40e_dbg_command_write()
1088 cnt = sscanf(&cmd_buf[9], "%i", &veb_seid); in i40e_dbg_command_write()
1113 } else if (strncmp(cmd_buf, "add macaddr", 11) == 0) { in i40e_dbg_command_write()
1119 cnt = sscanf(&cmd_buf[11], in i40e_dbg_command_write()
1153 } else if (strncmp(cmd_buf, "del macaddr", 11) == 0) { in i40e_dbg_command_write()
1158 cnt = sscanf(&cmd_buf[11], in i40e_dbg_command_write()
1192 } else if (strncmp(cmd_buf, "add pvid", 8) == 0) { in i40e_dbg_command_write()
1197 cnt = sscanf(&cmd_buf[8], "%i %u", &vsi_seid, &v); in i40e_dbg_command_write()
1222 } else if (strncmp(cmd_buf, "del pvid", 8) == 0) { in i40e_dbg_command_write()
1224 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
1243 } else if (strncmp(cmd_buf, "dump", 4) == 0) { in i40e_dbg_command_write()
1244 if (strncmp(&cmd_buf[5], "switch", 6) == 0) { in i40e_dbg_command_write()
1246 } else if (strncmp(&cmd_buf[5], "vsi", 3) == 0) { in i40e_dbg_command_write()
1247 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
1252 } else if (strncmp(&cmd_buf[5], "veb", 3) == 0) { in i40e_dbg_command_write()
1253 cnt = sscanf(&cmd_buf[8], "%i", &vsi_seid); in i40e_dbg_command_write()
1258 } else if (strncmp(&cmd_buf[5], "desc", 4) == 0) { in i40e_dbg_command_write()
1260 if (strncmp(&cmd_buf[10], "rx", 2) == 0) { in i40e_dbg_command_write()
1261 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
1265 } else if (strncmp(&cmd_buf[10], "tx", 2) in i40e_dbg_command_write()
1267 cnt = sscanf(&cmd_buf[12], "%i %i %i", in i40e_dbg_command_write()
1271 } else if (strncmp(&cmd_buf[10], "aq", 2) == 0) { in i40e_dbg_command_write()
1280 } else if (strncmp(&cmd_buf[5], "reset stats", 11) == 0) { in i40e_dbg_command_write()
1292 } else if (strncmp(&cmd_buf[5], "port", 4) == 0) { in i40e_dbg_command_write()
1396 } else if (strncmp(&cmd_buf[5], "debug fwdata", 12) == 0) { in i40e_dbg_command_write()
1405 cnt = sscanf(&cmd_buf[18], "%i %i %i", in i40e_dbg_command_write()
1451 } else if (strncmp(cmd_buf, "msg_enable", 10) == 0) { in i40e_dbg_command_write()
1453 cnt = sscanf(&cmd_buf[10], "%i", &level); in i40e_dbg_command_write()
1468 } else if (strncmp(cmd_buf, "pfr", 3) == 0) { in i40e_dbg_command_write()
1472 } else if (strncmp(cmd_buf, "corer", 5) == 0) { in i40e_dbg_command_write()
1476 } else if (strncmp(cmd_buf, "globr", 5) == 0) { in i40e_dbg_command_write()
1480 } else if (strncmp(cmd_buf, "empr", 4) == 0) { in i40e_dbg_command_write()
1484 } else if (strncmp(cmd_buf, "read", 4) == 0) { in i40e_dbg_command_write()
1488 cnt = sscanf(&cmd_buf[4], "%i", &address); in i40e_dbg_command_write()
1505 } else if (strncmp(cmd_buf, "write", 5) == 0) { in i40e_dbg_command_write()
1508 cnt = sscanf(&cmd_buf[5], "%i %i", &address, &value); in i40e_dbg_command_write()
1524 } else if (strncmp(cmd_buf, "clear_stats", 11) == 0) { in i40e_dbg_command_write()
1525 if (strncmp(&cmd_buf[12], "vsi", 3) == 0) { in i40e_dbg_command_write()
1526 cnt = sscanf(&cmd_buf[15], "%i", &vsi_seid); in i40e_dbg_command_write()
1548 } else if (strncmp(&cmd_buf[12], "port", 4) == 0) { in i40e_dbg_command_write()
1558 } else if (strncmp(cmd_buf, "send aq_cmd", 11) == 0) { in i40e_dbg_command_write()
1565 cnt = sscanf(&cmd_buf[11], in i40e_dbg_command_write()
1604 } else if (strncmp(cmd_buf, "send indirect aq_cmd", 20) == 0) { in i40e_dbg_command_write()
1613 cnt = sscanf(&cmd_buf[20], in i40e_dbg_command_write()
1670 } else if ((strncmp(cmd_buf, "add fd_filter", 13) == 0) || in i40e_dbg_command_write()
1671 (strncmp(cmd_buf, "rem fd_filter", 13) == 0)) { in i40e_dbg_command_write()
1682 if (strncmp(cmd_buf, "add", 3) == 0) in i40e_dbg_command_write()
1702 cnt = sscanf(&cmd_buf[13], in i40e_dbg_command_write()
1748 } else if (strncmp(cmd_buf, "fd current cnt", 14) == 0) { in i40e_dbg_command_write()
1751 } else if (strncmp(cmd_buf, "lldp", 4) == 0) { in i40e_dbg_command_write()
1752 if (strncmp(&cmd_buf[5], "stop", 4) == 0) { in i40e_dbg_command_write()
1777 } else if (strncmp(&cmd_buf[5], "start", 5) == 0) { in i40e_dbg_command_write()
1803 } else if (strncmp(&cmd_buf[5], in i40e_dbg_command_write()
1831 } else if (strncmp(&cmd_buf[5], "get remote", 10) == 0) { in i40e_dbg_command_write()
1859 } else if (strncmp(&cmd_buf[5], "event on", 8) == 0) { in i40e_dbg_command_write()
1870 } else if (strncmp(&cmd_buf[5], "event off", 9) == 0) { in i40e_dbg_command_write()
1882 } else if (strncmp(cmd_buf, "nvm read", 8) == 0) { in i40e_dbg_command_write()
1889 cnt = sscanf(&cmd_buf[8], "%hx %x %hx", in i40e_dbg_command_write()
1945 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); in i40e_dbg_command_write()
1985 kfree(cmd_buf); in i40e_dbg_command_write()
1986 cmd_buf = NULL; in i40e_dbg_command_write()