416{
419 unsigned int opc;
420 unsigned int needCpl;
421 unsigned int needSlotRelease;
422
424 opc = (
unsigned int)nvmeAdminCmd->
OPC;
425
426 needCpl = 1;
427 needSlotRelease = 0;
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442 switch (opc)
443 {
445 {
447 break;
448 }
450 {
452 break;
453 }
455 {
457 break;
458 }
460 {
462 break;
463 }
465 {
467 break;
468 }
470 {
472 break;
473 }
475 {
477 break;
478 }
480 {
481 needCpl = 0;
482 needSlotRelease = 1;
483 nvmeCPL.
dword[0] = 0;
485 break;
486 }
488 {
490 break;
491 }
493 {
494 needCpl = 0;
495 needSlotRelease = 0;
496 nvmeCPL.
dword[0] = 0;
498 break;
499 }
501 {
502 needCpl = 0;
503 needSlotRelease = 0;
504 nvmeCPL.
dword[0] = 0;
506 break;
507 }
508 default:
509 {
510 xil_printf("Not Support Admin Command OPC: %X\r\n", opc);
512 break;
513 }
514 }
515
516 if (needCpl == 1)
518 else if (needSlotRelease == 1)
520 else
521
523
524 xil_printf("Done Admin Command OPC: %X\r\n", opc);
525}
void set_auto_nvme_cpl(unsigned int cmdSlotTag, unsigned int specific, unsigned int statusFieldWord)
void set_nvme_cpl(unsigned int sqId, unsigned int cid, unsigned int specific, unsigned int statusFieldWord)
void set_nvme_slot_release(unsigned int cmdSlotTag)
#define ADMIN_CREATE_IO_CQ
#define ADMIN_SECURITY_RECEIVE
#define ADMIN_SET_FEATURES
#define ADMIN_DELETE_IO_CQ
#define ADMIN_GET_FEATURES
#define ADMIN_ASYNCHRONOUS_EVENT_REQUEST
#define ADMIN_CREATE_IO_SQ
#define ADMIN_DOORBELL_BUFFER_CONFIG
#define ADMIN_GET_LOG_PAGE
#define ADMIN_DELETE_IO_SQ
void handle_get_features(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_identify(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_create_io_sq(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_delete_io_sq(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_delete_io_cq(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_create_io_cq(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_get_log_page(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
void handle_set_features(NVME_ADMIN_COMMAND *nvmeAdminCmd, NVME_COMPLETION *nvmeCPL)
unsigned short cmdSlotTag
unsigned int cmdDword[16]
unsigned short statusFieldWord