bnxt_hsi.h 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519
  1. /* Broadcom NetXtreme-C/E network driver.
  2. *
  3. * Copyright (c) 2014-2016 Broadcom Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation.
  8. */
  9. #ifndef BNXT_HSI_H
  10. #define BNXT_HSI_H
  11. /* per-context HW statistics -- chip view */
  12. struct ctx_hw_stats {
  13. __le64 rx_ucast_pkts;
  14. __le64 rx_mcast_pkts;
  15. __le64 rx_bcast_pkts;
  16. __le64 rx_discard_pkts;
  17. __le64 rx_drop_pkts;
  18. __le64 rx_ucast_bytes;
  19. __le64 rx_mcast_bytes;
  20. __le64 rx_bcast_bytes;
  21. __le64 tx_ucast_pkts;
  22. __le64 tx_mcast_pkts;
  23. __le64 tx_bcast_pkts;
  24. __le64 tx_discard_pkts;
  25. __le64 tx_drop_pkts;
  26. __le64 tx_ucast_bytes;
  27. __le64 tx_mcast_bytes;
  28. __le64 tx_bcast_bytes;
  29. __le64 tpa_pkts;
  30. __le64 tpa_bytes;
  31. __le64 tpa_events;
  32. __le64 tpa_aborts;
  33. };
  34. /* Statistics Ejection Buffer Completion Record (16 bytes) */
  35. struct eject_cmpl {
  36. __le16 type;
  37. #define EJECT_CMPL_TYPE_MASK 0x3fUL
  38. #define EJECT_CMPL_TYPE_SFT 0
  39. #define EJECT_CMPL_TYPE_STAT_EJECT 0x1aUL
  40. __le16 len;
  41. __le32 opaque;
  42. __le32 v;
  43. #define EJECT_CMPL_V 0x1UL
  44. __le32 unused_2;
  45. };
  46. /* HWRM Completion Record (16 bytes) */
  47. struct hwrm_cmpl {
  48. __le16 type;
  49. #define HWRM_CMPL_TYPE_MASK 0x3fUL
  50. #define HWRM_CMPL_TYPE_SFT 0
  51. #define HWRM_CMPL_TYPE_HWRM_DONE 0x20UL
  52. __le16 sequence_id;
  53. __le32 unused_1;
  54. __le32 v;
  55. #define HWRM_CMPL_V 0x1UL
  56. __le32 unused_3;
  57. };
  58. /* HWRM Forwarded Request (16 bytes) */
  59. struct hwrm_fwd_req_cmpl {
  60. __le16 req_len_type;
  61. #define HWRM_FWD_REQ_CMPL_TYPE_MASK 0x3fUL
  62. #define HWRM_FWD_REQ_CMPL_TYPE_SFT 0
  63. #define HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ 0x22UL
  64. #define HWRM_FWD_REQ_CMPL_REQ_LEN_MASK 0xffc0UL
  65. #define HWRM_FWD_REQ_CMPL_REQ_LEN_SFT 6
  66. __le16 source_id;
  67. __le32 unused_0;
  68. __le32 req_buf_addr_v[2];
  69. #define HWRM_FWD_REQ_CMPL_V 0x1UL
  70. #define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_MASK 0xfffffffeUL
  71. #define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_SFT 1
  72. };
  73. /* HWRM Forwarded Response (16 bytes) */
  74. struct hwrm_fwd_resp_cmpl {
  75. __le16 type;
  76. #define HWRM_FWD_RESP_CMPL_TYPE_MASK 0x3fUL
  77. #define HWRM_FWD_RESP_CMPL_TYPE_SFT 0
  78. #define HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP 0x24UL
  79. __le16 source_id;
  80. __le16 resp_len;
  81. __le16 unused_1;
  82. __le32 resp_buf_addr_v[2];
  83. #define HWRM_FWD_RESP_CMPL_V 0x1UL
  84. #define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_MASK 0xfffffffeUL
  85. #define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_SFT 1
  86. };
  87. /* HWRM Asynchronous Event Completion Record (16 bytes) */
  88. struct hwrm_async_event_cmpl {
  89. __le16 type;
  90. #define HWRM_ASYNC_EVENT_CMPL_TYPE_MASK 0x3fUL
  91. #define HWRM_ASYNC_EVENT_CMPL_TYPE_SFT 0
  92. #define HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  93. __le16 event_id;
  94. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE 0x0UL
  95. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE 0x1UL
  96. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE 0x2UL
  97. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE 0x3UL
  98. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED 0x4UL
  99. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED 0x5UL
  100. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE 0x6UL
  101. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE 0x7UL
  102. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD 0x10UL
  103. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD 0x11UL
  104. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_FLR_PROC_CMPLT 0x12UL
  105. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD 0x20UL
  106. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD 0x21UL
  107. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR 0x30UL
  108. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE 0x31UL
  109. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE 0x32UL
  110. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE 0x33UL
  111. #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR 0xffUL
  112. __le32 event_data2;
  113. u8 opaque_v;
  114. #define HWRM_ASYNC_EVENT_CMPL_V 0x1UL
  115. #define HWRM_ASYNC_EVENT_CMPL_OPAQUE_MASK 0xfeUL
  116. #define HWRM_ASYNC_EVENT_CMPL_OPAQUE_SFT 1
  117. u8 timestamp_lo;
  118. __le16 timestamp_hi;
  119. __le32 event_data1;
  120. };
  121. /* HWRM Asynchronous Event Completion Record for link status change (16 bytes) */
  122. struct hwrm_async_event_cmpl_link_status_change {
  123. __le16 type;
  124. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_MASK 0x3fUL
  125. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_SFT 0
  126. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  127. __le16 event_id;
  128. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE 0x0UL
  129. __le32 event_data2;
  130. u8 opaque_v;
  131. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_V 0x1UL
  132. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_MASK 0xfeUL
  133. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_SFT 1
  134. u8 timestamp_lo;
  135. __le16 timestamp_hi;
  136. __le32 event_data1;
  137. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE 0x1UL
  138. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_DOWN (0x0UL << 0)
  139. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP (0x1UL << 0)
  140. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_LAST HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP
  141. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_MASK 0xeUL
  142. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_SFT 1
  143. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffff0UL
  144. #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_SFT 4
  145. };
  146. /* HWRM Asynchronous Event Completion Record for link MTU change (16 bytes) */
  147. struct hwrm_async_event_cmpl_link_mtu_change {
  148. __le16 type;
  149. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_MASK 0x3fUL
  150. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_SFT 0
  151. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  152. __le16 event_id;
  153. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE 0x1UL
  154. __le32 event_data2;
  155. u8 opaque_v;
  156. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_V 0x1UL
  157. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_MASK 0xfeUL
  158. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_SFT 1
  159. u8 timestamp_lo;
  160. __le16 timestamp_hi;
  161. __le32 event_data1;
  162. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_MASK 0xffffUL
  163. #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_SFT 0
  164. };
  165. /* HWRM Asynchronous Event Completion Record for link speed change (16 bytes) */
  166. struct hwrm_async_event_cmpl_link_speed_change {
  167. __le16 type;
  168. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_MASK 0x3fUL
  169. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_SFT 0
  170. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  171. __le16 event_id;
  172. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE 0x2UL
  173. __le32 event_data2;
  174. u8 opaque_v;
  175. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_V 0x1UL
  176. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_MASK 0xfeUL
  177. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_SFT 1
  178. u8 timestamp_lo;
  179. __le16 timestamp_hi;
  180. __le32 event_data1;
  181. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_FORCE 0x1UL
  182. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_MASK 0xfffeUL
  183. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_SFT 1
  184. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100MB (0x1UL << 1)
  185. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_1GB (0xaUL << 1)
  186. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2GB (0x14UL << 1)
  187. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2_5GB (0x19UL << 1)
  188. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_10GB (0x64UL << 1)
  189. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_20GB (0xc8UL << 1)
  190. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_25GB (0xfaUL << 1)
  191. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_40GB (0x190UL << 1)
  192. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_50GB (0x1f4UL << 1)
  193. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB (0x3e8UL << 1)
  194. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_LAST HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB
  195. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffff0000UL
  196. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_SFT 16
  197. };
  198. /* HWRM Asynchronous Event Completion Record for DCB Config change (16 bytes) */
  199. struct hwrm_async_event_cmpl_dcb_config_change {
  200. __le16 type;
  201. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_MASK 0x3fUL
  202. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_SFT 0
  203. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  204. __le16 event_id;
  205. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE 0x3UL
  206. __le32 event_data2;
  207. u8 opaque_v;
  208. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_V 0x1UL
  209. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_MASK 0xfeUL
  210. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_SFT 1
  211. u8 timestamp_lo;
  212. __le16 timestamp_hi;
  213. __le32 event_data1;
  214. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  215. #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0
  216. };
  217. /* HWRM Asynchronous Event Completion Record for port connection not allowed (16 bytes) */
  218. struct hwrm_async_event_cmpl_port_conn_not_allowed {
  219. __le16 type;
  220. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_MASK 0x3fUL
  221. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_SFT 0
  222. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  223. __le16 event_id;
  224. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED 0x4UL
  225. __le32 event_data2;
  226. u8 opaque_v;
  227. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_V 0x1UL
  228. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_MASK 0xfeUL
  229. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_SFT 1
  230. u8 timestamp_lo;
  231. __le16 timestamp_hi;
  232. __le32 event_data1;
  233. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  234. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0
  235. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_MASK 0xff0000UL
  236. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_SFT 16
  237. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_NONE (0x0UL << 16)
  238. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_DISABLETX (0x1UL << 16)
  239. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_WARNINGMSG (0x2UL << 16)
  240. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN (0x3UL << 16)
  241. #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_LAST HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN
  242. };
  243. /* HWRM Asynchronous Event Completion Record for link speed config not allowed (16 bytes) */
  244. struct hwrm_async_event_cmpl_link_speed_cfg_not_allowed {
  245. __le16 type;
  246. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_MASK 0x3fUL
  247. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_SFT 0
  248. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  249. __le16 event_id;
  250. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED 0x5UL
  251. __le32 event_data2;
  252. u8 opaque_v;
  253. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_V 0x1UL
  254. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_MASK 0xfeUL
  255. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_SFT 1
  256. u8 timestamp_lo;
  257. __le16 timestamp_hi;
  258. __le32 event_data1;
  259. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  260. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0
  261. };
  262. /* HWRM Asynchronous Event Completion Record for link speed configuration change (16 bytes) */
  263. struct hwrm_async_event_cmpl_link_speed_cfg_change {
  264. __le16 type;
  265. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_MASK 0x3fUL
  266. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_SFT 0
  267. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  268. __le16 event_id;
  269. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE 0x6UL
  270. __le32 event_data2;
  271. u8 opaque_v;
  272. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_V 0x1UL
  273. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_MASK 0xfeUL
  274. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_SFT 1
  275. u8 timestamp_lo;
  276. __le16 timestamp_hi;
  277. __le32 event_data1;
  278. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  279. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0
  280. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_SUPPORTED_LINK_SPEEDS_CHANGE 0x10000UL
  281. #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_ILLEGAL_LINK_SPEED_CFG 0x20000UL
  282. };
  283. /* HWRM Asynchronous Event Completion Record for Function Driver Unload (16 bytes) */
  284. struct hwrm_async_event_cmpl_func_drvr_unload {
  285. __le16 type;
  286. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_MASK 0x3fUL
  287. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_SFT 0
  288. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  289. __le16 event_id;
  290. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD 0x10UL
  291. __le32 event_data2;
  292. u8 opaque_v;
  293. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_V 0x1UL
  294. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_MASK 0xfeUL
  295. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_SFT 1
  296. u8 timestamp_lo;
  297. __le16 timestamp_hi;
  298. __le32 event_data1;
  299. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK 0xffffUL
  300. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0
  301. };
  302. /* HWRM Asynchronous Event Completion Record for Function Driver load (16 bytes) */
  303. struct hwrm_async_event_cmpl_func_drvr_load {
  304. __le16 type;
  305. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_MASK 0x3fUL
  306. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_SFT 0
  307. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  308. __le16 event_id;
  309. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD 0x11UL
  310. __le32 event_data2;
  311. u8 opaque_v;
  312. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_V 0x1UL
  313. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_MASK 0xfeUL
  314. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_SFT 1
  315. u8 timestamp_lo;
  316. __le16 timestamp_hi;
  317. __le32 event_data1;
  318. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK 0xffffUL
  319. #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
  320. };
  321. /* HWRM Asynchronous Event Completion Record for PF Driver Unload (16 bytes) */
  322. struct hwrm_async_event_cmpl_pf_drvr_unload {
  323. __le16 type;
  324. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_MASK 0x3fUL
  325. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_SFT 0
  326. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  327. __le16 event_id;
  328. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD 0x20UL
  329. __le32 event_data2;
  330. u8 opaque_v;
  331. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_V 0x1UL
  332. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_MASK 0xfeUL
  333. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_SFT 1
  334. u8 timestamp_lo;
  335. __le16 timestamp_hi;
  336. __le32 event_data1;
  337. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK 0xffffUL
  338. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0
  339. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_MASK 0x70000UL
  340. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_SFT 16
  341. };
  342. /* HWRM Asynchronous Event Completion Record for PF Driver load (16 bytes) */
  343. struct hwrm_async_event_cmpl_pf_drvr_load {
  344. __le16 type;
  345. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_MASK 0x3fUL
  346. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_SFT 0
  347. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  348. __le16 event_id;
  349. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD 0x21UL
  350. __le32 event_data2;
  351. u8 opaque_v;
  352. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_V 0x1UL
  353. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_MASK 0xfeUL
  354. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_SFT 1
  355. u8 timestamp_lo;
  356. __le16 timestamp_hi;
  357. __le32 event_data1;
  358. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK 0xffffUL
  359. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
  360. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_MASK 0x70000UL
  361. #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_SFT 16
  362. };
  363. /* HWRM Asynchronous Event Completion Record for VF FLR (16 bytes) */
  364. struct hwrm_async_event_cmpl_vf_flr {
  365. __le16 type;
  366. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_MASK 0x3fUL
  367. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_SFT 0
  368. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  369. __le16 event_id;
  370. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR 0x30UL
  371. __le32 event_data2;
  372. u8 opaque_v;
  373. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_V 0x1UL
  374. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_MASK 0xfeUL
  375. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_SFT 1
  376. u8 timestamp_lo;
  377. __le16 timestamp_hi;
  378. __le32 event_data1;
  379. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK 0xffffUL
  380. #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT 0
  381. };
  382. /* HWRM Asynchronous Event Completion Record for VF MAC Addr change (16 bytes) */
  383. struct hwrm_async_event_cmpl_vf_mac_addr_change {
  384. __le16 type;
  385. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_MASK 0x3fUL
  386. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_SFT 0
  387. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  388. __le16 event_id;
  389. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE 0x31UL
  390. __le32 event_data2;
  391. u8 opaque_v;
  392. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_V 0x1UL
  393. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_MASK 0xfeUL
  394. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_SFT 1
  395. u8 timestamp_lo;
  396. __le16 timestamp_hi;
  397. __le32 event_data1;
  398. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_MASK 0xffffUL
  399. #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_SFT 0
  400. };
  401. /* HWRM Asynchronous Event Completion Record for PF-VF communication status change (16 bytes) */
  402. struct hwrm_async_event_cmpl_pf_vf_comm_status_change {
  403. __le16 type;
  404. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_MASK 0x3fUL
  405. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_SFT 0
  406. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  407. __le16 event_id;
  408. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE 0x32UL
  409. __le32 event_data2;
  410. u8 opaque_v;
  411. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_V 0x1UL
  412. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_MASK 0xfeUL
  413. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_SFT 1
  414. u8 timestamp_lo;
  415. __le16 timestamp_hi;
  416. __le32 event_data1;
  417. #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_DATA1_COMM_ESTABLISHED 0x1UL
  418. };
  419. /* HWRM Asynchronous Event Completion Record for VF configuration change (16 bytes) */
  420. struct hwrm_async_event_cmpl_vf_cfg_change {
  421. __le16 type;
  422. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_MASK 0x3fUL
  423. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_SFT 0
  424. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  425. __le16 event_id;
  426. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE 0x33UL
  427. __le32 event_data2;
  428. u8 opaque_v;
  429. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_V 0x1UL
  430. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_MASK 0xfeUL
  431. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_SFT 1
  432. u8 timestamp_lo;
  433. __le16 timestamp_hi;
  434. __le32 event_data1;
  435. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MTU_CHANGE 0x1UL
  436. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MRU_CHANGE 0x2UL
  437. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_MAC_ADDR_CHANGE 0x4UL
  438. #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_VLAN_CHANGE 0x8UL
  439. };
  440. /* HWRM Asynchronous Event Completion Record for HWRM Error (16 bytes) */
  441. struct hwrm_async_event_cmpl_hwrm_error {
  442. __le16 type;
  443. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_MASK 0x3fUL
  444. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_SFT 0
  445. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  446. __le16 event_id;
  447. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR 0xffUL
  448. __le32 event_data2;
  449. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_MASK 0xffUL
  450. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_SFT 0
  451. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_WARNING 0x0UL
  452. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_NONFATAL 0x1UL
  453. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL 0x2UL
  454. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_LAST HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL
  455. u8 opaque_v;
  456. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_V 0x1UL
  457. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_MASK 0xfeUL
  458. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_SFT 1
  459. u8 timestamp_lo;
  460. __le16 timestamp_hi;
  461. __le32 event_data1;
  462. #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA1_TIMESTAMP 0x1UL
  463. };
  464. /* HW Resource Manager Specification 1.5.1 */
  465. #define HWRM_VERSION_MAJOR 1
  466. #define HWRM_VERSION_MINOR 5
  467. #define HWRM_VERSION_UPDATE 1
  468. #define HWRM_VERSION_STR "1.5.1"
  469. /*
  470. * Following is the signature for HWRM message field that indicates not
  471. * applicable (All F's). Need to cast it the size of the field if needed.
  472. */
  473. #define HWRM_NA_SIGNATURE ((__le32)(-1))
  474. #define HWRM_MAX_REQ_LEN (128) /* hwrm_func_buf_rgtr */
  475. #define HWRM_MAX_RESP_LEN (176) /* hwrm_func_qstats */
  476. #define HW_HASH_INDEX_SIZE 0x80 /* 7 bit indirection table index. */
  477. #define HW_HASH_KEY_SIZE 40
  478. #define HWRM_RESP_VALID_KEY 1 /* valid key for HWRM response */
  479. /* Input (16 bytes) */
  480. struct input {
  481. __le16 req_type;
  482. __le16 cmpl_ring;
  483. __le16 seq_id;
  484. __le16 target_id;
  485. __le64 resp_addr;
  486. };
  487. /* Output (8 bytes) */
  488. struct output {
  489. __le16 error_code;
  490. __le16 req_type;
  491. __le16 seq_id;
  492. __le16 resp_len;
  493. };
  494. /* Command numbering (8 bytes) */
  495. struct cmd_nums {
  496. __le16 req_type;
  497. #define HWRM_VER_GET (0x0UL)
  498. #define HWRM_FUNC_BUF_UNRGTR (0xeUL)
  499. #define HWRM_FUNC_VF_CFG (0xfUL)
  500. #define RESERVED1 (0x10UL)
  501. #define HWRM_FUNC_RESET (0x11UL)
  502. #define HWRM_FUNC_GETFID (0x12UL)
  503. #define HWRM_FUNC_VF_ALLOC (0x13UL)
  504. #define HWRM_FUNC_VF_FREE (0x14UL)
  505. #define HWRM_FUNC_QCAPS (0x15UL)
  506. #define HWRM_FUNC_QCFG (0x16UL)
  507. #define HWRM_FUNC_CFG (0x17UL)
  508. #define HWRM_FUNC_QSTATS (0x18UL)
  509. #define HWRM_FUNC_CLR_STATS (0x19UL)
  510. #define HWRM_FUNC_DRV_UNRGTR (0x1aUL)
  511. #define HWRM_FUNC_VF_RESC_FREE (0x1bUL)
  512. #define HWRM_FUNC_VF_VNIC_IDS_QUERY (0x1cUL)
  513. #define HWRM_FUNC_DRV_RGTR (0x1dUL)
  514. #define HWRM_FUNC_DRV_QVER (0x1eUL)
  515. #define HWRM_FUNC_BUF_RGTR (0x1fUL)
  516. #define HWRM_PORT_PHY_CFG (0x20UL)
  517. #define HWRM_PORT_MAC_CFG (0x21UL)
  518. #define HWRM_PORT_TS_QUERY (0x22UL)
  519. #define HWRM_PORT_QSTATS (0x23UL)
  520. #define HWRM_PORT_LPBK_QSTATS (0x24UL)
  521. #define HWRM_PORT_CLR_STATS (0x25UL)
  522. #define HWRM_PORT_LPBK_CLR_STATS (0x26UL)
  523. #define HWRM_PORT_PHY_QCFG (0x27UL)
  524. #define HWRM_PORT_MAC_QCFG (0x28UL)
  525. #define HWRM_PORT_BLINK_LED (0x29UL)
  526. #define HWRM_PORT_PHY_QCAPS (0x2aUL)
  527. #define HWRM_PORT_PHY_I2C_WRITE (0x2bUL)
  528. #define HWRM_PORT_PHY_I2C_READ (0x2cUL)
  529. #define HWRM_QUEUE_QPORTCFG (0x30UL)
  530. #define HWRM_QUEUE_QCFG (0x31UL)
  531. #define HWRM_QUEUE_CFG (0x32UL)
  532. #define RESERVED2 (0x33UL)
  533. #define RESERVED3 (0x34UL)
  534. #define HWRM_QUEUE_PFCENABLE_QCFG (0x35UL)
  535. #define HWRM_QUEUE_PFCENABLE_CFG (0x36UL)
  536. #define HWRM_QUEUE_PRI2COS_QCFG (0x37UL)
  537. #define HWRM_QUEUE_PRI2COS_CFG (0x38UL)
  538. #define HWRM_QUEUE_COS2BW_QCFG (0x39UL)
  539. #define HWRM_QUEUE_COS2BW_CFG (0x3aUL)
  540. #define HWRM_VNIC_ALLOC (0x40UL)
  541. #define HWRM_VNIC_FREE (0x41UL)
  542. #define HWRM_VNIC_CFG (0x42UL)
  543. #define HWRM_VNIC_QCFG (0x43UL)
  544. #define HWRM_VNIC_TPA_CFG (0x44UL)
  545. #define HWRM_VNIC_TPA_QCFG (0x45UL)
  546. #define HWRM_VNIC_RSS_CFG (0x46UL)
  547. #define HWRM_VNIC_RSS_QCFG (0x47UL)
  548. #define HWRM_VNIC_PLCMODES_CFG (0x48UL)
  549. #define HWRM_VNIC_PLCMODES_QCFG (0x49UL)
  550. #define HWRM_VNIC_QCAPS (0x4aUL)
  551. #define HWRM_RING_ALLOC (0x50UL)
  552. #define HWRM_RING_FREE (0x51UL)
  553. #define HWRM_RING_CMPL_RING_QAGGINT_PARAMS (0x52UL)
  554. #define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS (0x53UL)
  555. #define HWRM_RING_RESET (0x5eUL)
  556. #define HWRM_RING_GRP_ALLOC (0x60UL)
  557. #define HWRM_RING_GRP_FREE (0x61UL)
  558. #define RESERVED5 (0x64UL)
  559. #define RESERVED6 (0x65UL)
  560. #define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC (0x70UL)
  561. #define HWRM_VNIC_RSS_COS_LB_CTX_FREE (0x71UL)
  562. #define HWRM_CFA_L2_FILTER_ALLOC (0x90UL)
  563. #define HWRM_CFA_L2_FILTER_FREE (0x91UL)
  564. #define HWRM_CFA_L2_FILTER_CFG (0x92UL)
  565. #define HWRM_CFA_L2_SET_RX_MASK (0x93UL)
  566. #define RESERVED4 (0x94UL)
  567. #define HWRM_CFA_TUNNEL_FILTER_ALLOC (0x95UL)
  568. #define HWRM_CFA_TUNNEL_FILTER_FREE (0x96UL)
  569. #define HWRM_CFA_ENCAP_RECORD_ALLOC (0x97UL)
  570. #define HWRM_CFA_ENCAP_RECORD_FREE (0x98UL)
  571. #define HWRM_CFA_NTUPLE_FILTER_ALLOC (0x99UL)
  572. #define HWRM_CFA_NTUPLE_FILTER_FREE (0x9aUL)
  573. #define HWRM_CFA_NTUPLE_FILTER_CFG (0x9bUL)
  574. #define HWRM_CFA_EM_FLOW_ALLOC (0x9cUL)
  575. #define HWRM_CFA_EM_FLOW_FREE (0x9dUL)
  576. #define HWRM_CFA_EM_FLOW_CFG (0x9eUL)
  577. #define HWRM_TUNNEL_DST_PORT_QUERY (0xa0UL)
  578. #define HWRM_TUNNEL_DST_PORT_ALLOC (0xa1UL)
  579. #define HWRM_TUNNEL_DST_PORT_FREE (0xa2UL)
  580. #define HWRM_STAT_CTX_ALLOC (0xb0UL)
  581. #define HWRM_STAT_CTX_FREE (0xb1UL)
  582. #define HWRM_STAT_CTX_QUERY (0xb2UL)
  583. #define HWRM_STAT_CTX_CLR_STATS (0xb3UL)
  584. #define HWRM_FW_RESET (0xc0UL)
  585. #define HWRM_FW_QSTATUS (0xc1UL)
  586. #define HWRM_FW_SET_TIME (0xc8UL)
  587. #define HWRM_FW_GET_TIME (0xc9UL)
  588. #define HWRM_EXEC_FWD_RESP (0xd0UL)
  589. #define HWRM_REJECT_FWD_RESP (0xd1UL)
  590. #define HWRM_FWD_RESP (0xd2UL)
  591. #define HWRM_FWD_ASYNC_EVENT_CMPL (0xd3UL)
  592. #define HWRM_TEMP_MONITOR_QUERY (0xe0UL)
  593. #define HWRM_WOL_FILTER_ALLOC (0xf0UL)
  594. #define HWRM_WOL_FILTER_FREE (0xf1UL)
  595. #define HWRM_WOL_FILTER_QCFG (0xf2UL)
  596. #define HWRM_WOL_REASON_QCFG (0xf3UL)
  597. #define HWRM_DBG_READ_DIRECT (0xff10UL)
  598. #define HWRM_DBG_READ_INDIRECT (0xff11UL)
  599. #define HWRM_DBG_WRITE_DIRECT (0xff12UL)
  600. #define HWRM_DBG_WRITE_INDIRECT (0xff13UL)
  601. #define HWRM_DBG_DUMP (0xff14UL)
  602. #define HWRM_NVM_INSTALL_UPDATE (0xfff3UL)
  603. #define HWRM_NVM_MODIFY (0xfff4UL)
  604. #define HWRM_NVM_VERIFY_UPDATE (0xfff5UL)
  605. #define HWRM_NVM_GET_DEV_INFO (0xfff6UL)
  606. #define HWRM_NVM_ERASE_DIR_ENTRY (0xfff7UL)
  607. #define HWRM_NVM_MOD_DIR_ENTRY (0xfff8UL)
  608. #define HWRM_NVM_FIND_DIR_ENTRY (0xfff9UL)
  609. #define HWRM_NVM_GET_DIR_ENTRIES (0xfffaUL)
  610. #define HWRM_NVM_GET_DIR_INFO (0xfffbUL)
  611. #define HWRM_NVM_RAW_DUMP (0xfffcUL)
  612. #define HWRM_NVM_READ (0xfffdUL)
  613. #define HWRM_NVM_WRITE (0xfffeUL)
  614. #define HWRM_NVM_RAW_WRITE_BLK (0xffffUL)
  615. __le16 unused_0[3];
  616. };
  617. /* Return Codes (8 bytes) */
  618. struct ret_codes {
  619. __le16 error_code;
  620. #define HWRM_ERR_CODE_SUCCESS (0x0UL)
  621. #define HWRM_ERR_CODE_FAIL (0x1UL)
  622. #define HWRM_ERR_CODE_INVALID_PARAMS (0x2UL)
  623. #define HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED (0x3UL)
  624. #define HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR (0x4UL)
  625. #define HWRM_ERR_CODE_INVALID_FLAGS (0x5UL)
  626. #define HWRM_ERR_CODE_INVALID_ENABLES (0x6UL)
  627. #define HWRM_ERR_CODE_HWRM_ERROR (0xfUL)
  628. #define HWRM_ERR_CODE_UNKNOWN_ERR (0xfffeUL)
  629. #define HWRM_ERR_CODE_CMD_NOT_SUPPORTED (0xffffUL)
  630. __le16 unused_0[3];
  631. };
  632. /* Output (16 bytes) */
  633. struct hwrm_err_output {
  634. __le16 error_code;
  635. __le16 req_type;
  636. __le16 seq_id;
  637. __le16 resp_len;
  638. __le32 opaque_0;
  639. __le16 opaque_1;
  640. u8 cmd_err;
  641. u8 valid;
  642. };
  643. /* Port Tx Statistics Formats (408 bytes) */
  644. struct tx_port_stats {
  645. __le64 tx_64b_frames;
  646. __le64 tx_65b_127b_frames;
  647. __le64 tx_128b_255b_frames;
  648. __le64 tx_256b_511b_frames;
  649. __le64 tx_512b_1023b_frames;
  650. __le64 tx_1024b_1518_frames;
  651. __le64 tx_good_vlan_frames;
  652. __le64 tx_1519b_2047_frames;
  653. __le64 tx_2048b_4095b_frames;
  654. __le64 tx_4096b_9216b_frames;
  655. __le64 tx_9217b_16383b_frames;
  656. __le64 tx_good_frames;
  657. __le64 tx_total_frames;
  658. __le64 tx_ucast_frames;
  659. __le64 tx_mcast_frames;
  660. __le64 tx_bcast_frames;
  661. __le64 tx_pause_frames;
  662. __le64 tx_pfc_frames;
  663. __le64 tx_jabber_frames;
  664. __le64 tx_fcs_err_frames;
  665. __le64 tx_control_frames;
  666. __le64 tx_oversz_frames;
  667. __le64 tx_single_dfrl_frames;
  668. __le64 tx_multi_dfrl_frames;
  669. __le64 tx_single_coll_frames;
  670. __le64 tx_multi_coll_frames;
  671. __le64 tx_late_coll_frames;
  672. __le64 tx_excessive_coll_frames;
  673. __le64 tx_frag_frames;
  674. __le64 tx_err;
  675. __le64 tx_tagged_frames;
  676. __le64 tx_dbl_tagged_frames;
  677. __le64 tx_runt_frames;
  678. __le64 tx_fifo_underruns;
  679. __le64 tx_pfc_ena_frames_pri0;
  680. __le64 tx_pfc_ena_frames_pri1;
  681. __le64 tx_pfc_ena_frames_pri2;
  682. __le64 tx_pfc_ena_frames_pri3;
  683. __le64 tx_pfc_ena_frames_pri4;
  684. __le64 tx_pfc_ena_frames_pri5;
  685. __le64 tx_pfc_ena_frames_pri6;
  686. __le64 tx_pfc_ena_frames_pri7;
  687. __le64 tx_eee_lpi_events;
  688. __le64 tx_eee_lpi_duration;
  689. __le64 tx_llfc_logical_msgs;
  690. __le64 tx_hcfc_msgs;
  691. __le64 tx_total_collisions;
  692. __le64 tx_bytes;
  693. __le64 tx_xthol_frames;
  694. __le64 tx_stat_discard;
  695. __le64 tx_stat_error;
  696. };
  697. /* Port Rx Statistics Formats (528 bytes) */
  698. struct rx_port_stats {
  699. __le64 rx_64b_frames;
  700. __le64 rx_65b_127b_frames;
  701. __le64 rx_128b_255b_frames;
  702. __le64 rx_256b_511b_frames;
  703. __le64 rx_512b_1023b_frames;
  704. __le64 rx_1024b_1518_frames;
  705. __le64 rx_good_vlan_frames;
  706. __le64 rx_1519b_2047b_frames;
  707. __le64 rx_2048b_4095b_frames;
  708. __le64 rx_4096b_9216b_frames;
  709. __le64 rx_9217b_16383b_frames;
  710. __le64 rx_total_frames;
  711. __le64 rx_ucast_frames;
  712. __le64 rx_mcast_frames;
  713. __le64 rx_bcast_frames;
  714. __le64 rx_fcs_err_frames;
  715. __le64 rx_ctrl_frames;
  716. __le64 rx_pause_frames;
  717. __le64 rx_pfc_frames;
  718. __le64 rx_unsupported_opcode_frames;
  719. __le64 rx_unsupported_da_pausepfc_frames;
  720. __le64 rx_wrong_sa_frames;
  721. __le64 rx_align_err_frames;
  722. __le64 rx_oor_len_frames;
  723. __le64 rx_code_err_frames;
  724. __le64 rx_false_carrier_frames;
  725. __le64 rx_ovrsz_frames;
  726. __le64 rx_jbr_frames;
  727. __le64 rx_mtu_err_frames;
  728. __le64 rx_match_crc_frames;
  729. __le64 rx_promiscuous_frames;
  730. __le64 rx_tagged_frames;
  731. __le64 rx_double_tagged_frames;
  732. __le64 rx_trunc_frames;
  733. __le64 rx_good_frames;
  734. __le64 rx_pfc_xon2xoff_frames_pri0;
  735. __le64 rx_pfc_xon2xoff_frames_pri1;
  736. __le64 rx_pfc_xon2xoff_frames_pri2;
  737. __le64 rx_pfc_xon2xoff_frames_pri3;
  738. __le64 rx_pfc_xon2xoff_frames_pri4;
  739. __le64 rx_pfc_xon2xoff_frames_pri5;
  740. __le64 rx_pfc_xon2xoff_frames_pri6;
  741. __le64 rx_pfc_xon2xoff_frames_pri7;
  742. __le64 rx_pfc_ena_frames_pri0;
  743. __le64 rx_pfc_ena_frames_pri1;
  744. __le64 rx_pfc_ena_frames_pri2;
  745. __le64 rx_pfc_ena_frames_pri3;
  746. __le64 rx_pfc_ena_frames_pri4;
  747. __le64 rx_pfc_ena_frames_pri5;
  748. __le64 rx_pfc_ena_frames_pri6;
  749. __le64 rx_pfc_ena_frames_pri7;
  750. __le64 rx_sch_crc_err_frames;
  751. __le64 rx_undrsz_frames;
  752. __le64 rx_frag_frames;
  753. __le64 rx_eee_lpi_events;
  754. __le64 rx_eee_lpi_duration;
  755. __le64 rx_llfc_physical_msgs;
  756. __le64 rx_llfc_logical_msgs;
  757. __le64 rx_llfc_msgs_with_crc_err;
  758. __le64 rx_hcfc_msgs;
  759. __le64 rx_hcfc_msgs_with_crc_err;
  760. __le64 rx_bytes;
  761. __le64 rx_runt_bytes;
  762. __le64 rx_runt_frames;
  763. __le64 rx_stat_discard;
  764. __le64 rx_stat_err;
  765. };
  766. /* hwrm_ver_get */
  767. /* Input (24 bytes) */
  768. struct hwrm_ver_get_input {
  769. __le16 req_type;
  770. __le16 cmpl_ring;
  771. __le16 seq_id;
  772. __le16 target_id;
  773. __le64 resp_addr;
  774. u8 hwrm_intf_maj;
  775. u8 hwrm_intf_min;
  776. u8 hwrm_intf_upd;
  777. u8 unused_0[5];
  778. };
  779. /* Output (128 bytes) */
  780. struct hwrm_ver_get_output {
  781. __le16 error_code;
  782. __le16 req_type;
  783. __le16 seq_id;
  784. __le16 resp_len;
  785. u8 hwrm_intf_maj;
  786. u8 hwrm_intf_min;
  787. u8 hwrm_intf_upd;
  788. u8 hwrm_intf_rsvd;
  789. u8 hwrm_fw_maj;
  790. u8 hwrm_fw_min;
  791. u8 hwrm_fw_bld;
  792. u8 hwrm_fw_rsvd;
  793. u8 mgmt_fw_maj;
  794. u8 mgmt_fw_min;
  795. u8 mgmt_fw_bld;
  796. u8 mgmt_fw_rsvd;
  797. u8 netctrl_fw_maj;
  798. u8 netctrl_fw_min;
  799. u8 netctrl_fw_bld;
  800. u8 netctrl_fw_rsvd;
  801. __le32 dev_caps_cfg;
  802. #define VER_GET_RESP_DEV_CAPS_CFG_SECURE_FW_UPD_SUPPORTED 0x1UL
  803. #define VER_GET_RESP_DEV_CAPS_CFG_FW_DCBX_AGENT_SUPPORTED 0x2UL
  804. u8 roce_fw_maj;
  805. u8 roce_fw_min;
  806. u8 roce_fw_bld;
  807. u8 roce_fw_rsvd;
  808. char hwrm_fw_name[16];
  809. char mgmt_fw_name[16];
  810. char netctrl_fw_name[16];
  811. __le32 reserved2[4];
  812. char roce_fw_name[16];
  813. __le16 chip_num;
  814. u8 chip_rev;
  815. u8 chip_metal;
  816. u8 chip_bond_id;
  817. u8 chip_platform_type;
  818. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_ASIC 0x0UL
  819. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_FPGA 0x1UL
  820. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_PALLADIUM 0x2UL
  821. __le16 max_req_win_len;
  822. __le16 max_resp_len;
  823. __le16 def_req_timeout;
  824. u8 unused_0;
  825. u8 unused_1;
  826. u8 unused_2;
  827. u8 valid;
  828. };
  829. /* hwrm_func_reset */
  830. /* Input (24 bytes) */
  831. struct hwrm_func_reset_input {
  832. __le16 req_type;
  833. __le16 cmpl_ring;
  834. __le16 seq_id;
  835. __le16 target_id;
  836. __le64 resp_addr;
  837. __le32 enables;
  838. #define FUNC_RESET_REQ_ENABLES_VF_ID_VALID 0x1UL
  839. __le16 vf_id;
  840. u8 func_reset_level;
  841. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETALL 0x0UL
  842. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETME 0x1UL
  843. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETCHILDREN 0x2UL
  844. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETVF 0x3UL
  845. u8 unused_0;
  846. };
  847. /* Output (16 bytes) */
  848. struct hwrm_func_reset_output {
  849. __le16 error_code;
  850. __le16 req_type;
  851. __le16 seq_id;
  852. __le16 resp_len;
  853. __le32 unused_0;
  854. u8 unused_1;
  855. u8 unused_2;
  856. u8 unused_3;
  857. u8 valid;
  858. };
  859. /* hwrm_func_getfid */
  860. /* Input (24 bytes) */
  861. struct hwrm_func_getfid_input {
  862. __le16 req_type;
  863. __le16 cmpl_ring;
  864. __le16 seq_id;
  865. __le16 target_id;
  866. __le64 resp_addr;
  867. __le32 enables;
  868. #define FUNC_GETFID_REQ_ENABLES_PCI_ID 0x1UL
  869. __le16 pci_id;
  870. __le16 unused_0;
  871. };
  872. /* Output (16 bytes) */
  873. struct hwrm_func_getfid_output {
  874. __le16 error_code;
  875. __le16 req_type;
  876. __le16 seq_id;
  877. __le16 resp_len;
  878. __le16 fid;
  879. u8 unused_0;
  880. u8 unused_1;
  881. u8 unused_2;
  882. u8 unused_3;
  883. u8 unused_4;
  884. u8 valid;
  885. };
  886. /* hwrm_func_vf_alloc */
  887. /* Input (24 bytes) */
  888. struct hwrm_func_vf_alloc_input {
  889. __le16 req_type;
  890. __le16 cmpl_ring;
  891. __le16 seq_id;
  892. __le16 target_id;
  893. __le64 resp_addr;
  894. __le32 enables;
  895. #define FUNC_VF_ALLOC_REQ_ENABLES_FIRST_VF_ID 0x1UL
  896. __le16 first_vf_id;
  897. __le16 num_vfs;
  898. };
  899. /* Output (16 bytes) */
  900. struct hwrm_func_vf_alloc_output {
  901. __le16 error_code;
  902. __le16 req_type;
  903. __le16 seq_id;
  904. __le16 resp_len;
  905. __le16 first_vf_id;
  906. u8 unused_0;
  907. u8 unused_1;
  908. u8 unused_2;
  909. u8 unused_3;
  910. u8 unused_4;
  911. u8 valid;
  912. };
  913. /* hwrm_func_vf_free */
  914. /* Input (24 bytes) */
  915. struct hwrm_func_vf_free_input {
  916. __le16 req_type;
  917. __le16 cmpl_ring;
  918. __le16 seq_id;
  919. __le16 target_id;
  920. __le64 resp_addr;
  921. __le32 enables;
  922. #define FUNC_VF_FREE_REQ_ENABLES_FIRST_VF_ID 0x1UL
  923. __le16 first_vf_id;
  924. __le16 num_vfs;
  925. };
  926. /* Output (16 bytes) */
  927. struct hwrm_func_vf_free_output {
  928. __le16 error_code;
  929. __le16 req_type;
  930. __le16 seq_id;
  931. __le16 resp_len;
  932. __le32 unused_0;
  933. u8 unused_1;
  934. u8 unused_2;
  935. u8 unused_3;
  936. u8 valid;
  937. };
  938. /* hwrm_func_vf_cfg */
  939. /* Input (32 bytes) */
  940. struct hwrm_func_vf_cfg_input {
  941. __le16 req_type;
  942. __le16 cmpl_ring;
  943. __le16 seq_id;
  944. __le16 target_id;
  945. __le64 resp_addr;
  946. __le32 enables;
  947. #define FUNC_VF_CFG_REQ_ENABLES_MTU 0x1UL
  948. #define FUNC_VF_CFG_REQ_ENABLES_GUEST_VLAN 0x2UL
  949. #define FUNC_VF_CFG_REQ_ENABLES_ASYNC_EVENT_CR 0x4UL
  950. #define FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR 0x8UL
  951. __le16 mtu;
  952. __le16 guest_vlan;
  953. __le16 async_event_cr;
  954. u8 dflt_mac_addr[6];
  955. };
  956. /* Output (16 bytes) */
  957. struct hwrm_func_vf_cfg_output {
  958. __le16 error_code;
  959. __le16 req_type;
  960. __le16 seq_id;
  961. __le16 resp_len;
  962. __le32 unused_0;
  963. u8 unused_1;
  964. u8 unused_2;
  965. u8 unused_3;
  966. u8 valid;
  967. };
  968. /* hwrm_func_qcaps */
  969. /* Input (24 bytes) */
  970. struct hwrm_func_qcaps_input {
  971. __le16 req_type;
  972. __le16 cmpl_ring;
  973. __le16 seq_id;
  974. __le16 target_id;
  975. __le64 resp_addr;
  976. __le16 fid;
  977. __le16 unused_0[3];
  978. };
  979. /* Output (80 bytes) */
  980. struct hwrm_func_qcaps_output {
  981. __le16 error_code;
  982. __le16 req_type;
  983. __le16 seq_id;
  984. __le16 resp_len;
  985. __le16 fid;
  986. __le16 port_id;
  987. __le32 flags;
  988. #define FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED 0x1UL
  989. #define FUNC_QCAPS_RESP_FLAGS_GLOBAL_MSIX_AUTOMASKING 0x2UL
  990. #define FUNC_QCAPS_RESP_FLAGS_PTP_SUPPORTED 0x4UL
  991. #define FUNC_QCAPS_RESP_FLAGS_ROCE_V1_SUPPORTED 0x8UL
  992. #define FUNC_QCAPS_RESP_FLAGS_ROCE_V2_SUPPORTED 0x10UL
  993. #define FUNC_QCAPS_RESP_FLAGS_WOL_MAGICPKT_SUPPORTED 0x20UL
  994. #define FUNC_QCAPS_RESP_FLAGS_WOL_BMP_SUPPORTED 0x40UL
  995. #define FUNC_QCAPS_RESP_FLAGS_TX_RING_RL_SUPPORTED 0x80UL
  996. #define FUNC_QCAPS_RESP_FLAGS_TX_BW_CFG_SUPPORTED 0x100UL
  997. #define FUNC_QCAPS_RESP_FLAGS_VF_TX_RING_RL_SUPPORTED 0x200UL
  998. #define FUNC_QCAPS_RESP_FLAGS_VF_BW_CFG_SUPPORTED 0x400UL
  999. u8 mac_address[6];
  1000. __le16 max_rsscos_ctx;
  1001. __le16 max_cmpl_rings;
  1002. __le16 max_tx_rings;
  1003. __le16 max_rx_rings;
  1004. __le16 max_l2_ctxs;
  1005. __le16 max_vnics;
  1006. __le16 first_vf_id;
  1007. __le16 max_vfs;
  1008. __le16 max_stat_ctx;
  1009. __le32 max_encap_records;
  1010. __le32 max_decap_records;
  1011. __le32 max_tx_em_flows;
  1012. __le32 max_tx_wm_flows;
  1013. __le32 max_rx_em_flows;
  1014. __le32 max_rx_wm_flows;
  1015. __le32 max_mcast_filters;
  1016. __le32 max_flow_id;
  1017. __le32 max_hw_ring_grps;
  1018. __le16 max_sp_tx_rings;
  1019. u8 unused_0;
  1020. u8 valid;
  1021. };
  1022. /* hwrm_func_qcfg */
  1023. /* Input (24 bytes) */
  1024. struct hwrm_func_qcfg_input {
  1025. __le16 req_type;
  1026. __le16 cmpl_ring;
  1027. __le16 seq_id;
  1028. __le16 target_id;
  1029. __le64 resp_addr;
  1030. __le16 fid;
  1031. __le16 unused_0[3];
  1032. };
  1033. /* Output (72 bytes) */
  1034. struct hwrm_func_qcfg_output {
  1035. __le16 error_code;
  1036. __le16 req_type;
  1037. __le16 seq_id;
  1038. __le16 resp_len;
  1039. __le16 fid;
  1040. __le16 port_id;
  1041. __le16 vlan;
  1042. __le16 flags;
  1043. #define FUNC_QCFG_RESP_FLAGS_OOB_WOL_MAGICPKT_ENABLED 0x1UL
  1044. #define FUNC_QCFG_RESP_FLAGS_OOB_WOL_BMP_ENABLED 0x2UL
  1045. #define FUNC_QCFG_RESP_FLAGS_FW_DCBX_AGENT_ENABLED 0x4UL
  1046. u8 mac_address[6];
  1047. __le16 pci_id;
  1048. __le16 alloc_rsscos_ctx;
  1049. __le16 alloc_cmpl_rings;
  1050. __le16 alloc_tx_rings;
  1051. __le16 alloc_rx_rings;
  1052. __le16 alloc_l2_ctx;
  1053. __le16 alloc_vnics;
  1054. __le16 mtu;
  1055. __le16 mru;
  1056. __le16 stat_ctx_id;
  1057. u8 port_partition_type;
  1058. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_SPF 0x0UL
  1059. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_MPFS 0x1UL
  1060. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0 0x2UL
  1061. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5 0x3UL
  1062. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR2_0 0x4UL
  1063. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_UNKNOWN 0xffUL
  1064. u8 unused_0;
  1065. __le16 dflt_vnic_id;
  1066. u8 unused_1;
  1067. u8 unused_2;
  1068. __le32 min_bw;
  1069. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  1070. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_SFT 0
  1071. #define FUNC_QCFG_RESP_MIN_BW_RSVD 0x10000000UL
  1072. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1073. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_SFT 29
  1074. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  1075. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1076. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1077. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_LAST FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_INVALID
  1078. __le32 max_bw;
  1079. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  1080. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_SFT 0
  1081. #define FUNC_QCFG_RESP_MAX_BW_RSVD 0x10000000UL
  1082. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1083. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_SFT 29
  1084. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  1085. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1086. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1087. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_LAST FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_INVALID
  1088. u8 evb_mode;
  1089. #define FUNC_QCFG_RESP_EVB_MODE_NO_EVB 0x0UL
  1090. #define FUNC_QCFG_RESP_EVB_MODE_VEB 0x1UL
  1091. #define FUNC_QCFG_RESP_EVB_MODE_VEPA 0x2UL
  1092. u8 unused_3;
  1093. __le16 alloc_vfs;
  1094. __le32 alloc_mcast_filters;
  1095. __le32 alloc_hw_ring_grps;
  1096. __le16 alloc_sp_tx_rings;
  1097. u8 unused_4;
  1098. u8 valid;
  1099. };
  1100. /* hwrm_func_cfg */
  1101. /* Input (88 bytes) */
  1102. struct hwrm_func_cfg_input {
  1103. __le16 req_type;
  1104. __le16 cmpl_ring;
  1105. __le16 seq_id;
  1106. __le16 target_id;
  1107. __le64 resp_addr;
  1108. __le16 fid;
  1109. u8 unused_0;
  1110. u8 unused_1;
  1111. __le32 flags;
  1112. #define FUNC_CFG_REQ_FLAGS_PROM_MODE 0x1UL
  1113. #define FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK 0x2UL
  1114. #define FUNC_CFG_REQ_FLAGS_SRC_IP_ADDR_CHECK 0x4UL
  1115. #define FUNC_CFG_REQ_FLAGS_VLAN_PRI_MATCH 0x8UL
  1116. #define FUNC_CFG_REQ_FLAGS_DFLT_PRI_NOMATCH 0x10UL
  1117. #define FUNC_CFG_REQ_FLAGS_DISABLE_PAUSE 0x20UL
  1118. #define FUNC_CFG_REQ_FLAGS_DISABLE_STP 0x40UL
  1119. #define FUNC_CFG_REQ_FLAGS_DISABLE_LLDP 0x80UL
  1120. #define FUNC_CFG_REQ_FLAGS_DISABLE_PTPV2 0x100UL
  1121. __le32 enables;
  1122. #define FUNC_CFG_REQ_ENABLES_MTU 0x1UL
  1123. #define FUNC_CFG_REQ_ENABLES_MRU 0x2UL
  1124. #define FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS 0x4UL
  1125. #define FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS 0x8UL
  1126. #define FUNC_CFG_REQ_ENABLES_NUM_TX_RINGS 0x10UL
  1127. #define FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS 0x20UL
  1128. #define FUNC_CFG_REQ_ENABLES_NUM_L2_CTXS 0x40UL
  1129. #define FUNC_CFG_REQ_ENABLES_NUM_VNICS 0x80UL
  1130. #define FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS 0x100UL
  1131. #define FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR 0x200UL
  1132. #define FUNC_CFG_REQ_ENABLES_DFLT_VLAN 0x400UL
  1133. #define FUNC_CFG_REQ_ENABLES_DFLT_IP_ADDR 0x800UL
  1134. #define FUNC_CFG_REQ_ENABLES_MIN_BW 0x1000UL
  1135. #define FUNC_CFG_REQ_ENABLES_MAX_BW 0x2000UL
  1136. #define FUNC_CFG_REQ_ENABLES_ASYNC_EVENT_CR 0x4000UL
  1137. #define FUNC_CFG_REQ_ENABLES_VLAN_ANTISPOOF_MODE 0x8000UL
  1138. #define FUNC_CFG_REQ_ENABLES_ALLOWED_VLAN_PRIS 0x10000UL
  1139. #define FUNC_CFG_REQ_ENABLES_EVB_MODE 0x20000UL
  1140. #define FUNC_CFG_REQ_ENABLES_NUM_MCAST_FILTERS 0x40000UL
  1141. #define FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS 0x80000UL
  1142. __le16 mtu;
  1143. __le16 mru;
  1144. __le16 num_rsscos_ctxs;
  1145. __le16 num_cmpl_rings;
  1146. __le16 num_tx_rings;
  1147. __le16 num_rx_rings;
  1148. __le16 num_l2_ctxs;
  1149. __le16 num_vnics;
  1150. __le16 num_stat_ctxs;
  1151. __le16 num_hw_ring_grps;
  1152. u8 dflt_mac_addr[6];
  1153. __le16 dflt_vlan;
  1154. __be32 dflt_ip_addr[4];
  1155. __le32 min_bw;
  1156. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  1157. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_SFT 0
  1158. #define FUNC_CFG_REQ_MIN_BW_RSVD 0x10000000UL
  1159. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1160. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_SFT 29
  1161. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  1162. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1163. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1164. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_LAST FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_INVALID
  1165. __le32 max_bw;
  1166. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  1167. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_SFT 0
  1168. #define FUNC_CFG_REQ_MAX_BW_RSVD 0x10000000UL
  1169. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1170. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_SFT 29
  1171. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  1172. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1173. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1174. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_LAST FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_INVALID
  1175. __le16 async_event_cr;
  1176. u8 vlan_antispoof_mode;
  1177. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_NOCHECK 0x0UL
  1178. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN 0x1UL
  1179. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_INSERT_IF_VLANDNE 0x2UL
  1180. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN 0x3UL
  1181. u8 allowed_vlan_pris;
  1182. u8 evb_mode;
  1183. #define FUNC_CFG_REQ_EVB_MODE_NO_EVB 0x0UL
  1184. #define FUNC_CFG_REQ_EVB_MODE_VEB 0x1UL
  1185. #define FUNC_CFG_REQ_EVB_MODE_VEPA 0x2UL
  1186. u8 unused_2;
  1187. __le16 num_mcast_filters;
  1188. };
  1189. /* Output (16 bytes) */
  1190. struct hwrm_func_cfg_output {
  1191. __le16 error_code;
  1192. __le16 req_type;
  1193. __le16 seq_id;
  1194. __le16 resp_len;
  1195. __le32 unused_0;
  1196. u8 unused_1;
  1197. u8 unused_2;
  1198. u8 unused_3;
  1199. u8 valid;
  1200. };
  1201. /* hwrm_func_qstats */
  1202. /* Input (24 bytes) */
  1203. struct hwrm_func_qstats_input {
  1204. __le16 req_type;
  1205. __le16 cmpl_ring;
  1206. __le16 seq_id;
  1207. __le16 target_id;
  1208. __le64 resp_addr;
  1209. __le16 fid;
  1210. __le16 unused_0[3];
  1211. };
  1212. /* Output (176 bytes) */
  1213. struct hwrm_func_qstats_output {
  1214. __le16 error_code;
  1215. __le16 req_type;
  1216. __le16 seq_id;
  1217. __le16 resp_len;
  1218. __le64 tx_ucast_pkts;
  1219. __le64 tx_mcast_pkts;
  1220. __le64 tx_bcast_pkts;
  1221. __le64 tx_err_pkts;
  1222. __le64 tx_drop_pkts;
  1223. __le64 tx_ucast_bytes;
  1224. __le64 tx_mcast_bytes;
  1225. __le64 tx_bcast_bytes;
  1226. __le64 rx_ucast_pkts;
  1227. __le64 rx_mcast_pkts;
  1228. __le64 rx_bcast_pkts;
  1229. __le64 rx_err_pkts;
  1230. __le64 rx_drop_pkts;
  1231. __le64 rx_ucast_bytes;
  1232. __le64 rx_mcast_bytes;
  1233. __le64 rx_bcast_bytes;
  1234. __le64 rx_agg_pkts;
  1235. __le64 rx_agg_bytes;
  1236. __le64 rx_agg_events;
  1237. __le64 rx_agg_aborts;
  1238. __le32 unused_0;
  1239. u8 unused_1;
  1240. u8 unused_2;
  1241. u8 unused_3;
  1242. u8 valid;
  1243. };
  1244. /* hwrm_func_clr_stats */
  1245. /* Input (24 bytes) */
  1246. struct hwrm_func_clr_stats_input {
  1247. __le16 req_type;
  1248. __le16 cmpl_ring;
  1249. __le16 seq_id;
  1250. __le16 target_id;
  1251. __le64 resp_addr;
  1252. __le16 fid;
  1253. __le16 unused_0[3];
  1254. };
  1255. /* Output (16 bytes) */
  1256. struct hwrm_func_clr_stats_output {
  1257. __le16 error_code;
  1258. __le16 req_type;
  1259. __le16 seq_id;
  1260. __le16 resp_len;
  1261. __le32 unused_0;
  1262. u8 unused_1;
  1263. u8 unused_2;
  1264. u8 unused_3;
  1265. u8 valid;
  1266. };
  1267. /* hwrm_func_vf_resc_free */
  1268. /* Input (24 bytes) */
  1269. struct hwrm_func_vf_resc_free_input {
  1270. __le16 req_type;
  1271. __le16 cmpl_ring;
  1272. __le16 seq_id;
  1273. __le16 target_id;
  1274. __le64 resp_addr;
  1275. __le16 vf_id;
  1276. __le16 unused_0[3];
  1277. };
  1278. /* Output (16 bytes) */
  1279. struct hwrm_func_vf_resc_free_output {
  1280. __le16 error_code;
  1281. __le16 req_type;
  1282. __le16 seq_id;
  1283. __le16 resp_len;
  1284. __le32 unused_0;
  1285. u8 unused_1;
  1286. u8 unused_2;
  1287. u8 unused_3;
  1288. u8 valid;
  1289. };
  1290. /* hwrm_func_vf_vnic_ids_query */
  1291. /* Input (32 bytes) */
  1292. struct hwrm_func_vf_vnic_ids_query_input {
  1293. __le16 req_type;
  1294. __le16 cmpl_ring;
  1295. __le16 seq_id;
  1296. __le16 target_id;
  1297. __le64 resp_addr;
  1298. __le16 vf_id;
  1299. u8 unused_0;
  1300. u8 unused_1;
  1301. __le32 max_vnic_id_cnt;
  1302. __le64 vnic_id_tbl_addr;
  1303. };
  1304. /* Output (16 bytes) */
  1305. struct hwrm_func_vf_vnic_ids_query_output {
  1306. __le16 error_code;
  1307. __le16 req_type;
  1308. __le16 seq_id;
  1309. __le16 resp_len;
  1310. __le32 vnic_id_cnt;
  1311. u8 unused_0;
  1312. u8 unused_1;
  1313. u8 unused_2;
  1314. u8 valid;
  1315. };
  1316. /* hwrm_func_drv_rgtr */
  1317. /* Input (80 bytes) */
  1318. struct hwrm_func_drv_rgtr_input {
  1319. __le16 req_type;
  1320. __le16 cmpl_ring;
  1321. __le16 seq_id;
  1322. __le16 target_id;
  1323. __le64 resp_addr;
  1324. __le32 flags;
  1325. #define FUNC_DRV_RGTR_REQ_FLAGS_FWD_ALL_MODE 0x1UL
  1326. #define FUNC_DRV_RGTR_REQ_FLAGS_FWD_NONE_MODE 0x2UL
  1327. __le32 enables;
  1328. #define FUNC_DRV_RGTR_REQ_ENABLES_OS_TYPE 0x1UL
  1329. #define FUNC_DRV_RGTR_REQ_ENABLES_VER 0x2UL
  1330. #define FUNC_DRV_RGTR_REQ_ENABLES_TIMESTAMP 0x4UL
  1331. #define FUNC_DRV_RGTR_REQ_ENABLES_VF_REQ_FWD 0x8UL
  1332. #define FUNC_DRV_RGTR_REQ_ENABLES_ASYNC_EVENT_FWD 0x10UL
  1333. __le16 os_type;
  1334. #define FUNC_DRV_RGTR_REQ_OS_TYPE_UNKNOWN 0x0UL
  1335. #define FUNC_DRV_RGTR_REQ_OS_TYPE_OTHER 0x1UL
  1336. #define FUNC_DRV_RGTR_REQ_OS_TYPE_MSDOS 0xeUL
  1337. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WINDOWS 0x12UL
  1338. #define FUNC_DRV_RGTR_REQ_OS_TYPE_SOLARIS 0x1dUL
  1339. #define FUNC_DRV_RGTR_REQ_OS_TYPE_LINUX 0x24UL
  1340. #define FUNC_DRV_RGTR_REQ_OS_TYPE_FREEBSD 0x2aUL
  1341. #define FUNC_DRV_RGTR_REQ_OS_TYPE_ESXI 0x68UL
  1342. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WIN864 0x73UL
  1343. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WIN2012R2 0x74UL
  1344. u8 ver_maj;
  1345. u8 ver_min;
  1346. u8 ver_upd;
  1347. u8 unused_0;
  1348. __le16 unused_1;
  1349. __le32 timestamp;
  1350. __le32 unused_2;
  1351. __le32 vf_req_fwd[8];
  1352. __le32 async_event_fwd[8];
  1353. };
  1354. /* Output (16 bytes) */
  1355. struct hwrm_func_drv_rgtr_output {
  1356. __le16 error_code;
  1357. __le16 req_type;
  1358. __le16 seq_id;
  1359. __le16 resp_len;
  1360. __le32 unused_0;
  1361. u8 unused_1;
  1362. u8 unused_2;
  1363. u8 unused_3;
  1364. u8 valid;
  1365. };
  1366. /* hwrm_func_drv_unrgtr */
  1367. /* Input (24 bytes) */
  1368. struct hwrm_func_drv_unrgtr_input {
  1369. __le16 req_type;
  1370. __le16 cmpl_ring;
  1371. __le16 seq_id;
  1372. __le16 target_id;
  1373. __le64 resp_addr;
  1374. __le32 flags;
  1375. #define FUNC_DRV_UNRGTR_REQ_FLAGS_PREPARE_FOR_SHUTDOWN 0x1UL
  1376. __le32 unused_0;
  1377. };
  1378. /* Output (16 bytes) */
  1379. struct hwrm_func_drv_unrgtr_output {
  1380. __le16 error_code;
  1381. __le16 req_type;
  1382. __le16 seq_id;
  1383. __le16 resp_len;
  1384. __le32 unused_0;
  1385. u8 unused_1;
  1386. u8 unused_2;
  1387. u8 unused_3;
  1388. u8 valid;
  1389. };
  1390. /* hwrm_func_buf_rgtr */
  1391. /* Input (128 bytes) */
  1392. struct hwrm_func_buf_rgtr_input {
  1393. __le16 req_type;
  1394. __le16 cmpl_ring;
  1395. __le16 seq_id;
  1396. __le16 target_id;
  1397. __le64 resp_addr;
  1398. __le32 enables;
  1399. #define FUNC_BUF_RGTR_REQ_ENABLES_VF_ID 0x1UL
  1400. #define FUNC_BUF_RGTR_REQ_ENABLES_ERR_BUF_ADDR 0x2UL
  1401. __le16 vf_id;
  1402. __le16 req_buf_num_pages;
  1403. __le16 req_buf_page_size;
  1404. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_16B 0x4UL
  1405. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_4K 0xcUL
  1406. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_8K 0xdUL
  1407. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_64K 0x10UL
  1408. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_2M 0x15UL
  1409. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_4M 0x16UL
  1410. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_1G 0x1eUL
  1411. __le16 req_buf_len;
  1412. __le16 resp_buf_len;
  1413. u8 unused_0;
  1414. u8 unused_1;
  1415. __le64 req_buf_page_addr0;
  1416. __le64 req_buf_page_addr1;
  1417. __le64 req_buf_page_addr2;
  1418. __le64 req_buf_page_addr3;
  1419. __le64 req_buf_page_addr4;
  1420. __le64 req_buf_page_addr5;
  1421. __le64 req_buf_page_addr6;
  1422. __le64 req_buf_page_addr7;
  1423. __le64 req_buf_page_addr8;
  1424. __le64 req_buf_page_addr9;
  1425. __le64 error_buf_addr;
  1426. __le64 resp_buf_addr;
  1427. };
  1428. /* Output (16 bytes) */
  1429. struct hwrm_func_buf_rgtr_output {
  1430. __le16 error_code;
  1431. __le16 req_type;
  1432. __le16 seq_id;
  1433. __le16 resp_len;
  1434. __le32 unused_0;
  1435. u8 unused_1;
  1436. u8 unused_2;
  1437. u8 unused_3;
  1438. u8 valid;
  1439. };
  1440. /* hwrm_func_drv_qver */
  1441. /* Input (24 bytes) */
  1442. struct hwrm_func_drv_qver_input {
  1443. __le16 req_type;
  1444. __le16 cmpl_ring;
  1445. __le16 seq_id;
  1446. __le16 target_id;
  1447. __le64 resp_addr;
  1448. __le32 reserved;
  1449. __le16 fid;
  1450. __le16 unused_0;
  1451. };
  1452. /* Output (16 bytes) */
  1453. struct hwrm_func_drv_qver_output {
  1454. __le16 error_code;
  1455. __le16 req_type;
  1456. __le16 seq_id;
  1457. __le16 resp_len;
  1458. __le16 os_type;
  1459. #define FUNC_DRV_QVER_RESP_OS_TYPE_UNKNOWN 0x0UL
  1460. #define FUNC_DRV_QVER_RESP_OS_TYPE_OTHER 0x1UL
  1461. #define FUNC_DRV_QVER_RESP_OS_TYPE_MSDOS 0xeUL
  1462. #define FUNC_DRV_QVER_RESP_OS_TYPE_WINDOWS 0x12UL
  1463. #define FUNC_DRV_QVER_RESP_OS_TYPE_SOLARIS 0x1dUL
  1464. #define FUNC_DRV_QVER_RESP_OS_TYPE_LINUX 0x24UL
  1465. #define FUNC_DRV_QVER_RESP_OS_TYPE_FREEBSD 0x2aUL
  1466. #define FUNC_DRV_QVER_RESP_OS_TYPE_ESXI 0x68UL
  1467. #define FUNC_DRV_QVER_RESP_OS_TYPE_WIN864 0x73UL
  1468. #define FUNC_DRV_QVER_RESP_OS_TYPE_WIN2012R2 0x74UL
  1469. u8 ver_maj;
  1470. u8 ver_min;
  1471. u8 ver_upd;
  1472. u8 unused_0;
  1473. u8 unused_1;
  1474. u8 valid;
  1475. };
  1476. /* hwrm_port_phy_cfg */
  1477. /* Input (56 bytes) */
  1478. struct hwrm_port_phy_cfg_input {
  1479. __le16 req_type;
  1480. __le16 cmpl_ring;
  1481. __le16 seq_id;
  1482. __le16 target_id;
  1483. __le64 resp_addr;
  1484. __le32 flags;
  1485. #define PORT_PHY_CFG_REQ_FLAGS_RESET_PHY 0x1UL
  1486. #define PORT_PHY_CFG_REQ_FLAGS_FORCE_LINK_DOWN 0x2UL
  1487. #define PORT_PHY_CFG_REQ_FLAGS_FORCE 0x4UL
  1488. #define PORT_PHY_CFG_REQ_FLAGS_RESTART_AUTONEG 0x8UL
  1489. #define PORT_PHY_CFG_REQ_FLAGS_EEE_ENABLE 0x10UL
  1490. #define PORT_PHY_CFG_REQ_FLAGS_EEE_DISABLE 0x20UL
  1491. #define PORT_PHY_CFG_REQ_FLAGS_EEE_TX_LPI_ENABLE 0x40UL
  1492. #define PORT_PHY_CFG_REQ_FLAGS_EEE_TX_LPI_DISABLE 0x80UL
  1493. #define PORT_PHY_CFG_REQ_FLAGS_FEC_AUTONEG_ENABLE 0x100UL
  1494. #define PORT_PHY_CFG_REQ_FLAGS_FEC_AUTONEG_DISABLE 0x200UL
  1495. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE74_ENABLE 0x400UL
  1496. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE74_DISABLE 0x800UL
  1497. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE91_ENABLE 0x1000UL
  1498. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE91_DISABLE 0x2000UL
  1499. __le32 enables;
  1500. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE 0x1UL
  1501. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_DUPLEX 0x2UL
  1502. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_PAUSE 0x4UL
  1503. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED 0x8UL
  1504. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK 0x10UL
  1505. #define PORT_PHY_CFG_REQ_ENABLES_WIRESPEED 0x20UL
  1506. #define PORT_PHY_CFG_REQ_ENABLES_LPBK 0x40UL
  1507. #define PORT_PHY_CFG_REQ_ENABLES_PREEMPHASIS 0x80UL
  1508. #define PORT_PHY_CFG_REQ_ENABLES_FORCE_PAUSE 0x100UL
  1509. #define PORT_PHY_CFG_REQ_ENABLES_EEE_LINK_SPEED_MASK 0x200UL
  1510. #define PORT_PHY_CFG_REQ_ENABLES_TX_LPI_TIMER 0x400UL
  1511. __le16 port_id;
  1512. __le16 force_link_speed;
  1513. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100MB 0x1UL
  1514. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_1GB 0xaUL
  1515. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_2GB 0x14UL
  1516. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_2_5GB 0x19UL
  1517. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10GB 0x64UL
  1518. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_20GB 0xc8UL
  1519. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_25GB 0xfaUL
  1520. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB 0x190UL
  1521. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB 0x1f4UL
  1522. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB 0x3e8UL
  1523. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10MB 0xffffUL
  1524. u8 auto_mode;
  1525. #define PORT_PHY_CFG_REQ_AUTO_MODE_NONE 0x0UL
  1526. #define PORT_PHY_CFG_REQ_AUTO_MODE_ALL_SPEEDS 0x1UL
  1527. #define PORT_PHY_CFG_REQ_AUTO_MODE_ONE_SPEED 0x2UL
  1528. #define PORT_PHY_CFG_REQ_AUTO_MODE_ONE_OR_BELOW 0x3UL
  1529. #define PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK 0x4UL
  1530. u8 auto_duplex;
  1531. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_HALF 0x0UL
  1532. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_FULL 0x1UL
  1533. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_BOTH 0x2UL
  1534. u8 auto_pause;
  1535. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_TX 0x1UL
  1536. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_RX 0x2UL
  1537. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE 0x4UL
  1538. u8 unused_0;
  1539. __le16 auto_link_speed;
  1540. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100MB 0x1UL
  1541. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_1GB 0xaUL
  1542. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_2GB 0x14UL
  1543. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_2_5GB 0x19UL
  1544. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10GB 0x64UL
  1545. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_20GB 0xc8UL
  1546. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_25GB 0xfaUL
  1547. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_40GB 0x190UL
  1548. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_50GB 0x1f4UL
  1549. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100GB 0x3e8UL
  1550. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10MB 0xffffUL
  1551. __le16 auto_link_speed_mask;
  1552. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100MBHD 0x1UL
  1553. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100MB 0x2UL
  1554. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_1GBHD 0x4UL
  1555. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_1GB 0x8UL
  1556. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_2GB 0x10UL
  1557. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_2_5GB 0x20UL
  1558. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10GB 0x40UL
  1559. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_20GB 0x80UL
  1560. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_25GB 0x100UL
  1561. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_40GB 0x200UL
  1562. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_50GB 0x400UL
  1563. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100GB 0x800UL
  1564. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10MBHD 0x1000UL
  1565. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10MB 0x2000UL
  1566. u8 wirespeed;
  1567. #define PORT_PHY_CFG_REQ_WIRESPEED_OFF 0x0UL
  1568. #define PORT_PHY_CFG_REQ_WIRESPEED_ON 0x1UL
  1569. u8 lpbk;
  1570. #define PORT_PHY_CFG_REQ_LPBK_NONE 0x0UL
  1571. #define PORT_PHY_CFG_REQ_LPBK_LOCAL 0x1UL
  1572. #define PORT_PHY_CFG_REQ_LPBK_REMOTE 0x2UL
  1573. u8 force_pause;
  1574. #define PORT_PHY_CFG_REQ_FORCE_PAUSE_TX 0x1UL
  1575. #define PORT_PHY_CFG_REQ_FORCE_PAUSE_RX 0x2UL
  1576. u8 unused_1;
  1577. __le32 preemphasis;
  1578. __le16 eee_link_speed_mask;
  1579. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  1580. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_100MB 0x2UL
  1581. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  1582. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_1GB 0x8UL
  1583. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  1584. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  1585. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_10GB 0x40UL
  1586. u8 unused_2;
  1587. u8 unused_3;
  1588. __le32 tx_lpi_timer;
  1589. __le32 unused_4;
  1590. #define PORT_PHY_CFG_REQ_TX_LPI_TIMER_MASK 0xffffffUL
  1591. #define PORT_PHY_CFG_REQ_TX_LPI_TIMER_SFT 0
  1592. };
  1593. /* Output (16 bytes) */
  1594. struct hwrm_port_phy_cfg_output {
  1595. __le16 error_code;
  1596. __le16 req_type;
  1597. __le16 seq_id;
  1598. __le16 resp_len;
  1599. __le32 unused_0;
  1600. u8 unused_1;
  1601. u8 unused_2;
  1602. u8 unused_3;
  1603. u8 valid;
  1604. };
  1605. /* hwrm_port_phy_qcfg */
  1606. /* Input (24 bytes) */
  1607. struct hwrm_port_phy_qcfg_input {
  1608. __le16 req_type;
  1609. __le16 cmpl_ring;
  1610. __le16 seq_id;
  1611. __le16 target_id;
  1612. __le64 resp_addr;
  1613. __le16 port_id;
  1614. __le16 unused_0[3];
  1615. };
  1616. /* Output (96 bytes) */
  1617. struct hwrm_port_phy_qcfg_output {
  1618. __le16 error_code;
  1619. __le16 req_type;
  1620. __le16 seq_id;
  1621. __le16 resp_len;
  1622. u8 link;
  1623. #define PORT_PHY_QCFG_RESP_LINK_NO_LINK 0x0UL
  1624. #define PORT_PHY_QCFG_RESP_LINK_SIGNAL 0x1UL
  1625. #define PORT_PHY_QCFG_RESP_LINK_LINK 0x2UL
  1626. u8 unused_0;
  1627. __le16 link_speed;
  1628. #define PORT_PHY_QCFG_RESP_LINK_SPEED_100MB 0x1UL
  1629. #define PORT_PHY_QCFG_RESP_LINK_SPEED_1GB 0xaUL
  1630. #define PORT_PHY_QCFG_RESP_LINK_SPEED_2GB 0x14UL
  1631. #define PORT_PHY_QCFG_RESP_LINK_SPEED_2_5GB 0x19UL
  1632. #define PORT_PHY_QCFG_RESP_LINK_SPEED_10GB 0x64UL
  1633. #define PORT_PHY_QCFG_RESP_LINK_SPEED_20GB 0xc8UL
  1634. #define PORT_PHY_QCFG_RESP_LINK_SPEED_25GB 0xfaUL
  1635. #define PORT_PHY_QCFG_RESP_LINK_SPEED_40GB 0x190UL
  1636. #define PORT_PHY_QCFG_RESP_LINK_SPEED_50GB 0x1f4UL
  1637. #define PORT_PHY_QCFG_RESP_LINK_SPEED_100GB 0x3e8UL
  1638. #define PORT_PHY_QCFG_RESP_LINK_SPEED_10MB 0xffffUL
  1639. u8 duplex;
  1640. #define PORT_PHY_QCFG_RESP_DUPLEX_HALF 0x0UL
  1641. #define PORT_PHY_QCFG_RESP_DUPLEX_FULL 0x1UL
  1642. u8 pause;
  1643. #define PORT_PHY_QCFG_RESP_PAUSE_TX 0x1UL
  1644. #define PORT_PHY_QCFG_RESP_PAUSE_RX 0x2UL
  1645. __le16 support_speeds;
  1646. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100MBHD 0x1UL
  1647. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100MB 0x2UL
  1648. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_1GBHD 0x4UL
  1649. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_1GB 0x8UL
  1650. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_2GB 0x10UL
  1651. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_2_5GB 0x20UL
  1652. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10GB 0x40UL
  1653. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_20GB 0x80UL
  1654. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_25GB 0x100UL
  1655. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_40GB 0x200UL
  1656. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_50GB 0x400UL
  1657. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100GB 0x800UL
  1658. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10MBHD 0x1000UL
  1659. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10MB 0x2000UL
  1660. __le16 force_link_speed;
  1661. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_100MB 0x1UL
  1662. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_1GB 0xaUL
  1663. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_2GB 0x14UL
  1664. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_2_5GB 0x19UL
  1665. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_10GB 0x64UL
  1666. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_20GB 0xc8UL
  1667. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_25GB 0xfaUL
  1668. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_40GB 0x190UL
  1669. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_50GB 0x1f4UL
  1670. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_100GB 0x3e8UL
  1671. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_10MB 0xffffUL
  1672. u8 auto_mode;
  1673. #define PORT_PHY_QCFG_RESP_AUTO_MODE_NONE 0x0UL
  1674. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ALL_SPEEDS 0x1UL
  1675. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ONE_SPEED 0x2UL
  1676. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ONE_OR_BELOW 0x3UL
  1677. #define PORT_PHY_QCFG_RESP_AUTO_MODE_SPEED_MASK 0x4UL
  1678. u8 auto_pause;
  1679. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_TX 0x1UL
  1680. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_RX 0x2UL
  1681. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_AUTONEG_PAUSE 0x4UL
  1682. __le16 auto_link_speed;
  1683. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_100MB 0x1UL
  1684. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_1GB 0xaUL
  1685. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_2GB 0x14UL
  1686. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_2_5GB 0x19UL
  1687. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_10GB 0x64UL
  1688. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_20GB 0xc8UL
  1689. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_25GB 0xfaUL
  1690. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_40GB 0x190UL
  1691. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_50GB 0x1f4UL
  1692. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_100GB 0x3e8UL
  1693. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_10MB 0xffffUL
  1694. __le16 auto_link_speed_mask;
  1695. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100MBHD 0x1UL
  1696. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100MB 0x2UL
  1697. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_1GBHD 0x4UL
  1698. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_1GB 0x8UL
  1699. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_2GB 0x10UL
  1700. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_2_5GB 0x20UL
  1701. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10GB 0x40UL
  1702. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_20GB 0x80UL
  1703. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_25GB 0x100UL
  1704. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_40GB 0x200UL
  1705. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_50GB 0x400UL
  1706. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100GB 0x800UL
  1707. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10MBHD 0x1000UL
  1708. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10MB 0x2000UL
  1709. u8 wirespeed;
  1710. #define PORT_PHY_QCFG_RESP_WIRESPEED_OFF 0x0UL
  1711. #define PORT_PHY_QCFG_RESP_WIRESPEED_ON 0x1UL
  1712. u8 lpbk;
  1713. #define PORT_PHY_QCFG_RESP_LPBK_NONE 0x0UL
  1714. #define PORT_PHY_QCFG_RESP_LPBK_LOCAL 0x1UL
  1715. #define PORT_PHY_QCFG_RESP_LPBK_REMOTE 0x2UL
  1716. u8 force_pause;
  1717. #define PORT_PHY_QCFG_RESP_FORCE_PAUSE_TX 0x1UL
  1718. #define PORT_PHY_QCFG_RESP_FORCE_PAUSE_RX 0x2UL
  1719. u8 module_status;
  1720. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NONE 0x0UL
  1721. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_DISABLETX 0x1UL
  1722. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_WARNINGMSG 0x2UL
  1723. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_PWRDOWN 0x3UL
  1724. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NOTINSERTED 0x4UL
  1725. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NOTAPPLICABLE 0xffUL
  1726. __le32 preemphasis;
  1727. u8 phy_maj;
  1728. u8 phy_min;
  1729. u8 phy_bld;
  1730. u8 phy_type;
  1731. #define PORT_PHY_QCFG_RESP_PHY_TYPE_UNKNOWN 0x0UL
  1732. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASECR 0x1UL
  1733. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR4 0x2UL
  1734. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASELR 0x3UL
  1735. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASESR 0x4UL
  1736. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR2 0x5UL
  1737. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKX 0x6UL
  1738. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR 0x7UL
  1739. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASET 0x8UL
  1740. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE 0x9UL
  1741. #define PORT_PHY_QCFG_RESP_PHY_TYPE_SGMIIEXTPHY 0xaUL
  1742. u8 media_type;
  1743. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_UNKNOWN 0x0UL
  1744. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP 0x1UL
  1745. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_DAC 0x2UL
  1746. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_FIBRE 0x3UL
  1747. u8 xcvr_pkg_type;
  1748. #define PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_XCVR_INTERNAL 0x1UL
  1749. #define PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_XCVR_EXTERNAL 0x2UL
  1750. u8 eee_config_phy_addr;
  1751. #define PORT_PHY_QCFG_RESP_PHY_ADDR_MASK 0x1fUL
  1752. #define PORT_PHY_QCFG_RESP_PHY_ADDR_SFT 0
  1753. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_ENABLED 0x20UL
  1754. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_ACTIVE 0x40UL
  1755. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_TX_LPI 0x80UL
  1756. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_MASK 0xe0UL
  1757. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_SFT 5
  1758. u8 parallel_detect;
  1759. #define PORT_PHY_QCFG_RESP_PARALLEL_DETECT 0x1UL
  1760. #define PORT_PHY_QCFG_RESP_RESERVED_MASK 0xfeUL
  1761. #define PORT_PHY_QCFG_RESP_RESERVED_SFT 1
  1762. __le16 link_partner_adv_speeds;
  1763. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100MBHD 0x1UL
  1764. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100MB 0x2UL
  1765. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_1GBHD 0x4UL
  1766. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_1GB 0x8UL
  1767. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_2GB 0x10UL
  1768. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_2_5GB 0x20UL
  1769. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10GB 0x40UL
  1770. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_20GB 0x80UL
  1771. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_25GB 0x100UL
  1772. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_40GB 0x200UL
  1773. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_50GB 0x400UL
  1774. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100GB 0x800UL
  1775. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10MBHD 0x1000UL
  1776. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10MB 0x2000UL
  1777. u8 link_partner_adv_auto_mode;
  1778. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_NONE 0x0UL
  1779. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ALL_SPEEDS 0x1UL
  1780. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ONE_SPEED 0x2UL
  1781. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ONE_OR_BELOW 0x3UL
  1782. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK 0x4UL
  1783. u8 link_partner_adv_pause;
  1784. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_PAUSE_TX 0x1UL
  1785. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_PAUSE_RX 0x2UL
  1786. __le16 adv_eee_link_speed_mask;
  1787. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  1788. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_100MB 0x2UL
  1789. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  1790. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_1GB 0x8UL
  1791. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  1792. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  1793. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_10GB 0x40UL
  1794. __le16 link_partner_adv_eee_link_speed_mask;
  1795. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  1796. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_100MB 0x2UL
  1797. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  1798. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_1GB 0x8UL
  1799. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  1800. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  1801. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_10GB 0x40UL
  1802. __le32 xcvr_identifier_type_tx_lpi_timer;
  1803. #define PORT_PHY_QCFG_RESP_TX_LPI_TIMER_MASK 0xffffffUL
  1804. #define PORT_PHY_QCFG_RESP_TX_LPI_TIMER_SFT 0
  1805. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_MASK 0xff000000UL
  1806. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_SFT 24
  1807. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_UNKNOWN (0x0UL << 24)
  1808. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_SFP (0x3UL << 24)
  1809. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFP (0xcUL << 24)
  1810. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFPPLUS (0xdUL << 24)
  1811. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFP28 (0x11UL << 24)
  1812. __le16 fec_cfg;
  1813. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED 0x1UL
  1814. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_SUPPORTED 0x2UL
  1815. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_ENABLED 0x4UL
  1816. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_SUPPORTED 0x8UL
  1817. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_ENABLED 0x10UL
  1818. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_SUPPORTED 0x20UL
  1819. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_ENABLED 0x40UL
  1820. u8 unused_1;
  1821. u8 unused_2;
  1822. char phy_vendor_name[16];
  1823. char phy_vendor_partnumber[16];
  1824. __le32 unused_3;
  1825. u8 unused_4;
  1826. u8 unused_5;
  1827. u8 unused_6;
  1828. u8 valid;
  1829. };
  1830. /* hwrm_port_mac_cfg */
  1831. /* Input (40 bytes) */
  1832. struct hwrm_port_mac_cfg_input {
  1833. __le16 req_type;
  1834. __le16 cmpl_ring;
  1835. __le16 seq_id;
  1836. __le16 target_id;
  1837. __le64 resp_addr;
  1838. __le32 flags;
  1839. #define PORT_MAC_CFG_REQ_FLAGS_MATCH_LINK 0x1UL
  1840. #define PORT_MAC_CFG_REQ_FLAGS_VLAN_PRI2COS_ENABLE 0x2UL
  1841. #define PORT_MAC_CFG_REQ_FLAGS_TUNNEL_PRI2COS_ENABLE 0x4UL
  1842. #define PORT_MAC_CFG_REQ_FLAGS_IP_DSCP2COS_ENABLE 0x8UL
  1843. #define PORT_MAC_CFG_REQ_FLAGS_PTP_RX_TS_CAPTURE_ENABLE 0x10UL
  1844. #define PORT_MAC_CFG_REQ_FLAGS_PTP_RX_TS_CAPTURE_DISABLE 0x20UL
  1845. #define PORT_MAC_CFG_REQ_FLAGS_PTP_TX_TS_CAPTURE_ENABLE 0x40UL
  1846. #define PORT_MAC_CFG_REQ_FLAGS_PTP_TX_TS_CAPTURE_DISABLE 0x80UL
  1847. #define PORT_MAC_CFG_REQ_FLAGS_OOB_WOL_ENABLE 0x100UL
  1848. #define PORT_MAC_CFG_REQ_FLAGS_OOB_WOL_DISABLE 0x200UL
  1849. #define PORT_MAC_CFG_REQ_FLAGS_VLAN_PRI2COS_DISABLE 0x400UL
  1850. #define PORT_MAC_CFG_REQ_FLAGS_TUNNEL_PRI2COS_DISABLE 0x800UL
  1851. #define PORT_MAC_CFG_REQ_FLAGS_IP_DSCP2COS_DISABLE 0x1000UL
  1852. __le32 enables;
  1853. #define PORT_MAC_CFG_REQ_ENABLES_IPG 0x1UL
  1854. #define PORT_MAC_CFG_REQ_ENABLES_LPBK 0x2UL
  1855. #define PORT_MAC_CFG_REQ_ENABLES_VLAN_PRI2COS_MAP_PRI 0x4UL
  1856. #define PORT_MAC_CFG_REQ_ENABLES_RESERVED1 0x8UL
  1857. #define PORT_MAC_CFG_REQ_ENABLES_TUNNEL_PRI2COS_MAP_PRI 0x10UL
  1858. #define PORT_MAC_CFG_REQ_ENABLES_DSCP2COS_MAP_PRI 0x20UL
  1859. #define PORT_MAC_CFG_REQ_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE 0x40UL
  1860. #define PORT_MAC_CFG_REQ_ENABLES_TX_TS_CAPTURE_PTP_MSG_TYPE 0x80UL
  1861. #define PORT_MAC_CFG_REQ_ENABLES_COS_FIELD_CFG 0x100UL
  1862. __le16 port_id;
  1863. u8 ipg;
  1864. u8 lpbk;
  1865. #define PORT_MAC_CFG_REQ_LPBK_NONE 0x0UL
  1866. #define PORT_MAC_CFG_REQ_LPBK_LOCAL 0x1UL
  1867. #define PORT_MAC_CFG_REQ_LPBK_REMOTE 0x2UL
  1868. u8 vlan_pri2cos_map_pri;
  1869. u8 reserved1;
  1870. u8 tunnel_pri2cos_map_pri;
  1871. u8 dscp2pri_map_pri;
  1872. __le16 rx_ts_capture_ptp_msg_type;
  1873. __le16 tx_ts_capture_ptp_msg_type;
  1874. u8 cos_field_cfg;
  1875. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_RSVD1 0x1UL
  1876. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_MASK 0x6UL
  1877. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_SFT 1
  1878. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST (0x0UL << 1)
  1879. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER (0x1UL << 1)
  1880. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST (0x2UL << 1)
  1881. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED (0x3UL << 1)
  1882. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_LAST PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
  1883. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK 0x18UL
  1884. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT 3
  1885. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST (0x0UL << 3)
  1886. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER (0x1UL << 3)
  1887. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST (0x2UL << 3)
  1888. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED (0x3UL << 3)
  1889. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_LAST PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED
  1890. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_DEFAULT_COS_MASK 0xe0UL
  1891. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_DEFAULT_COS_SFT 5
  1892. u8 unused_0[3];
  1893. };
  1894. /* Output (16 bytes) */
  1895. struct hwrm_port_mac_cfg_output {
  1896. __le16 error_code;
  1897. __le16 req_type;
  1898. __le16 seq_id;
  1899. __le16 resp_len;
  1900. __le16 mru;
  1901. __le16 mtu;
  1902. u8 ipg;
  1903. u8 lpbk;
  1904. #define PORT_MAC_CFG_RESP_LPBK_NONE 0x0UL
  1905. #define PORT_MAC_CFG_RESP_LPBK_LOCAL 0x1UL
  1906. #define PORT_MAC_CFG_RESP_LPBK_REMOTE 0x2UL
  1907. u8 unused_0;
  1908. u8 valid;
  1909. };
  1910. /* hwrm_port_qstats */
  1911. /* Input (40 bytes) */
  1912. struct hwrm_port_qstats_input {
  1913. __le16 req_type;
  1914. __le16 cmpl_ring;
  1915. __le16 seq_id;
  1916. __le16 target_id;
  1917. __le64 resp_addr;
  1918. __le16 port_id;
  1919. u8 unused_0;
  1920. u8 unused_1;
  1921. u8 unused_2[3];
  1922. u8 unused_3;
  1923. __le64 tx_stat_host_addr;
  1924. __le64 rx_stat_host_addr;
  1925. };
  1926. /* Output (16 bytes) */
  1927. struct hwrm_port_qstats_output {
  1928. __le16 error_code;
  1929. __le16 req_type;
  1930. __le16 seq_id;
  1931. __le16 resp_len;
  1932. __le16 tx_stat_size;
  1933. __le16 rx_stat_size;
  1934. u8 unused_0;
  1935. u8 unused_1;
  1936. u8 unused_2;
  1937. u8 valid;
  1938. };
  1939. /* hwrm_port_lpbk_qstats */
  1940. /* Input (16 bytes) */
  1941. struct hwrm_port_lpbk_qstats_input {
  1942. __le16 req_type;
  1943. __le16 cmpl_ring;
  1944. __le16 seq_id;
  1945. __le16 target_id;
  1946. __le64 resp_addr;
  1947. };
  1948. /* Output (96 bytes) */
  1949. struct hwrm_port_lpbk_qstats_output {
  1950. __le16 error_code;
  1951. __le16 req_type;
  1952. __le16 seq_id;
  1953. __le16 resp_len;
  1954. __le64 lpbk_ucast_frames;
  1955. __le64 lpbk_mcast_frames;
  1956. __le64 lpbk_bcast_frames;
  1957. __le64 lpbk_ucast_bytes;
  1958. __le64 lpbk_mcast_bytes;
  1959. __le64 lpbk_bcast_bytes;
  1960. __le64 tx_stat_discard;
  1961. __le64 tx_stat_error;
  1962. __le64 rx_stat_discard;
  1963. __le64 rx_stat_error;
  1964. __le32 unused_0;
  1965. u8 unused_1;
  1966. u8 unused_2;
  1967. u8 unused_3;
  1968. u8 valid;
  1969. };
  1970. /* hwrm_port_clr_stats */
  1971. /* Input (24 bytes) */
  1972. struct hwrm_port_clr_stats_input {
  1973. __le16 req_type;
  1974. __le16 cmpl_ring;
  1975. __le16 seq_id;
  1976. __le16 target_id;
  1977. __le64 resp_addr;
  1978. __le16 port_id;
  1979. __le16 unused_0[3];
  1980. };
  1981. /* Output (16 bytes) */
  1982. struct hwrm_port_clr_stats_output {
  1983. __le16 error_code;
  1984. __le16 req_type;
  1985. __le16 seq_id;
  1986. __le16 resp_len;
  1987. __le32 unused_0;
  1988. u8 unused_1;
  1989. u8 unused_2;
  1990. u8 unused_3;
  1991. u8 valid;
  1992. };
  1993. /* hwrm_port_lpbk_clr_stats */
  1994. /* Input (16 bytes) */
  1995. struct hwrm_port_lpbk_clr_stats_input {
  1996. __le16 req_type;
  1997. __le16 cmpl_ring;
  1998. __le16 seq_id;
  1999. __le16 target_id;
  2000. __le64 resp_addr;
  2001. };
  2002. /* Output (16 bytes) */
  2003. struct hwrm_port_lpbk_clr_stats_output {
  2004. __le16 error_code;
  2005. __le16 req_type;
  2006. __le16 seq_id;
  2007. __le16 resp_len;
  2008. __le32 unused_0;
  2009. u8 unused_1;
  2010. u8 unused_2;
  2011. u8 unused_3;
  2012. u8 valid;
  2013. };
  2014. /* hwrm_port_blink_led */
  2015. /* Input (24 bytes) */
  2016. struct hwrm_port_blink_led_input {
  2017. __le16 req_type;
  2018. __le16 cmpl_ring;
  2019. __le16 seq_id;
  2020. __le16 target_id;
  2021. __le64 resp_addr;
  2022. __le32 num_blinks;
  2023. __le32 unused_0;
  2024. };
  2025. /* Output (16 bytes) */
  2026. struct hwrm_port_blink_led_output {
  2027. __le16 error_code;
  2028. __le16 req_type;
  2029. __le16 seq_id;
  2030. __le16 resp_len;
  2031. __le32 unused_0;
  2032. u8 unused_1;
  2033. u8 unused_2;
  2034. u8 unused_3;
  2035. u8 valid;
  2036. };
  2037. /* hwrm_port_phy_qcaps */
  2038. /* Input (24 bytes) */
  2039. struct hwrm_port_phy_qcaps_input {
  2040. __le16 req_type;
  2041. __le16 cmpl_ring;
  2042. __le16 seq_id;
  2043. __le16 target_id;
  2044. __le64 resp_addr;
  2045. __le16 port_id;
  2046. __le16 unused_0[3];
  2047. };
  2048. /* Output (24 bytes) */
  2049. struct hwrm_port_phy_qcaps_output {
  2050. __le16 error_code;
  2051. __le16 req_type;
  2052. __le16 seq_id;
  2053. __le16 resp_len;
  2054. u8 eee_supported;
  2055. #define PORT_PHY_QCAPS_RESP_EEE_SUPPORTED 0x1UL
  2056. #define PORT_PHY_QCAPS_RESP_RSVD1_MASK 0xfeUL
  2057. #define PORT_PHY_QCAPS_RESP_RSVD1_SFT 1
  2058. u8 unused_0;
  2059. __le16 supported_speeds_force_mode;
  2060. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100MBHD 0x1UL
  2061. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100MB 0x2UL
  2062. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_1GBHD 0x4UL
  2063. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_1GB 0x8UL
  2064. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_2GB 0x10UL
  2065. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_2_5GB 0x20UL
  2066. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10GB 0x40UL
  2067. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_20GB 0x80UL
  2068. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_25GB 0x100UL
  2069. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_40GB 0x200UL
  2070. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_50GB 0x400UL
  2071. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100GB 0x800UL
  2072. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10MBHD 0x1000UL
  2073. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10MB 0x2000UL
  2074. __le16 supported_speeds_auto_mode;
  2075. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100MBHD 0x1UL
  2076. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100MB 0x2UL
  2077. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_1GBHD 0x4UL
  2078. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_1GB 0x8UL
  2079. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_2GB 0x10UL
  2080. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_2_5GB 0x20UL
  2081. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10GB 0x40UL
  2082. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_20GB 0x80UL
  2083. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_25GB 0x100UL
  2084. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_40GB 0x200UL
  2085. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_50GB 0x400UL
  2086. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100GB 0x800UL
  2087. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10MBHD 0x1000UL
  2088. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10MB 0x2000UL
  2089. __le16 supported_speeds_eee_mode;
  2090. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD1 0x1UL
  2091. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_100MB 0x2UL
  2092. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD2 0x4UL
  2093. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_1GB 0x8UL
  2094. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD3 0x10UL
  2095. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD4 0x20UL
  2096. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_10GB 0x40UL
  2097. __le32 tx_lpi_timer_low;
  2098. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_LOW_MASK 0xffffffUL
  2099. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_LOW_SFT 0
  2100. #define PORT_PHY_QCAPS_RESP_RSVD2_MASK 0xff000000UL
  2101. #define PORT_PHY_QCAPS_RESP_RSVD2_SFT 24
  2102. __le32 valid_tx_lpi_timer_high;
  2103. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_HIGH_MASK 0xffffffUL
  2104. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_HIGH_SFT 0
  2105. #define PORT_PHY_QCAPS_RESP_VALID_MASK 0xff000000UL
  2106. #define PORT_PHY_QCAPS_RESP_VALID_SFT 24
  2107. };
  2108. /* hwrm_port_phy_i2c_read */
  2109. /* Input (40 bytes) */
  2110. struct hwrm_port_phy_i2c_read_input {
  2111. __le16 req_type;
  2112. __le16 cmpl_ring;
  2113. __le16 seq_id;
  2114. __le16 target_id;
  2115. __le64 resp_addr;
  2116. __le32 flags;
  2117. __le32 enables;
  2118. #define PORT_PHY_I2C_READ_REQ_ENABLES_PAGE_OFFSET 0x1UL
  2119. __le16 port_id;
  2120. u8 i2c_slave_addr;
  2121. u8 unused_0;
  2122. __le16 page_number;
  2123. __le16 page_offset;
  2124. u8 data_length;
  2125. u8 unused_1[7];
  2126. };
  2127. /* Output (80 bytes) */
  2128. struct hwrm_port_phy_i2c_read_output {
  2129. __le16 error_code;
  2130. __le16 req_type;
  2131. __le16 seq_id;
  2132. __le16 resp_len;
  2133. __le32 data[16];
  2134. __le32 unused_0;
  2135. u8 unused_1;
  2136. u8 unused_2;
  2137. u8 unused_3;
  2138. u8 valid;
  2139. };
  2140. /* hwrm_queue_qportcfg */
  2141. /* Input (24 bytes) */
  2142. struct hwrm_queue_qportcfg_input {
  2143. __le16 req_type;
  2144. __le16 cmpl_ring;
  2145. __le16 seq_id;
  2146. __le16 target_id;
  2147. __le64 resp_addr;
  2148. __le32 flags;
  2149. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH 0x1UL
  2150. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_TX 0x0UL
  2151. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_RX 0x1UL
  2152. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_LAST QUEUE_QPORTCFG_REQ_FLAGS_PATH_RX
  2153. __le16 port_id;
  2154. __le16 unused_0;
  2155. };
  2156. /* Output (32 bytes) */
  2157. struct hwrm_queue_qportcfg_output {
  2158. __le16 error_code;
  2159. __le16 req_type;
  2160. __le16 seq_id;
  2161. __le16 resp_len;
  2162. u8 max_configurable_queues;
  2163. u8 max_configurable_lossless_queues;
  2164. u8 queue_cfg_allowed;
  2165. u8 queue_cfg_info;
  2166. #define QUEUE_QPORTCFG_RESP_QUEUE_CFG_INFO_ASYM_CFG 0x1UL
  2167. u8 queue_pfcenable_cfg_allowed;
  2168. u8 queue_pri2cos_cfg_allowed;
  2169. u8 queue_cos2bw_cfg_allowed;
  2170. u8 queue_id0;
  2171. u8 queue_id0_service_profile;
  2172. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSY 0x0UL
  2173. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS 0x1UL
  2174. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN 0xffUL
  2175. u8 queue_id1;
  2176. u8 queue_id1_service_profile;
  2177. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSY 0x0UL
  2178. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS 0x1UL
  2179. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN 0xffUL
  2180. u8 queue_id2;
  2181. u8 queue_id2_service_profile;
  2182. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSY 0x0UL
  2183. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS 0x1UL
  2184. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN 0xffUL
  2185. u8 queue_id3;
  2186. u8 queue_id3_service_profile;
  2187. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSY 0x0UL
  2188. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS 0x1UL
  2189. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN 0xffUL
  2190. u8 queue_id4;
  2191. u8 queue_id4_service_profile;
  2192. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSY 0x0UL
  2193. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS 0x1UL
  2194. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN 0xffUL
  2195. u8 queue_id5;
  2196. u8 queue_id5_service_profile;
  2197. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSY 0x0UL
  2198. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS 0x1UL
  2199. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN 0xffUL
  2200. u8 queue_id6;
  2201. u8 queue_id6_service_profile;
  2202. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSY 0x0UL
  2203. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS 0x1UL
  2204. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN 0xffUL
  2205. u8 queue_id7;
  2206. u8 queue_id7_service_profile;
  2207. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSY 0x0UL
  2208. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS 0x1UL
  2209. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN 0xffUL
  2210. u8 valid;
  2211. };
  2212. /* hwrm_queue_cfg */
  2213. /* Input (40 bytes) */
  2214. struct hwrm_queue_cfg_input {
  2215. __le16 req_type;
  2216. __le16 cmpl_ring;
  2217. __le16 seq_id;
  2218. __le16 target_id;
  2219. __le64 resp_addr;
  2220. __le32 flags;
  2221. #define QUEUE_CFG_REQ_FLAGS_PATH_MASK 0x3UL
  2222. #define QUEUE_CFG_REQ_FLAGS_PATH_SFT 0
  2223. #define QUEUE_CFG_REQ_FLAGS_PATH_TX 0x0UL
  2224. #define QUEUE_CFG_REQ_FLAGS_PATH_RX 0x1UL
  2225. #define QUEUE_CFG_REQ_FLAGS_PATH_BIDIR 0x2UL
  2226. #define QUEUE_CFG_REQ_FLAGS_PATH_LAST QUEUE_CFG_REQ_FLAGS_PATH_BIDIR
  2227. __le32 enables;
  2228. #define QUEUE_CFG_REQ_ENABLES_DFLT_LEN 0x1UL
  2229. #define QUEUE_CFG_REQ_ENABLES_SERVICE_PROFILE 0x2UL
  2230. __le32 queue_id;
  2231. __le32 dflt_len;
  2232. u8 service_profile;
  2233. #define QUEUE_CFG_REQ_SERVICE_PROFILE_LOSSY 0x0UL
  2234. #define QUEUE_CFG_REQ_SERVICE_PROFILE_LOSSLESS 0x1UL
  2235. #define QUEUE_CFG_REQ_SERVICE_PROFILE_UNKNOWN 0xffUL
  2236. u8 unused_0[7];
  2237. };
  2238. /* Output (16 bytes) */
  2239. struct hwrm_queue_cfg_output {
  2240. __le16 error_code;
  2241. __le16 req_type;
  2242. __le16 seq_id;
  2243. __le16 resp_len;
  2244. __le32 unused_0;
  2245. u8 unused_1;
  2246. u8 unused_2;
  2247. u8 unused_3;
  2248. u8 valid;
  2249. };
  2250. /* hwrm_queue_pfcenable_cfg */
  2251. /* Input (24 bytes) */
  2252. struct hwrm_queue_pfcenable_cfg_input {
  2253. __le16 req_type;
  2254. __le16 cmpl_ring;
  2255. __le16 seq_id;
  2256. __le16 target_id;
  2257. __le64 resp_addr;
  2258. __le32 flags;
  2259. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI0_PFC_ENABLED 0x1UL
  2260. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI1_PFC_ENABLED 0x2UL
  2261. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI2_PFC_ENABLED 0x4UL
  2262. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI3_PFC_ENABLED 0x8UL
  2263. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI4_PFC_ENABLED 0x10UL
  2264. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI5_PFC_ENABLED 0x20UL
  2265. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI6_PFC_ENABLED 0x40UL
  2266. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI7_PFC_ENABLED 0x80UL
  2267. __le16 port_id;
  2268. __le16 unused_0;
  2269. };
  2270. /* Output (16 bytes) */
  2271. struct hwrm_queue_pfcenable_cfg_output {
  2272. __le16 error_code;
  2273. __le16 req_type;
  2274. __le16 seq_id;
  2275. __le16 resp_len;
  2276. __le32 unused_0;
  2277. u8 unused_1;
  2278. u8 unused_2;
  2279. u8 unused_3;
  2280. u8 valid;
  2281. };
  2282. /* hwrm_queue_pri2cos_cfg */
  2283. /* Input (40 bytes) */
  2284. struct hwrm_queue_pri2cos_cfg_input {
  2285. __le16 req_type;
  2286. __le16 cmpl_ring;
  2287. __le16 seq_id;
  2288. __le16 target_id;
  2289. __le64 resp_addr;
  2290. __le32 flags;
  2291. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_MASK 0x3UL
  2292. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_SFT 0
  2293. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_TX (0x0UL << 0)
  2294. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_RX (0x1UL << 0)
  2295. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_BIDIR (0x2UL << 0)
  2296. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_LAST QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_BIDIR
  2297. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_IVLAN 0x4UL
  2298. __le32 enables;
  2299. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI0_COS_QUEUE_ID 0x1UL
  2300. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI1_COS_QUEUE_ID 0x2UL
  2301. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI2_COS_QUEUE_ID 0x4UL
  2302. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI3_COS_QUEUE_ID 0x8UL
  2303. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI4_COS_QUEUE_ID 0x10UL
  2304. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI5_COS_QUEUE_ID 0x20UL
  2305. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI6_COS_QUEUE_ID 0x40UL
  2306. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI7_COS_QUEUE_ID 0x80UL
  2307. u8 port_id;
  2308. u8 pri0_cos_queue_id;
  2309. u8 pri1_cos_queue_id;
  2310. u8 pri2_cos_queue_id;
  2311. u8 pri3_cos_queue_id;
  2312. u8 pri4_cos_queue_id;
  2313. u8 pri5_cos_queue_id;
  2314. u8 pri6_cos_queue_id;
  2315. u8 pri7_cos_queue_id;
  2316. u8 unused_0[7];
  2317. };
  2318. /* Output (16 bytes) */
  2319. struct hwrm_queue_pri2cos_cfg_output {
  2320. __le16 error_code;
  2321. __le16 req_type;
  2322. __le16 seq_id;
  2323. __le16 resp_len;
  2324. __le32 unused_0;
  2325. u8 unused_1;
  2326. u8 unused_2;
  2327. u8 unused_3;
  2328. u8 valid;
  2329. };
  2330. /* hwrm_queue_cos2bw_cfg */
  2331. /* Input (128 bytes) */
  2332. struct hwrm_queue_cos2bw_cfg_input {
  2333. __le16 req_type;
  2334. __le16 cmpl_ring;
  2335. __le16 seq_id;
  2336. __le16 target_id;
  2337. __le64 resp_addr;
  2338. __le32 flags;
  2339. __le32 enables;
  2340. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID0_VALID 0x1UL
  2341. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID1_VALID 0x2UL
  2342. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID2_VALID 0x4UL
  2343. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID3_VALID 0x8UL
  2344. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID4_VALID 0x10UL
  2345. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID5_VALID 0x20UL
  2346. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID6_VALID 0x40UL
  2347. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID7_VALID 0x80UL
  2348. __le16 port_id;
  2349. u8 queue_id0;
  2350. u8 unused_0;
  2351. __le32 queue_id0_min_bw;
  2352. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2353. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_SFT 0
  2354. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_RSVD 0x10000000UL
  2355. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2356. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT 29
  2357. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2358. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2359. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2360. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
  2361. __le32 queue_id0_max_bw;
  2362. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2363. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_SFT 0
  2364. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_RSVD 0x10000000UL
  2365. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2366. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT 29
  2367. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2368. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2369. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2370. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
  2371. u8 queue_id0_tsa_assign;
  2372. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_SP 0x0UL
  2373. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_ETS 0x1UL
  2374. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2375. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2376. u8 queue_id0_pri_lvl;
  2377. u8 queue_id0_bw_weight;
  2378. u8 queue_id1;
  2379. __le32 queue_id1_min_bw;
  2380. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2381. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_SFT 0
  2382. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_RSVD 0x10000000UL
  2383. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2384. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT 29
  2385. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2386. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2387. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2388. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
  2389. __le32 queue_id1_max_bw;
  2390. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2391. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_SFT 0
  2392. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_RSVD 0x10000000UL
  2393. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2394. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT 29
  2395. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2396. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2397. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2398. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
  2399. u8 queue_id1_tsa_assign;
  2400. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_SP 0x0UL
  2401. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_ETS 0x1UL
  2402. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2403. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2404. u8 queue_id1_pri_lvl;
  2405. u8 queue_id1_bw_weight;
  2406. u8 queue_id2;
  2407. __le32 queue_id2_min_bw;
  2408. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2409. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_SFT 0
  2410. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_RSVD 0x10000000UL
  2411. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2412. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT 29
  2413. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2414. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2415. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2416. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
  2417. __le32 queue_id2_max_bw;
  2418. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2419. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_SFT 0
  2420. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_RSVD 0x10000000UL
  2421. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2422. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT 29
  2423. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2424. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2425. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2426. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
  2427. u8 queue_id2_tsa_assign;
  2428. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_SP 0x0UL
  2429. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_ETS 0x1UL
  2430. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2431. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2432. u8 queue_id2_pri_lvl;
  2433. u8 queue_id2_bw_weight;
  2434. u8 queue_id3;
  2435. __le32 queue_id3_min_bw;
  2436. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2437. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_SFT 0
  2438. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_RSVD 0x10000000UL
  2439. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2440. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT 29
  2441. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2442. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2443. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2444. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
  2445. __le32 queue_id3_max_bw;
  2446. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2447. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_SFT 0
  2448. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_RSVD 0x10000000UL
  2449. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2450. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT 29
  2451. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2452. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2453. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2454. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
  2455. u8 queue_id3_tsa_assign;
  2456. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_SP 0x0UL
  2457. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_ETS 0x1UL
  2458. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2459. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2460. u8 queue_id3_pri_lvl;
  2461. u8 queue_id3_bw_weight;
  2462. u8 queue_id4;
  2463. __le32 queue_id4_min_bw;
  2464. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2465. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_SFT 0
  2466. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_RSVD 0x10000000UL
  2467. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2468. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT 29
  2469. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2470. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2471. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2472. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
  2473. __le32 queue_id4_max_bw;
  2474. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2475. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_SFT 0
  2476. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_RSVD 0x10000000UL
  2477. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2478. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT 29
  2479. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2480. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2481. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2482. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
  2483. u8 queue_id4_tsa_assign;
  2484. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_SP 0x0UL
  2485. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_ETS 0x1UL
  2486. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2487. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2488. u8 queue_id4_pri_lvl;
  2489. u8 queue_id4_bw_weight;
  2490. u8 queue_id5;
  2491. __le32 queue_id5_min_bw;
  2492. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2493. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_SFT 0
  2494. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_RSVD 0x10000000UL
  2495. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2496. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT 29
  2497. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2498. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2499. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2500. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
  2501. __le32 queue_id5_max_bw;
  2502. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2503. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_SFT 0
  2504. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_RSVD 0x10000000UL
  2505. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2506. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT 29
  2507. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2508. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2509. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2510. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
  2511. u8 queue_id5_tsa_assign;
  2512. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_SP 0x0UL
  2513. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_ETS 0x1UL
  2514. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2515. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2516. u8 queue_id5_pri_lvl;
  2517. u8 queue_id5_bw_weight;
  2518. u8 queue_id6;
  2519. __le32 queue_id6_min_bw;
  2520. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2521. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_SFT 0
  2522. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_RSVD 0x10000000UL
  2523. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2524. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT 29
  2525. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2526. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2527. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2528. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
  2529. __le32 queue_id6_max_bw;
  2530. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2531. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_SFT 0
  2532. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_RSVD 0x10000000UL
  2533. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2534. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT 29
  2535. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2536. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2537. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2538. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
  2539. u8 queue_id6_tsa_assign;
  2540. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_SP 0x0UL
  2541. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_ETS 0x1UL
  2542. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2543. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2544. u8 queue_id6_pri_lvl;
  2545. u8 queue_id6_bw_weight;
  2546. u8 queue_id7;
  2547. __le32 queue_id7_min_bw;
  2548. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  2549. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_SFT 0
  2550. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_RSVD 0x10000000UL
  2551. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2552. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT 29
  2553. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2554. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2555. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2556. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
  2557. __le32 queue_id7_max_bw;
  2558. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2559. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_SFT 0
  2560. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_RSVD 0x10000000UL
  2561. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2562. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT 29
  2563. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2564. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2565. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2566. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
  2567. u8 queue_id7_tsa_assign;
  2568. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_SP 0x0UL
  2569. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_ETS 0x1UL
  2570. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  2571. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST 0xffUL
  2572. u8 queue_id7_pri_lvl;
  2573. u8 queue_id7_bw_weight;
  2574. u8 unused_1[5];
  2575. };
  2576. /* Output (16 bytes) */
  2577. struct hwrm_queue_cos2bw_cfg_output {
  2578. __le16 error_code;
  2579. __le16 req_type;
  2580. __le16 seq_id;
  2581. __le16 resp_len;
  2582. __le32 unused_0;
  2583. u8 unused_1;
  2584. u8 unused_2;
  2585. u8 unused_3;
  2586. u8 valid;
  2587. };
  2588. /* hwrm_vnic_alloc */
  2589. /* Input (24 bytes) */
  2590. struct hwrm_vnic_alloc_input {
  2591. __le16 req_type;
  2592. __le16 cmpl_ring;
  2593. __le16 seq_id;
  2594. __le16 target_id;
  2595. __le64 resp_addr;
  2596. __le32 flags;
  2597. #define VNIC_ALLOC_REQ_FLAGS_DEFAULT 0x1UL
  2598. __le32 unused_0;
  2599. };
  2600. /* Output (16 bytes) */
  2601. struct hwrm_vnic_alloc_output {
  2602. __le16 error_code;
  2603. __le16 req_type;
  2604. __le16 seq_id;
  2605. __le16 resp_len;
  2606. __le32 vnic_id;
  2607. u8 unused_0;
  2608. u8 unused_1;
  2609. u8 unused_2;
  2610. u8 valid;
  2611. };
  2612. /* hwrm_vnic_free */
  2613. /* Input (24 bytes) */
  2614. struct hwrm_vnic_free_input {
  2615. __le16 req_type;
  2616. __le16 cmpl_ring;
  2617. __le16 seq_id;
  2618. __le16 target_id;
  2619. __le64 resp_addr;
  2620. __le32 vnic_id;
  2621. __le32 unused_0;
  2622. };
  2623. /* Output (16 bytes) */
  2624. struct hwrm_vnic_free_output {
  2625. __le16 error_code;
  2626. __le16 req_type;
  2627. __le16 seq_id;
  2628. __le16 resp_len;
  2629. __le32 unused_0;
  2630. u8 unused_1;
  2631. u8 unused_2;
  2632. u8 unused_3;
  2633. u8 valid;
  2634. };
  2635. /* hwrm_vnic_cfg */
  2636. /* Input (40 bytes) */
  2637. struct hwrm_vnic_cfg_input {
  2638. __le16 req_type;
  2639. __le16 cmpl_ring;
  2640. __le16 seq_id;
  2641. __le16 target_id;
  2642. __le64 resp_addr;
  2643. __le32 flags;
  2644. #define VNIC_CFG_REQ_FLAGS_DEFAULT 0x1UL
  2645. #define VNIC_CFG_REQ_FLAGS_VLAN_STRIP_MODE 0x2UL
  2646. #define VNIC_CFG_REQ_FLAGS_BD_STALL_MODE 0x4UL
  2647. #define VNIC_CFG_REQ_FLAGS_ROCE_DUAL_VNIC_MODE 0x8UL
  2648. #define VNIC_CFG_REQ_FLAGS_ROCE_ONLY_VNIC_MODE 0x10UL
  2649. #define VNIC_CFG_REQ_FLAGS_RSS_DFLT_CR_MODE 0x20UL
  2650. __le32 enables;
  2651. #define VNIC_CFG_REQ_ENABLES_DFLT_RING_GRP 0x1UL
  2652. #define VNIC_CFG_REQ_ENABLES_RSS_RULE 0x2UL
  2653. #define VNIC_CFG_REQ_ENABLES_COS_RULE 0x4UL
  2654. #define VNIC_CFG_REQ_ENABLES_LB_RULE 0x8UL
  2655. #define VNIC_CFG_REQ_ENABLES_MRU 0x10UL
  2656. __le16 vnic_id;
  2657. __le16 dflt_ring_grp;
  2658. __le16 rss_rule;
  2659. __le16 cos_rule;
  2660. __le16 lb_rule;
  2661. __le16 mru;
  2662. __le32 unused_0;
  2663. };
  2664. /* Output (16 bytes) */
  2665. struct hwrm_vnic_cfg_output {
  2666. __le16 error_code;
  2667. __le16 req_type;
  2668. __le16 seq_id;
  2669. __le16 resp_len;
  2670. __le32 unused_0;
  2671. u8 unused_1;
  2672. u8 unused_2;
  2673. u8 unused_3;
  2674. u8 valid;
  2675. };
  2676. /* hwrm_vnic_tpa_cfg */
  2677. /* Input (40 bytes) */
  2678. struct hwrm_vnic_tpa_cfg_input {
  2679. __le16 req_type;
  2680. __le16 cmpl_ring;
  2681. __le16 seq_id;
  2682. __le16 target_id;
  2683. __le64 resp_addr;
  2684. __le32 flags;
  2685. #define VNIC_TPA_CFG_REQ_FLAGS_TPA 0x1UL
  2686. #define VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA 0x2UL
  2687. #define VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE 0x4UL
  2688. #define VNIC_TPA_CFG_REQ_FLAGS_GRO 0x8UL
  2689. #define VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN 0x10UL
  2690. #define VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ 0x20UL
  2691. #define VNIC_TPA_CFG_REQ_FLAGS_GRO_IPID_CHECK 0x40UL
  2692. #define VNIC_TPA_CFG_REQ_FLAGS_GRO_TTL_CHECK 0x80UL
  2693. __le32 enables;
  2694. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS 0x1UL
  2695. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS 0x2UL
  2696. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_TIMER 0x4UL
  2697. #define VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN 0x8UL
  2698. __le16 vnic_id;
  2699. __le16 max_agg_segs;
  2700. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_1 0x0UL
  2701. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_2 0x1UL
  2702. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_4 0x2UL
  2703. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_8 0x3UL
  2704. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_MAX 0x1fUL
  2705. __le16 max_aggs;
  2706. #define VNIC_TPA_CFG_REQ_MAX_AGGS_1 0x0UL
  2707. #define VNIC_TPA_CFG_REQ_MAX_AGGS_2 0x1UL
  2708. #define VNIC_TPA_CFG_REQ_MAX_AGGS_4 0x2UL
  2709. #define VNIC_TPA_CFG_REQ_MAX_AGGS_8 0x3UL
  2710. #define VNIC_TPA_CFG_REQ_MAX_AGGS_16 0x4UL
  2711. #define VNIC_TPA_CFG_REQ_MAX_AGGS_MAX 0x7UL
  2712. u8 unused_0;
  2713. u8 unused_1;
  2714. __le32 max_agg_timer;
  2715. __le32 min_agg_len;
  2716. };
  2717. /* Output (16 bytes) */
  2718. struct hwrm_vnic_tpa_cfg_output {
  2719. __le16 error_code;
  2720. __le16 req_type;
  2721. __le16 seq_id;
  2722. __le16 resp_len;
  2723. __le32 unused_0;
  2724. u8 unused_1;
  2725. u8 unused_2;
  2726. u8 unused_3;
  2727. u8 valid;
  2728. };
  2729. /* hwrm_vnic_rss_cfg */
  2730. /* Input (48 bytes) */
  2731. struct hwrm_vnic_rss_cfg_input {
  2732. __le16 req_type;
  2733. __le16 cmpl_ring;
  2734. __le16 seq_id;
  2735. __le16 target_id;
  2736. __le64 resp_addr;
  2737. __le32 hash_type;
  2738. #define VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 0x1UL
  2739. #define VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 0x2UL
  2740. #define VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4 0x4UL
  2741. #define VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 0x8UL
  2742. #define VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6 0x10UL
  2743. #define VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6 0x20UL
  2744. __le32 unused_0;
  2745. __le64 ring_grp_tbl_addr;
  2746. __le64 hash_key_tbl_addr;
  2747. __le16 rss_ctx_idx;
  2748. __le16 unused_1[3];
  2749. };
  2750. /* Output (16 bytes) */
  2751. struct hwrm_vnic_rss_cfg_output {
  2752. __le16 error_code;
  2753. __le16 req_type;
  2754. __le16 seq_id;
  2755. __le16 resp_len;
  2756. __le32 unused_0;
  2757. u8 unused_1;
  2758. u8 unused_2;
  2759. u8 unused_3;
  2760. u8 valid;
  2761. };
  2762. /* hwrm_vnic_plcmodes_cfg */
  2763. /* Input (40 bytes) */
  2764. struct hwrm_vnic_plcmodes_cfg_input {
  2765. __le16 req_type;
  2766. __le16 cmpl_ring;
  2767. __le16 seq_id;
  2768. __le16 target_id;
  2769. __le64 resp_addr;
  2770. __le32 flags;
  2771. #define VNIC_PLCMODES_CFG_REQ_FLAGS_REGULAR_PLACEMENT 0x1UL
  2772. #define VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT 0x2UL
  2773. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 0x4UL
  2774. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6 0x8UL
  2775. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_FCOE 0x10UL
  2776. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_ROCE 0x20UL
  2777. __le32 enables;
  2778. #define VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID 0x1UL
  2779. #define VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_OFFSET_VALID 0x2UL
  2780. #define VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID 0x4UL
  2781. __le32 vnic_id;
  2782. __le16 jumbo_thresh;
  2783. __le16 hds_offset;
  2784. __le16 hds_threshold;
  2785. __le16 unused_0[3];
  2786. };
  2787. /* Output (16 bytes) */
  2788. struct hwrm_vnic_plcmodes_cfg_output {
  2789. __le16 error_code;
  2790. __le16 req_type;
  2791. __le16 seq_id;
  2792. __le16 resp_len;
  2793. __le32 unused_0;
  2794. u8 unused_1;
  2795. u8 unused_2;
  2796. u8 unused_3;
  2797. u8 valid;
  2798. };
  2799. /* hwrm_vnic_rss_cos_lb_ctx_alloc */
  2800. /* Input (16 bytes) */
  2801. struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {
  2802. __le16 req_type;
  2803. __le16 cmpl_ring;
  2804. __le16 seq_id;
  2805. __le16 target_id;
  2806. __le64 resp_addr;
  2807. };
  2808. /* Output (16 bytes) */
  2809. struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {
  2810. __le16 error_code;
  2811. __le16 req_type;
  2812. __le16 seq_id;
  2813. __le16 resp_len;
  2814. __le16 rss_cos_lb_ctx_id;
  2815. u8 unused_0;
  2816. u8 unused_1;
  2817. u8 unused_2;
  2818. u8 unused_3;
  2819. u8 unused_4;
  2820. u8 valid;
  2821. };
  2822. /* hwrm_vnic_rss_cos_lb_ctx_free */
  2823. /* Input (24 bytes) */
  2824. struct hwrm_vnic_rss_cos_lb_ctx_free_input {
  2825. __le16 req_type;
  2826. __le16 cmpl_ring;
  2827. __le16 seq_id;
  2828. __le16 target_id;
  2829. __le64 resp_addr;
  2830. __le16 rss_cos_lb_ctx_id;
  2831. __le16 unused_0[3];
  2832. };
  2833. /* Output (16 bytes) */
  2834. struct hwrm_vnic_rss_cos_lb_ctx_free_output {
  2835. __le16 error_code;
  2836. __le16 req_type;
  2837. __le16 seq_id;
  2838. __le16 resp_len;
  2839. __le32 unused_0;
  2840. u8 unused_1;
  2841. u8 unused_2;
  2842. u8 unused_3;
  2843. u8 valid;
  2844. };
  2845. /* hwrm_ring_alloc */
  2846. /* Input (80 bytes) */
  2847. struct hwrm_ring_alloc_input {
  2848. __le16 req_type;
  2849. __le16 cmpl_ring;
  2850. __le16 seq_id;
  2851. __le16 target_id;
  2852. __le64 resp_addr;
  2853. __le32 enables;
  2854. #define RING_ALLOC_REQ_ENABLES_RESERVED1 0x1UL
  2855. #define RING_ALLOC_REQ_ENABLES_RING_ARB_CFG 0x2UL
  2856. #define RING_ALLOC_REQ_ENABLES_RESERVED3 0x4UL
  2857. #define RING_ALLOC_REQ_ENABLES_STAT_CTX_ID_VALID 0x8UL
  2858. #define RING_ALLOC_REQ_ENABLES_RESERVED4 0x10UL
  2859. #define RING_ALLOC_REQ_ENABLES_MAX_BW_VALID 0x20UL
  2860. u8 ring_type;
  2861. #define RING_ALLOC_REQ_RING_TYPE_CMPL 0x0UL
  2862. #define RING_ALLOC_REQ_RING_TYPE_TX 0x1UL
  2863. #define RING_ALLOC_REQ_RING_TYPE_RX 0x2UL
  2864. u8 unused_0;
  2865. __le16 unused_1;
  2866. __le64 page_tbl_addr;
  2867. __le32 fbo;
  2868. u8 page_size;
  2869. u8 page_tbl_depth;
  2870. u8 unused_2;
  2871. u8 unused_3;
  2872. __le32 length;
  2873. __le16 logical_id;
  2874. __le16 cmpl_ring_id;
  2875. __le16 queue_id;
  2876. u8 unused_4;
  2877. u8 unused_5;
  2878. __le32 reserved1;
  2879. __le16 ring_arb_cfg;
  2880. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_MASK 0xfUL
  2881. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_SFT 0
  2882. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_SP (0x1UL << 0)
  2883. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_WFQ (0x2UL << 0)
  2884. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_LAST RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_WFQ
  2885. #define RING_ALLOC_REQ_RING_ARB_CFG_RSVD_MASK 0xf0UL
  2886. #define RING_ALLOC_REQ_RING_ARB_CFG_RSVD_SFT 4
  2887. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_PARAM_MASK 0xff00UL
  2888. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_PARAM_SFT 8
  2889. u8 unused_6;
  2890. u8 unused_7;
  2891. __le32 reserved3;
  2892. __le32 stat_ctx_id;
  2893. __le32 reserved4;
  2894. __le32 max_bw;
  2895. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  2896. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_SFT 0
  2897. #define RING_ALLOC_REQ_MAX_BW_RSVD 0x10000000UL
  2898. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  2899. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_SFT 29
  2900. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_MBPS (0x0UL << 29)
  2901. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  2902. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  2903. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_LAST RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_INVALID
  2904. u8 int_mode;
  2905. #define RING_ALLOC_REQ_INT_MODE_LEGACY 0x0UL
  2906. #define RING_ALLOC_REQ_INT_MODE_RSVD 0x1UL
  2907. #define RING_ALLOC_REQ_INT_MODE_MSIX 0x2UL
  2908. #define RING_ALLOC_REQ_INT_MODE_POLL 0x3UL
  2909. u8 unused_8[3];
  2910. };
  2911. /* Output (16 bytes) */
  2912. struct hwrm_ring_alloc_output {
  2913. __le16 error_code;
  2914. __le16 req_type;
  2915. __le16 seq_id;
  2916. __le16 resp_len;
  2917. __le16 ring_id;
  2918. __le16 logical_ring_id;
  2919. u8 unused_0;
  2920. u8 unused_1;
  2921. u8 unused_2;
  2922. u8 valid;
  2923. };
  2924. /* hwrm_ring_free */
  2925. /* Input (24 bytes) */
  2926. struct hwrm_ring_free_input {
  2927. __le16 req_type;
  2928. __le16 cmpl_ring;
  2929. __le16 seq_id;
  2930. __le16 target_id;
  2931. __le64 resp_addr;
  2932. u8 ring_type;
  2933. #define RING_FREE_REQ_RING_TYPE_CMPL 0x0UL
  2934. #define RING_FREE_REQ_RING_TYPE_TX 0x1UL
  2935. #define RING_FREE_REQ_RING_TYPE_RX 0x2UL
  2936. u8 unused_0;
  2937. __le16 ring_id;
  2938. __le32 unused_1;
  2939. };
  2940. /* Output (16 bytes) */
  2941. struct hwrm_ring_free_output {
  2942. __le16 error_code;
  2943. __le16 req_type;
  2944. __le16 seq_id;
  2945. __le16 resp_len;
  2946. __le32 unused_0;
  2947. u8 unused_1;
  2948. u8 unused_2;
  2949. u8 unused_3;
  2950. u8 valid;
  2951. };
  2952. /* hwrm_ring_cmpl_ring_qaggint_params */
  2953. /* Input (24 bytes) */
  2954. struct hwrm_ring_cmpl_ring_qaggint_params_input {
  2955. __le16 req_type;
  2956. __le16 cmpl_ring;
  2957. __le16 seq_id;
  2958. __le16 target_id;
  2959. __le64 resp_addr;
  2960. __le16 ring_id;
  2961. __le16 unused_0[3];
  2962. };
  2963. /* Output (32 bytes) */
  2964. struct hwrm_ring_cmpl_ring_qaggint_params_output {
  2965. __le16 error_code;
  2966. __le16 req_type;
  2967. __le16 seq_id;
  2968. __le16 resp_len;
  2969. __le16 flags;
  2970. #define RING_CMPL_RING_QAGGINT_PARAMS_RESP_FLAGS_TIMER_RESET 0x1UL
  2971. #define RING_CMPL_RING_QAGGINT_PARAMS_RESP_FLAGS_RING_IDLE 0x2UL
  2972. __le16 num_cmpl_dma_aggr;
  2973. __le16 num_cmpl_dma_aggr_during_int;
  2974. __le16 cmpl_aggr_dma_tmr;
  2975. __le16 cmpl_aggr_dma_tmr_during_int;
  2976. __le16 int_lat_tmr_min;
  2977. __le16 int_lat_tmr_max;
  2978. __le16 num_cmpl_aggr_int;
  2979. __le32 unused_0;
  2980. u8 unused_1;
  2981. u8 unused_2;
  2982. u8 unused_3;
  2983. u8 valid;
  2984. };
  2985. /* hwrm_ring_cmpl_ring_cfg_aggint_params */
  2986. /* Input (40 bytes) */
  2987. struct hwrm_ring_cmpl_ring_cfg_aggint_params_input {
  2988. __le16 req_type;
  2989. __le16 cmpl_ring;
  2990. __le16 seq_id;
  2991. __le16 target_id;
  2992. __le64 resp_addr;
  2993. __le16 ring_id;
  2994. __le16 flags;
  2995. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_FLAGS_TIMER_RESET 0x1UL
  2996. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_FLAGS_RING_IDLE 0x2UL
  2997. __le16 num_cmpl_dma_aggr;
  2998. __le16 num_cmpl_dma_aggr_during_int;
  2999. __le16 cmpl_aggr_dma_tmr;
  3000. __le16 cmpl_aggr_dma_tmr_during_int;
  3001. __le16 int_lat_tmr_min;
  3002. __le16 int_lat_tmr_max;
  3003. __le16 num_cmpl_aggr_int;
  3004. __le16 unused_0[3];
  3005. };
  3006. /* Output (16 bytes) */
  3007. struct hwrm_ring_cmpl_ring_cfg_aggint_params_output {
  3008. __le16 error_code;
  3009. __le16 req_type;
  3010. __le16 seq_id;
  3011. __le16 resp_len;
  3012. __le32 unused_0;
  3013. u8 unused_1;
  3014. u8 unused_2;
  3015. u8 unused_3;
  3016. u8 valid;
  3017. };
  3018. /* hwrm_ring_reset */
  3019. /* Input (24 bytes) */
  3020. struct hwrm_ring_reset_input {
  3021. __le16 req_type;
  3022. __le16 cmpl_ring;
  3023. __le16 seq_id;
  3024. __le16 target_id;
  3025. __le64 resp_addr;
  3026. u8 ring_type;
  3027. #define RING_RESET_REQ_RING_TYPE_CMPL 0x0UL
  3028. #define RING_RESET_REQ_RING_TYPE_TX 0x1UL
  3029. #define RING_RESET_REQ_RING_TYPE_RX 0x2UL
  3030. u8 unused_0;
  3031. __le16 ring_id;
  3032. __le32 unused_1;
  3033. };
  3034. /* Output (16 bytes) */
  3035. struct hwrm_ring_reset_output {
  3036. __le16 error_code;
  3037. __le16 req_type;
  3038. __le16 seq_id;
  3039. __le16 resp_len;
  3040. __le32 unused_0;
  3041. u8 unused_1;
  3042. u8 unused_2;
  3043. u8 unused_3;
  3044. u8 valid;
  3045. };
  3046. /* hwrm_ring_grp_alloc */
  3047. /* Input (24 bytes) */
  3048. struct hwrm_ring_grp_alloc_input {
  3049. __le16 req_type;
  3050. __le16 cmpl_ring;
  3051. __le16 seq_id;
  3052. __le16 target_id;
  3053. __le64 resp_addr;
  3054. __le16 cr;
  3055. __le16 rr;
  3056. __le16 ar;
  3057. __le16 sc;
  3058. };
  3059. /* Output (16 bytes) */
  3060. struct hwrm_ring_grp_alloc_output {
  3061. __le16 error_code;
  3062. __le16 req_type;
  3063. __le16 seq_id;
  3064. __le16 resp_len;
  3065. __le32 ring_group_id;
  3066. u8 unused_0;
  3067. u8 unused_1;
  3068. u8 unused_2;
  3069. u8 valid;
  3070. };
  3071. /* hwrm_ring_grp_free */
  3072. /* Input (24 bytes) */
  3073. struct hwrm_ring_grp_free_input {
  3074. __le16 req_type;
  3075. __le16 cmpl_ring;
  3076. __le16 seq_id;
  3077. __le16 target_id;
  3078. __le64 resp_addr;
  3079. __le32 ring_group_id;
  3080. __le32 unused_0;
  3081. };
  3082. /* Output (16 bytes) */
  3083. struct hwrm_ring_grp_free_output {
  3084. __le16 error_code;
  3085. __le16 req_type;
  3086. __le16 seq_id;
  3087. __le16 resp_len;
  3088. __le32 unused_0;
  3089. u8 unused_1;
  3090. u8 unused_2;
  3091. u8 unused_3;
  3092. u8 valid;
  3093. };
  3094. /* hwrm_cfa_l2_filter_alloc */
  3095. /* Input (96 bytes) */
  3096. struct hwrm_cfa_l2_filter_alloc_input {
  3097. __le16 req_type;
  3098. __le16 cmpl_ring;
  3099. __le16 seq_id;
  3100. __le16 target_id;
  3101. __le64 resp_addr;
  3102. __le32 flags;
  3103. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH 0x1UL
  3104. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_TX (0x0UL << 0)
  3105. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX (0x1UL << 0)
  3106. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_LAST CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX
  3107. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x2UL
  3108. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_DROP 0x4UL
  3109. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_OUTERMOST 0x8UL
  3110. __le32 enables;
  3111. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR 0x1UL
  3112. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR_MASK 0x2UL
  3113. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_OVLAN 0x4UL
  3114. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_OVLAN_MASK 0x8UL
  3115. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN 0x10UL
  3116. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN_MASK 0x20UL
  3117. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_ADDR 0x40UL
  3118. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_ADDR_MASK 0x80UL
  3119. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_OVLAN 0x100UL
  3120. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_OVLAN_MASK 0x200UL
  3121. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_IVLAN 0x400UL
  3122. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_IVLAN_MASK 0x800UL
  3123. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_SRC_TYPE 0x1000UL
  3124. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_SRC_ID 0x2000UL
  3125. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x4000UL
  3126. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x8000UL
  3127. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x10000UL
  3128. u8 l2_addr[6];
  3129. u8 unused_0;
  3130. u8 unused_1;
  3131. u8 l2_addr_mask[6];
  3132. __le16 l2_ovlan;
  3133. __le16 l2_ovlan_mask;
  3134. __le16 l2_ivlan;
  3135. __le16 l2_ivlan_mask;
  3136. u8 unused_2;
  3137. u8 unused_3;
  3138. u8 t_l2_addr[6];
  3139. u8 unused_4;
  3140. u8 unused_5;
  3141. u8 t_l2_addr_mask[6];
  3142. __le16 t_l2_ovlan;
  3143. __le16 t_l2_ovlan_mask;
  3144. __le16 t_l2_ivlan;
  3145. __le16 t_l2_ivlan_mask;
  3146. u8 src_type;
  3147. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_NPORT 0x0UL
  3148. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_PF 0x1UL
  3149. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_VF 0x2UL
  3150. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_VNIC 0x3UL
  3151. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_KONG 0x4UL
  3152. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_APE 0x5UL
  3153. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_BONO 0x6UL
  3154. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_TANG 0x7UL
  3155. u8 unused_6;
  3156. __le32 src_id;
  3157. u8 tunnel_type;
  3158. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  3159. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3160. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  3161. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  3162. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  3163. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3164. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  3165. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  3166. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  3167. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  3168. u8 unused_7;
  3169. __le16 dst_id;
  3170. __le16 mirror_vnic_id;
  3171. u8 pri_hint;
  3172. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_NO_PREFER 0x0UL
  3173. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_ABOVE_FILTER 0x1UL
  3174. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_BELOW_FILTER 0x2UL
  3175. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_MAX 0x3UL
  3176. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_MIN 0x4UL
  3177. u8 unused_8;
  3178. __le32 unused_9;
  3179. __le64 l2_filter_id_hint;
  3180. };
  3181. /* Output (24 bytes) */
  3182. struct hwrm_cfa_l2_filter_alloc_output {
  3183. __le16 error_code;
  3184. __le16 req_type;
  3185. __le16 seq_id;
  3186. __le16 resp_len;
  3187. __le64 l2_filter_id;
  3188. __le32 flow_id;
  3189. u8 unused_0;
  3190. u8 unused_1;
  3191. u8 unused_2;
  3192. u8 valid;
  3193. };
  3194. /* hwrm_cfa_l2_filter_free */
  3195. /* Input (24 bytes) */
  3196. struct hwrm_cfa_l2_filter_free_input {
  3197. __le16 req_type;
  3198. __le16 cmpl_ring;
  3199. __le16 seq_id;
  3200. __le16 target_id;
  3201. __le64 resp_addr;
  3202. __le64 l2_filter_id;
  3203. };
  3204. /* Output (16 bytes) */
  3205. struct hwrm_cfa_l2_filter_free_output {
  3206. __le16 error_code;
  3207. __le16 req_type;
  3208. __le16 seq_id;
  3209. __le16 resp_len;
  3210. __le32 unused_0;
  3211. u8 unused_1;
  3212. u8 unused_2;
  3213. u8 unused_3;
  3214. u8 valid;
  3215. };
  3216. /* hwrm_cfa_l2_filter_cfg */
  3217. /* Input (40 bytes) */
  3218. struct hwrm_cfa_l2_filter_cfg_input {
  3219. __le16 req_type;
  3220. __le16 cmpl_ring;
  3221. __le16 seq_id;
  3222. __le16 target_id;
  3223. __le64 resp_addr;
  3224. __le32 flags;
  3225. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH 0x1UL
  3226. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_TX (0x0UL << 0)
  3227. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_RX (0x1UL << 0)
  3228. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_LAST CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_RX
  3229. #define CFA_L2_FILTER_CFG_REQ_FLAGS_DROP 0x2UL
  3230. __le32 enables;
  3231. #define CFA_L2_FILTER_CFG_REQ_ENABLES_DST_ID 0x1UL
  3232. #define CFA_L2_FILTER_CFG_REQ_ENABLES_NEW_MIRROR_VNIC_ID 0x2UL
  3233. __le64 l2_filter_id;
  3234. __le32 dst_id;
  3235. __le32 new_mirror_vnic_id;
  3236. };
  3237. /* Output (16 bytes) */
  3238. struct hwrm_cfa_l2_filter_cfg_output {
  3239. __le16 error_code;
  3240. __le16 req_type;
  3241. __le16 seq_id;
  3242. __le16 resp_len;
  3243. __le32 unused_0;
  3244. u8 unused_1;
  3245. u8 unused_2;
  3246. u8 unused_3;
  3247. u8 valid;
  3248. };
  3249. /* hwrm_cfa_l2_set_rx_mask */
  3250. /* Input (56 bytes) */
  3251. struct hwrm_cfa_l2_set_rx_mask_input {
  3252. __le16 req_type;
  3253. __le16 cmpl_ring;
  3254. __le16 seq_id;
  3255. __le16 target_id;
  3256. __le64 resp_addr;
  3257. __le32 vnic_id;
  3258. __le32 mask;
  3259. #define CFA_L2_SET_RX_MASK_REQ_MASK_RESERVED 0x1UL
  3260. #define CFA_L2_SET_RX_MASK_REQ_MASK_MCAST 0x2UL
  3261. #define CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST 0x4UL
  3262. #define CFA_L2_SET_RX_MASK_REQ_MASK_BCAST 0x8UL
  3263. #define CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS 0x10UL
  3264. #define CFA_L2_SET_RX_MASK_REQ_MASK_OUTERMOST 0x20UL
  3265. #define CFA_L2_SET_RX_MASK_REQ_MASK_VLANONLY 0x40UL
  3266. #define CFA_L2_SET_RX_MASK_REQ_MASK_VLAN_NONVLAN 0x80UL
  3267. #define CFA_L2_SET_RX_MASK_REQ_MASK_ANYVLAN_NONVLAN 0x100UL
  3268. __le64 mc_tbl_addr;
  3269. __le32 num_mc_entries;
  3270. __le32 unused_0;
  3271. __le64 vlan_tag_tbl_addr;
  3272. __le32 num_vlan_tags;
  3273. __le32 unused_1;
  3274. };
  3275. /* Output (16 bytes) */
  3276. struct hwrm_cfa_l2_set_rx_mask_output {
  3277. __le16 error_code;
  3278. __le16 req_type;
  3279. __le16 seq_id;
  3280. __le16 resp_len;
  3281. __le32 unused_0;
  3282. u8 unused_1;
  3283. u8 unused_2;
  3284. u8 unused_3;
  3285. u8 valid;
  3286. };
  3287. /* hwrm_cfa_tunnel_filter_alloc */
  3288. /* Input (88 bytes) */
  3289. struct hwrm_cfa_tunnel_filter_alloc_input {
  3290. __le16 req_type;
  3291. __le16 cmpl_ring;
  3292. __le16 seq_id;
  3293. __le16 target_id;
  3294. __le64 resp_addr;
  3295. __le32 flags;
  3296. #define CFA_TUNNEL_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  3297. __le32 enables;
  3298. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_FILTER_ID 0x1UL
  3299. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_ADDR 0x2UL
  3300. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN 0x4UL
  3301. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L3_ADDR 0x8UL
  3302. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L3_ADDR_TYPE 0x10UL
  3303. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_T_L3_ADDR_TYPE 0x20UL
  3304. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_T_L3_ADDR 0x40UL
  3305. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x80UL
  3306. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_VNI 0x100UL
  3307. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_DST_VNIC_ID 0x200UL
  3308. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x400UL
  3309. __le64 l2_filter_id;
  3310. u8 l2_addr[6];
  3311. __le16 l2_ivlan;
  3312. __le32 l3_addr[4];
  3313. __le32 t_l3_addr[4];
  3314. u8 l3_addr_type;
  3315. u8 t_l3_addr_type;
  3316. u8 tunnel_type;
  3317. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  3318. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3319. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  3320. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  3321. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  3322. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3323. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  3324. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  3325. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  3326. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  3327. u8 unused_0;
  3328. __le32 vni;
  3329. __le32 dst_vnic_id;
  3330. __le32 mirror_vnic_id;
  3331. };
  3332. /* Output (24 bytes) */
  3333. struct hwrm_cfa_tunnel_filter_alloc_output {
  3334. __le16 error_code;
  3335. __le16 req_type;
  3336. __le16 seq_id;
  3337. __le16 resp_len;
  3338. __le64 tunnel_filter_id;
  3339. __le32 flow_id;
  3340. u8 unused_0;
  3341. u8 unused_1;
  3342. u8 unused_2;
  3343. u8 valid;
  3344. };
  3345. /* hwrm_cfa_tunnel_filter_free */
  3346. /* Input (24 bytes) */
  3347. struct hwrm_cfa_tunnel_filter_free_input {
  3348. __le16 req_type;
  3349. __le16 cmpl_ring;
  3350. __le16 seq_id;
  3351. __le16 target_id;
  3352. __le64 resp_addr;
  3353. __le64 tunnel_filter_id;
  3354. };
  3355. /* Output (16 bytes) */
  3356. struct hwrm_cfa_tunnel_filter_free_output {
  3357. __le16 error_code;
  3358. __le16 req_type;
  3359. __le16 seq_id;
  3360. __le16 resp_len;
  3361. __le32 unused_0;
  3362. u8 unused_1;
  3363. u8 unused_2;
  3364. u8 unused_3;
  3365. u8 valid;
  3366. };
  3367. /* hwrm_cfa_encap_record_alloc */
  3368. /* Input (32 bytes) */
  3369. struct hwrm_cfa_encap_record_alloc_input {
  3370. __le16 req_type;
  3371. __le16 cmpl_ring;
  3372. __le16 seq_id;
  3373. __le16 target_id;
  3374. __le64 resp_addr;
  3375. __le32 flags;
  3376. #define CFA_ENCAP_RECORD_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  3377. u8 encap_type;
  3378. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_VXLAN 0x1UL
  3379. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_NVGRE 0x2UL
  3380. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_L2GRE 0x3UL
  3381. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_IPIP 0x4UL
  3382. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_GENEVE 0x5UL
  3383. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_MPLS 0x6UL
  3384. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_VLAN 0x7UL
  3385. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_IPGRE 0x8UL
  3386. u8 unused_0;
  3387. __le16 unused_1;
  3388. __le32 encap_data[16];
  3389. };
  3390. /* Output (16 bytes) */
  3391. struct hwrm_cfa_encap_record_alloc_output {
  3392. __le16 error_code;
  3393. __le16 req_type;
  3394. __le16 seq_id;
  3395. __le16 resp_len;
  3396. __le32 encap_record_id;
  3397. u8 unused_0;
  3398. u8 unused_1;
  3399. u8 unused_2;
  3400. u8 valid;
  3401. };
  3402. /* hwrm_cfa_encap_record_free */
  3403. /* Input (24 bytes) */
  3404. struct hwrm_cfa_encap_record_free_input {
  3405. __le16 req_type;
  3406. __le16 cmpl_ring;
  3407. __le16 seq_id;
  3408. __le16 target_id;
  3409. __le64 resp_addr;
  3410. __le32 encap_record_id;
  3411. __le32 unused_0;
  3412. };
  3413. /* Output (16 bytes) */
  3414. struct hwrm_cfa_encap_record_free_output {
  3415. __le16 error_code;
  3416. __le16 req_type;
  3417. __le16 seq_id;
  3418. __le16 resp_len;
  3419. __le32 unused_0;
  3420. u8 unused_1;
  3421. u8 unused_2;
  3422. u8 unused_3;
  3423. u8 valid;
  3424. };
  3425. /* hwrm_cfa_ntuple_filter_alloc */
  3426. /* Input (128 bytes) */
  3427. struct hwrm_cfa_ntuple_filter_alloc_input {
  3428. __le16 req_type;
  3429. __le16 cmpl_ring;
  3430. __le16 seq_id;
  3431. __le16 target_id;
  3432. __le64 resp_addr;
  3433. __le32 flags;
  3434. #define CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  3435. #define CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_DROP 0x2UL
  3436. __le32 enables;
  3437. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_L2_FILTER_ID 0x1UL
  3438. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_ETHERTYPE 0x2UL
  3439. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x4UL
  3440. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_MACADDR 0x8UL
  3441. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_IPADDR_TYPE 0x10UL
  3442. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_IPADDR 0x20UL
  3443. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_IPADDR_MASK 0x40UL
  3444. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_IPADDR 0x80UL
  3445. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_IPADDR_MASK 0x100UL
  3446. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_IP_PROTOCOL 0x200UL
  3447. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_PORT 0x400UL
  3448. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_PORT_MASK 0x800UL
  3449. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_PORT 0x1000UL
  3450. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_PORT_MASK 0x2000UL
  3451. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_PRI_HINT 0x4000UL
  3452. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_NTUPLE_FILTER_ID 0x8000UL
  3453. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x10000UL
  3454. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x20000UL
  3455. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_MACADDR 0x40000UL
  3456. __le64 l2_filter_id;
  3457. u8 src_macaddr[6];
  3458. __be16 ethertype;
  3459. u8 ip_addr_type;
  3460. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_UNKNOWN 0x0UL
  3461. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV4 0x4UL
  3462. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV6 0x6UL
  3463. u8 ip_protocol;
  3464. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_UNKNOWN 0x0UL
  3465. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_UDP 0x6UL
  3466. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_TCP 0x11UL
  3467. __le16 dst_id;
  3468. __le16 mirror_vnic_id;
  3469. u8 tunnel_type;
  3470. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  3471. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3472. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  3473. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  3474. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  3475. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3476. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  3477. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  3478. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  3479. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  3480. u8 pri_hint;
  3481. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_NO_PREFER 0x0UL
  3482. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_ABOVE 0x1UL
  3483. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_BELOW 0x2UL
  3484. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_HIGHEST 0x3UL
  3485. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_LOWEST 0x4UL
  3486. __be32 src_ipaddr[4];
  3487. __be32 src_ipaddr_mask[4];
  3488. __be32 dst_ipaddr[4];
  3489. __be32 dst_ipaddr_mask[4];
  3490. __be16 src_port;
  3491. __be16 src_port_mask;
  3492. __be16 dst_port;
  3493. __be16 dst_port_mask;
  3494. __le64 ntuple_filter_id_hint;
  3495. };
  3496. /* Output (24 bytes) */
  3497. struct hwrm_cfa_ntuple_filter_alloc_output {
  3498. __le16 error_code;
  3499. __le16 req_type;
  3500. __le16 seq_id;
  3501. __le16 resp_len;
  3502. __le64 ntuple_filter_id;
  3503. __le32 flow_id;
  3504. u8 unused_0;
  3505. u8 unused_1;
  3506. u8 unused_2;
  3507. u8 valid;
  3508. };
  3509. /* hwrm_cfa_ntuple_filter_free */
  3510. /* Input (24 bytes) */
  3511. struct hwrm_cfa_ntuple_filter_free_input {
  3512. __le16 req_type;
  3513. __le16 cmpl_ring;
  3514. __le16 seq_id;
  3515. __le16 target_id;
  3516. __le64 resp_addr;
  3517. __le64 ntuple_filter_id;
  3518. };
  3519. /* Output (16 bytes) */
  3520. struct hwrm_cfa_ntuple_filter_free_output {
  3521. __le16 error_code;
  3522. __le16 req_type;
  3523. __le16 seq_id;
  3524. __le16 resp_len;
  3525. __le32 unused_0;
  3526. u8 unused_1;
  3527. u8 unused_2;
  3528. u8 unused_3;
  3529. u8 valid;
  3530. };
  3531. /* hwrm_cfa_ntuple_filter_cfg */
  3532. /* Input (40 bytes) */
  3533. struct hwrm_cfa_ntuple_filter_cfg_input {
  3534. __le16 req_type;
  3535. __le16 cmpl_ring;
  3536. __le16 seq_id;
  3537. __le16 target_id;
  3538. __le64 resp_addr;
  3539. __le32 enables;
  3540. #define CFA_NTUPLE_FILTER_CFG_REQ_ENABLES_NEW_DST_ID 0x1UL
  3541. #define CFA_NTUPLE_FILTER_CFG_REQ_ENABLES_NEW_MIRROR_VNIC_ID 0x2UL
  3542. __le32 unused_0;
  3543. __le64 ntuple_filter_id;
  3544. __le32 new_dst_id;
  3545. __le32 new_mirror_vnic_id;
  3546. };
  3547. /* Output (16 bytes) */
  3548. struct hwrm_cfa_ntuple_filter_cfg_output {
  3549. __le16 error_code;
  3550. __le16 req_type;
  3551. __le16 seq_id;
  3552. __le16 resp_len;
  3553. __le32 unused_0;
  3554. u8 unused_1;
  3555. u8 unused_2;
  3556. u8 unused_3;
  3557. u8 valid;
  3558. };
  3559. /* hwrm_tunnel_dst_port_query */
  3560. /* Input (24 bytes) */
  3561. struct hwrm_tunnel_dst_port_query_input {
  3562. __le16 req_type;
  3563. __le16 cmpl_ring;
  3564. __le16 seq_id;
  3565. __le16 target_id;
  3566. __le64 resp_addr;
  3567. u8 tunnel_type;
  3568. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3569. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3570. u8 unused_0[7];
  3571. };
  3572. /* Output (16 bytes) */
  3573. struct hwrm_tunnel_dst_port_query_output {
  3574. __le16 error_code;
  3575. __le16 req_type;
  3576. __le16 seq_id;
  3577. __le16 resp_len;
  3578. __le16 tunnel_dst_port_id;
  3579. __be16 tunnel_dst_port_val;
  3580. u8 unused_0;
  3581. u8 unused_1;
  3582. u8 unused_2;
  3583. u8 valid;
  3584. };
  3585. /* hwrm_tunnel_dst_port_alloc */
  3586. /* Input (24 bytes) */
  3587. struct hwrm_tunnel_dst_port_alloc_input {
  3588. __le16 req_type;
  3589. __le16 cmpl_ring;
  3590. __le16 seq_id;
  3591. __le16 target_id;
  3592. __le64 resp_addr;
  3593. u8 tunnel_type;
  3594. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3595. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3596. u8 unused_0;
  3597. __be16 tunnel_dst_port_val;
  3598. __le32 unused_1;
  3599. };
  3600. /* Output (16 bytes) */
  3601. struct hwrm_tunnel_dst_port_alloc_output {
  3602. __le16 error_code;
  3603. __le16 req_type;
  3604. __le16 seq_id;
  3605. __le16 resp_len;
  3606. __le16 tunnel_dst_port_id;
  3607. u8 unused_0;
  3608. u8 unused_1;
  3609. u8 unused_2;
  3610. u8 unused_3;
  3611. u8 unused_4;
  3612. u8 valid;
  3613. };
  3614. /* hwrm_tunnel_dst_port_free */
  3615. /* Input (24 bytes) */
  3616. struct hwrm_tunnel_dst_port_free_input {
  3617. __le16 req_type;
  3618. __le16 cmpl_ring;
  3619. __le16 seq_id;
  3620. __le16 target_id;
  3621. __le64 resp_addr;
  3622. u8 tunnel_type;
  3623. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  3624. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  3625. u8 unused_0;
  3626. __le16 tunnel_dst_port_id;
  3627. __le32 unused_1;
  3628. };
  3629. /* Output (16 bytes) */
  3630. struct hwrm_tunnel_dst_port_free_output {
  3631. __le16 error_code;
  3632. __le16 req_type;
  3633. __le16 seq_id;
  3634. __le16 resp_len;
  3635. __le32 unused_0;
  3636. u8 unused_1;
  3637. u8 unused_2;
  3638. u8 unused_3;
  3639. u8 valid;
  3640. };
  3641. /* hwrm_stat_ctx_alloc */
  3642. /* Input (32 bytes) */
  3643. struct hwrm_stat_ctx_alloc_input {
  3644. __le16 req_type;
  3645. __le16 cmpl_ring;
  3646. __le16 seq_id;
  3647. __le16 target_id;
  3648. __le64 resp_addr;
  3649. __le64 stats_dma_addr;
  3650. __le32 update_period_ms;
  3651. __le32 unused_0;
  3652. };
  3653. /* Output (16 bytes) */
  3654. struct hwrm_stat_ctx_alloc_output {
  3655. __le16 error_code;
  3656. __le16 req_type;
  3657. __le16 seq_id;
  3658. __le16 resp_len;
  3659. __le32 stat_ctx_id;
  3660. u8 unused_0;
  3661. u8 unused_1;
  3662. u8 unused_2;
  3663. u8 valid;
  3664. };
  3665. /* hwrm_stat_ctx_free */
  3666. /* Input (24 bytes) */
  3667. struct hwrm_stat_ctx_free_input {
  3668. __le16 req_type;
  3669. __le16 cmpl_ring;
  3670. __le16 seq_id;
  3671. __le16 target_id;
  3672. __le64 resp_addr;
  3673. __le32 stat_ctx_id;
  3674. __le32 unused_0;
  3675. };
  3676. /* Output (16 bytes) */
  3677. struct hwrm_stat_ctx_free_output {
  3678. __le16 error_code;
  3679. __le16 req_type;
  3680. __le16 seq_id;
  3681. __le16 resp_len;
  3682. __le32 stat_ctx_id;
  3683. u8 unused_0;
  3684. u8 unused_1;
  3685. u8 unused_2;
  3686. u8 valid;
  3687. };
  3688. /* hwrm_stat_ctx_query */
  3689. /* Input (24 bytes) */
  3690. struct hwrm_stat_ctx_query_input {
  3691. __le16 req_type;
  3692. __le16 cmpl_ring;
  3693. __le16 seq_id;
  3694. __le16 target_id;
  3695. __le64 resp_addr;
  3696. __le32 stat_ctx_id;
  3697. __le32 unused_0;
  3698. };
  3699. /* Output (176 bytes) */
  3700. struct hwrm_stat_ctx_query_output {
  3701. __le16 error_code;
  3702. __le16 req_type;
  3703. __le16 seq_id;
  3704. __le16 resp_len;
  3705. __le64 tx_ucast_pkts;
  3706. __le64 tx_mcast_pkts;
  3707. __le64 tx_bcast_pkts;
  3708. __le64 tx_err_pkts;
  3709. __le64 tx_drop_pkts;
  3710. __le64 tx_ucast_bytes;
  3711. __le64 tx_mcast_bytes;
  3712. __le64 tx_bcast_bytes;
  3713. __le64 rx_ucast_pkts;
  3714. __le64 rx_mcast_pkts;
  3715. __le64 rx_bcast_pkts;
  3716. __le64 rx_err_pkts;
  3717. __le64 rx_drop_pkts;
  3718. __le64 rx_ucast_bytes;
  3719. __le64 rx_mcast_bytes;
  3720. __le64 rx_bcast_bytes;
  3721. __le64 rx_agg_pkts;
  3722. __le64 rx_agg_bytes;
  3723. __le64 rx_agg_events;
  3724. __le64 rx_agg_aborts;
  3725. __le32 unused_0;
  3726. u8 unused_1;
  3727. u8 unused_2;
  3728. u8 unused_3;
  3729. u8 valid;
  3730. };
  3731. /* hwrm_stat_ctx_clr_stats */
  3732. /* Input (24 bytes) */
  3733. struct hwrm_stat_ctx_clr_stats_input {
  3734. __le16 req_type;
  3735. __le16 cmpl_ring;
  3736. __le16 seq_id;
  3737. __le16 target_id;
  3738. __le64 resp_addr;
  3739. __le32 stat_ctx_id;
  3740. __le32 unused_0;
  3741. };
  3742. /* Output (16 bytes) */
  3743. struct hwrm_stat_ctx_clr_stats_output {
  3744. __le16 error_code;
  3745. __le16 req_type;
  3746. __le16 seq_id;
  3747. __le16 resp_len;
  3748. __le32 unused_0;
  3749. u8 unused_1;
  3750. u8 unused_2;
  3751. u8 unused_3;
  3752. u8 valid;
  3753. };
  3754. /* hwrm_fw_reset */
  3755. /* Input (24 bytes) */
  3756. struct hwrm_fw_reset_input {
  3757. __le16 req_type;
  3758. __le16 cmpl_ring;
  3759. __le16 seq_id;
  3760. __le16 target_id;
  3761. __le64 resp_addr;
  3762. u8 embedded_proc_type;
  3763. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_BOOT 0x0UL
  3764. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_MGMT 0x1UL
  3765. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_NETCTRL 0x2UL
  3766. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_ROCE 0x3UL
  3767. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_RSVD 0x4UL
  3768. u8 selfrst_status;
  3769. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTNONE 0x0UL
  3770. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP 0x1UL
  3771. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  3772. __le16 unused_0[3];
  3773. };
  3774. /* Output (16 bytes) */
  3775. struct hwrm_fw_reset_output {
  3776. __le16 error_code;
  3777. __le16 req_type;
  3778. __le16 seq_id;
  3779. __le16 resp_len;
  3780. u8 selfrst_status;
  3781. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTNONE 0x0UL
  3782. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTASAP 0x1UL
  3783. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  3784. u8 unused_0;
  3785. __le16 unused_1;
  3786. u8 unused_2;
  3787. u8 unused_3;
  3788. u8 unused_4;
  3789. u8 valid;
  3790. };
  3791. /* hwrm_fw_qstatus */
  3792. /* Input (24 bytes) */
  3793. struct hwrm_fw_qstatus_input {
  3794. __le16 req_type;
  3795. __le16 cmpl_ring;
  3796. __le16 seq_id;
  3797. __le16 target_id;
  3798. __le64 resp_addr;
  3799. u8 embedded_proc_type;
  3800. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_BOOT 0x0UL
  3801. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_MGMT 0x1UL
  3802. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_NETCTRL 0x2UL
  3803. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_ROCE 0x3UL
  3804. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_RSVD 0x4UL
  3805. u8 unused_0[7];
  3806. };
  3807. /* Output (16 bytes) */
  3808. struct hwrm_fw_qstatus_output {
  3809. __le16 error_code;
  3810. __le16 req_type;
  3811. __le16 seq_id;
  3812. __le16 resp_len;
  3813. u8 selfrst_status;
  3814. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTNONE 0x0UL
  3815. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTASAP 0x1UL
  3816. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  3817. u8 unused_0;
  3818. __le16 unused_1;
  3819. u8 unused_2;
  3820. u8 unused_3;
  3821. u8 unused_4;
  3822. u8 valid;
  3823. };
  3824. /* hwrm_fw_set_time */
  3825. /* Input (32 bytes) */
  3826. struct hwrm_fw_set_time_input {
  3827. __le16 req_type;
  3828. __le16 cmpl_ring;
  3829. __le16 seq_id;
  3830. __le16 target_id;
  3831. __le64 resp_addr;
  3832. __le16 year;
  3833. #define FW_SET_TIME_REQ_YEAR_UNKNOWN 0x0UL
  3834. u8 month;
  3835. u8 day;
  3836. u8 hour;
  3837. u8 minute;
  3838. u8 second;
  3839. u8 unused_0;
  3840. __le16 millisecond;
  3841. __le16 zone;
  3842. #define FW_SET_TIME_REQ_ZONE_UTC 0x0UL
  3843. #define FW_SET_TIME_REQ_ZONE_UNKNOWN 0xffffUL
  3844. __le32 unused_1;
  3845. };
  3846. /* Output (16 bytes) */
  3847. struct hwrm_fw_set_time_output {
  3848. __le16 error_code;
  3849. __le16 req_type;
  3850. __le16 seq_id;
  3851. __le16 resp_len;
  3852. __le32 unused_0;
  3853. u8 unused_1;
  3854. u8 unused_2;
  3855. u8 unused_3;
  3856. u8 valid;
  3857. };
  3858. /* hwrm_exec_fwd_resp */
  3859. /* Input (128 bytes) */
  3860. struct hwrm_exec_fwd_resp_input {
  3861. __le16 req_type;
  3862. __le16 cmpl_ring;
  3863. __le16 seq_id;
  3864. __le16 target_id;
  3865. __le64 resp_addr;
  3866. __le32 encap_request[26];
  3867. __le16 encap_resp_target_id;
  3868. __le16 unused_0[3];
  3869. };
  3870. /* Output (16 bytes) */
  3871. struct hwrm_exec_fwd_resp_output {
  3872. __le16 error_code;
  3873. __le16 req_type;
  3874. __le16 seq_id;
  3875. __le16 resp_len;
  3876. __le32 unused_0;
  3877. u8 unused_1;
  3878. u8 unused_2;
  3879. u8 unused_3;
  3880. u8 valid;
  3881. };
  3882. /* hwrm_reject_fwd_resp */
  3883. /* Input (128 bytes) */
  3884. struct hwrm_reject_fwd_resp_input {
  3885. __le16 req_type;
  3886. __le16 cmpl_ring;
  3887. __le16 seq_id;
  3888. __le16 target_id;
  3889. __le64 resp_addr;
  3890. __le32 encap_request[26];
  3891. __le16 encap_resp_target_id;
  3892. __le16 unused_0[3];
  3893. };
  3894. /* Output (16 bytes) */
  3895. struct hwrm_reject_fwd_resp_output {
  3896. __le16 error_code;
  3897. __le16 req_type;
  3898. __le16 seq_id;
  3899. __le16 resp_len;
  3900. __le32 unused_0;
  3901. u8 unused_1;
  3902. u8 unused_2;
  3903. u8 unused_3;
  3904. u8 valid;
  3905. };
  3906. /* hwrm_fwd_resp */
  3907. /* Input (40 bytes) */
  3908. struct hwrm_fwd_resp_input {
  3909. __le16 req_type;
  3910. __le16 cmpl_ring;
  3911. __le16 seq_id;
  3912. __le16 target_id;
  3913. __le64 resp_addr;
  3914. __le16 encap_resp_target_id;
  3915. __le16 encap_resp_cmpl_ring;
  3916. __le16 encap_resp_len;
  3917. u8 unused_0;
  3918. u8 unused_1;
  3919. __le64 encap_resp_addr;
  3920. __le32 encap_resp[24];
  3921. };
  3922. /* Output (16 bytes) */
  3923. struct hwrm_fwd_resp_output {
  3924. __le16 error_code;
  3925. __le16 req_type;
  3926. __le16 seq_id;
  3927. __le16 resp_len;
  3928. __le32 unused_0;
  3929. u8 unused_1;
  3930. u8 unused_2;
  3931. u8 unused_3;
  3932. u8 valid;
  3933. };
  3934. /* hwrm_fwd_async_event_cmpl */
  3935. /* Input (32 bytes) */
  3936. struct hwrm_fwd_async_event_cmpl_input {
  3937. __le16 req_type;
  3938. __le16 cmpl_ring;
  3939. __le16 seq_id;
  3940. __le16 target_id;
  3941. __le64 resp_addr;
  3942. __le16 encap_async_event_target_id;
  3943. u8 unused_0;
  3944. u8 unused_1;
  3945. u8 unused_2[3];
  3946. u8 unused_3;
  3947. __le32 encap_async_event_cmpl[4];
  3948. };
  3949. /* Output (16 bytes) */
  3950. struct hwrm_fwd_async_event_cmpl_output {
  3951. __le16 error_code;
  3952. __le16 req_type;
  3953. __le16 seq_id;
  3954. __le16 resp_len;
  3955. __le32 unused_0;
  3956. u8 unused_1;
  3957. u8 unused_2;
  3958. u8 unused_3;
  3959. u8 valid;
  3960. };
  3961. /* hwrm_temp_monitor_query */
  3962. /* Input (16 bytes) */
  3963. struct hwrm_temp_monitor_query_input {
  3964. __le16 req_type;
  3965. __le16 cmpl_ring;
  3966. __le16 seq_id;
  3967. __le16 target_id;
  3968. __le64 resp_addr;
  3969. };
  3970. /* Output (16 bytes) */
  3971. struct hwrm_temp_monitor_query_output {
  3972. __le16 error_code;
  3973. __le16 req_type;
  3974. __le16 seq_id;
  3975. __le16 resp_len;
  3976. u8 temp;
  3977. u8 unused_0;
  3978. __le16 unused_1;
  3979. u8 unused_2;
  3980. u8 unused_3;
  3981. u8 unused_4;
  3982. u8 valid;
  3983. };
  3984. /* hwrm_nvm_read */
  3985. /* Input (40 bytes) */
  3986. struct hwrm_nvm_read_input {
  3987. __le16 req_type;
  3988. __le16 cmpl_ring;
  3989. __le16 seq_id;
  3990. __le16 target_id;
  3991. __le64 resp_addr;
  3992. __le64 host_dest_addr;
  3993. __le16 dir_idx;
  3994. u8 unused_0;
  3995. u8 unused_1;
  3996. __le32 offset;
  3997. __le32 len;
  3998. __le32 unused_2;
  3999. };
  4000. /* Output (16 bytes) */
  4001. struct hwrm_nvm_read_output {
  4002. __le16 error_code;
  4003. __le16 req_type;
  4004. __le16 seq_id;
  4005. __le16 resp_len;
  4006. __le32 unused_0;
  4007. u8 unused_1;
  4008. u8 unused_2;
  4009. u8 unused_3;
  4010. u8 valid;
  4011. };
  4012. /* hwrm_nvm_raw_dump */
  4013. /* Input (32 bytes) */
  4014. struct hwrm_nvm_raw_dump_input {
  4015. __le16 req_type;
  4016. __le16 cmpl_ring;
  4017. __le16 seq_id;
  4018. __le16 target_id;
  4019. __le64 resp_addr;
  4020. __le64 host_dest_addr;
  4021. __le32 offset;
  4022. __le32 len;
  4023. };
  4024. /* Output (16 bytes) */
  4025. struct hwrm_nvm_raw_dump_output {
  4026. __le16 error_code;
  4027. __le16 req_type;
  4028. __le16 seq_id;
  4029. __le16 resp_len;
  4030. __le32 unused_0;
  4031. u8 unused_1;
  4032. u8 unused_2;
  4033. u8 unused_3;
  4034. u8 valid;
  4035. };
  4036. /* hwrm_nvm_get_dir_entries */
  4037. /* Input (24 bytes) */
  4038. struct hwrm_nvm_get_dir_entries_input {
  4039. __le16 req_type;
  4040. __le16 cmpl_ring;
  4041. __le16 seq_id;
  4042. __le16 target_id;
  4043. __le64 resp_addr;
  4044. __le64 host_dest_addr;
  4045. };
  4046. /* Output (16 bytes) */
  4047. struct hwrm_nvm_get_dir_entries_output {
  4048. __le16 error_code;
  4049. __le16 req_type;
  4050. __le16 seq_id;
  4051. __le16 resp_len;
  4052. __le32 unused_0;
  4053. u8 unused_1;
  4054. u8 unused_2;
  4055. u8 unused_3;
  4056. u8 valid;
  4057. };
  4058. /* hwrm_nvm_get_dir_info */
  4059. /* Input (16 bytes) */
  4060. struct hwrm_nvm_get_dir_info_input {
  4061. __le16 req_type;
  4062. __le16 cmpl_ring;
  4063. __le16 seq_id;
  4064. __le16 target_id;
  4065. __le64 resp_addr;
  4066. };
  4067. /* Output (24 bytes) */
  4068. struct hwrm_nvm_get_dir_info_output {
  4069. __le16 error_code;
  4070. __le16 req_type;
  4071. __le16 seq_id;
  4072. __le16 resp_len;
  4073. __le32 entries;
  4074. __le32 entry_length;
  4075. __le32 unused_0;
  4076. u8 unused_1;
  4077. u8 unused_2;
  4078. u8 unused_3;
  4079. u8 valid;
  4080. };
  4081. /* hwrm_nvm_write */
  4082. /* Input (48 bytes) */
  4083. struct hwrm_nvm_write_input {
  4084. __le16 req_type;
  4085. __le16 cmpl_ring;
  4086. __le16 seq_id;
  4087. __le16 target_id;
  4088. __le64 resp_addr;
  4089. __le64 host_src_addr;
  4090. __le16 dir_type;
  4091. __le16 dir_ordinal;
  4092. __le16 dir_ext;
  4093. __le16 dir_attr;
  4094. __le32 dir_data_length;
  4095. __le16 option;
  4096. __le16 flags;
  4097. #define NVM_WRITE_REQ_FLAGS_KEEP_ORIG_ACTIVE_IMG 0x1UL
  4098. __le32 dir_item_length;
  4099. __le32 unused_0;
  4100. };
  4101. /* Output (16 bytes) */
  4102. struct hwrm_nvm_write_output {
  4103. __le16 error_code;
  4104. __le16 req_type;
  4105. __le16 seq_id;
  4106. __le16 resp_len;
  4107. __le32 dir_item_length;
  4108. __le16 dir_idx;
  4109. u8 unused_0;
  4110. u8 valid;
  4111. };
  4112. /* hwrm_nvm_modify */
  4113. /* Input (40 bytes) */
  4114. struct hwrm_nvm_modify_input {
  4115. __le16 req_type;
  4116. __le16 cmpl_ring;
  4117. __le16 seq_id;
  4118. __le16 target_id;
  4119. __le64 resp_addr;
  4120. __le64 host_src_addr;
  4121. __le16 dir_idx;
  4122. u8 unused_0;
  4123. u8 unused_1;
  4124. __le32 offset;
  4125. __le32 len;
  4126. __le32 unused_2;
  4127. };
  4128. /* Output (16 bytes) */
  4129. struct hwrm_nvm_modify_output {
  4130. __le16 error_code;
  4131. __le16 req_type;
  4132. __le16 seq_id;
  4133. __le16 resp_len;
  4134. __le32 unused_0;
  4135. u8 unused_1;
  4136. u8 unused_2;
  4137. u8 unused_3;
  4138. u8 valid;
  4139. };
  4140. /* hwrm_nvm_find_dir_entry */
  4141. /* Input (32 bytes) */
  4142. struct hwrm_nvm_find_dir_entry_input {
  4143. __le16 req_type;
  4144. __le16 cmpl_ring;
  4145. __le16 seq_id;
  4146. __le16 target_id;
  4147. __le64 resp_addr;
  4148. __le32 enables;
  4149. #define NVM_FIND_DIR_ENTRY_REQ_ENABLES_DIR_IDX_VALID 0x1UL
  4150. __le16 dir_idx;
  4151. __le16 dir_type;
  4152. __le16 dir_ordinal;
  4153. __le16 dir_ext;
  4154. u8 opt_ordinal;
  4155. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_MASK 0x3UL
  4156. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_SFT 0
  4157. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_EQ 0x0UL
  4158. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_GE 0x1UL
  4159. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_GT 0x2UL
  4160. u8 unused_1[3];
  4161. };
  4162. /* Output (32 bytes) */
  4163. struct hwrm_nvm_find_dir_entry_output {
  4164. __le16 error_code;
  4165. __le16 req_type;
  4166. __le16 seq_id;
  4167. __le16 resp_len;
  4168. __le32 dir_item_length;
  4169. __le32 dir_data_length;
  4170. __le32 fw_ver;
  4171. __le16 dir_ordinal;
  4172. __le16 dir_idx;
  4173. __le32 unused_0;
  4174. u8 unused_1;
  4175. u8 unused_2;
  4176. u8 unused_3;
  4177. u8 valid;
  4178. };
  4179. /* hwrm_nvm_erase_dir_entry */
  4180. /* Input (24 bytes) */
  4181. struct hwrm_nvm_erase_dir_entry_input {
  4182. __le16 req_type;
  4183. __le16 cmpl_ring;
  4184. __le16 seq_id;
  4185. __le16 target_id;
  4186. __le64 resp_addr;
  4187. __le16 dir_idx;
  4188. __le16 unused_0[3];
  4189. };
  4190. /* Output (16 bytes) */
  4191. struct hwrm_nvm_erase_dir_entry_output {
  4192. __le16 error_code;
  4193. __le16 req_type;
  4194. __le16 seq_id;
  4195. __le16 resp_len;
  4196. __le32 unused_0;
  4197. u8 unused_1;
  4198. u8 unused_2;
  4199. u8 unused_3;
  4200. u8 valid;
  4201. };
  4202. /* hwrm_nvm_get_dev_info */
  4203. /* Input (16 bytes) */
  4204. struct hwrm_nvm_get_dev_info_input {
  4205. __le16 req_type;
  4206. __le16 cmpl_ring;
  4207. __le16 seq_id;
  4208. __le16 target_id;
  4209. __le64 resp_addr;
  4210. };
  4211. /* Output (32 bytes) */
  4212. struct hwrm_nvm_get_dev_info_output {
  4213. __le16 error_code;
  4214. __le16 req_type;
  4215. __le16 seq_id;
  4216. __le16 resp_len;
  4217. __le16 manufacturer_id;
  4218. __le16 device_id;
  4219. __le32 sector_size;
  4220. __le32 nvram_size;
  4221. __le32 reserved_size;
  4222. __le32 available_size;
  4223. u8 unused_0;
  4224. u8 unused_1;
  4225. u8 unused_2;
  4226. u8 valid;
  4227. };
  4228. /* hwrm_nvm_mod_dir_entry */
  4229. /* Input (32 bytes) */
  4230. struct hwrm_nvm_mod_dir_entry_input {
  4231. __le16 req_type;
  4232. __le16 cmpl_ring;
  4233. __le16 seq_id;
  4234. __le16 target_id;
  4235. __le64 resp_addr;
  4236. __le32 enables;
  4237. #define NVM_MOD_DIR_ENTRY_REQ_ENABLES_CHECKSUM 0x1UL
  4238. __le16 dir_idx;
  4239. __le16 dir_ordinal;
  4240. __le16 dir_ext;
  4241. __le16 dir_attr;
  4242. __le32 checksum;
  4243. };
  4244. /* Output (16 bytes) */
  4245. struct hwrm_nvm_mod_dir_entry_output {
  4246. __le16 error_code;
  4247. __le16 req_type;
  4248. __le16 seq_id;
  4249. __le16 resp_len;
  4250. __le32 unused_0;
  4251. u8 unused_1;
  4252. u8 unused_2;
  4253. u8 unused_3;
  4254. u8 valid;
  4255. };
  4256. /* hwrm_nvm_verify_update */
  4257. /* Input (24 bytes) */
  4258. struct hwrm_nvm_verify_update_input {
  4259. __le16 req_type;
  4260. __le16 cmpl_ring;
  4261. __le16 seq_id;
  4262. __le16 target_id;
  4263. __le64 resp_addr;
  4264. __le16 dir_type;
  4265. __le16 dir_ordinal;
  4266. __le16 dir_ext;
  4267. __le16 unused_0;
  4268. };
  4269. /* Output (16 bytes) */
  4270. struct hwrm_nvm_verify_update_output {
  4271. __le16 error_code;
  4272. __le16 req_type;
  4273. __le16 seq_id;
  4274. __le16 resp_len;
  4275. __le32 unused_0;
  4276. u8 unused_1;
  4277. u8 unused_2;
  4278. u8 unused_3;
  4279. u8 valid;
  4280. };
  4281. /* hwrm_nvm_install_update */
  4282. /* Input (24 bytes) */
  4283. struct hwrm_nvm_install_update_input {
  4284. __le16 req_type;
  4285. __le16 cmpl_ring;
  4286. __le16 seq_id;
  4287. __le16 target_id;
  4288. __le64 resp_addr;
  4289. __le32 install_type;
  4290. #define NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_NORMAL 0x0UL
  4291. #define NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_ALL 0xffffffffUL
  4292. __le32 unused_0;
  4293. };
  4294. /* Output (24 bytes) */
  4295. struct hwrm_nvm_install_update_output {
  4296. __le16 error_code;
  4297. __le16 req_type;
  4298. __le16 seq_id;
  4299. __le16 resp_len;
  4300. __le64 installed_items;
  4301. u8 result;
  4302. #define NVM_INSTALL_UPDATE_RESP_RESULT_SUCCESS 0x0UL
  4303. u8 problem_item;
  4304. #define NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_NONE 0x0UL
  4305. #define NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_PACKAGE 0xffUL
  4306. u8 reset_required;
  4307. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_NONE 0x0UL
  4308. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_PCI 0x1UL
  4309. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_POWER 0x2UL
  4310. u8 unused_0;
  4311. u8 unused_1;
  4312. u8 unused_2;
  4313. u8 unused_3;
  4314. u8 valid;
  4315. };
  4316. #endif