bnxt_hsi.h 276 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023
  1. /* Broadcom NetXtreme-C/E network driver.
  2. *
  3. * Copyright (c) 2014-2016 Broadcom Corporation
  4. * Copyright (c) 2016-2018 Broadcom Limited
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation.
  9. *
  10. * DO NOT MODIFY!!! This file is automatically generated.
  11. */
  12. #ifndef _BNXT_HSI_H_
  13. #define _BNXT_HSI_H_
  14. /* hwrm_cmd_hdr (size:128b/16B) */
  15. struct hwrm_cmd_hdr {
  16. __le16 req_type;
  17. __le16 cmpl_ring;
  18. __le16 seq_id;
  19. __le16 target_id;
  20. __le64 resp_addr;
  21. };
  22. /* hwrm_resp_hdr (size:64b/8B) */
  23. struct hwrm_resp_hdr {
  24. __le16 error_code;
  25. __le16 req_type;
  26. __le16 seq_id;
  27. __le16 resp_len;
  28. };
  29. #define CMD_DISCR_TLV_ENCAP 0x8000UL
  30. #define CMD_DISCR_LAST CMD_DISCR_TLV_ENCAP
  31. #define TLV_TYPE_HWRM_REQUEST 0x1UL
  32. #define TLV_TYPE_HWRM_RESPONSE 0x2UL
  33. #define TLV_TYPE_ROCE_SP_COMMAND 0x3UL
  34. #define TLV_TYPE_ENGINE_CKV_DEVICE_SERIAL_NUMBER 0x8001UL
  35. #define TLV_TYPE_ENGINE_CKV_NONCE 0x8002UL
  36. #define TLV_TYPE_ENGINE_CKV_IV 0x8003UL
  37. #define TLV_TYPE_ENGINE_CKV_AUTH_TAG 0x8004UL
  38. #define TLV_TYPE_ENGINE_CKV_CIPHERTEXT 0x8005UL
  39. #define TLV_TYPE_ENGINE_CKV_ALGORITHMS 0x8006UL
  40. #define TLV_TYPE_ENGINE_CKV_ECC_PUBLIC_KEY 0x8007UL
  41. #define TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE 0x8008UL
  42. #define TLV_TYPE_LAST TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE
  43. /* tlv (size:64b/8B) */
  44. struct tlv {
  45. __le16 cmd_discr;
  46. u8 reserved_8b;
  47. u8 flags;
  48. #define TLV_FLAGS_MORE 0x1UL
  49. #define TLV_FLAGS_MORE_LAST 0x0UL
  50. #define TLV_FLAGS_MORE_NOT_LAST 0x1UL
  51. #define TLV_FLAGS_REQUIRED 0x2UL
  52. #define TLV_FLAGS_REQUIRED_NO (0x0UL << 1)
  53. #define TLV_FLAGS_REQUIRED_YES (0x1UL << 1)
  54. #define TLV_FLAGS_REQUIRED_LAST TLV_FLAGS_REQUIRED_YES
  55. __le16 tlv_type;
  56. __le16 length;
  57. };
  58. /* input (size:128b/16B) */
  59. struct input {
  60. __le16 req_type;
  61. __le16 cmpl_ring;
  62. __le16 seq_id;
  63. __le16 target_id;
  64. __le64 resp_addr;
  65. };
  66. /* output (size:64b/8B) */
  67. struct output {
  68. __le16 error_code;
  69. __le16 req_type;
  70. __le16 seq_id;
  71. __le16 resp_len;
  72. };
  73. /* hwrm_short_input (size:128b/16B) */
  74. struct hwrm_short_input {
  75. __le16 req_type;
  76. __le16 signature;
  77. #define SHORT_REQ_SIGNATURE_SHORT_CMD 0x4321UL
  78. #define SHORT_REQ_SIGNATURE_LAST SHORT_REQ_SIGNATURE_SHORT_CMD
  79. __le16 unused_0;
  80. __le16 size;
  81. __le64 req_addr;
  82. };
  83. /* cmd_nums (size:64b/8B) */
  84. struct cmd_nums {
  85. __le16 req_type;
  86. #define HWRM_VER_GET 0x0UL
  87. #define HWRM_FUNC_DRV_IF_CHANGE 0xdUL
  88. #define HWRM_FUNC_BUF_UNRGTR 0xeUL
  89. #define HWRM_FUNC_VF_CFG 0xfUL
  90. #define HWRM_RESERVED1 0x10UL
  91. #define HWRM_FUNC_RESET 0x11UL
  92. #define HWRM_FUNC_GETFID 0x12UL
  93. #define HWRM_FUNC_VF_ALLOC 0x13UL
  94. #define HWRM_FUNC_VF_FREE 0x14UL
  95. #define HWRM_FUNC_QCAPS 0x15UL
  96. #define HWRM_FUNC_QCFG 0x16UL
  97. #define HWRM_FUNC_CFG 0x17UL
  98. #define HWRM_FUNC_QSTATS 0x18UL
  99. #define HWRM_FUNC_CLR_STATS 0x19UL
  100. #define HWRM_FUNC_DRV_UNRGTR 0x1aUL
  101. #define HWRM_FUNC_VF_RESC_FREE 0x1bUL
  102. #define HWRM_FUNC_VF_VNIC_IDS_QUERY 0x1cUL
  103. #define HWRM_FUNC_DRV_RGTR 0x1dUL
  104. #define HWRM_FUNC_DRV_QVER 0x1eUL
  105. #define HWRM_FUNC_BUF_RGTR 0x1fUL
  106. #define HWRM_PORT_PHY_CFG 0x20UL
  107. #define HWRM_PORT_MAC_CFG 0x21UL
  108. #define HWRM_PORT_TS_QUERY 0x22UL
  109. #define HWRM_PORT_QSTATS 0x23UL
  110. #define HWRM_PORT_LPBK_QSTATS 0x24UL
  111. #define HWRM_PORT_CLR_STATS 0x25UL
  112. #define HWRM_PORT_LPBK_CLR_STATS 0x26UL
  113. #define HWRM_PORT_PHY_QCFG 0x27UL
  114. #define HWRM_PORT_MAC_QCFG 0x28UL
  115. #define HWRM_PORT_MAC_PTP_QCFG 0x29UL
  116. #define HWRM_PORT_PHY_QCAPS 0x2aUL
  117. #define HWRM_PORT_PHY_I2C_WRITE 0x2bUL
  118. #define HWRM_PORT_PHY_I2C_READ 0x2cUL
  119. #define HWRM_PORT_LED_CFG 0x2dUL
  120. #define HWRM_PORT_LED_QCFG 0x2eUL
  121. #define HWRM_PORT_LED_QCAPS 0x2fUL
  122. #define HWRM_QUEUE_QPORTCFG 0x30UL
  123. #define HWRM_QUEUE_QCFG 0x31UL
  124. #define HWRM_QUEUE_CFG 0x32UL
  125. #define HWRM_FUNC_VLAN_CFG 0x33UL
  126. #define HWRM_FUNC_VLAN_QCFG 0x34UL
  127. #define HWRM_QUEUE_PFCENABLE_QCFG 0x35UL
  128. #define HWRM_QUEUE_PFCENABLE_CFG 0x36UL
  129. #define HWRM_QUEUE_PRI2COS_QCFG 0x37UL
  130. #define HWRM_QUEUE_PRI2COS_CFG 0x38UL
  131. #define HWRM_QUEUE_COS2BW_QCFG 0x39UL
  132. #define HWRM_QUEUE_COS2BW_CFG 0x3aUL
  133. #define HWRM_QUEUE_DSCP_QCAPS 0x3bUL
  134. #define HWRM_QUEUE_DSCP2PRI_QCFG 0x3cUL
  135. #define HWRM_QUEUE_DSCP2PRI_CFG 0x3dUL
  136. #define HWRM_VNIC_ALLOC 0x40UL
  137. #define HWRM_VNIC_FREE 0x41UL
  138. #define HWRM_VNIC_CFG 0x42UL
  139. #define HWRM_VNIC_QCFG 0x43UL
  140. #define HWRM_VNIC_TPA_CFG 0x44UL
  141. #define HWRM_VNIC_TPA_QCFG 0x45UL
  142. #define HWRM_VNIC_RSS_CFG 0x46UL
  143. #define HWRM_VNIC_RSS_QCFG 0x47UL
  144. #define HWRM_VNIC_PLCMODES_CFG 0x48UL
  145. #define HWRM_VNIC_PLCMODES_QCFG 0x49UL
  146. #define HWRM_VNIC_QCAPS 0x4aUL
  147. #define HWRM_RING_ALLOC 0x50UL
  148. #define HWRM_RING_FREE 0x51UL
  149. #define HWRM_RING_CMPL_RING_QAGGINT_PARAMS 0x52UL
  150. #define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS 0x53UL
  151. #define HWRM_RING_AGGINT_QCAPS 0x54UL
  152. #define HWRM_RING_RESET 0x5eUL
  153. #define HWRM_RING_GRP_ALLOC 0x60UL
  154. #define HWRM_RING_GRP_FREE 0x61UL
  155. #define HWRM_RESERVED5 0x64UL
  156. #define HWRM_RESERVED6 0x65UL
  157. #define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC 0x70UL
  158. #define HWRM_VNIC_RSS_COS_LB_CTX_FREE 0x71UL
  159. #define HWRM_CFA_L2_FILTER_ALLOC 0x90UL
  160. #define HWRM_CFA_L2_FILTER_FREE 0x91UL
  161. #define HWRM_CFA_L2_FILTER_CFG 0x92UL
  162. #define HWRM_CFA_L2_SET_RX_MASK 0x93UL
  163. #define HWRM_CFA_VLAN_ANTISPOOF_CFG 0x94UL
  164. #define HWRM_CFA_TUNNEL_FILTER_ALLOC 0x95UL
  165. #define HWRM_CFA_TUNNEL_FILTER_FREE 0x96UL
  166. #define HWRM_CFA_ENCAP_RECORD_ALLOC 0x97UL
  167. #define HWRM_CFA_ENCAP_RECORD_FREE 0x98UL
  168. #define HWRM_CFA_NTUPLE_FILTER_ALLOC 0x99UL
  169. #define HWRM_CFA_NTUPLE_FILTER_FREE 0x9aUL
  170. #define HWRM_CFA_NTUPLE_FILTER_CFG 0x9bUL
  171. #define HWRM_CFA_EM_FLOW_ALLOC 0x9cUL
  172. #define HWRM_CFA_EM_FLOW_FREE 0x9dUL
  173. #define HWRM_CFA_EM_FLOW_CFG 0x9eUL
  174. #define HWRM_TUNNEL_DST_PORT_QUERY 0xa0UL
  175. #define HWRM_TUNNEL_DST_PORT_ALLOC 0xa1UL
  176. #define HWRM_TUNNEL_DST_PORT_FREE 0xa2UL
  177. #define HWRM_STAT_CTX_ALLOC 0xb0UL
  178. #define HWRM_STAT_CTX_FREE 0xb1UL
  179. #define HWRM_STAT_CTX_QUERY 0xb2UL
  180. #define HWRM_STAT_CTX_CLR_STATS 0xb3UL
  181. #define HWRM_PORT_QSTATS_EXT 0xb4UL
  182. #define HWRM_FW_RESET 0xc0UL
  183. #define HWRM_FW_QSTATUS 0xc1UL
  184. #define HWRM_FW_HEALTH_CHECK 0xc2UL
  185. #define HWRM_FW_SYNC 0xc3UL
  186. #define HWRM_FW_SET_TIME 0xc8UL
  187. #define HWRM_FW_GET_TIME 0xc9UL
  188. #define HWRM_FW_SET_STRUCTURED_DATA 0xcaUL
  189. #define HWRM_FW_GET_STRUCTURED_DATA 0xcbUL
  190. #define HWRM_FW_IPC_MAILBOX 0xccUL
  191. #define HWRM_EXEC_FWD_RESP 0xd0UL
  192. #define HWRM_REJECT_FWD_RESP 0xd1UL
  193. #define HWRM_FWD_RESP 0xd2UL
  194. #define HWRM_FWD_ASYNC_EVENT_CMPL 0xd3UL
  195. #define HWRM_OEM_CMD 0xd4UL
  196. #define HWRM_TEMP_MONITOR_QUERY 0xe0UL
  197. #define HWRM_WOL_FILTER_ALLOC 0xf0UL
  198. #define HWRM_WOL_FILTER_FREE 0xf1UL
  199. #define HWRM_WOL_FILTER_QCFG 0xf2UL
  200. #define HWRM_WOL_REASON_QCFG 0xf3UL
  201. #define HWRM_CFA_METER_PROFILE_ALLOC 0xf5UL
  202. #define HWRM_CFA_METER_PROFILE_FREE 0xf6UL
  203. #define HWRM_CFA_METER_PROFILE_CFG 0xf7UL
  204. #define HWRM_CFA_METER_INSTANCE_ALLOC 0xf8UL
  205. #define HWRM_CFA_METER_INSTANCE_FREE 0xf9UL
  206. #define HWRM_CFA_VFR_ALLOC 0xfdUL
  207. #define HWRM_CFA_VFR_FREE 0xfeUL
  208. #define HWRM_CFA_VF_PAIR_ALLOC 0x100UL
  209. #define HWRM_CFA_VF_PAIR_FREE 0x101UL
  210. #define HWRM_CFA_VF_PAIR_INFO 0x102UL
  211. #define HWRM_CFA_FLOW_ALLOC 0x103UL
  212. #define HWRM_CFA_FLOW_FREE 0x104UL
  213. #define HWRM_CFA_FLOW_FLUSH 0x105UL
  214. #define HWRM_CFA_FLOW_STATS 0x106UL
  215. #define HWRM_CFA_FLOW_INFO 0x107UL
  216. #define HWRM_CFA_DECAP_FILTER_ALLOC 0x108UL
  217. #define HWRM_CFA_DECAP_FILTER_FREE 0x109UL
  218. #define HWRM_CFA_VLAN_ANTISPOOF_QCFG 0x10aUL
  219. #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC 0x10bUL
  220. #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE 0x10cUL
  221. #define HWRM_CFA_PAIR_ALLOC 0x10dUL
  222. #define HWRM_CFA_PAIR_FREE 0x10eUL
  223. #define HWRM_CFA_PAIR_INFO 0x10fUL
  224. #define HWRM_FW_IPC_MSG 0x110UL
  225. #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO 0x111UL
  226. #define HWRM_ENGINE_CKV_HELLO 0x12dUL
  227. #define HWRM_ENGINE_CKV_STATUS 0x12eUL
  228. #define HWRM_ENGINE_CKV_CKEK_ADD 0x12fUL
  229. #define HWRM_ENGINE_CKV_CKEK_DELETE 0x130UL
  230. #define HWRM_ENGINE_CKV_KEY_ADD 0x131UL
  231. #define HWRM_ENGINE_CKV_KEY_DELETE 0x132UL
  232. #define HWRM_ENGINE_CKV_FLUSH 0x133UL
  233. #define HWRM_ENGINE_CKV_RNG_GET 0x134UL
  234. #define HWRM_ENGINE_CKV_KEY_GEN 0x135UL
  235. #define HWRM_ENGINE_QG_CONFIG_QUERY 0x13cUL
  236. #define HWRM_ENGINE_QG_QUERY 0x13dUL
  237. #define HWRM_ENGINE_QG_METER_PROFILE_CONFIG_QUERY 0x13eUL
  238. #define HWRM_ENGINE_QG_METER_PROFILE_QUERY 0x13fUL
  239. #define HWRM_ENGINE_QG_METER_PROFILE_ALLOC 0x140UL
  240. #define HWRM_ENGINE_QG_METER_PROFILE_FREE 0x141UL
  241. #define HWRM_ENGINE_QG_METER_QUERY 0x142UL
  242. #define HWRM_ENGINE_QG_METER_BIND 0x143UL
  243. #define HWRM_ENGINE_QG_METER_UNBIND 0x144UL
  244. #define HWRM_ENGINE_QG_FUNC_BIND 0x145UL
  245. #define HWRM_ENGINE_SG_CONFIG_QUERY 0x146UL
  246. #define HWRM_ENGINE_SG_QUERY 0x147UL
  247. #define HWRM_ENGINE_SG_METER_QUERY 0x148UL
  248. #define HWRM_ENGINE_SG_METER_CONFIG 0x149UL
  249. #define HWRM_ENGINE_SG_QG_BIND 0x14aUL
  250. #define HWRM_ENGINE_QG_SG_UNBIND 0x14bUL
  251. #define HWRM_ENGINE_CONFIG_QUERY 0x154UL
  252. #define HWRM_ENGINE_STATS_CONFIG 0x155UL
  253. #define HWRM_ENGINE_STATS_CLEAR 0x156UL
  254. #define HWRM_ENGINE_STATS_QUERY 0x157UL
  255. #define HWRM_ENGINE_RQ_ALLOC 0x15eUL
  256. #define HWRM_ENGINE_RQ_FREE 0x15fUL
  257. #define HWRM_ENGINE_CQ_ALLOC 0x160UL
  258. #define HWRM_ENGINE_CQ_FREE 0x161UL
  259. #define HWRM_ENGINE_NQ_ALLOC 0x162UL
  260. #define HWRM_ENGINE_NQ_FREE 0x163UL
  261. #define HWRM_ENGINE_ON_DIE_RQE_CREDITS 0x164UL
  262. #define HWRM_FUNC_RESOURCE_QCAPS 0x190UL
  263. #define HWRM_FUNC_VF_RESOURCE_CFG 0x191UL
  264. #define HWRM_FUNC_BACKING_STORE_QCAPS 0x192UL
  265. #define HWRM_FUNC_BACKING_STORE_CFG 0x193UL
  266. #define HWRM_FUNC_BACKING_STORE_QCFG 0x194UL
  267. #define HWRM_FUNC_VF_BW_CFG 0x195UL
  268. #define HWRM_FUNC_VF_BW_QCFG 0x196UL
  269. #define HWRM_SELFTEST_QLIST 0x200UL
  270. #define HWRM_SELFTEST_EXEC 0x201UL
  271. #define HWRM_SELFTEST_IRQ 0x202UL
  272. #define HWRM_SELFTEST_RETRIEVE_SERDES_DATA 0x203UL
  273. #define HWRM_PCIE_QSTATS 0x204UL
  274. #define HWRM_DBG_READ_DIRECT 0xff10UL
  275. #define HWRM_DBG_READ_INDIRECT 0xff11UL
  276. #define HWRM_DBG_WRITE_DIRECT 0xff12UL
  277. #define HWRM_DBG_WRITE_INDIRECT 0xff13UL
  278. #define HWRM_DBG_DUMP 0xff14UL
  279. #define HWRM_DBG_ERASE_NVM 0xff15UL
  280. #define HWRM_DBG_CFG 0xff16UL
  281. #define HWRM_DBG_COREDUMP_LIST 0xff17UL
  282. #define HWRM_DBG_COREDUMP_INITIATE 0xff18UL
  283. #define HWRM_DBG_COREDUMP_RETRIEVE 0xff19UL
  284. #define HWRM_DBG_FW_CLI 0xff1aUL
  285. #define HWRM_DBG_I2C_CMD 0xff1bUL
  286. #define HWRM_NVM_FACTORY_DEFAULTS 0xffeeUL
  287. #define HWRM_NVM_VALIDATE_OPTION 0xffefUL
  288. #define HWRM_NVM_FLUSH 0xfff0UL
  289. #define HWRM_NVM_GET_VARIABLE 0xfff1UL
  290. #define HWRM_NVM_SET_VARIABLE 0xfff2UL
  291. #define HWRM_NVM_INSTALL_UPDATE 0xfff3UL
  292. #define HWRM_NVM_MODIFY 0xfff4UL
  293. #define HWRM_NVM_VERIFY_UPDATE 0xfff5UL
  294. #define HWRM_NVM_GET_DEV_INFO 0xfff6UL
  295. #define HWRM_NVM_ERASE_DIR_ENTRY 0xfff7UL
  296. #define HWRM_NVM_MOD_DIR_ENTRY 0xfff8UL
  297. #define HWRM_NVM_FIND_DIR_ENTRY 0xfff9UL
  298. #define HWRM_NVM_GET_DIR_ENTRIES 0xfffaUL
  299. #define HWRM_NVM_GET_DIR_INFO 0xfffbUL
  300. #define HWRM_NVM_RAW_DUMP 0xfffcUL
  301. #define HWRM_NVM_READ 0xfffdUL
  302. #define HWRM_NVM_WRITE 0xfffeUL
  303. #define HWRM_NVM_RAW_WRITE_BLK 0xffffUL
  304. #define HWRM_LAST HWRM_NVM_RAW_WRITE_BLK
  305. __le16 unused_0[3];
  306. };
  307. /* ret_codes (size:64b/8B) */
  308. struct ret_codes {
  309. __le16 error_code;
  310. #define HWRM_ERR_CODE_SUCCESS 0x0UL
  311. #define HWRM_ERR_CODE_FAIL 0x1UL
  312. #define HWRM_ERR_CODE_INVALID_PARAMS 0x2UL
  313. #define HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED 0x3UL
  314. #define HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR 0x4UL
  315. #define HWRM_ERR_CODE_INVALID_FLAGS 0x5UL
  316. #define HWRM_ERR_CODE_INVALID_ENABLES 0x6UL
  317. #define HWRM_ERR_CODE_UNSUPPORTED_TLV 0x7UL
  318. #define HWRM_ERR_CODE_NO_BUFFER 0x8UL
  319. #define HWRM_ERR_CODE_UNSUPPORTED_OPTION_ERR 0x9UL
  320. #define HWRM_ERR_CODE_HWRM_ERROR 0xfUL
  321. #define HWRM_ERR_CODE_UNKNOWN_ERR 0xfffeUL
  322. #define HWRM_ERR_CODE_CMD_NOT_SUPPORTED 0xffffUL
  323. #define HWRM_ERR_CODE_LAST HWRM_ERR_CODE_CMD_NOT_SUPPORTED
  324. __le16 unused_0[3];
  325. };
  326. /* hwrm_err_output (size:128b/16B) */
  327. struct hwrm_err_output {
  328. __le16 error_code;
  329. __le16 req_type;
  330. __le16 seq_id;
  331. __le16 resp_len;
  332. __le32 opaque_0;
  333. __le16 opaque_1;
  334. u8 cmd_err;
  335. u8 valid;
  336. };
  337. #define HWRM_NA_SIGNATURE ((__le32)(-1))
  338. #define HWRM_MAX_REQ_LEN 128
  339. #define HWRM_MAX_RESP_LEN 280
  340. #define HW_HASH_INDEX_SIZE 0x80
  341. #define HW_HASH_KEY_SIZE 40
  342. #define HWRM_RESP_VALID_KEY 1
  343. #define HWRM_VERSION_MAJOR 1
  344. #define HWRM_VERSION_MINOR 9
  345. #define HWRM_VERSION_UPDATE 2
  346. #define HWRM_VERSION_RSVD 25
  347. #define HWRM_VERSION_STR "1.9.2.25"
  348. /* hwrm_ver_get_input (size:192b/24B) */
  349. struct hwrm_ver_get_input {
  350. __le16 req_type;
  351. __le16 cmpl_ring;
  352. __le16 seq_id;
  353. __le16 target_id;
  354. __le64 resp_addr;
  355. u8 hwrm_intf_maj;
  356. u8 hwrm_intf_min;
  357. u8 hwrm_intf_upd;
  358. u8 unused_0[5];
  359. };
  360. /* hwrm_ver_get_output (size:1408b/176B) */
  361. struct hwrm_ver_get_output {
  362. __le16 error_code;
  363. __le16 req_type;
  364. __le16 seq_id;
  365. __le16 resp_len;
  366. u8 hwrm_intf_maj_8b;
  367. u8 hwrm_intf_min_8b;
  368. u8 hwrm_intf_upd_8b;
  369. u8 hwrm_intf_rsvd_8b;
  370. u8 hwrm_fw_maj_8b;
  371. u8 hwrm_fw_min_8b;
  372. u8 hwrm_fw_bld_8b;
  373. u8 hwrm_fw_rsvd_8b;
  374. u8 mgmt_fw_maj_8b;
  375. u8 mgmt_fw_min_8b;
  376. u8 mgmt_fw_bld_8b;
  377. u8 mgmt_fw_rsvd_8b;
  378. u8 netctrl_fw_maj_8b;
  379. u8 netctrl_fw_min_8b;
  380. u8 netctrl_fw_bld_8b;
  381. u8 netctrl_fw_rsvd_8b;
  382. __le32 dev_caps_cfg;
  383. #define VER_GET_RESP_DEV_CAPS_CFG_SECURE_FW_UPD_SUPPORTED 0x1UL
  384. #define VER_GET_RESP_DEV_CAPS_CFG_FW_DCBX_AGENT_SUPPORTED 0x2UL
  385. #define VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED 0x4UL
  386. #define VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_REQUIRED 0x8UL
  387. u8 roce_fw_maj_8b;
  388. u8 roce_fw_min_8b;
  389. u8 roce_fw_bld_8b;
  390. u8 roce_fw_rsvd_8b;
  391. char hwrm_fw_name[16];
  392. char mgmt_fw_name[16];
  393. char netctrl_fw_name[16];
  394. u8 reserved2[16];
  395. char roce_fw_name[16];
  396. __le16 chip_num;
  397. u8 chip_rev;
  398. u8 chip_metal;
  399. u8 chip_bond_id;
  400. u8 chip_platform_type;
  401. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_ASIC 0x0UL
  402. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_FPGA 0x1UL
  403. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_PALLADIUM 0x2UL
  404. #define VER_GET_RESP_CHIP_PLATFORM_TYPE_LAST VER_GET_RESP_CHIP_PLATFORM_TYPE_PALLADIUM
  405. __le16 max_req_win_len;
  406. __le16 max_resp_len;
  407. __le16 def_req_timeout;
  408. u8 flags;
  409. #define VER_GET_RESP_FLAGS_DEV_NOT_RDY 0x1UL
  410. #define VER_GET_RESP_FLAGS_EXT_VER_AVAIL 0x2UL
  411. u8 unused_0[2];
  412. u8 always_1;
  413. __le16 hwrm_intf_major;
  414. __le16 hwrm_intf_minor;
  415. __le16 hwrm_intf_build;
  416. __le16 hwrm_intf_patch;
  417. __le16 hwrm_fw_major;
  418. __le16 hwrm_fw_minor;
  419. __le16 hwrm_fw_build;
  420. __le16 hwrm_fw_patch;
  421. __le16 mgmt_fw_major;
  422. __le16 mgmt_fw_minor;
  423. __le16 mgmt_fw_build;
  424. __le16 mgmt_fw_patch;
  425. __le16 netctrl_fw_major;
  426. __le16 netctrl_fw_minor;
  427. __le16 netctrl_fw_build;
  428. __le16 netctrl_fw_patch;
  429. __le16 roce_fw_major;
  430. __le16 roce_fw_minor;
  431. __le16 roce_fw_build;
  432. __le16 roce_fw_patch;
  433. __le16 max_ext_req_len;
  434. u8 unused_1[5];
  435. u8 valid;
  436. };
  437. /* eject_cmpl (size:128b/16B) */
  438. struct eject_cmpl {
  439. __le16 type;
  440. #define EJECT_CMPL_TYPE_MASK 0x3fUL
  441. #define EJECT_CMPL_TYPE_SFT 0
  442. #define EJECT_CMPL_TYPE_STAT_EJECT 0x1aUL
  443. #define EJECT_CMPL_TYPE_LAST EJECT_CMPL_TYPE_STAT_EJECT
  444. __le16 len;
  445. __le32 opaque;
  446. __le32 v;
  447. #define EJECT_CMPL_V 0x1UL
  448. __le32 unused_2;
  449. };
  450. /* hwrm_cmpl (size:128b/16B) */
  451. struct hwrm_cmpl {
  452. __le16 type;
  453. #define CMPL_TYPE_MASK 0x3fUL
  454. #define CMPL_TYPE_SFT 0
  455. #define CMPL_TYPE_HWRM_DONE 0x20UL
  456. #define CMPL_TYPE_LAST CMPL_TYPE_HWRM_DONE
  457. __le16 sequence_id;
  458. __le32 unused_1;
  459. __le32 v;
  460. #define CMPL_V 0x1UL
  461. __le32 unused_3;
  462. };
  463. /* hwrm_fwd_req_cmpl (size:128b/16B) */
  464. struct hwrm_fwd_req_cmpl {
  465. __le16 req_len_type;
  466. #define FWD_REQ_CMPL_TYPE_MASK 0x3fUL
  467. #define FWD_REQ_CMPL_TYPE_SFT 0
  468. #define FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ 0x22UL
  469. #define FWD_REQ_CMPL_TYPE_LAST FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ
  470. #define FWD_REQ_CMPL_REQ_LEN_MASK 0xffc0UL
  471. #define FWD_REQ_CMPL_REQ_LEN_SFT 6
  472. __le16 source_id;
  473. __le32 unused0;
  474. __le32 req_buf_addr_v[2];
  475. #define FWD_REQ_CMPL_V 0x1UL
  476. #define FWD_REQ_CMPL_REQ_BUF_ADDR_MASK 0xfffffffeUL
  477. #define FWD_REQ_CMPL_REQ_BUF_ADDR_SFT 1
  478. };
  479. /* hwrm_fwd_resp_cmpl (size:128b/16B) */
  480. struct hwrm_fwd_resp_cmpl {
  481. __le16 type;
  482. #define FWD_RESP_CMPL_TYPE_MASK 0x3fUL
  483. #define FWD_RESP_CMPL_TYPE_SFT 0
  484. #define FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP 0x24UL
  485. #define FWD_RESP_CMPL_TYPE_LAST FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP
  486. __le16 source_id;
  487. __le16 resp_len;
  488. __le16 unused_1;
  489. __le32 resp_buf_addr_v[2];
  490. #define FWD_RESP_CMPL_V 0x1UL
  491. #define FWD_RESP_CMPL_RESP_BUF_ADDR_MASK 0xfffffffeUL
  492. #define FWD_RESP_CMPL_RESP_BUF_ADDR_SFT 1
  493. };
  494. /* hwrm_async_event_cmpl (size:128b/16B) */
  495. struct hwrm_async_event_cmpl {
  496. __le16 type;
  497. #define ASYNC_EVENT_CMPL_TYPE_MASK 0x3fUL
  498. #define ASYNC_EVENT_CMPL_TYPE_SFT 0
  499. #define ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  500. #define ASYNC_EVENT_CMPL_TYPE_LAST ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT
  501. __le16 event_id;
  502. #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE 0x0UL
  503. #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE 0x1UL
  504. #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE 0x2UL
  505. #define ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE 0x3UL
  506. #define ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED 0x4UL
  507. #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED 0x5UL
  508. #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE 0x6UL
  509. #define ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE 0x7UL
  510. #define ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD 0x10UL
  511. #define ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD 0x11UL
  512. #define ASYNC_EVENT_CMPL_EVENT_ID_FUNC_FLR_PROC_CMPLT 0x12UL
  513. #define ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD 0x20UL
  514. #define ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD 0x21UL
  515. #define ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR 0x30UL
  516. #define ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE 0x31UL
  517. #define ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE 0x32UL
  518. #define ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE 0x33UL
  519. #define ASYNC_EVENT_CMPL_EVENT_ID_LLFC_PFC_CHANGE 0x34UL
  520. #define ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE 0x35UL
  521. #define ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR 0xffUL
  522. #define ASYNC_EVENT_CMPL_EVENT_ID_LAST ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR
  523. __le32 event_data2;
  524. u8 opaque_v;
  525. #define ASYNC_EVENT_CMPL_V 0x1UL
  526. #define ASYNC_EVENT_CMPL_OPAQUE_MASK 0xfeUL
  527. #define ASYNC_EVENT_CMPL_OPAQUE_SFT 1
  528. u8 timestamp_lo;
  529. __le16 timestamp_hi;
  530. __le32 event_data1;
  531. };
  532. /* hwrm_async_event_cmpl_link_status_change (size:128b/16B) */
  533. struct hwrm_async_event_cmpl_link_status_change {
  534. __le16 type;
  535. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_MASK 0x3fUL
  536. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_SFT 0
  537. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  538. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_LAST ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT
  539. __le16 event_id;
  540. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE 0x0UL
  541. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LAST ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE
  542. __le32 event_data2;
  543. u8 opaque_v;
  544. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_V 0x1UL
  545. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_MASK 0xfeUL
  546. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_SFT 1
  547. u8 timestamp_lo;
  548. __le16 timestamp_hi;
  549. __le32 event_data1;
  550. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE 0x1UL
  551. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_DOWN 0x0UL
  552. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP 0x1UL
  553. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_LAST ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP
  554. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_MASK 0xeUL
  555. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_SFT 1
  556. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffff0UL
  557. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_SFT 4
  558. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_MASK 0xff00000UL
  559. #define ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_SFT 20
  560. };
  561. /* hwrm_async_event_cmpl_port_conn_not_allowed (size:128b/16B) */
  562. struct hwrm_async_event_cmpl_port_conn_not_allowed {
  563. __le16 type;
  564. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_MASK 0x3fUL
  565. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_SFT 0
  566. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  567. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_LAST ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT
  568. __le16 event_id;
  569. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED 0x4UL
  570. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_LAST ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED
  571. __le32 event_data2;
  572. u8 opaque_v;
  573. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_V 0x1UL
  574. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_MASK 0xfeUL
  575. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_SFT 1
  576. u8 timestamp_lo;
  577. __le16 timestamp_hi;
  578. __le32 event_data1;
  579. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  580. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0
  581. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_MASK 0xff0000UL
  582. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_SFT 16
  583. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_NONE (0x0UL << 16)
  584. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_DISABLETX (0x1UL << 16)
  585. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_WARNINGMSG (0x2UL << 16)
  586. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN (0x3UL << 16)
  587. #define ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_LAST ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN
  588. };
  589. /* hwrm_async_event_cmpl_link_speed_cfg_change (size:128b/16B) */
  590. struct hwrm_async_event_cmpl_link_speed_cfg_change {
  591. __le16 type;
  592. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_MASK 0x3fUL
  593. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_SFT 0
  594. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  595. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_LAST ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
  596. __le16 event_id;
  597. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE 0x6UL
  598. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LAST ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE
  599. __le32 event_data2;
  600. u8 opaque_v;
  601. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_V 0x1UL
  602. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_MASK 0xfeUL
  603. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_SFT 1
  604. u8 timestamp_lo;
  605. __le16 timestamp_hi;
  606. __le32 event_data1;
  607. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK 0xffffUL
  608. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0
  609. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_SUPPORTED_LINK_SPEEDS_CHANGE 0x10000UL
  610. #define ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_ILLEGAL_LINK_SPEED_CFG 0x20000UL
  611. };
  612. /* hwrm_async_event_cmpl_vf_cfg_change (size:128b/16B) */
  613. struct hwrm_async_event_cmpl_vf_cfg_change {
  614. __le16 type;
  615. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_MASK 0x3fUL
  616. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_SFT 0
  617. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT 0x2eUL
  618. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_LAST ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
  619. __le16 event_id;
  620. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE 0x33UL
  621. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_LAST ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE
  622. __le32 event_data2;
  623. u8 opaque_v;
  624. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_V 0x1UL
  625. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_MASK 0xfeUL
  626. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_SFT 1
  627. u8 timestamp_lo;
  628. __le16 timestamp_hi;
  629. __le32 event_data1;
  630. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MTU_CHANGE 0x1UL
  631. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MRU_CHANGE 0x2UL
  632. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_MAC_ADDR_CHANGE 0x4UL
  633. #define ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_VLAN_CHANGE 0x8UL
  634. };
  635. /* hwrm_func_reset_input (size:192b/24B) */
  636. struct hwrm_func_reset_input {
  637. __le16 req_type;
  638. __le16 cmpl_ring;
  639. __le16 seq_id;
  640. __le16 target_id;
  641. __le64 resp_addr;
  642. __le32 enables;
  643. #define FUNC_RESET_REQ_ENABLES_VF_ID_VALID 0x1UL
  644. __le16 vf_id;
  645. u8 func_reset_level;
  646. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETALL 0x0UL
  647. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETME 0x1UL
  648. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETCHILDREN 0x2UL
  649. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETVF 0x3UL
  650. #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_LAST FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETVF
  651. u8 unused_0;
  652. };
  653. /* hwrm_func_reset_output (size:128b/16B) */
  654. struct hwrm_func_reset_output {
  655. __le16 error_code;
  656. __le16 req_type;
  657. __le16 seq_id;
  658. __le16 resp_len;
  659. u8 unused_0[7];
  660. u8 valid;
  661. };
  662. /* hwrm_func_getfid_input (size:192b/24B) */
  663. struct hwrm_func_getfid_input {
  664. __le16 req_type;
  665. __le16 cmpl_ring;
  666. __le16 seq_id;
  667. __le16 target_id;
  668. __le64 resp_addr;
  669. __le32 enables;
  670. #define FUNC_GETFID_REQ_ENABLES_PCI_ID 0x1UL
  671. __le16 pci_id;
  672. u8 unused_0[2];
  673. };
  674. /* hwrm_func_getfid_output (size:128b/16B) */
  675. struct hwrm_func_getfid_output {
  676. __le16 error_code;
  677. __le16 req_type;
  678. __le16 seq_id;
  679. __le16 resp_len;
  680. __le16 fid;
  681. u8 unused_0[5];
  682. u8 valid;
  683. };
  684. /* hwrm_func_vf_alloc_input (size:192b/24B) */
  685. struct hwrm_func_vf_alloc_input {
  686. __le16 req_type;
  687. __le16 cmpl_ring;
  688. __le16 seq_id;
  689. __le16 target_id;
  690. __le64 resp_addr;
  691. __le32 enables;
  692. #define FUNC_VF_ALLOC_REQ_ENABLES_FIRST_VF_ID 0x1UL
  693. __le16 first_vf_id;
  694. __le16 num_vfs;
  695. };
  696. /* hwrm_func_vf_alloc_output (size:128b/16B) */
  697. struct hwrm_func_vf_alloc_output {
  698. __le16 error_code;
  699. __le16 req_type;
  700. __le16 seq_id;
  701. __le16 resp_len;
  702. __le16 first_vf_id;
  703. u8 unused_0[5];
  704. u8 valid;
  705. };
  706. /* hwrm_func_vf_free_input (size:192b/24B) */
  707. struct hwrm_func_vf_free_input {
  708. __le16 req_type;
  709. __le16 cmpl_ring;
  710. __le16 seq_id;
  711. __le16 target_id;
  712. __le64 resp_addr;
  713. __le32 enables;
  714. #define FUNC_VF_FREE_REQ_ENABLES_FIRST_VF_ID 0x1UL
  715. __le16 first_vf_id;
  716. __le16 num_vfs;
  717. };
  718. /* hwrm_func_vf_free_output (size:128b/16B) */
  719. struct hwrm_func_vf_free_output {
  720. __le16 error_code;
  721. __le16 req_type;
  722. __le16 seq_id;
  723. __le16 resp_len;
  724. u8 unused_0[7];
  725. u8 valid;
  726. };
  727. /* hwrm_func_vf_cfg_input (size:448b/56B) */
  728. struct hwrm_func_vf_cfg_input {
  729. __le16 req_type;
  730. __le16 cmpl_ring;
  731. __le16 seq_id;
  732. __le16 target_id;
  733. __le64 resp_addr;
  734. __le32 enables;
  735. #define FUNC_VF_CFG_REQ_ENABLES_MTU 0x1UL
  736. #define FUNC_VF_CFG_REQ_ENABLES_GUEST_VLAN 0x2UL
  737. #define FUNC_VF_CFG_REQ_ENABLES_ASYNC_EVENT_CR 0x4UL
  738. #define FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR 0x8UL
  739. #define FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS 0x10UL
  740. #define FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS 0x20UL
  741. #define FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS 0x40UL
  742. #define FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS 0x80UL
  743. #define FUNC_VF_CFG_REQ_ENABLES_NUM_L2_CTXS 0x100UL
  744. #define FUNC_VF_CFG_REQ_ENABLES_NUM_VNICS 0x200UL
  745. #define FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS 0x400UL
  746. #define FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS 0x800UL
  747. __le16 mtu;
  748. __le16 guest_vlan;
  749. __le16 async_event_cr;
  750. u8 dflt_mac_addr[6];
  751. __le32 flags;
  752. #define FUNC_VF_CFG_REQ_FLAGS_TX_ASSETS_TEST 0x1UL
  753. #define FUNC_VF_CFG_REQ_FLAGS_RX_ASSETS_TEST 0x2UL
  754. #define FUNC_VF_CFG_REQ_FLAGS_CMPL_ASSETS_TEST 0x4UL
  755. #define FUNC_VF_CFG_REQ_FLAGS_RSSCOS_CTX_ASSETS_TEST 0x8UL
  756. #define FUNC_VF_CFG_REQ_FLAGS_RING_GRP_ASSETS_TEST 0x10UL
  757. #define FUNC_VF_CFG_REQ_FLAGS_STAT_CTX_ASSETS_TEST 0x20UL
  758. #define FUNC_VF_CFG_REQ_FLAGS_VNIC_ASSETS_TEST 0x40UL
  759. #define FUNC_VF_CFG_REQ_FLAGS_L2_CTX_ASSETS_TEST 0x80UL
  760. __le16 num_rsscos_ctxs;
  761. __le16 num_cmpl_rings;
  762. __le16 num_tx_rings;
  763. __le16 num_rx_rings;
  764. __le16 num_l2_ctxs;
  765. __le16 num_vnics;
  766. __le16 num_stat_ctxs;
  767. __le16 num_hw_ring_grps;
  768. u8 unused_0[4];
  769. };
  770. /* hwrm_func_vf_cfg_output (size:128b/16B) */
  771. struct hwrm_func_vf_cfg_output {
  772. __le16 error_code;
  773. __le16 req_type;
  774. __le16 seq_id;
  775. __le16 resp_len;
  776. u8 unused_0[7];
  777. u8 valid;
  778. };
  779. /* hwrm_func_qcaps_input (size:192b/24B) */
  780. struct hwrm_func_qcaps_input {
  781. __le16 req_type;
  782. __le16 cmpl_ring;
  783. __le16 seq_id;
  784. __le16 target_id;
  785. __le64 resp_addr;
  786. __le16 fid;
  787. u8 unused_0[6];
  788. };
  789. /* hwrm_func_qcaps_output (size:640b/80B) */
  790. struct hwrm_func_qcaps_output {
  791. __le16 error_code;
  792. __le16 req_type;
  793. __le16 seq_id;
  794. __le16 resp_len;
  795. __le16 fid;
  796. __le16 port_id;
  797. __le32 flags;
  798. #define FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED 0x1UL
  799. #define FUNC_QCAPS_RESP_FLAGS_GLOBAL_MSIX_AUTOMASKING 0x2UL
  800. #define FUNC_QCAPS_RESP_FLAGS_PTP_SUPPORTED 0x4UL
  801. #define FUNC_QCAPS_RESP_FLAGS_ROCE_V1_SUPPORTED 0x8UL
  802. #define FUNC_QCAPS_RESP_FLAGS_ROCE_V2_SUPPORTED 0x10UL
  803. #define FUNC_QCAPS_RESP_FLAGS_WOL_MAGICPKT_SUPPORTED 0x20UL
  804. #define FUNC_QCAPS_RESP_FLAGS_WOL_BMP_SUPPORTED 0x40UL
  805. #define FUNC_QCAPS_RESP_FLAGS_TX_RING_RL_SUPPORTED 0x80UL
  806. #define FUNC_QCAPS_RESP_FLAGS_TX_BW_CFG_SUPPORTED 0x100UL
  807. #define FUNC_QCAPS_RESP_FLAGS_VF_TX_RING_RL_SUPPORTED 0x200UL
  808. #define FUNC_QCAPS_RESP_FLAGS_VF_BW_CFG_SUPPORTED 0x400UL
  809. #define FUNC_QCAPS_RESP_FLAGS_STD_TX_RING_MODE_SUPPORTED 0x800UL
  810. #define FUNC_QCAPS_RESP_FLAGS_GENEVE_TUN_FLAGS_SUPPORTED 0x1000UL
  811. #define FUNC_QCAPS_RESP_FLAGS_NVGRE_TUN_FLAGS_SUPPORTED 0x2000UL
  812. #define FUNC_QCAPS_RESP_FLAGS_GRE_TUN_FLAGS_SUPPORTED 0x4000UL
  813. #define FUNC_QCAPS_RESP_FLAGS_MPLS_TUN_FLAGS_SUPPORTED 0x8000UL
  814. #define FUNC_QCAPS_RESP_FLAGS_PCIE_STATS_SUPPORTED 0x10000UL
  815. #define FUNC_QCAPS_RESP_FLAGS_ADOPTED_PF_SUPPORTED 0x20000UL
  816. #define FUNC_QCAPS_RESP_FLAGS_ADMIN_PF_SUPPORTED 0x40000UL
  817. #define FUNC_QCAPS_RESP_FLAGS_LINK_ADMIN_STATUS_SUPPORTED 0x80000UL
  818. u8 mac_address[6];
  819. __le16 max_rsscos_ctx;
  820. __le16 max_cmpl_rings;
  821. __le16 max_tx_rings;
  822. __le16 max_rx_rings;
  823. __le16 max_l2_ctxs;
  824. __le16 max_vnics;
  825. __le16 first_vf_id;
  826. __le16 max_vfs;
  827. __le16 max_stat_ctx;
  828. __le32 max_encap_records;
  829. __le32 max_decap_records;
  830. __le32 max_tx_em_flows;
  831. __le32 max_tx_wm_flows;
  832. __le32 max_rx_em_flows;
  833. __le32 max_rx_wm_flows;
  834. __le32 max_mcast_filters;
  835. __le32 max_flow_id;
  836. __le32 max_hw_ring_grps;
  837. __le16 max_sp_tx_rings;
  838. u8 unused_0;
  839. u8 valid;
  840. };
  841. /* hwrm_func_qcfg_input (size:192b/24B) */
  842. struct hwrm_func_qcfg_input {
  843. __le16 req_type;
  844. __le16 cmpl_ring;
  845. __le16 seq_id;
  846. __le16 target_id;
  847. __le64 resp_addr;
  848. __le16 fid;
  849. u8 unused_0[6];
  850. };
  851. /* hwrm_func_qcfg_output (size:640b/80B) */
  852. struct hwrm_func_qcfg_output {
  853. __le16 error_code;
  854. __le16 req_type;
  855. __le16 seq_id;
  856. __le16 resp_len;
  857. __le16 fid;
  858. __le16 port_id;
  859. __le16 vlan;
  860. __le16 flags;
  861. #define FUNC_QCFG_RESP_FLAGS_OOB_WOL_MAGICPKT_ENABLED 0x1UL
  862. #define FUNC_QCFG_RESP_FLAGS_OOB_WOL_BMP_ENABLED 0x2UL
  863. #define FUNC_QCFG_RESP_FLAGS_FW_DCBX_AGENT_ENABLED 0x4UL
  864. #define FUNC_QCFG_RESP_FLAGS_STD_TX_RING_MODE_ENABLED 0x8UL
  865. #define FUNC_QCFG_RESP_FLAGS_FW_LLDP_AGENT_ENABLED 0x10UL
  866. #define FUNC_QCFG_RESP_FLAGS_MULTI_HOST 0x20UL
  867. u8 mac_address[6];
  868. __le16 pci_id;
  869. __le16 alloc_rsscos_ctx;
  870. __le16 alloc_cmpl_rings;
  871. __le16 alloc_tx_rings;
  872. __le16 alloc_rx_rings;
  873. __le16 alloc_l2_ctx;
  874. __le16 alloc_vnics;
  875. __le16 mtu;
  876. __le16 mru;
  877. __le16 stat_ctx_id;
  878. u8 port_partition_type;
  879. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_SPF 0x0UL
  880. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_MPFS 0x1UL
  881. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0 0x2UL
  882. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5 0x3UL
  883. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR2_0 0x4UL
  884. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_UNKNOWN 0xffUL
  885. #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_LAST FUNC_QCFG_RESP_PORT_PARTITION_TYPE_UNKNOWN
  886. u8 port_pf_cnt;
  887. #define FUNC_QCFG_RESP_PORT_PF_CNT_UNAVAIL 0x0UL
  888. #define FUNC_QCFG_RESP_PORT_PF_CNT_LAST FUNC_QCFG_RESP_PORT_PF_CNT_UNAVAIL
  889. __le16 dflt_vnic_id;
  890. __le16 max_mtu_configured;
  891. __le32 min_bw;
  892. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  893. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_SFT 0
  894. #define FUNC_QCFG_RESP_MIN_BW_SCALE 0x10000000UL
  895. #define FUNC_QCFG_RESP_MIN_BW_SCALE_BITS (0x0UL << 28)
  896. #define FUNC_QCFG_RESP_MIN_BW_SCALE_BYTES (0x1UL << 28)
  897. #define FUNC_QCFG_RESP_MIN_BW_SCALE_LAST FUNC_QCFG_RESP_MIN_BW_SCALE_BYTES
  898. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  899. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_SFT 29
  900. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  901. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  902. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  903. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  904. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  905. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  906. #define FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_LAST FUNC_QCFG_RESP_MIN_BW_BW_VALUE_UNIT_INVALID
  907. __le32 max_bw;
  908. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  909. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_SFT 0
  910. #define FUNC_QCFG_RESP_MAX_BW_SCALE 0x10000000UL
  911. #define FUNC_QCFG_RESP_MAX_BW_SCALE_BITS (0x0UL << 28)
  912. #define FUNC_QCFG_RESP_MAX_BW_SCALE_BYTES (0x1UL << 28)
  913. #define FUNC_QCFG_RESP_MAX_BW_SCALE_LAST FUNC_QCFG_RESP_MAX_BW_SCALE_BYTES
  914. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  915. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_SFT 29
  916. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  917. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  918. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  919. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  920. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  921. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  922. #define FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_LAST FUNC_QCFG_RESP_MAX_BW_BW_VALUE_UNIT_INVALID
  923. u8 evb_mode;
  924. #define FUNC_QCFG_RESP_EVB_MODE_NO_EVB 0x0UL
  925. #define FUNC_QCFG_RESP_EVB_MODE_VEB 0x1UL
  926. #define FUNC_QCFG_RESP_EVB_MODE_VEPA 0x2UL
  927. #define FUNC_QCFG_RESP_EVB_MODE_LAST FUNC_QCFG_RESP_EVB_MODE_VEPA
  928. u8 options;
  929. #define FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_MASK 0x3UL
  930. #define FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_SFT 0
  931. #define FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_SIZE_64 0x0UL
  932. #define FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_SIZE_128 0x1UL
  933. #define FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_LAST FUNC_QCFG_RESP_OPTIONS_CACHE_LINESIZE_SIZE_128
  934. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_MASK 0xcUL
  935. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_SFT 2
  936. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN (0x0UL << 2)
  937. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_FORCED_UP (0x1UL << 2)
  938. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_AUTO (0x2UL << 2)
  939. #define FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_LAST FUNC_QCFG_RESP_OPTIONS_LINK_ADMIN_STATE_AUTO
  940. #define FUNC_QCFG_RESP_OPTIONS_RSVD_MASK 0xf0UL
  941. #define FUNC_QCFG_RESP_OPTIONS_RSVD_SFT 4
  942. __le16 alloc_vfs;
  943. __le32 alloc_mcast_filters;
  944. __le32 alloc_hw_ring_grps;
  945. __le16 alloc_sp_tx_rings;
  946. __le16 alloc_stat_ctx;
  947. __le16 alloc_msix;
  948. u8 unused_2[5];
  949. u8 valid;
  950. };
  951. /* hwrm_func_cfg_input (size:704b/88B) */
  952. struct hwrm_func_cfg_input {
  953. __le16 req_type;
  954. __le16 cmpl_ring;
  955. __le16 seq_id;
  956. __le16 target_id;
  957. __le64 resp_addr;
  958. __le16 fid;
  959. __le16 num_msix;
  960. __le32 flags;
  961. #define FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE 0x1UL
  962. #define FUNC_CFG_REQ_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE 0x2UL
  963. #define FUNC_CFG_REQ_FLAGS_RSVD_MASK 0x1fcUL
  964. #define FUNC_CFG_REQ_FLAGS_RSVD_SFT 2
  965. #define FUNC_CFG_REQ_FLAGS_STD_TX_RING_MODE_ENABLE 0x200UL
  966. #define FUNC_CFG_REQ_FLAGS_STD_TX_RING_MODE_DISABLE 0x400UL
  967. #define FUNC_CFG_REQ_FLAGS_VIRT_MAC_PERSIST 0x800UL
  968. #define FUNC_CFG_REQ_FLAGS_NO_AUTOCLEAR_STATISTIC 0x1000UL
  969. #define FUNC_CFG_REQ_FLAGS_TX_ASSETS_TEST 0x2000UL
  970. #define FUNC_CFG_REQ_FLAGS_RX_ASSETS_TEST 0x4000UL
  971. #define FUNC_CFG_REQ_FLAGS_CMPL_ASSETS_TEST 0x8000UL
  972. #define FUNC_CFG_REQ_FLAGS_RSSCOS_CTX_ASSETS_TEST 0x10000UL
  973. #define FUNC_CFG_REQ_FLAGS_RING_GRP_ASSETS_TEST 0x20000UL
  974. #define FUNC_CFG_REQ_FLAGS_STAT_CTX_ASSETS_TEST 0x40000UL
  975. #define FUNC_CFG_REQ_FLAGS_VNIC_ASSETS_TEST 0x80000UL
  976. #define FUNC_CFG_REQ_FLAGS_L2_CTX_ASSETS_TEST 0x100000UL
  977. __le32 enables;
  978. #define FUNC_CFG_REQ_ENABLES_MTU 0x1UL
  979. #define FUNC_CFG_REQ_ENABLES_MRU 0x2UL
  980. #define FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS 0x4UL
  981. #define FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS 0x8UL
  982. #define FUNC_CFG_REQ_ENABLES_NUM_TX_RINGS 0x10UL
  983. #define FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS 0x20UL
  984. #define FUNC_CFG_REQ_ENABLES_NUM_L2_CTXS 0x40UL
  985. #define FUNC_CFG_REQ_ENABLES_NUM_VNICS 0x80UL
  986. #define FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS 0x100UL
  987. #define FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR 0x200UL
  988. #define FUNC_CFG_REQ_ENABLES_DFLT_VLAN 0x400UL
  989. #define FUNC_CFG_REQ_ENABLES_DFLT_IP_ADDR 0x800UL
  990. #define FUNC_CFG_REQ_ENABLES_MIN_BW 0x1000UL
  991. #define FUNC_CFG_REQ_ENABLES_MAX_BW 0x2000UL
  992. #define FUNC_CFG_REQ_ENABLES_ASYNC_EVENT_CR 0x4000UL
  993. #define FUNC_CFG_REQ_ENABLES_VLAN_ANTISPOOF_MODE 0x8000UL
  994. #define FUNC_CFG_REQ_ENABLES_ALLOWED_VLAN_PRIS 0x10000UL
  995. #define FUNC_CFG_REQ_ENABLES_EVB_MODE 0x20000UL
  996. #define FUNC_CFG_REQ_ENABLES_NUM_MCAST_FILTERS 0x40000UL
  997. #define FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS 0x80000UL
  998. #define FUNC_CFG_REQ_ENABLES_CACHE_LINESIZE 0x100000UL
  999. #define FUNC_CFG_REQ_ENABLES_NUM_MSIX 0x200000UL
  1000. #define FUNC_CFG_REQ_ENABLES_ADMIN_LINK_STATE 0x400000UL
  1001. __le16 mtu;
  1002. __le16 mru;
  1003. __le16 num_rsscos_ctxs;
  1004. __le16 num_cmpl_rings;
  1005. __le16 num_tx_rings;
  1006. __le16 num_rx_rings;
  1007. __le16 num_l2_ctxs;
  1008. __le16 num_vnics;
  1009. __le16 num_stat_ctxs;
  1010. __le16 num_hw_ring_grps;
  1011. u8 dflt_mac_addr[6];
  1012. __le16 dflt_vlan;
  1013. __be32 dflt_ip_addr[4];
  1014. __le32 min_bw;
  1015. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  1016. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_SFT 0
  1017. #define FUNC_CFG_REQ_MIN_BW_SCALE 0x10000000UL
  1018. #define FUNC_CFG_REQ_MIN_BW_SCALE_BITS (0x0UL << 28)
  1019. #define FUNC_CFG_REQ_MIN_BW_SCALE_BYTES (0x1UL << 28)
  1020. #define FUNC_CFG_REQ_MIN_BW_SCALE_LAST FUNC_CFG_REQ_MIN_BW_SCALE_BYTES
  1021. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1022. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_SFT 29
  1023. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  1024. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  1025. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  1026. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  1027. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1028. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1029. #define FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_LAST FUNC_CFG_REQ_MIN_BW_BW_VALUE_UNIT_INVALID
  1030. __le32 max_bw;
  1031. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  1032. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_SFT 0
  1033. #define FUNC_CFG_REQ_MAX_BW_SCALE 0x10000000UL
  1034. #define FUNC_CFG_REQ_MAX_BW_SCALE_BITS (0x0UL << 28)
  1035. #define FUNC_CFG_REQ_MAX_BW_SCALE_BYTES (0x1UL << 28)
  1036. #define FUNC_CFG_REQ_MAX_BW_SCALE_LAST FUNC_CFG_REQ_MAX_BW_SCALE_BYTES
  1037. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  1038. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_SFT 29
  1039. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  1040. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  1041. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  1042. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  1043. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  1044. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  1045. #define FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_LAST FUNC_CFG_REQ_MAX_BW_BW_VALUE_UNIT_INVALID
  1046. __le16 async_event_cr;
  1047. u8 vlan_antispoof_mode;
  1048. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_NOCHECK 0x0UL
  1049. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN 0x1UL
  1050. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_INSERT_IF_VLANDNE 0x2UL
  1051. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN 0x3UL
  1052. #define FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_LAST FUNC_CFG_REQ_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN
  1053. u8 allowed_vlan_pris;
  1054. u8 evb_mode;
  1055. #define FUNC_CFG_REQ_EVB_MODE_NO_EVB 0x0UL
  1056. #define FUNC_CFG_REQ_EVB_MODE_VEB 0x1UL
  1057. #define FUNC_CFG_REQ_EVB_MODE_VEPA 0x2UL
  1058. #define FUNC_CFG_REQ_EVB_MODE_LAST FUNC_CFG_REQ_EVB_MODE_VEPA
  1059. u8 options;
  1060. #define FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_MASK 0x3UL
  1061. #define FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SFT 0
  1062. #define FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SIZE_64 0x0UL
  1063. #define FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SIZE_128 0x1UL
  1064. #define FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_LAST FUNC_CFG_REQ_OPTIONS_CACHE_LINESIZE_SIZE_128
  1065. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_MASK 0xcUL
  1066. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_SFT 2
  1067. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN (0x0UL << 2)
  1068. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_FORCED_UP (0x1UL << 2)
  1069. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_AUTO (0x2UL << 2)
  1070. #define FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_LAST FUNC_CFG_REQ_OPTIONS_LINK_ADMIN_STATE_AUTO
  1071. #define FUNC_CFG_REQ_OPTIONS_RSVD_MASK 0xf0UL
  1072. #define FUNC_CFG_REQ_OPTIONS_RSVD_SFT 4
  1073. __le16 num_mcast_filters;
  1074. };
  1075. /* hwrm_func_cfg_output (size:128b/16B) */
  1076. struct hwrm_func_cfg_output {
  1077. __le16 error_code;
  1078. __le16 req_type;
  1079. __le16 seq_id;
  1080. __le16 resp_len;
  1081. u8 unused_0[7];
  1082. u8 valid;
  1083. };
  1084. /* hwrm_func_qstats_input (size:192b/24B) */
  1085. struct hwrm_func_qstats_input {
  1086. __le16 req_type;
  1087. __le16 cmpl_ring;
  1088. __le16 seq_id;
  1089. __le16 target_id;
  1090. __le64 resp_addr;
  1091. __le16 fid;
  1092. u8 unused_0[6];
  1093. };
  1094. /* hwrm_func_qstats_output (size:1408b/176B) */
  1095. struct hwrm_func_qstats_output {
  1096. __le16 error_code;
  1097. __le16 req_type;
  1098. __le16 seq_id;
  1099. __le16 resp_len;
  1100. __le64 tx_ucast_pkts;
  1101. __le64 tx_mcast_pkts;
  1102. __le64 tx_bcast_pkts;
  1103. __le64 tx_discard_pkts;
  1104. __le64 tx_drop_pkts;
  1105. __le64 tx_ucast_bytes;
  1106. __le64 tx_mcast_bytes;
  1107. __le64 tx_bcast_bytes;
  1108. __le64 rx_ucast_pkts;
  1109. __le64 rx_mcast_pkts;
  1110. __le64 rx_bcast_pkts;
  1111. __le64 rx_discard_pkts;
  1112. __le64 rx_drop_pkts;
  1113. __le64 rx_ucast_bytes;
  1114. __le64 rx_mcast_bytes;
  1115. __le64 rx_bcast_bytes;
  1116. __le64 rx_agg_pkts;
  1117. __le64 rx_agg_bytes;
  1118. __le64 rx_agg_events;
  1119. __le64 rx_agg_aborts;
  1120. u8 unused_0[7];
  1121. u8 valid;
  1122. };
  1123. /* hwrm_func_clr_stats_input (size:192b/24B) */
  1124. struct hwrm_func_clr_stats_input {
  1125. __le16 req_type;
  1126. __le16 cmpl_ring;
  1127. __le16 seq_id;
  1128. __le16 target_id;
  1129. __le64 resp_addr;
  1130. __le16 fid;
  1131. u8 unused_0[6];
  1132. };
  1133. /* hwrm_func_clr_stats_output (size:128b/16B) */
  1134. struct hwrm_func_clr_stats_output {
  1135. __le16 error_code;
  1136. __le16 req_type;
  1137. __le16 seq_id;
  1138. __le16 resp_len;
  1139. u8 unused_0[7];
  1140. u8 valid;
  1141. };
  1142. /* hwrm_func_vf_resc_free_input (size:192b/24B) */
  1143. struct hwrm_func_vf_resc_free_input {
  1144. __le16 req_type;
  1145. __le16 cmpl_ring;
  1146. __le16 seq_id;
  1147. __le16 target_id;
  1148. __le64 resp_addr;
  1149. __le16 vf_id;
  1150. u8 unused_0[6];
  1151. };
  1152. /* hwrm_func_vf_resc_free_output (size:128b/16B) */
  1153. struct hwrm_func_vf_resc_free_output {
  1154. __le16 error_code;
  1155. __le16 req_type;
  1156. __le16 seq_id;
  1157. __le16 resp_len;
  1158. u8 unused_0[7];
  1159. u8 valid;
  1160. };
  1161. /* hwrm_func_drv_rgtr_input (size:896b/112B) */
  1162. struct hwrm_func_drv_rgtr_input {
  1163. __le16 req_type;
  1164. __le16 cmpl_ring;
  1165. __le16 seq_id;
  1166. __le16 target_id;
  1167. __le64 resp_addr;
  1168. __le32 flags;
  1169. #define FUNC_DRV_RGTR_REQ_FLAGS_FWD_ALL_MODE 0x1UL
  1170. #define FUNC_DRV_RGTR_REQ_FLAGS_FWD_NONE_MODE 0x2UL
  1171. #define FUNC_DRV_RGTR_REQ_FLAGS_16BIT_VER_MODE 0x4UL
  1172. __le32 enables;
  1173. #define FUNC_DRV_RGTR_REQ_ENABLES_OS_TYPE 0x1UL
  1174. #define FUNC_DRV_RGTR_REQ_ENABLES_VER 0x2UL
  1175. #define FUNC_DRV_RGTR_REQ_ENABLES_TIMESTAMP 0x4UL
  1176. #define FUNC_DRV_RGTR_REQ_ENABLES_VF_REQ_FWD 0x8UL
  1177. #define FUNC_DRV_RGTR_REQ_ENABLES_ASYNC_EVENT_FWD 0x10UL
  1178. __le16 os_type;
  1179. #define FUNC_DRV_RGTR_REQ_OS_TYPE_UNKNOWN 0x0UL
  1180. #define FUNC_DRV_RGTR_REQ_OS_TYPE_OTHER 0x1UL
  1181. #define FUNC_DRV_RGTR_REQ_OS_TYPE_MSDOS 0xeUL
  1182. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WINDOWS 0x12UL
  1183. #define FUNC_DRV_RGTR_REQ_OS_TYPE_SOLARIS 0x1dUL
  1184. #define FUNC_DRV_RGTR_REQ_OS_TYPE_LINUX 0x24UL
  1185. #define FUNC_DRV_RGTR_REQ_OS_TYPE_FREEBSD 0x2aUL
  1186. #define FUNC_DRV_RGTR_REQ_OS_TYPE_ESXI 0x68UL
  1187. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WIN864 0x73UL
  1188. #define FUNC_DRV_RGTR_REQ_OS_TYPE_WIN2012R2 0x74UL
  1189. #define FUNC_DRV_RGTR_REQ_OS_TYPE_UEFI 0x8000UL
  1190. #define FUNC_DRV_RGTR_REQ_OS_TYPE_LAST FUNC_DRV_RGTR_REQ_OS_TYPE_UEFI
  1191. u8 ver_maj_8b;
  1192. u8 ver_min_8b;
  1193. u8 ver_upd_8b;
  1194. u8 unused_0[3];
  1195. __le32 timestamp;
  1196. u8 unused_1[4];
  1197. __le32 vf_req_fwd[8];
  1198. __le32 async_event_fwd[8];
  1199. __le16 ver_maj;
  1200. __le16 ver_min;
  1201. __le16 ver_upd;
  1202. __le16 ver_patch;
  1203. };
  1204. /* hwrm_func_drv_rgtr_output (size:128b/16B) */
  1205. struct hwrm_func_drv_rgtr_output {
  1206. __le16 error_code;
  1207. __le16 req_type;
  1208. __le16 seq_id;
  1209. __le16 resp_len;
  1210. __le32 flags;
  1211. #define FUNC_DRV_RGTR_RESP_FLAGS_IF_CHANGE_SUPPORTED 0x1UL
  1212. u8 unused_0[3];
  1213. u8 valid;
  1214. };
  1215. /* hwrm_func_drv_unrgtr_input (size:192b/24B) */
  1216. struct hwrm_func_drv_unrgtr_input {
  1217. __le16 req_type;
  1218. __le16 cmpl_ring;
  1219. __le16 seq_id;
  1220. __le16 target_id;
  1221. __le64 resp_addr;
  1222. __le32 flags;
  1223. #define FUNC_DRV_UNRGTR_REQ_FLAGS_PREPARE_FOR_SHUTDOWN 0x1UL
  1224. u8 unused_0[4];
  1225. };
  1226. /* hwrm_func_drv_unrgtr_output (size:128b/16B) */
  1227. struct hwrm_func_drv_unrgtr_output {
  1228. __le16 error_code;
  1229. __le16 req_type;
  1230. __le16 seq_id;
  1231. __le16 resp_len;
  1232. u8 unused_0[7];
  1233. u8 valid;
  1234. };
  1235. /* hwrm_func_buf_rgtr_input (size:1024b/128B) */
  1236. struct hwrm_func_buf_rgtr_input {
  1237. __le16 req_type;
  1238. __le16 cmpl_ring;
  1239. __le16 seq_id;
  1240. __le16 target_id;
  1241. __le64 resp_addr;
  1242. __le32 enables;
  1243. #define FUNC_BUF_RGTR_REQ_ENABLES_VF_ID 0x1UL
  1244. #define FUNC_BUF_RGTR_REQ_ENABLES_ERR_BUF_ADDR 0x2UL
  1245. __le16 vf_id;
  1246. __le16 req_buf_num_pages;
  1247. __le16 req_buf_page_size;
  1248. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_16B 0x4UL
  1249. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_4K 0xcUL
  1250. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_8K 0xdUL
  1251. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_64K 0x10UL
  1252. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_2M 0x15UL
  1253. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_4M 0x16UL
  1254. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_1G 0x1eUL
  1255. #define FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_LAST FUNC_BUF_RGTR_REQ_REQ_BUF_PAGE_SIZE_1G
  1256. __le16 req_buf_len;
  1257. __le16 resp_buf_len;
  1258. u8 unused_0[2];
  1259. __le64 req_buf_page_addr0;
  1260. __le64 req_buf_page_addr1;
  1261. __le64 req_buf_page_addr2;
  1262. __le64 req_buf_page_addr3;
  1263. __le64 req_buf_page_addr4;
  1264. __le64 req_buf_page_addr5;
  1265. __le64 req_buf_page_addr6;
  1266. __le64 req_buf_page_addr7;
  1267. __le64 req_buf_page_addr8;
  1268. __le64 req_buf_page_addr9;
  1269. __le64 error_buf_addr;
  1270. __le64 resp_buf_addr;
  1271. };
  1272. /* hwrm_func_buf_rgtr_output (size:128b/16B) */
  1273. struct hwrm_func_buf_rgtr_output {
  1274. __le16 error_code;
  1275. __le16 req_type;
  1276. __le16 seq_id;
  1277. __le16 resp_len;
  1278. u8 unused_0[7];
  1279. u8 valid;
  1280. };
  1281. /* hwrm_func_drv_qver_input (size:192b/24B) */
  1282. struct hwrm_func_drv_qver_input {
  1283. __le16 req_type;
  1284. __le16 cmpl_ring;
  1285. __le16 seq_id;
  1286. __le16 target_id;
  1287. __le64 resp_addr;
  1288. __le32 reserved;
  1289. __le16 fid;
  1290. u8 unused_0[2];
  1291. };
  1292. /* hwrm_func_drv_qver_output (size:256b/32B) */
  1293. struct hwrm_func_drv_qver_output {
  1294. __le16 error_code;
  1295. __le16 req_type;
  1296. __le16 seq_id;
  1297. __le16 resp_len;
  1298. __le16 os_type;
  1299. #define FUNC_DRV_QVER_RESP_OS_TYPE_UNKNOWN 0x0UL
  1300. #define FUNC_DRV_QVER_RESP_OS_TYPE_OTHER 0x1UL
  1301. #define FUNC_DRV_QVER_RESP_OS_TYPE_MSDOS 0xeUL
  1302. #define FUNC_DRV_QVER_RESP_OS_TYPE_WINDOWS 0x12UL
  1303. #define FUNC_DRV_QVER_RESP_OS_TYPE_SOLARIS 0x1dUL
  1304. #define FUNC_DRV_QVER_RESP_OS_TYPE_LINUX 0x24UL
  1305. #define FUNC_DRV_QVER_RESP_OS_TYPE_FREEBSD 0x2aUL
  1306. #define FUNC_DRV_QVER_RESP_OS_TYPE_ESXI 0x68UL
  1307. #define FUNC_DRV_QVER_RESP_OS_TYPE_WIN864 0x73UL
  1308. #define FUNC_DRV_QVER_RESP_OS_TYPE_WIN2012R2 0x74UL
  1309. #define FUNC_DRV_QVER_RESP_OS_TYPE_UEFI 0x8000UL
  1310. #define FUNC_DRV_QVER_RESP_OS_TYPE_LAST FUNC_DRV_QVER_RESP_OS_TYPE_UEFI
  1311. u8 ver_maj_8b;
  1312. u8 ver_min_8b;
  1313. u8 ver_upd_8b;
  1314. u8 unused_0[3];
  1315. __le16 ver_maj;
  1316. __le16 ver_min;
  1317. __le16 ver_upd;
  1318. __le16 ver_patch;
  1319. u8 unused_1[7];
  1320. u8 valid;
  1321. };
  1322. /* hwrm_func_resource_qcaps_input (size:192b/24B) */
  1323. struct hwrm_func_resource_qcaps_input {
  1324. __le16 req_type;
  1325. __le16 cmpl_ring;
  1326. __le16 seq_id;
  1327. __le16 target_id;
  1328. __le64 resp_addr;
  1329. __le16 fid;
  1330. u8 unused_0[6];
  1331. };
  1332. /* hwrm_func_resource_qcaps_output (size:448b/56B) */
  1333. struct hwrm_func_resource_qcaps_output {
  1334. __le16 error_code;
  1335. __le16 req_type;
  1336. __le16 seq_id;
  1337. __le16 resp_len;
  1338. __le16 max_vfs;
  1339. __le16 max_msix;
  1340. __le16 vf_reservation_strategy;
  1341. #define FUNC_RESOURCE_QCAPS_RESP_VF_RESERVATION_STRATEGY_MAXIMAL 0x0UL
  1342. #define FUNC_RESOURCE_QCAPS_RESP_VF_RESERVATION_STRATEGY_MINIMAL 0x1UL
  1343. #define FUNC_RESOURCE_QCAPS_RESP_VF_RESERVATION_STRATEGY_MINIMAL_STATIC 0x2UL
  1344. #define FUNC_RESOURCE_QCAPS_RESP_VF_RESERVATION_STRATEGY_LAST FUNC_RESOURCE_QCAPS_RESP_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
  1345. __le16 min_rsscos_ctx;
  1346. __le16 max_rsscos_ctx;
  1347. __le16 min_cmpl_rings;
  1348. __le16 max_cmpl_rings;
  1349. __le16 min_tx_rings;
  1350. __le16 max_tx_rings;
  1351. __le16 min_rx_rings;
  1352. __le16 max_rx_rings;
  1353. __le16 min_l2_ctxs;
  1354. __le16 max_l2_ctxs;
  1355. __le16 min_vnics;
  1356. __le16 max_vnics;
  1357. __le16 min_stat_ctx;
  1358. __le16 max_stat_ctx;
  1359. __le16 min_hw_ring_grps;
  1360. __le16 max_hw_ring_grps;
  1361. __le16 max_tx_scheduler_inputs;
  1362. u8 unused_0[7];
  1363. u8 valid;
  1364. };
  1365. /* hwrm_func_vf_resource_cfg_input (size:448b/56B) */
  1366. struct hwrm_func_vf_resource_cfg_input {
  1367. __le16 req_type;
  1368. __le16 cmpl_ring;
  1369. __le16 seq_id;
  1370. __le16 target_id;
  1371. __le64 resp_addr;
  1372. __le16 vf_id;
  1373. __le16 max_msix;
  1374. __le16 min_rsscos_ctx;
  1375. __le16 max_rsscos_ctx;
  1376. __le16 min_cmpl_rings;
  1377. __le16 max_cmpl_rings;
  1378. __le16 min_tx_rings;
  1379. __le16 max_tx_rings;
  1380. __le16 min_rx_rings;
  1381. __le16 max_rx_rings;
  1382. __le16 min_l2_ctxs;
  1383. __le16 max_l2_ctxs;
  1384. __le16 min_vnics;
  1385. __le16 max_vnics;
  1386. __le16 min_stat_ctx;
  1387. __le16 max_stat_ctx;
  1388. __le16 min_hw_ring_grps;
  1389. __le16 max_hw_ring_grps;
  1390. u8 unused_0[4];
  1391. };
  1392. /* hwrm_func_vf_resource_cfg_output (size:256b/32B) */
  1393. struct hwrm_func_vf_resource_cfg_output {
  1394. __le16 error_code;
  1395. __le16 req_type;
  1396. __le16 seq_id;
  1397. __le16 resp_len;
  1398. __le16 reserved_rsscos_ctx;
  1399. __le16 reserved_cmpl_rings;
  1400. __le16 reserved_tx_rings;
  1401. __le16 reserved_rx_rings;
  1402. __le16 reserved_l2_ctxs;
  1403. __le16 reserved_vnics;
  1404. __le16 reserved_stat_ctx;
  1405. __le16 reserved_hw_ring_grps;
  1406. u8 unused_0[7];
  1407. u8 valid;
  1408. };
  1409. /* hwrm_func_backing_store_qcaps_input (size:128b/16B) */
  1410. struct hwrm_func_backing_store_qcaps_input {
  1411. __le16 req_type;
  1412. __le16 cmpl_ring;
  1413. __le16 seq_id;
  1414. __le16 target_id;
  1415. __le64 resp_addr;
  1416. };
  1417. /* hwrm_func_backing_store_qcaps_output (size:576b/72B) */
  1418. struct hwrm_func_backing_store_qcaps_output {
  1419. __le16 error_code;
  1420. __le16 req_type;
  1421. __le16 seq_id;
  1422. __le16 resp_len;
  1423. __le32 qp_max_entries;
  1424. __le16 qp_min_qp1_entries;
  1425. __le16 qp_max_l2_entries;
  1426. __le16 qp_entry_size;
  1427. __le16 srq_max_l2_entries;
  1428. __le32 srq_max_entries;
  1429. __le16 srq_entry_size;
  1430. __le16 cq_max_l2_entries;
  1431. __le32 cq_max_entries;
  1432. __le16 cq_entry_size;
  1433. __le16 vnic_max_vnic_entries;
  1434. __le16 vnic_max_ring_table_entries;
  1435. __le16 vnic_entry_size;
  1436. __le32 stat_max_entries;
  1437. __le16 stat_entry_size;
  1438. __le16 tqm_entry_size;
  1439. __le32 tqm_min_entries_per_ring;
  1440. __le32 tqm_max_entries_per_ring;
  1441. __le32 mrav_max_entries;
  1442. __le16 mrav_entry_size;
  1443. __le16 tim_entry_size;
  1444. __le32 tim_max_entries;
  1445. u8 unused_0[3];
  1446. u8 valid;
  1447. };
  1448. /* hwrm_func_backing_store_cfg_input (size:2048b/256B) */
  1449. struct hwrm_func_backing_store_cfg_input {
  1450. __le16 req_type;
  1451. __le16 cmpl_ring;
  1452. __le16 seq_id;
  1453. __le16 target_id;
  1454. __le64 resp_addr;
  1455. __le32 flags;
  1456. #define FUNC_BACKING_STORE_CFG_REQ_FLAGS_PREBOOT_MODE 0x1UL
  1457. __le32 enables;
  1458. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_QP 0x1UL
  1459. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_SRQ 0x2UL
  1460. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_CQ 0x4UL
  1461. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_VNIC 0x8UL
  1462. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_STAT 0x10UL
  1463. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_SP 0x20UL
  1464. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING0 0x40UL
  1465. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING1 0x80UL
  1466. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING2 0x100UL
  1467. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING3 0x200UL
  1468. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING4 0x400UL
  1469. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING5 0x800UL
  1470. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING6 0x1000UL
  1471. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TQM_RING7 0x2000UL
  1472. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_MRAV 0x4000UL
  1473. #define FUNC_BACKING_STORE_CFG_REQ_ENABLES_TIM 0x8000UL
  1474. u8 qpc_pg_size_qpc_lvl;
  1475. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_MASK 0xfUL
  1476. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_SFT 0
  1477. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_LVL_0 0x0UL
  1478. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_LVL_1 0x1UL
  1479. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_LVL_2 0x2UL
  1480. #define FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_QPC_LVL_LVL_2
  1481. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_MASK 0xf0UL
  1482. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_SFT 4
  1483. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_4K (0x0UL << 4)
  1484. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_8K (0x1UL << 4)
  1485. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_64K (0x2UL << 4)
  1486. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_2M (0x3UL << 4)
  1487. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_8M (0x4UL << 4)
  1488. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_1G (0x5UL << 4)
  1489. #define FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_QPC_PG_SIZE_PG_1G
  1490. u8 srq_pg_size_srq_lvl;
  1491. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_MASK 0xfUL
  1492. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_SFT 0
  1493. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_LVL_0 0x0UL
  1494. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_LVL_1 0x1UL
  1495. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_LVL_2 0x2UL
  1496. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_SRQ_LVL_LVL_2
  1497. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_MASK 0xf0UL
  1498. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_SFT 4
  1499. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_4K (0x0UL << 4)
  1500. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_8K (0x1UL << 4)
  1501. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_64K (0x2UL << 4)
  1502. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_2M (0x3UL << 4)
  1503. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_8M (0x4UL << 4)
  1504. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_1G (0x5UL << 4)
  1505. #define FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_SRQ_PG_SIZE_PG_1G
  1506. u8 cq_pg_size_cq_lvl;
  1507. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_MASK 0xfUL
  1508. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_SFT 0
  1509. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_LVL_0 0x0UL
  1510. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_LVL_1 0x1UL
  1511. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_LVL_2 0x2UL
  1512. #define FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_CQ_LVL_LVL_2
  1513. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_MASK 0xf0UL
  1514. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_SFT 4
  1515. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_4K (0x0UL << 4)
  1516. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_8K (0x1UL << 4)
  1517. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_64K (0x2UL << 4)
  1518. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_2M (0x3UL << 4)
  1519. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_8M (0x4UL << 4)
  1520. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_1G (0x5UL << 4)
  1521. #define FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_CQ_PG_SIZE_PG_1G
  1522. u8 vnic_pg_size_vnic_lvl;
  1523. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_MASK 0xfUL
  1524. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_SFT 0
  1525. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_LVL_0 0x0UL
  1526. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_LVL_1 0x1UL
  1527. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_LVL_2 0x2UL
  1528. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_VNIC_LVL_LVL_2
  1529. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_MASK 0xf0UL
  1530. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_SFT 4
  1531. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_4K (0x0UL << 4)
  1532. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_8K (0x1UL << 4)
  1533. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_64K (0x2UL << 4)
  1534. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_2M (0x3UL << 4)
  1535. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_8M (0x4UL << 4)
  1536. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_1G (0x5UL << 4)
  1537. #define FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_VNIC_PG_SIZE_PG_1G
  1538. u8 stat_pg_size_stat_lvl;
  1539. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_MASK 0xfUL
  1540. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_SFT 0
  1541. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_LVL_0 0x0UL
  1542. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_LVL_1 0x1UL
  1543. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_LVL_2 0x2UL
  1544. #define FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_STAT_LVL_LVL_2
  1545. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_MASK 0xf0UL
  1546. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_SFT 4
  1547. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_4K (0x0UL << 4)
  1548. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_8K (0x1UL << 4)
  1549. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_64K (0x2UL << 4)
  1550. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_2M (0x3UL << 4)
  1551. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_8M (0x4UL << 4)
  1552. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_1G (0x5UL << 4)
  1553. #define FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_STAT_PG_SIZE_PG_1G
  1554. u8 tqm_sp_pg_size_tqm_sp_lvl;
  1555. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_MASK 0xfUL
  1556. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_SFT 0
  1557. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_LVL_0 0x0UL
  1558. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_LVL_1 0x1UL
  1559. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_LVL_2 0x2UL
  1560. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_SP_LVL_LVL_2
  1561. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_MASK 0xf0UL
  1562. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_SFT 4
  1563. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_4K (0x0UL << 4)
  1564. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_8K (0x1UL << 4)
  1565. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_64K (0x2UL << 4)
  1566. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_2M (0x3UL << 4)
  1567. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_8M (0x4UL << 4)
  1568. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_1G (0x5UL << 4)
  1569. #define FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_SP_PG_SIZE_PG_1G
  1570. u8 tqm_ring0_pg_size_tqm_ring0_lvl;
  1571. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_MASK 0xfUL
  1572. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_SFT 0
  1573. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_LVL_0 0x0UL
  1574. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_LVL_1 0x1UL
  1575. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_LVL_2 0x2UL
  1576. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_LVL_LVL_2
  1577. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_MASK 0xf0UL
  1578. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_SFT 4
  1579. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_4K (0x0UL << 4)
  1580. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_8K (0x1UL << 4)
  1581. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_64K (0x2UL << 4)
  1582. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_2M (0x3UL << 4)
  1583. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_8M (0x4UL << 4)
  1584. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_1G (0x5UL << 4)
  1585. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING0_PG_SIZE_PG_1G
  1586. u8 tqm_ring1_pg_size_tqm_ring1_lvl;
  1587. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_MASK 0xfUL
  1588. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_SFT 0
  1589. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_LVL_0 0x0UL
  1590. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_LVL_1 0x1UL
  1591. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_LVL_2 0x2UL
  1592. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_LVL_LVL_2
  1593. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_MASK 0xf0UL
  1594. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_SFT 4
  1595. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_4K (0x0UL << 4)
  1596. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_8K (0x1UL << 4)
  1597. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_64K (0x2UL << 4)
  1598. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_2M (0x3UL << 4)
  1599. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_8M (0x4UL << 4)
  1600. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_1G (0x5UL << 4)
  1601. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING1_PG_SIZE_PG_1G
  1602. u8 tqm_ring2_pg_size_tqm_ring2_lvl;
  1603. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_MASK 0xfUL
  1604. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_SFT 0
  1605. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_LVL_0 0x0UL
  1606. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_LVL_1 0x1UL
  1607. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_LVL_2 0x2UL
  1608. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_LVL_LVL_2
  1609. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_MASK 0xf0UL
  1610. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_SFT 4
  1611. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_4K (0x0UL << 4)
  1612. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_8K (0x1UL << 4)
  1613. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_64K (0x2UL << 4)
  1614. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_2M (0x3UL << 4)
  1615. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_8M (0x4UL << 4)
  1616. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_1G (0x5UL << 4)
  1617. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING2_PG_SIZE_PG_1G
  1618. u8 tqm_ring3_pg_size_tqm_ring3_lvl;
  1619. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_MASK 0xfUL
  1620. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_SFT 0
  1621. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_LVL_0 0x0UL
  1622. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_LVL_1 0x1UL
  1623. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_LVL_2 0x2UL
  1624. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_LVL_LVL_2
  1625. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_MASK 0xf0UL
  1626. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_SFT 4
  1627. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_4K (0x0UL << 4)
  1628. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_8K (0x1UL << 4)
  1629. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_64K (0x2UL << 4)
  1630. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_2M (0x3UL << 4)
  1631. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_8M (0x4UL << 4)
  1632. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_1G (0x5UL << 4)
  1633. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING3_PG_SIZE_PG_1G
  1634. u8 tqm_ring4_pg_size_tqm_ring4_lvl;
  1635. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_MASK 0xfUL
  1636. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_SFT 0
  1637. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_LVL_0 0x0UL
  1638. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_LVL_1 0x1UL
  1639. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_LVL_2 0x2UL
  1640. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_LVL_LVL_2
  1641. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_MASK 0xf0UL
  1642. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_SFT 4
  1643. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_4K (0x0UL << 4)
  1644. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_8K (0x1UL << 4)
  1645. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_64K (0x2UL << 4)
  1646. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_2M (0x3UL << 4)
  1647. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_8M (0x4UL << 4)
  1648. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_1G (0x5UL << 4)
  1649. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING4_PG_SIZE_PG_1G
  1650. u8 tqm_ring5_pg_size_tqm_ring5_lvl;
  1651. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_MASK 0xfUL
  1652. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_SFT 0
  1653. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_LVL_0 0x0UL
  1654. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_LVL_1 0x1UL
  1655. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_LVL_2 0x2UL
  1656. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_LVL_LVL_2
  1657. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_MASK 0xf0UL
  1658. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_SFT 4
  1659. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_4K (0x0UL << 4)
  1660. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_8K (0x1UL << 4)
  1661. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_64K (0x2UL << 4)
  1662. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_2M (0x3UL << 4)
  1663. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_8M (0x4UL << 4)
  1664. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_1G (0x5UL << 4)
  1665. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING5_PG_SIZE_PG_1G
  1666. u8 tqm_ring6_pg_size_tqm_ring6_lvl;
  1667. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_MASK 0xfUL
  1668. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_SFT 0
  1669. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_LVL_0 0x0UL
  1670. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_LVL_1 0x1UL
  1671. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_LVL_2 0x2UL
  1672. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_LVL_LVL_2
  1673. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_MASK 0xf0UL
  1674. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_SFT 4
  1675. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_4K (0x0UL << 4)
  1676. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_8K (0x1UL << 4)
  1677. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_64K (0x2UL << 4)
  1678. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_2M (0x3UL << 4)
  1679. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_8M (0x4UL << 4)
  1680. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_1G (0x5UL << 4)
  1681. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING6_PG_SIZE_PG_1G
  1682. u8 tqm_ring7_pg_size_tqm_ring7_lvl;
  1683. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_MASK 0xfUL
  1684. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_SFT 0
  1685. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_LVL_0 0x0UL
  1686. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_LVL_1 0x1UL
  1687. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_LVL_2 0x2UL
  1688. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_LVL_LVL_2
  1689. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_MASK 0xf0UL
  1690. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_SFT 4
  1691. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_4K (0x0UL << 4)
  1692. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_8K (0x1UL << 4)
  1693. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_64K (0x2UL << 4)
  1694. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_2M (0x3UL << 4)
  1695. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_8M (0x4UL << 4)
  1696. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_1G (0x5UL << 4)
  1697. #define FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TQM_RING7_PG_SIZE_PG_1G
  1698. u8 mrav_pg_size_mrav_lvl;
  1699. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_MASK 0xfUL
  1700. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_SFT 0
  1701. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_LVL_0 0x0UL
  1702. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_LVL_1 0x1UL
  1703. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_LVL_2 0x2UL
  1704. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_MRAV_LVL_LVL_2
  1705. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_MASK 0xf0UL
  1706. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_SFT 4
  1707. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_4K (0x0UL << 4)
  1708. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_8K (0x1UL << 4)
  1709. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_64K (0x2UL << 4)
  1710. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_2M (0x3UL << 4)
  1711. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_8M (0x4UL << 4)
  1712. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_1G (0x5UL << 4)
  1713. #define FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_MRAV_PG_SIZE_PG_1G
  1714. u8 tim_pg_size_tim_lvl;
  1715. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_MASK 0xfUL
  1716. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_SFT 0
  1717. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_LVL_0 0x0UL
  1718. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_LVL_1 0x1UL
  1719. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_LVL_2 0x2UL
  1720. #define FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_LAST FUNC_BACKING_STORE_CFG_REQ_TIM_LVL_LVL_2
  1721. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_MASK 0xf0UL
  1722. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_SFT 4
  1723. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_4K (0x0UL << 4)
  1724. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_8K (0x1UL << 4)
  1725. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_64K (0x2UL << 4)
  1726. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_2M (0x3UL << 4)
  1727. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_8M (0x4UL << 4)
  1728. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_1G (0x5UL << 4)
  1729. #define FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_LAST FUNC_BACKING_STORE_CFG_REQ_TIM_PG_SIZE_PG_1G
  1730. __le64 qpc_page_dir;
  1731. __le64 srq_page_dir;
  1732. __le64 cq_page_dir;
  1733. __le64 vnic_page_dir;
  1734. __le64 stat_page_dir;
  1735. __le64 tqm_sp_page_dir;
  1736. __le64 tqm_ring0_page_dir;
  1737. __le64 tqm_ring1_page_dir;
  1738. __le64 tqm_ring2_page_dir;
  1739. __le64 tqm_ring3_page_dir;
  1740. __le64 tqm_ring4_page_dir;
  1741. __le64 tqm_ring5_page_dir;
  1742. __le64 tqm_ring6_page_dir;
  1743. __le64 tqm_ring7_page_dir;
  1744. __le64 mrav_page_dir;
  1745. __le64 tim_page_dir;
  1746. __le32 qp_num_entries;
  1747. __le32 srq_num_entries;
  1748. __le32 cq_num_entries;
  1749. __le32 stat_num_entries;
  1750. __le32 tqm_sp_num_entries;
  1751. __le32 tqm_ring0_num_entries;
  1752. __le32 tqm_ring1_num_entries;
  1753. __le32 tqm_ring2_num_entries;
  1754. __le32 tqm_ring3_num_entries;
  1755. __le32 tqm_ring4_num_entries;
  1756. __le32 tqm_ring5_num_entries;
  1757. __le32 tqm_ring6_num_entries;
  1758. __le32 tqm_ring7_num_entries;
  1759. __le32 mrav_num_entries;
  1760. __le32 tim_num_entries;
  1761. __le16 qp_num_qp1_entries;
  1762. __le16 qp_num_l2_entries;
  1763. __le16 qp_entry_size;
  1764. __le16 srq_num_l2_entries;
  1765. __le16 srq_entry_size;
  1766. __le16 cq_num_l2_entries;
  1767. __le16 cq_entry_size;
  1768. __le16 vnic_num_vnic_entries;
  1769. __le16 vnic_num_ring_table_entries;
  1770. __le16 vnic_entry_size;
  1771. __le16 stat_entry_size;
  1772. __le16 tqm_entry_size;
  1773. __le16 mrav_entry_size;
  1774. __le16 tim_entry_size;
  1775. };
  1776. /* hwrm_func_backing_store_cfg_output (size:128b/16B) */
  1777. struct hwrm_func_backing_store_cfg_output {
  1778. __le16 error_code;
  1779. __le16 req_type;
  1780. __le16 seq_id;
  1781. __le16 resp_len;
  1782. u8 unused_0[7];
  1783. u8 valid;
  1784. };
  1785. /* hwrm_func_drv_if_change_input (size:192b/24B) */
  1786. struct hwrm_func_drv_if_change_input {
  1787. __le16 req_type;
  1788. __le16 cmpl_ring;
  1789. __le16 seq_id;
  1790. __le16 target_id;
  1791. __le64 resp_addr;
  1792. __le32 flags;
  1793. #define FUNC_DRV_IF_CHANGE_REQ_FLAGS_UP 0x1UL
  1794. __le32 unused;
  1795. };
  1796. /* hwrm_func_drv_if_change_output (size:128b/16B) */
  1797. struct hwrm_func_drv_if_change_output {
  1798. __le16 error_code;
  1799. __le16 req_type;
  1800. __le16 seq_id;
  1801. __le16 resp_len;
  1802. __le32 flags;
  1803. #define FUNC_DRV_IF_CHANGE_RESP_FLAGS_RESC_CHANGE 0x1UL
  1804. u8 unused_0[3];
  1805. u8 valid;
  1806. };
  1807. /* hwrm_port_phy_cfg_input (size:448b/56B) */
  1808. struct hwrm_port_phy_cfg_input {
  1809. __le16 req_type;
  1810. __le16 cmpl_ring;
  1811. __le16 seq_id;
  1812. __le16 target_id;
  1813. __le64 resp_addr;
  1814. __le32 flags;
  1815. #define PORT_PHY_CFG_REQ_FLAGS_RESET_PHY 0x1UL
  1816. #define PORT_PHY_CFG_REQ_FLAGS_DEPRECATED 0x2UL
  1817. #define PORT_PHY_CFG_REQ_FLAGS_FORCE 0x4UL
  1818. #define PORT_PHY_CFG_REQ_FLAGS_RESTART_AUTONEG 0x8UL
  1819. #define PORT_PHY_CFG_REQ_FLAGS_EEE_ENABLE 0x10UL
  1820. #define PORT_PHY_CFG_REQ_FLAGS_EEE_DISABLE 0x20UL
  1821. #define PORT_PHY_CFG_REQ_FLAGS_EEE_TX_LPI_ENABLE 0x40UL
  1822. #define PORT_PHY_CFG_REQ_FLAGS_EEE_TX_LPI_DISABLE 0x80UL
  1823. #define PORT_PHY_CFG_REQ_FLAGS_FEC_AUTONEG_ENABLE 0x100UL
  1824. #define PORT_PHY_CFG_REQ_FLAGS_FEC_AUTONEG_DISABLE 0x200UL
  1825. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE74_ENABLE 0x400UL
  1826. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE74_DISABLE 0x800UL
  1827. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE91_ENABLE 0x1000UL
  1828. #define PORT_PHY_CFG_REQ_FLAGS_FEC_CLAUSE91_DISABLE 0x2000UL
  1829. #define PORT_PHY_CFG_REQ_FLAGS_FORCE_LINK_DWN 0x4000UL
  1830. __le32 enables;
  1831. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE 0x1UL
  1832. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_DUPLEX 0x2UL
  1833. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_PAUSE 0x4UL
  1834. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED 0x8UL
  1835. #define PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK 0x10UL
  1836. #define PORT_PHY_CFG_REQ_ENABLES_WIRESPEED 0x20UL
  1837. #define PORT_PHY_CFG_REQ_ENABLES_LPBK 0x40UL
  1838. #define PORT_PHY_CFG_REQ_ENABLES_PREEMPHASIS 0x80UL
  1839. #define PORT_PHY_CFG_REQ_ENABLES_FORCE_PAUSE 0x100UL
  1840. #define PORT_PHY_CFG_REQ_ENABLES_EEE_LINK_SPEED_MASK 0x200UL
  1841. #define PORT_PHY_CFG_REQ_ENABLES_TX_LPI_TIMER 0x400UL
  1842. __le16 port_id;
  1843. __le16 force_link_speed;
  1844. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100MB 0x1UL
  1845. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_1GB 0xaUL
  1846. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_2GB 0x14UL
  1847. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_2_5GB 0x19UL
  1848. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10GB 0x64UL
  1849. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_20GB 0xc8UL
  1850. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_25GB 0xfaUL
  1851. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB 0x190UL
  1852. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB 0x1f4UL
  1853. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB 0x3e8UL
  1854. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10MB 0xffffUL
  1855. #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_LAST PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10MB
  1856. u8 auto_mode;
  1857. #define PORT_PHY_CFG_REQ_AUTO_MODE_NONE 0x0UL
  1858. #define PORT_PHY_CFG_REQ_AUTO_MODE_ALL_SPEEDS 0x1UL
  1859. #define PORT_PHY_CFG_REQ_AUTO_MODE_ONE_SPEED 0x2UL
  1860. #define PORT_PHY_CFG_REQ_AUTO_MODE_ONE_OR_BELOW 0x3UL
  1861. #define PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK 0x4UL
  1862. #define PORT_PHY_CFG_REQ_AUTO_MODE_LAST PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK
  1863. u8 auto_duplex;
  1864. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_HALF 0x0UL
  1865. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_FULL 0x1UL
  1866. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_BOTH 0x2UL
  1867. #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_LAST PORT_PHY_CFG_REQ_AUTO_DUPLEX_BOTH
  1868. u8 auto_pause;
  1869. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_TX 0x1UL
  1870. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_RX 0x2UL
  1871. #define PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE 0x4UL
  1872. u8 unused_0;
  1873. __le16 auto_link_speed;
  1874. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100MB 0x1UL
  1875. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_1GB 0xaUL
  1876. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_2GB 0x14UL
  1877. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_2_5GB 0x19UL
  1878. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10GB 0x64UL
  1879. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_20GB 0xc8UL
  1880. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_25GB 0xfaUL
  1881. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_40GB 0x190UL
  1882. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_50GB 0x1f4UL
  1883. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100GB 0x3e8UL
  1884. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10MB 0xffffUL
  1885. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_LAST PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10MB
  1886. __le16 auto_link_speed_mask;
  1887. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100MBHD 0x1UL
  1888. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100MB 0x2UL
  1889. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_1GBHD 0x4UL
  1890. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_1GB 0x8UL
  1891. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_2GB 0x10UL
  1892. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_2_5GB 0x20UL
  1893. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10GB 0x40UL
  1894. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_20GB 0x80UL
  1895. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_25GB 0x100UL
  1896. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_40GB 0x200UL
  1897. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_50GB 0x400UL
  1898. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100GB 0x800UL
  1899. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10MBHD 0x1000UL
  1900. #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10MB 0x2000UL
  1901. u8 wirespeed;
  1902. #define PORT_PHY_CFG_REQ_WIRESPEED_OFF 0x0UL
  1903. #define PORT_PHY_CFG_REQ_WIRESPEED_ON 0x1UL
  1904. #define PORT_PHY_CFG_REQ_WIRESPEED_LAST PORT_PHY_CFG_REQ_WIRESPEED_ON
  1905. u8 lpbk;
  1906. #define PORT_PHY_CFG_REQ_LPBK_NONE 0x0UL
  1907. #define PORT_PHY_CFG_REQ_LPBK_LOCAL 0x1UL
  1908. #define PORT_PHY_CFG_REQ_LPBK_REMOTE 0x2UL
  1909. #define PORT_PHY_CFG_REQ_LPBK_EXTERNAL 0x3UL
  1910. #define PORT_PHY_CFG_REQ_LPBK_LAST PORT_PHY_CFG_REQ_LPBK_EXTERNAL
  1911. u8 force_pause;
  1912. #define PORT_PHY_CFG_REQ_FORCE_PAUSE_TX 0x1UL
  1913. #define PORT_PHY_CFG_REQ_FORCE_PAUSE_RX 0x2UL
  1914. u8 unused_1;
  1915. __le32 preemphasis;
  1916. __le16 eee_link_speed_mask;
  1917. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  1918. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_100MB 0x2UL
  1919. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  1920. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_1GB 0x8UL
  1921. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  1922. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  1923. #define PORT_PHY_CFG_REQ_EEE_LINK_SPEED_MASK_10GB 0x40UL
  1924. u8 unused_2[2];
  1925. __le32 tx_lpi_timer;
  1926. #define PORT_PHY_CFG_REQ_TX_LPI_TIMER_MASK 0xffffffUL
  1927. #define PORT_PHY_CFG_REQ_TX_LPI_TIMER_SFT 0
  1928. __le32 unused_3;
  1929. };
  1930. /* hwrm_port_phy_cfg_output (size:128b/16B) */
  1931. struct hwrm_port_phy_cfg_output {
  1932. __le16 error_code;
  1933. __le16 req_type;
  1934. __le16 seq_id;
  1935. __le16 resp_len;
  1936. u8 unused_0[7];
  1937. u8 valid;
  1938. };
  1939. /* hwrm_port_phy_cfg_cmd_err (size:64b/8B) */
  1940. struct hwrm_port_phy_cfg_cmd_err {
  1941. u8 code;
  1942. #define PORT_PHY_CFG_CMD_ERR_CODE_UNKNOWN 0x0UL
  1943. #define PORT_PHY_CFG_CMD_ERR_CODE_ILLEGAL_SPEED 0x1UL
  1944. #define PORT_PHY_CFG_CMD_ERR_CODE_RETRY 0x2UL
  1945. #define PORT_PHY_CFG_CMD_ERR_CODE_LAST PORT_PHY_CFG_CMD_ERR_CODE_RETRY
  1946. u8 unused_0[7];
  1947. };
  1948. /* hwrm_port_phy_qcfg_input (size:192b/24B) */
  1949. struct hwrm_port_phy_qcfg_input {
  1950. __le16 req_type;
  1951. __le16 cmpl_ring;
  1952. __le16 seq_id;
  1953. __le16 target_id;
  1954. __le64 resp_addr;
  1955. __le16 port_id;
  1956. u8 unused_0[6];
  1957. };
  1958. /* hwrm_port_phy_qcfg_output (size:768b/96B) */
  1959. struct hwrm_port_phy_qcfg_output {
  1960. __le16 error_code;
  1961. __le16 req_type;
  1962. __le16 seq_id;
  1963. __le16 resp_len;
  1964. u8 link;
  1965. #define PORT_PHY_QCFG_RESP_LINK_NO_LINK 0x0UL
  1966. #define PORT_PHY_QCFG_RESP_LINK_SIGNAL 0x1UL
  1967. #define PORT_PHY_QCFG_RESP_LINK_LINK 0x2UL
  1968. #define PORT_PHY_QCFG_RESP_LINK_LAST PORT_PHY_QCFG_RESP_LINK_LINK
  1969. u8 unused_0;
  1970. __le16 link_speed;
  1971. #define PORT_PHY_QCFG_RESP_LINK_SPEED_100MB 0x1UL
  1972. #define PORT_PHY_QCFG_RESP_LINK_SPEED_1GB 0xaUL
  1973. #define PORT_PHY_QCFG_RESP_LINK_SPEED_2GB 0x14UL
  1974. #define PORT_PHY_QCFG_RESP_LINK_SPEED_2_5GB 0x19UL
  1975. #define PORT_PHY_QCFG_RESP_LINK_SPEED_10GB 0x64UL
  1976. #define PORT_PHY_QCFG_RESP_LINK_SPEED_20GB 0xc8UL
  1977. #define PORT_PHY_QCFG_RESP_LINK_SPEED_25GB 0xfaUL
  1978. #define PORT_PHY_QCFG_RESP_LINK_SPEED_40GB 0x190UL
  1979. #define PORT_PHY_QCFG_RESP_LINK_SPEED_50GB 0x1f4UL
  1980. #define PORT_PHY_QCFG_RESP_LINK_SPEED_100GB 0x3e8UL
  1981. #define PORT_PHY_QCFG_RESP_LINK_SPEED_10MB 0xffffUL
  1982. #define PORT_PHY_QCFG_RESP_LINK_SPEED_LAST PORT_PHY_QCFG_RESP_LINK_SPEED_10MB
  1983. u8 duplex_cfg;
  1984. #define PORT_PHY_QCFG_RESP_DUPLEX_CFG_HALF 0x0UL
  1985. #define PORT_PHY_QCFG_RESP_DUPLEX_CFG_FULL 0x1UL
  1986. #define PORT_PHY_QCFG_RESP_DUPLEX_CFG_LAST PORT_PHY_QCFG_RESP_DUPLEX_CFG_FULL
  1987. u8 pause;
  1988. #define PORT_PHY_QCFG_RESP_PAUSE_TX 0x1UL
  1989. #define PORT_PHY_QCFG_RESP_PAUSE_RX 0x2UL
  1990. __le16 support_speeds;
  1991. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100MBHD 0x1UL
  1992. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100MB 0x2UL
  1993. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_1GBHD 0x4UL
  1994. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_1GB 0x8UL
  1995. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_2GB 0x10UL
  1996. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_2_5GB 0x20UL
  1997. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10GB 0x40UL
  1998. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_20GB 0x80UL
  1999. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_25GB 0x100UL
  2000. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_40GB 0x200UL
  2001. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_50GB 0x400UL
  2002. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100GB 0x800UL
  2003. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10MBHD 0x1000UL
  2004. #define PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_10MB 0x2000UL
  2005. __le16 force_link_speed;
  2006. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_100MB 0x1UL
  2007. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_1GB 0xaUL
  2008. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_2GB 0x14UL
  2009. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_2_5GB 0x19UL
  2010. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_10GB 0x64UL
  2011. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_20GB 0xc8UL
  2012. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_25GB 0xfaUL
  2013. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_40GB 0x190UL
  2014. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_50GB 0x1f4UL
  2015. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_100GB 0x3e8UL
  2016. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_10MB 0xffffUL
  2017. #define PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_LAST PORT_PHY_QCFG_RESP_FORCE_LINK_SPEED_10MB
  2018. u8 auto_mode;
  2019. #define PORT_PHY_QCFG_RESP_AUTO_MODE_NONE 0x0UL
  2020. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ALL_SPEEDS 0x1UL
  2021. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ONE_SPEED 0x2UL
  2022. #define PORT_PHY_QCFG_RESP_AUTO_MODE_ONE_OR_BELOW 0x3UL
  2023. #define PORT_PHY_QCFG_RESP_AUTO_MODE_SPEED_MASK 0x4UL
  2024. #define PORT_PHY_QCFG_RESP_AUTO_MODE_LAST PORT_PHY_QCFG_RESP_AUTO_MODE_SPEED_MASK
  2025. u8 auto_pause;
  2026. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_TX 0x1UL
  2027. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_RX 0x2UL
  2028. #define PORT_PHY_QCFG_RESP_AUTO_PAUSE_AUTONEG_PAUSE 0x4UL
  2029. __le16 auto_link_speed;
  2030. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_100MB 0x1UL
  2031. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_1GB 0xaUL
  2032. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_2GB 0x14UL
  2033. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_2_5GB 0x19UL
  2034. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_10GB 0x64UL
  2035. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_20GB 0xc8UL
  2036. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_25GB 0xfaUL
  2037. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_40GB 0x190UL
  2038. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_50GB 0x1f4UL
  2039. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_100GB 0x3e8UL
  2040. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_10MB 0xffffUL
  2041. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_LAST PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_10MB
  2042. __le16 auto_link_speed_mask;
  2043. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100MBHD 0x1UL
  2044. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100MB 0x2UL
  2045. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_1GBHD 0x4UL
  2046. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_1GB 0x8UL
  2047. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_2GB 0x10UL
  2048. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_2_5GB 0x20UL
  2049. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10GB 0x40UL
  2050. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_20GB 0x80UL
  2051. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_25GB 0x100UL
  2052. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_40GB 0x200UL
  2053. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_50GB 0x400UL
  2054. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_100GB 0x800UL
  2055. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10MBHD 0x1000UL
  2056. #define PORT_PHY_QCFG_RESP_AUTO_LINK_SPEED_MASK_10MB 0x2000UL
  2057. u8 wirespeed;
  2058. #define PORT_PHY_QCFG_RESP_WIRESPEED_OFF 0x0UL
  2059. #define PORT_PHY_QCFG_RESP_WIRESPEED_ON 0x1UL
  2060. #define PORT_PHY_QCFG_RESP_WIRESPEED_LAST PORT_PHY_QCFG_RESP_WIRESPEED_ON
  2061. u8 lpbk;
  2062. #define PORT_PHY_QCFG_RESP_LPBK_NONE 0x0UL
  2063. #define PORT_PHY_QCFG_RESP_LPBK_LOCAL 0x1UL
  2064. #define PORT_PHY_QCFG_RESP_LPBK_REMOTE 0x2UL
  2065. #define PORT_PHY_QCFG_RESP_LPBK_EXTERNAL 0x3UL
  2066. #define PORT_PHY_QCFG_RESP_LPBK_LAST PORT_PHY_QCFG_RESP_LPBK_EXTERNAL
  2067. u8 force_pause;
  2068. #define PORT_PHY_QCFG_RESP_FORCE_PAUSE_TX 0x1UL
  2069. #define PORT_PHY_QCFG_RESP_FORCE_PAUSE_RX 0x2UL
  2070. u8 module_status;
  2071. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NONE 0x0UL
  2072. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_DISABLETX 0x1UL
  2073. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_WARNINGMSG 0x2UL
  2074. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_PWRDOWN 0x3UL
  2075. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NOTINSERTED 0x4UL
  2076. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_NOTAPPLICABLE 0xffUL
  2077. #define PORT_PHY_QCFG_RESP_MODULE_STATUS_LAST PORT_PHY_QCFG_RESP_MODULE_STATUS_NOTAPPLICABLE
  2078. __le32 preemphasis;
  2079. u8 phy_maj;
  2080. u8 phy_min;
  2081. u8 phy_bld;
  2082. u8 phy_type;
  2083. #define PORT_PHY_QCFG_RESP_PHY_TYPE_UNKNOWN 0x0UL
  2084. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASECR 0x1UL
  2085. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR4 0x2UL
  2086. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASELR 0x3UL
  2087. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASESR 0x4UL
  2088. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR2 0x5UL
  2089. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKX 0x6UL
  2090. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASEKR 0x7UL
  2091. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASET 0x8UL
  2092. #define PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE 0x9UL
  2093. #define PORT_PHY_QCFG_RESP_PHY_TYPE_SGMIIEXTPHY 0xaUL
  2094. #define PORT_PHY_QCFG_RESP_PHY_TYPE_25G_BASECR_CA_L 0xbUL
  2095. #define PORT_PHY_QCFG_RESP_PHY_TYPE_25G_BASECR_CA_S 0xcUL
  2096. #define PORT_PHY_QCFG_RESP_PHY_TYPE_25G_BASECR_CA_N 0xdUL
  2097. #define PORT_PHY_QCFG_RESP_PHY_TYPE_25G_BASESR 0xeUL
  2098. #define PORT_PHY_QCFG_RESP_PHY_TYPE_100G_BASECR4 0xfUL
  2099. #define PORT_PHY_QCFG_RESP_PHY_TYPE_100G_BASESR4 0x10UL
  2100. #define PORT_PHY_QCFG_RESP_PHY_TYPE_100G_BASELR4 0x11UL
  2101. #define PORT_PHY_QCFG_RESP_PHY_TYPE_100G_BASEER4 0x12UL
  2102. #define PORT_PHY_QCFG_RESP_PHY_TYPE_100G_BASESR10 0x13UL
  2103. #define PORT_PHY_QCFG_RESP_PHY_TYPE_40G_BASECR4 0x14UL
  2104. #define PORT_PHY_QCFG_RESP_PHY_TYPE_40G_BASESR4 0x15UL
  2105. #define PORT_PHY_QCFG_RESP_PHY_TYPE_40G_BASELR4 0x16UL
  2106. #define PORT_PHY_QCFG_RESP_PHY_TYPE_40G_BASEER4 0x17UL
  2107. #define PORT_PHY_QCFG_RESP_PHY_TYPE_40G_ACTIVE_CABLE 0x18UL
  2108. #define PORT_PHY_QCFG_RESP_PHY_TYPE_1G_BASET 0x19UL
  2109. #define PORT_PHY_QCFG_RESP_PHY_TYPE_1G_BASESX 0x1aUL
  2110. #define PORT_PHY_QCFG_RESP_PHY_TYPE_1G_BASECX 0x1bUL
  2111. #define PORT_PHY_QCFG_RESP_PHY_TYPE_LAST PORT_PHY_QCFG_RESP_PHY_TYPE_1G_BASECX
  2112. u8 media_type;
  2113. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_UNKNOWN 0x0UL
  2114. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP 0x1UL
  2115. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_DAC 0x2UL
  2116. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_FIBRE 0x3UL
  2117. #define PORT_PHY_QCFG_RESP_MEDIA_TYPE_LAST PORT_PHY_QCFG_RESP_MEDIA_TYPE_FIBRE
  2118. u8 xcvr_pkg_type;
  2119. #define PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_XCVR_INTERNAL 0x1UL
  2120. #define PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_XCVR_EXTERNAL 0x2UL
  2121. #define PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_LAST PORT_PHY_QCFG_RESP_XCVR_PKG_TYPE_XCVR_EXTERNAL
  2122. u8 eee_config_phy_addr;
  2123. #define PORT_PHY_QCFG_RESP_PHY_ADDR_MASK 0x1fUL
  2124. #define PORT_PHY_QCFG_RESP_PHY_ADDR_SFT 0
  2125. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_MASK 0xe0UL
  2126. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_SFT 5
  2127. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_ENABLED 0x20UL
  2128. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_ACTIVE 0x40UL
  2129. #define PORT_PHY_QCFG_RESP_EEE_CONFIG_EEE_TX_LPI 0x80UL
  2130. u8 parallel_detect;
  2131. #define PORT_PHY_QCFG_RESP_PARALLEL_DETECT 0x1UL
  2132. __le16 link_partner_adv_speeds;
  2133. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100MBHD 0x1UL
  2134. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100MB 0x2UL
  2135. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_1GBHD 0x4UL
  2136. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_1GB 0x8UL
  2137. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_2GB 0x10UL
  2138. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_2_5GB 0x20UL
  2139. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10GB 0x40UL
  2140. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_20GB 0x80UL
  2141. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_25GB 0x100UL
  2142. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_40GB 0x200UL
  2143. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_50GB 0x400UL
  2144. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_100GB 0x800UL
  2145. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10MBHD 0x1000UL
  2146. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_SPEEDS_10MB 0x2000UL
  2147. u8 link_partner_adv_auto_mode;
  2148. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_NONE 0x0UL
  2149. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ALL_SPEEDS 0x1UL
  2150. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ONE_SPEED 0x2UL
  2151. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_ONE_OR_BELOW 0x3UL
  2152. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK 0x4UL
  2153. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_LAST PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK
  2154. u8 link_partner_adv_pause;
  2155. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_PAUSE_TX 0x1UL
  2156. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_PAUSE_RX 0x2UL
  2157. __le16 adv_eee_link_speed_mask;
  2158. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  2159. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_100MB 0x2UL
  2160. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  2161. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_1GB 0x8UL
  2162. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  2163. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  2164. #define PORT_PHY_QCFG_RESP_ADV_EEE_LINK_SPEED_MASK_10GB 0x40UL
  2165. __le16 link_partner_adv_eee_link_speed_mask;
  2166. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD1 0x1UL
  2167. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_100MB 0x2UL
  2168. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD2 0x4UL
  2169. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_1GB 0x8UL
  2170. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD3 0x10UL
  2171. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD4 0x20UL
  2172. #define PORT_PHY_QCFG_RESP_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_10GB 0x40UL
  2173. __le32 xcvr_identifier_type_tx_lpi_timer;
  2174. #define PORT_PHY_QCFG_RESP_TX_LPI_TIMER_MASK 0xffffffUL
  2175. #define PORT_PHY_QCFG_RESP_TX_LPI_TIMER_SFT 0
  2176. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_MASK 0xff000000UL
  2177. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_SFT 24
  2178. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_UNKNOWN (0x0UL << 24)
  2179. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_SFP (0x3UL << 24)
  2180. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFP (0xcUL << 24)
  2181. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFPPLUS (0xdUL << 24)
  2182. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFP28 (0x11UL << 24)
  2183. #define PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_LAST PORT_PHY_QCFG_RESP_XCVR_IDENTIFIER_TYPE_QSFP28
  2184. __le16 fec_cfg;
  2185. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED 0x1UL
  2186. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_SUPPORTED 0x2UL
  2187. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_ENABLED 0x4UL
  2188. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_SUPPORTED 0x8UL
  2189. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_ENABLED 0x10UL
  2190. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_SUPPORTED 0x20UL
  2191. #define PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_ENABLED 0x40UL
  2192. u8 duplex_state;
  2193. #define PORT_PHY_QCFG_RESP_DUPLEX_STATE_HALF 0x0UL
  2194. #define PORT_PHY_QCFG_RESP_DUPLEX_STATE_FULL 0x1UL
  2195. #define PORT_PHY_QCFG_RESP_DUPLEX_STATE_LAST PORT_PHY_QCFG_RESP_DUPLEX_STATE_FULL
  2196. u8 option_flags;
  2197. #define PORT_PHY_QCFG_RESP_OPTION_FLAGS_MEDIA_AUTO_DETECT 0x1UL
  2198. char phy_vendor_name[16];
  2199. char phy_vendor_partnumber[16];
  2200. u8 unused_2[7];
  2201. u8 valid;
  2202. };
  2203. /* hwrm_port_mac_cfg_input (size:320b/40B) */
  2204. struct hwrm_port_mac_cfg_input {
  2205. __le16 req_type;
  2206. __le16 cmpl_ring;
  2207. __le16 seq_id;
  2208. __le16 target_id;
  2209. __le64 resp_addr;
  2210. __le32 flags;
  2211. #define PORT_MAC_CFG_REQ_FLAGS_MATCH_LINK 0x1UL
  2212. #define PORT_MAC_CFG_REQ_FLAGS_VLAN_PRI2COS_ENABLE 0x2UL
  2213. #define PORT_MAC_CFG_REQ_FLAGS_TUNNEL_PRI2COS_ENABLE 0x4UL
  2214. #define PORT_MAC_CFG_REQ_FLAGS_IP_DSCP2COS_ENABLE 0x8UL
  2215. #define PORT_MAC_CFG_REQ_FLAGS_PTP_RX_TS_CAPTURE_ENABLE 0x10UL
  2216. #define PORT_MAC_CFG_REQ_FLAGS_PTP_RX_TS_CAPTURE_DISABLE 0x20UL
  2217. #define PORT_MAC_CFG_REQ_FLAGS_PTP_TX_TS_CAPTURE_ENABLE 0x40UL
  2218. #define PORT_MAC_CFG_REQ_FLAGS_PTP_TX_TS_CAPTURE_DISABLE 0x80UL
  2219. #define PORT_MAC_CFG_REQ_FLAGS_OOB_WOL_ENABLE 0x100UL
  2220. #define PORT_MAC_CFG_REQ_FLAGS_OOB_WOL_DISABLE 0x200UL
  2221. #define PORT_MAC_CFG_REQ_FLAGS_VLAN_PRI2COS_DISABLE 0x400UL
  2222. #define PORT_MAC_CFG_REQ_FLAGS_TUNNEL_PRI2COS_DISABLE 0x800UL
  2223. #define PORT_MAC_CFG_REQ_FLAGS_IP_DSCP2COS_DISABLE 0x1000UL
  2224. __le32 enables;
  2225. #define PORT_MAC_CFG_REQ_ENABLES_IPG 0x1UL
  2226. #define PORT_MAC_CFG_REQ_ENABLES_LPBK 0x2UL
  2227. #define PORT_MAC_CFG_REQ_ENABLES_VLAN_PRI2COS_MAP_PRI 0x4UL
  2228. #define PORT_MAC_CFG_REQ_ENABLES_TUNNEL_PRI2COS_MAP_PRI 0x10UL
  2229. #define PORT_MAC_CFG_REQ_ENABLES_DSCP2COS_MAP_PRI 0x20UL
  2230. #define PORT_MAC_CFG_REQ_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE 0x40UL
  2231. #define PORT_MAC_CFG_REQ_ENABLES_TX_TS_CAPTURE_PTP_MSG_TYPE 0x80UL
  2232. #define PORT_MAC_CFG_REQ_ENABLES_COS_FIELD_CFG 0x100UL
  2233. __le16 port_id;
  2234. u8 ipg;
  2235. u8 lpbk;
  2236. #define PORT_MAC_CFG_REQ_LPBK_NONE 0x0UL
  2237. #define PORT_MAC_CFG_REQ_LPBK_LOCAL 0x1UL
  2238. #define PORT_MAC_CFG_REQ_LPBK_REMOTE 0x2UL
  2239. #define PORT_MAC_CFG_REQ_LPBK_LAST PORT_MAC_CFG_REQ_LPBK_REMOTE
  2240. u8 vlan_pri2cos_map_pri;
  2241. u8 reserved1;
  2242. u8 tunnel_pri2cos_map_pri;
  2243. u8 dscp2pri_map_pri;
  2244. __le16 rx_ts_capture_ptp_msg_type;
  2245. __le16 tx_ts_capture_ptp_msg_type;
  2246. u8 cos_field_cfg;
  2247. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_RSVD1 0x1UL
  2248. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_MASK 0x6UL
  2249. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_SFT 1
  2250. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST (0x0UL << 1)
  2251. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER (0x1UL << 1)
  2252. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST (0x2UL << 1)
  2253. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED (0x3UL << 1)
  2254. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_LAST PORT_MAC_CFG_REQ_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
  2255. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK 0x18UL
  2256. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT 3
  2257. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST (0x0UL << 3)
  2258. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER (0x1UL << 3)
  2259. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST (0x2UL << 3)
  2260. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED (0x3UL << 3)
  2261. #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
  2262. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_DEFAULT_COS_MASK 0xe0UL
  2263. #define PORT_MAC_CFG_REQ_COS_FIELD_CFG_DEFAULT_COS_SFT 5
  2264. u8 unused_0[3];
  2265. };
  2266. /* hwrm_port_mac_cfg_output (size:128b/16B) */
  2267. struct hwrm_port_mac_cfg_output {
  2268. __le16 error_code;
  2269. __le16 req_type;
  2270. __le16 seq_id;
  2271. __le16 resp_len;
  2272. __le16 mru;
  2273. __le16 mtu;
  2274. u8 ipg;
  2275. u8 lpbk;
  2276. #define PORT_MAC_CFG_RESP_LPBK_NONE 0x0UL
  2277. #define PORT_MAC_CFG_RESP_LPBK_LOCAL 0x1UL
  2278. #define PORT_MAC_CFG_RESP_LPBK_REMOTE 0x2UL
  2279. #define PORT_MAC_CFG_RESP_LPBK_LAST PORT_MAC_CFG_RESP_LPBK_REMOTE
  2280. u8 unused_0;
  2281. u8 valid;
  2282. };
  2283. /* hwrm_port_mac_ptp_qcfg_input (size:192b/24B) */
  2284. struct hwrm_port_mac_ptp_qcfg_input {
  2285. __le16 req_type;
  2286. __le16 cmpl_ring;
  2287. __le16 seq_id;
  2288. __le16 target_id;
  2289. __le64 resp_addr;
  2290. __le16 port_id;
  2291. u8 unused_0[6];
  2292. };
  2293. /* hwrm_port_mac_ptp_qcfg_output (size:640b/80B) */
  2294. struct hwrm_port_mac_ptp_qcfg_output {
  2295. __le16 error_code;
  2296. __le16 req_type;
  2297. __le16 seq_id;
  2298. __le16 resp_len;
  2299. u8 flags;
  2300. #define PORT_MAC_PTP_QCFG_RESP_FLAGS_DIRECT_ACCESS 0x1UL
  2301. #define PORT_MAC_PTP_QCFG_RESP_FLAGS_HWRM_ACCESS 0x2UL
  2302. u8 unused_0[3];
  2303. __le32 rx_ts_reg_off_lower;
  2304. __le32 rx_ts_reg_off_upper;
  2305. __le32 rx_ts_reg_off_seq_id;
  2306. __le32 rx_ts_reg_off_src_id_0;
  2307. __le32 rx_ts_reg_off_src_id_1;
  2308. __le32 rx_ts_reg_off_src_id_2;
  2309. __le32 rx_ts_reg_off_domain_id;
  2310. __le32 rx_ts_reg_off_fifo;
  2311. __le32 rx_ts_reg_off_fifo_adv;
  2312. __le32 rx_ts_reg_off_granularity;
  2313. __le32 tx_ts_reg_off_lower;
  2314. __le32 tx_ts_reg_off_upper;
  2315. __le32 tx_ts_reg_off_seq_id;
  2316. __le32 tx_ts_reg_off_fifo;
  2317. __le32 tx_ts_reg_off_granularity;
  2318. u8 unused_1[7];
  2319. u8 valid;
  2320. };
  2321. /* tx_port_stats (size:3264b/408B) */
  2322. struct tx_port_stats {
  2323. __le64 tx_64b_frames;
  2324. __le64 tx_65b_127b_frames;
  2325. __le64 tx_128b_255b_frames;
  2326. __le64 tx_256b_511b_frames;
  2327. __le64 tx_512b_1023b_frames;
  2328. __le64 tx_1024b_1518b_frames;
  2329. __le64 tx_good_vlan_frames;
  2330. __le64 tx_1519b_2047b_frames;
  2331. __le64 tx_2048b_4095b_frames;
  2332. __le64 tx_4096b_9216b_frames;
  2333. __le64 tx_9217b_16383b_frames;
  2334. __le64 tx_good_frames;
  2335. __le64 tx_total_frames;
  2336. __le64 tx_ucast_frames;
  2337. __le64 tx_mcast_frames;
  2338. __le64 tx_bcast_frames;
  2339. __le64 tx_pause_frames;
  2340. __le64 tx_pfc_frames;
  2341. __le64 tx_jabber_frames;
  2342. __le64 tx_fcs_err_frames;
  2343. __le64 tx_control_frames;
  2344. __le64 tx_oversz_frames;
  2345. __le64 tx_single_dfrl_frames;
  2346. __le64 tx_multi_dfrl_frames;
  2347. __le64 tx_single_coll_frames;
  2348. __le64 tx_multi_coll_frames;
  2349. __le64 tx_late_coll_frames;
  2350. __le64 tx_excessive_coll_frames;
  2351. __le64 tx_frag_frames;
  2352. __le64 tx_err;
  2353. __le64 tx_tagged_frames;
  2354. __le64 tx_dbl_tagged_frames;
  2355. __le64 tx_runt_frames;
  2356. __le64 tx_fifo_underruns;
  2357. __le64 tx_pfc_ena_frames_pri0;
  2358. __le64 tx_pfc_ena_frames_pri1;
  2359. __le64 tx_pfc_ena_frames_pri2;
  2360. __le64 tx_pfc_ena_frames_pri3;
  2361. __le64 tx_pfc_ena_frames_pri4;
  2362. __le64 tx_pfc_ena_frames_pri5;
  2363. __le64 tx_pfc_ena_frames_pri6;
  2364. __le64 tx_pfc_ena_frames_pri7;
  2365. __le64 tx_eee_lpi_events;
  2366. __le64 tx_eee_lpi_duration;
  2367. __le64 tx_llfc_logical_msgs;
  2368. __le64 tx_hcfc_msgs;
  2369. __le64 tx_total_collisions;
  2370. __le64 tx_bytes;
  2371. __le64 tx_xthol_frames;
  2372. __le64 tx_stat_discard;
  2373. __le64 tx_stat_error;
  2374. };
  2375. /* rx_port_stats (size:4224b/528B) */
  2376. struct rx_port_stats {
  2377. __le64 rx_64b_frames;
  2378. __le64 rx_65b_127b_frames;
  2379. __le64 rx_128b_255b_frames;
  2380. __le64 rx_256b_511b_frames;
  2381. __le64 rx_512b_1023b_frames;
  2382. __le64 rx_1024b_1518b_frames;
  2383. __le64 rx_good_vlan_frames;
  2384. __le64 rx_1519b_2047b_frames;
  2385. __le64 rx_2048b_4095b_frames;
  2386. __le64 rx_4096b_9216b_frames;
  2387. __le64 rx_9217b_16383b_frames;
  2388. __le64 rx_total_frames;
  2389. __le64 rx_ucast_frames;
  2390. __le64 rx_mcast_frames;
  2391. __le64 rx_bcast_frames;
  2392. __le64 rx_fcs_err_frames;
  2393. __le64 rx_ctrl_frames;
  2394. __le64 rx_pause_frames;
  2395. __le64 rx_pfc_frames;
  2396. __le64 rx_unsupported_opcode_frames;
  2397. __le64 rx_unsupported_da_pausepfc_frames;
  2398. __le64 rx_wrong_sa_frames;
  2399. __le64 rx_align_err_frames;
  2400. __le64 rx_oor_len_frames;
  2401. __le64 rx_code_err_frames;
  2402. __le64 rx_false_carrier_frames;
  2403. __le64 rx_ovrsz_frames;
  2404. __le64 rx_jbr_frames;
  2405. __le64 rx_mtu_err_frames;
  2406. __le64 rx_match_crc_frames;
  2407. __le64 rx_promiscuous_frames;
  2408. __le64 rx_tagged_frames;
  2409. __le64 rx_double_tagged_frames;
  2410. __le64 rx_trunc_frames;
  2411. __le64 rx_good_frames;
  2412. __le64 rx_pfc_xon2xoff_frames_pri0;
  2413. __le64 rx_pfc_xon2xoff_frames_pri1;
  2414. __le64 rx_pfc_xon2xoff_frames_pri2;
  2415. __le64 rx_pfc_xon2xoff_frames_pri3;
  2416. __le64 rx_pfc_xon2xoff_frames_pri4;
  2417. __le64 rx_pfc_xon2xoff_frames_pri5;
  2418. __le64 rx_pfc_xon2xoff_frames_pri6;
  2419. __le64 rx_pfc_xon2xoff_frames_pri7;
  2420. __le64 rx_pfc_ena_frames_pri0;
  2421. __le64 rx_pfc_ena_frames_pri1;
  2422. __le64 rx_pfc_ena_frames_pri2;
  2423. __le64 rx_pfc_ena_frames_pri3;
  2424. __le64 rx_pfc_ena_frames_pri4;
  2425. __le64 rx_pfc_ena_frames_pri5;
  2426. __le64 rx_pfc_ena_frames_pri6;
  2427. __le64 rx_pfc_ena_frames_pri7;
  2428. __le64 rx_sch_crc_err_frames;
  2429. __le64 rx_undrsz_frames;
  2430. __le64 rx_frag_frames;
  2431. __le64 rx_eee_lpi_events;
  2432. __le64 rx_eee_lpi_duration;
  2433. __le64 rx_llfc_physical_msgs;
  2434. __le64 rx_llfc_logical_msgs;
  2435. __le64 rx_llfc_msgs_with_crc_err;
  2436. __le64 rx_hcfc_msgs;
  2437. __le64 rx_hcfc_msgs_with_crc_err;
  2438. __le64 rx_bytes;
  2439. __le64 rx_runt_bytes;
  2440. __le64 rx_runt_frames;
  2441. __le64 rx_stat_discard;
  2442. __le64 rx_stat_err;
  2443. };
  2444. /* hwrm_port_qstats_input (size:320b/40B) */
  2445. struct hwrm_port_qstats_input {
  2446. __le16 req_type;
  2447. __le16 cmpl_ring;
  2448. __le16 seq_id;
  2449. __le16 target_id;
  2450. __le64 resp_addr;
  2451. __le16 port_id;
  2452. u8 unused_0[6];
  2453. __le64 tx_stat_host_addr;
  2454. __le64 rx_stat_host_addr;
  2455. };
  2456. /* hwrm_port_qstats_output (size:128b/16B) */
  2457. struct hwrm_port_qstats_output {
  2458. __le16 error_code;
  2459. __le16 req_type;
  2460. __le16 seq_id;
  2461. __le16 resp_len;
  2462. __le16 tx_stat_size;
  2463. __le16 rx_stat_size;
  2464. u8 unused_0[3];
  2465. u8 valid;
  2466. };
  2467. /* tx_port_stats_ext (size:2048b/256B) */
  2468. struct tx_port_stats_ext {
  2469. __le64 tx_bytes_cos0;
  2470. __le64 tx_bytes_cos1;
  2471. __le64 tx_bytes_cos2;
  2472. __le64 tx_bytes_cos3;
  2473. __le64 tx_bytes_cos4;
  2474. __le64 tx_bytes_cos5;
  2475. __le64 tx_bytes_cos6;
  2476. __le64 tx_bytes_cos7;
  2477. __le64 tx_packets_cos0;
  2478. __le64 tx_packets_cos1;
  2479. __le64 tx_packets_cos2;
  2480. __le64 tx_packets_cos3;
  2481. __le64 tx_packets_cos4;
  2482. __le64 tx_packets_cos5;
  2483. __le64 tx_packets_cos6;
  2484. __le64 tx_packets_cos7;
  2485. __le64 pfc_pri0_tx_duration_us;
  2486. __le64 pfc_pri0_tx_transitions;
  2487. __le64 pfc_pri1_tx_duration_us;
  2488. __le64 pfc_pri1_tx_transitions;
  2489. __le64 pfc_pri2_tx_duration_us;
  2490. __le64 pfc_pri2_tx_transitions;
  2491. __le64 pfc_pri3_tx_duration_us;
  2492. __le64 pfc_pri3_tx_transitions;
  2493. __le64 pfc_pri4_tx_duration_us;
  2494. __le64 pfc_pri4_tx_transitions;
  2495. __le64 pfc_pri5_tx_duration_us;
  2496. __le64 pfc_pri5_tx_transitions;
  2497. __le64 pfc_pri6_tx_duration_us;
  2498. __le64 pfc_pri6_tx_transitions;
  2499. __le64 pfc_pri7_tx_duration_us;
  2500. __le64 pfc_pri7_tx_transitions;
  2501. };
  2502. /* rx_port_stats_ext (size:2368b/296B) */
  2503. struct rx_port_stats_ext {
  2504. __le64 link_down_events;
  2505. __le64 continuous_pause_events;
  2506. __le64 resume_pause_events;
  2507. __le64 continuous_roce_pause_events;
  2508. __le64 resume_roce_pause_events;
  2509. __le64 rx_bytes_cos0;
  2510. __le64 rx_bytes_cos1;
  2511. __le64 rx_bytes_cos2;
  2512. __le64 rx_bytes_cos3;
  2513. __le64 rx_bytes_cos4;
  2514. __le64 rx_bytes_cos5;
  2515. __le64 rx_bytes_cos6;
  2516. __le64 rx_bytes_cos7;
  2517. __le64 rx_packets_cos0;
  2518. __le64 rx_packets_cos1;
  2519. __le64 rx_packets_cos2;
  2520. __le64 rx_packets_cos3;
  2521. __le64 rx_packets_cos4;
  2522. __le64 rx_packets_cos5;
  2523. __le64 rx_packets_cos6;
  2524. __le64 rx_packets_cos7;
  2525. __le64 pfc_pri0_rx_duration_us;
  2526. __le64 pfc_pri0_rx_transitions;
  2527. __le64 pfc_pri1_rx_duration_us;
  2528. __le64 pfc_pri1_rx_transitions;
  2529. __le64 pfc_pri2_rx_duration_us;
  2530. __le64 pfc_pri2_rx_transitions;
  2531. __le64 pfc_pri3_rx_duration_us;
  2532. __le64 pfc_pri3_rx_transitions;
  2533. __le64 pfc_pri4_rx_duration_us;
  2534. __le64 pfc_pri4_rx_transitions;
  2535. __le64 pfc_pri5_rx_duration_us;
  2536. __le64 pfc_pri5_rx_transitions;
  2537. __le64 pfc_pri6_rx_duration_us;
  2538. __le64 pfc_pri6_rx_transitions;
  2539. __le64 pfc_pri7_rx_duration_us;
  2540. __le64 pfc_pri7_rx_transitions;
  2541. };
  2542. /* hwrm_port_qstats_ext_input (size:320b/40B) */
  2543. struct hwrm_port_qstats_ext_input {
  2544. __le16 req_type;
  2545. __le16 cmpl_ring;
  2546. __le16 seq_id;
  2547. __le16 target_id;
  2548. __le64 resp_addr;
  2549. __le16 port_id;
  2550. __le16 tx_stat_size;
  2551. __le16 rx_stat_size;
  2552. u8 unused_0[2];
  2553. __le64 tx_stat_host_addr;
  2554. __le64 rx_stat_host_addr;
  2555. };
  2556. /* hwrm_port_qstats_ext_output (size:128b/16B) */
  2557. struct hwrm_port_qstats_ext_output {
  2558. __le16 error_code;
  2559. __le16 req_type;
  2560. __le16 seq_id;
  2561. __le16 resp_len;
  2562. __le16 tx_stat_size;
  2563. __le16 rx_stat_size;
  2564. __le16 total_active_cos_queues;
  2565. u8 unused_0;
  2566. u8 valid;
  2567. };
  2568. /* hwrm_port_lpbk_qstats_input (size:128b/16B) */
  2569. struct hwrm_port_lpbk_qstats_input {
  2570. __le16 req_type;
  2571. __le16 cmpl_ring;
  2572. __le16 seq_id;
  2573. __le16 target_id;
  2574. __le64 resp_addr;
  2575. };
  2576. /* hwrm_port_lpbk_qstats_output (size:768b/96B) */
  2577. struct hwrm_port_lpbk_qstats_output {
  2578. __le16 error_code;
  2579. __le16 req_type;
  2580. __le16 seq_id;
  2581. __le16 resp_len;
  2582. __le64 lpbk_ucast_frames;
  2583. __le64 lpbk_mcast_frames;
  2584. __le64 lpbk_bcast_frames;
  2585. __le64 lpbk_ucast_bytes;
  2586. __le64 lpbk_mcast_bytes;
  2587. __le64 lpbk_bcast_bytes;
  2588. __le64 tx_stat_discard;
  2589. __le64 tx_stat_error;
  2590. __le64 rx_stat_discard;
  2591. __le64 rx_stat_error;
  2592. u8 unused_0[7];
  2593. u8 valid;
  2594. };
  2595. /* hwrm_port_clr_stats_input (size:192b/24B) */
  2596. struct hwrm_port_clr_stats_input {
  2597. __le16 req_type;
  2598. __le16 cmpl_ring;
  2599. __le16 seq_id;
  2600. __le16 target_id;
  2601. __le64 resp_addr;
  2602. __le16 port_id;
  2603. u8 unused_0[6];
  2604. };
  2605. /* hwrm_port_clr_stats_output (size:128b/16B) */
  2606. struct hwrm_port_clr_stats_output {
  2607. __le16 error_code;
  2608. __le16 req_type;
  2609. __le16 seq_id;
  2610. __le16 resp_len;
  2611. u8 unused_0[7];
  2612. u8 valid;
  2613. };
  2614. /* hwrm_port_lpbk_clr_stats_input (size:128b/16B) */
  2615. struct hwrm_port_lpbk_clr_stats_input {
  2616. __le16 req_type;
  2617. __le16 cmpl_ring;
  2618. __le16 seq_id;
  2619. __le16 target_id;
  2620. __le64 resp_addr;
  2621. };
  2622. /* hwrm_port_lpbk_clr_stats_output (size:128b/16B) */
  2623. struct hwrm_port_lpbk_clr_stats_output {
  2624. __le16 error_code;
  2625. __le16 req_type;
  2626. __le16 seq_id;
  2627. __le16 resp_len;
  2628. u8 unused_0[7];
  2629. u8 valid;
  2630. };
  2631. /* hwrm_port_phy_qcaps_input (size:192b/24B) */
  2632. struct hwrm_port_phy_qcaps_input {
  2633. __le16 req_type;
  2634. __le16 cmpl_ring;
  2635. __le16 seq_id;
  2636. __le16 target_id;
  2637. __le64 resp_addr;
  2638. __le16 port_id;
  2639. u8 unused_0[6];
  2640. };
  2641. /* hwrm_port_phy_qcaps_output (size:192b/24B) */
  2642. struct hwrm_port_phy_qcaps_output {
  2643. __le16 error_code;
  2644. __le16 req_type;
  2645. __le16 seq_id;
  2646. __le16 resp_len;
  2647. u8 flags;
  2648. #define PORT_PHY_QCAPS_RESP_FLAGS_EEE_SUPPORTED 0x1UL
  2649. #define PORT_PHY_QCAPS_RESP_FLAGS_EXTERNAL_LPBK_SUPPORTED 0x2UL
  2650. #define PORT_PHY_QCAPS_RESP_FLAGS_RSVD1_MASK 0xfcUL
  2651. #define PORT_PHY_QCAPS_RESP_FLAGS_RSVD1_SFT 2
  2652. u8 port_cnt;
  2653. #define PORT_PHY_QCAPS_RESP_PORT_CNT_UNKNOWN 0x0UL
  2654. #define PORT_PHY_QCAPS_RESP_PORT_CNT_1 0x1UL
  2655. #define PORT_PHY_QCAPS_RESP_PORT_CNT_2 0x2UL
  2656. #define PORT_PHY_QCAPS_RESP_PORT_CNT_3 0x3UL
  2657. #define PORT_PHY_QCAPS_RESP_PORT_CNT_4 0x4UL
  2658. #define PORT_PHY_QCAPS_RESP_PORT_CNT_LAST PORT_PHY_QCAPS_RESP_PORT_CNT_4
  2659. __le16 supported_speeds_force_mode;
  2660. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100MBHD 0x1UL
  2661. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100MB 0x2UL
  2662. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_1GBHD 0x4UL
  2663. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_1GB 0x8UL
  2664. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_2GB 0x10UL
  2665. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_2_5GB 0x20UL
  2666. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10GB 0x40UL
  2667. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_20GB 0x80UL
  2668. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_25GB 0x100UL
  2669. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_40GB 0x200UL
  2670. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_50GB 0x400UL
  2671. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_100GB 0x800UL
  2672. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10MBHD 0x1000UL
  2673. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_FORCE_MODE_10MB 0x2000UL
  2674. __le16 supported_speeds_auto_mode;
  2675. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100MBHD 0x1UL
  2676. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100MB 0x2UL
  2677. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_1GBHD 0x4UL
  2678. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_1GB 0x8UL
  2679. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_2GB 0x10UL
  2680. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_2_5GB 0x20UL
  2681. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10GB 0x40UL
  2682. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_20GB 0x80UL
  2683. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_25GB 0x100UL
  2684. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_40GB 0x200UL
  2685. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_50GB 0x400UL
  2686. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_100GB 0x800UL
  2687. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10MBHD 0x1000UL
  2688. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_AUTO_MODE_10MB 0x2000UL
  2689. __le16 supported_speeds_eee_mode;
  2690. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD1 0x1UL
  2691. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_100MB 0x2UL
  2692. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD2 0x4UL
  2693. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_1GB 0x8UL
  2694. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD3 0x10UL
  2695. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_RSVD4 0x20UL
  2696. #define PORT_PHY_QCAPS_RESP_SUPPORTED_SPEEDS_EEE_MODE_10GB 0x40UL
  2697. __le32 tx_lpi_timer_low;
  2698. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_LOW_MASK 0xffffffUL
  2699. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_LOW_SFT 0
  2700. #define PORT_PHY_QCAPS_RESP_RSVD2_MASK 0xff000000UL
  2701. #define PORT_PHY_QCAPS_RESP_RSVD2_SFT 24
  2702. __le32 valid_tx_lpi_timer_high;
  2703. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_HIGH_MASK 0xffffffUL
  2704. #define PORT_PHY_QCAPS_RESP_TX_LPI_TIMER_HIGH_SFT 0
  2705. #define PORT_PHY_QCAPS_RESP_VALID_MASK 0xff000000UL
  2706. #define PORT_PHY_QCAPS_RESP_VALID_SFT 24
  2707. };
  2708. /* hwrm_port_phy_i2c_read_input (size:320b/40B) */
  2709. struct hwrm_port_phy_i2c_read_input {
  2710. __le16 req_type;
  2711. __le16 cmpl_ring;
  2712. __le16 seq_id;
  2713. __le16 target_id;
  2714. __le64 resp_addr;
  2715. __le32 flags;
  2716. __le32 enables;
  2717. #define PORT_PHY_I2C_READ_REQ_ENABLES_PAGE_OFFSET 0x1UL
  2718. __le16 port_id;
  2719. u8 i2c_slave_addr;
  2720. u8 unused_0;
  2721. __le16 page_number;
  2722. __le16 page_offset;
  2723. u8 data_length;
  2724. u8 unused_1[7];
  2725. };
  2726. /* hwrm_port_phy_i2c_read_output (size:640b/80B) */
  2727. struct hwrm_port_phy_i2c_read_output {
  2728. __le16 error_code;
  2729. __le16 req_type;
  2730. __le16 seq_id;
  2731. __le16 resp_len;
  2732. __le32 data[16];
  2733. u8 unused_0[7];
  2734. u8 valid;
  2735. };
  2736. /* hwrm_port_led_cfg_input (size:512b/64B) */
  2737. struct hwrm_port_led_cfg_input {
  2738. __le16 req_type;
  2739. __le16 cmpl_ring;
  2740. __le16 seq_id;
  2741. __le16 target_id;
  2742. __le64 resp_addr;
  2743. __le32 enables;
  2744. #define PORT_LED_CFG_REQ_ENABLES_LED0_ID 0x1UL
  2745. #define PORT_LED_CFG_REQ_ENABLES_LED0_STATE 0x2UL
  2746. #define PORT_LED_CFG_REQ_ENABLES_LED0_COLOR 0x4UL
  2747. #define PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_ON 0x8UL
  2748. #define PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_OFF 0x10UL
  2749. #define PORT_LED_CFG_REQ_ENABLES_LED0_GROUP_ID 0x20UL
  2750. #define PORT_LED_CFG_REQ_ENABLES_LED1_ID 0x40UL
  2751. #define PORT_LED_CFG_REQ_ENABLES_LED1_STATE 0x80UL
  2752. #define PORT_LED_CFG_REQ_ENABLES_LED1_COLOR 0x100UL
  2753. #define PORT_LED_CFG_REQ_ENABLES_LED1_BLINK_ON 0x200UL
  2754. #define PORT_LED_CFG_REQ_ENABLES_LED1_BLINK_OFF 0x400UL
  2755. #define PORT_LED_CFG_REQ_ENABLES_LED1_GROUP_ID 0x800UL
  2756. #define PORT_LED_CFG_REQ_ENABLES_LED2_ID 0x1000UL
  2757. #define PORT_LED_CFG_REQ_ENABLES_LED2_STATE 0x2000UL
  2758. #define PORT_LED_CFG_REQ_ENABLES_LED2_COLOR 0x4000UL
  2759. #define PORT_LED_CFG_REQ_ENABLES_LED2_BLINK_ON 0x8000UL
  2760. #define PORT_LED_CFG_REQ_ENABLES_LED2_BLINK_OFF 0x10000UL
  2761. #define PORT_LED_CFG_REQ_ENABLES_LED2_GROUP_ID 0x20000UL
  2762. #define PORT_LED_CFG_REQ_ENABLES_LED3_ID 0x40000UL
  2763. #define PORT_LED_CFG_REQ_ENABLES_LED3_STATE 0x80000UL
  2764. #define PORT_LED_CFG_REQ_ENABLES_LED3_COLOR 0x100000UL
  2765. #define PORT_LED_CFG_REQ_ENABLES_LED3_BLINK_ON 0x200000UL
  2766. #define PORT_LED_CFG_REQ_ENABLES_LED3_BLINK_OFF 0x400000UL
  2767. #define PORT_LED_CFG_REQ_ENABLES_LED3_GROUP_ID 0x800000UL
  2768. __le16 port_id;
  2769. u8 num_leds;
  2770. u8 rsvd;
  2771. u8 led0_id;
  2772. u8 led0_state;
  2773. #define PORT_LED_CFG_REQ_LED0_STATE_DEFAULT 0x0UL
  2774. #define PORT_LED_CFG_REQ_LED0_STATE_OFF 0x1UL
  2775. #define PORT_LED_CFG_REQ_LED0_STATE_ON 0x2UL
  2776. #define PORT_LED_CFG_REQ_LED0_STATE_BLINK 0x3UL
  2777. #define PORT_LED_CFG_REQ_LED0_STATE_BLINKALT 0x4UL
  2778. #define PORT_LED_CFG_REQ_LED0_STATE_LAST PORT_LED_CFG_REQ_LED0_STATE_BLINKALT
  2779. u8 led0_color;
  2780. #define PORT_LED_CFG_REQ_LED0_COLOR_DEFAULT 0x0UL
  2781. #define PORT_LED_CFG_REQ_LED0_COLOR_AMBER 0x1UL
  2782. #define PORT_LED_CFG_REQ_LED0_COLOR_GREEN 0x2UL
  2783. #define PORT_LED_CFG_REQ_LED0_COLOR_GREENAMBER 0x3UL
  2784. #define PORT_LED_CFG_REQ_LED0_COLOR_LAST PORT_LED_CFG_REQ_LED0_COLOR_GREENAMBER
  2785. u8 unused_0;
  2786. __le16 led0_blink_on;
  2787. __le16 led0_blink_off;
  2788. u8 led0_group_id;
  2789. u8 rsvd0;
  2790. u8 led1_id;
  2791. u8 led1_state;
  2792. #define PORT_LED_CFG_REQ_LED1_STATE_DEFAULT 0x0UL
  2793. #define PORT_LED_CFG_REQ_LED1_STATE_OFF 0x1UL
  2794. #define PORT_LED_CFG_REQ_LED1_STATE_ON 0x2UL
  2795. #define PORT_LED_CFG_REQ_LED1_STATE_BLINK 0x3UL
  2796. #define PORT_LED_CFG_REQ_LED1_STATE_BLINKALT 0x4UL
  2797. #define PORT_LED_CFG_REQ_LED1_STATE_LAST PORT_LED_CFG_REQ_LED1_STATE_BLINKALT
  2798. u8 led1_color;
  2799. #define PORT_LED_CFG_REQ_LED1_COLOR_DEFAULT 0x0UL
  2800. #define PORT_LED_CFG_REQ_LED1_COLOR_AMBER 0x1UL
  2801. #define PORT_LED_CFG_REQ_LED1_COLOR_GREEN 0x2UL
  2802. #define PORT_LED_CFG_REQ_LED1_COLOR_GREENAMBER 0x3UL
  2803. #define PORT_LED_CFG_REQ_LED1_COLOR_LAST PORT_LED_CFG_REQ_LED1_COLOR_GREENAMBER
  2804. u8 unused_1;
  2805. __le16 led1_blink_on;
  2806. __le16 led1_blink_off;
  2807. u8 led1_group_id;
  2808. u8 rsvd1;
  2809. u8 led2_id;
  2810. u8 led2_state;
  2811. #define PORT_LED_CFG_REQ_LED2_STATE_DEFAULT 0x0UL
  2812. #define PORT_LED_CFG_REQ_LED2_STATE_OFF 0x1UL
  2813. #define PORT_LED_CFG_REQ_LED2_STATE_ON 0x2UL
  2814. #define PORT_LED_CFG_REQ_LED2_STATE_BLINK 0x3UL
  2815. #define PORT_LED_CFG_REQ_LED2_STATE_BLINKALT 0x4UL
  2816. #define PORT_LED_CFG_REQ_LED2_STATE_LAST PORT_LED_CFG_REQ_LED2_STATE_BLINKALT
  2817. u8 led2_color;
  2818. #define PORT_LED_CFG_REQ_LED2_COLOR_DEFAULT 0x0UL
  2819. #define PORT_LED_CFG_REQ_LED2_COLOR_AMBER 0x1UL
  2820. #define PORT_LED_CFG_REQ_LED2_COLOR_GREEN 0x2UL
  2821. #define PORT_LED_CFG_REQ_LED2_COLOR_GREENAMBER 0x3UL
  2822. #define PORT_LED_CFG_REQ_LED2_COLOR_LAST PORT_LED_CFG_REQ_LED2_COLOR_GREENAMBER
  2823. u8 unused_2;
  2824. __le16 led2_blink_on;
  2825. __le16 led2_blink_off;
  2826. u8 led2_group_id;
  2827. u8 rsvd2;
  2828. u8 led3_id;
  2829. u8 led3_state;
  2830. #define PORT_LED_CFG_REQ_LED3_STATE_DEFAULT 0x0UL
  2831. #define PORT_LED_CFG_REQ_LED3_STATE_OFF 0x1UL
  2832. #define PORT_LED_CFG_REQ_LED3_STATE_ON 0x2UL
  2833. #define PORT_LED_CFG_REQ_LED3_STATE_BLINK 0x3UL
  2834. #define PORT_LED_CFG_REQ_LED3_STATE_BLINKALT 0x4UL
  2835. #define PORT_LED_CFG_REQ_LED3_STATE_LAST PORT_LED_CFG_REQ_LED3_STATE_BLINKALT
  2836. u8 led3_color;
  2837. #define PORT_LED_CFG_REQ_LED3_COLOR_DEFAULT 0x0UL
  2838. #define PORT_LED_CFG_REQ_LED3_COLOR_AMBER 0x1UL
  2839. #define PORT_LED_CFG_REQ_LED3_COLOR_GREEN 0x2UL
  2840. #define PORT_LED_CFG_REQ_LED3_COLOR_GREENAMBER 0x3UL
  2841. #define PORT_LED_CFG_REQ_LED3_COLOR_LAST PORT_LED_CFG_REQ_LED3_COLOR_GREENAMBER
  2842. u8 unused_3;
  2843. __le16 led3_blink_on;
  2844. __le16 led3_blink_off;
  2845. u8 led3_group_id;
  2846. u8 rsvd3;
  2847. };
  2848. /* hwrm_port_led_cfg_output (size:128b/16B) */
  2849. struct hwrm_port_led_cfg_output {
  2850. __le16 error_code;
  2851. __le16 req_type;
  2852. __le16 seq_id;
  2853. __le16 resp_len;
  2854. u8 unused_0[7];
  2855. u8 valid;
  2856. };
  2857. /* hwrm_port_led_qcfg_input (size:192b/24B) */
  2858. struct hwrm_port_led_qcfg_input {
  2859. __le16 req_type;
  2860. __le16 cmpl_ring;
  2861. __le16 seq_id;
  2862. __le16 target_id;
  2863. __le64 resp_addr;
  2864. __le16 port_id;
  2865. u8 unused_0[6];
  2866. };
  2867. /* hwrm_port_led_qcfg_output (size:448b/56B) */
  2868. struct hwrm_port_led_qcfg_output {
  2869. __le16 error_code;
  2870. __le16 req_type;
  2871. __le16 seq_id;
  2872. __le16 resp_len;
  2873. u8 num_leds;
  2874. u8 led0_id;
  2875. u8 led0_type;
  2876. #define PORT_LED_QCFG_RESP_LED0_TYPE_SPEED 0x0UL
  2877. #define PORT_LED_QCFG_RESP_LED0_TYPE_ACTIVITY 0x1UL
  2878. #define PORT_LED_QCFG_RESP_LED0_TYPE_INVALID 0xffUL
  2879. #define PORT_LED_QCFG_RESP_LED0_TYPE_LAST PORT_LED_QCFG_RESP_LED0_TYPE_INVALID
  2880. u8 led0_state;
  2881. #define PORT_LED_QCFG_RESP_LED0_STATE_DEFAULT 0x0UL
  2882. #define PORT_LED_QCFG_RESP_LED0_STATE_OFF 0x1UL
  2883. #define PORT_LED_QCFG_RESP_LED0_STATE_ON 0x2UL
  2884. #define PORT_LED_QCFG_RESP_LED0_STATE_BLINK 0x3UL
  2885. #define PORT_LED_QCFG_RESP_LED0_STATE_BLINKALT 0x4UL
  2886. #define PORT_LED_QCFG_RESP_LED0_STATE_LAST PORT_LED_QCFG_RESP_LED0_STATE_BLINKALT
  2887. u8 led0_color;
  2888. #define PORT_LED_QCFG_RESP_LED0_COLOR_DEFAULT 0x0UL
  2889. #define PORT_LED_QCFG_RESP_LED0_COLOR_AMBER 0x1UL
  2890. #define PORT_LED_QCFG_RESP_LED0_COLOR_GREEN 0x2UL
  2891. #define PORT_LED_QCFG_RESP_LED0_COLOR_GREENAMBER 0x3UL
  2892. #define PORT_LED_QCFG_RESP_LED0_COLOR_LAST PORT_LED_QCFG_RESP_LED0_COLOR_GREENAMBER
  2893. u8 unused_0;
  2894. __le16 led0_blink_on;
  2895. __le16 led0_blink_off;
  2896. u8 led0_group_id;
  2897. u8 led1_id;
  2898. u8 led1_type;
  2899. #define PORT_LED_QCFG_RESP_LED1_TYPE_SPEED 0x0UL
  2900. #define PORT_LED_QCFG_RESP_LED1_TYPE_ACTIVITY 0x1UL
  2901. #define PORT_LED_QCFG_RESP_LED1_TYPE_INVALID 0xffUL
  2902. #define PORT_LED_QCFG_RESP_LED1_TYPE_LAST PORT_LED_QCFG_RESP_LED1_TYPE_INVALID
  2903. u8 led1_state;
  2904. #define PORT_LED_QCFG_RESP_LED1_STATE_DEFAULT 0x0UL
  2905. #define PORT_LED_QCFG_RESP_LED1_STATE_OFF 0x1UL
  2906. #define PORT_LED_QCFG_RESP_LED1_STATE_ON 0x2UL
  2907. #define PORT_LED_QCFG_RESP_LED1_STATE_BLINK 0x3UL
  2908. #define PORT_LED_QCFG_RESP_LED1_STATE_BLINKALT 0x4UL
  2909. #define PORT_LED_QCFG_RESP_LED1_STATE_LAST PORT_LED_QCFG_RESP_LED1_STATE_BLINKALT
  2910. u8 led1_color;
  2911. #define PORT_LED_QCFG_RESP_LED1_COLOR_DEFAULT 0x0UL
  2912. #define PORT_LED_QCFG_RESP_LED1_COLOR_AMBER 0x1UL
  2913. #define PORT_LED_QCFG_RESP_LED1_COLOR_GREEN 0x2UL
  2914. #define PORT_LED_QCFG_RESP_LED1_COLOR_GREENAMBER 0x3UL
  2915. #define PORT_LED_QCFG_RESP_LED1_COLOR_LAST PORT_LED_QCFG_RESP_LED1_COLOR_GREENAMBER
  2916. u8 unused_1;
  2917. __le16 led1_blink_on;
  2918. __le16 led1_blink_off;
  2919. u8 led1_group_id;
  2920. u8 led2_id;
  2921. u8 led2_type;
  2922. #define PORT_LED_QCFG_RESP_LED2_TYPE_SPEED 0x0UL
  2923. #define PORT_LED_QCFG_RESP_LED2_TYPE_ACTIVITY 0x1UL
  2924. #define PORT_LED_QCFG_RESP_LED2_TYPE_INVALID 0xffUL
  2925. #define PORT_LED_QCFG_RESP_LED2_TYPE_LAST PORT_LED_QCFG_RESP_LED2_TYPE_INVALID
  2926. u8 led2_state;
  2927. #define PORT_LED_QCFG_RESP_LED2_STATE_DEFAULT 0x0UL
  2928. #define PORT_LED_QCFG_RESP_LED2_STATE_OFF 0x1UL
  2929. #define PORT_LED_QCFG_RESP_LED2_STATE_ON 0x2UL
  2930. #define PORT_LED_QCFG_RESP_LED2_STATE_BLINK 0x3UL
  2931. #define PORT_LED_QCFG_RESP_LED2_STATE_BLINKALT 0x4UL
  2932. #define PORT_LED_QCFG_RESP_LED2_STATE_LAST PORT_LED_QCFG_RESP_LED2_STATE_BLINKALT
  2933. u8 led2_color;
  2934. #define PORT_LED_QCFG_RESP_LED2_COLOR_DEFAULT 0x0UL
  2935. #define PORT_LED_QCFG_RESP_LED2_COLOR_AMBER 0x1UL
  2936. #define PORT_LED_QCFG_RESP_LED2_COLOR_GREEN 0x2UL
  2937. #define PORT_LED_QCFG_RESP_LED2_COLOR_GREENAMBER 0x3UL
  2938. #define PORT_LED_QCFG_RESP_LED2_COLOR_LAST PORT_LED_QCFG_RESP_LED2_COLOR_GREENAMBER
  2939. u8 unused_2;
  2940. __le16 led2_blink_on;
  2941. __le16 led2_blink_off;
  2942. u8 led2_group_id;
  2943. u8 led3_id;
  2944. u8 led3_type;
  2945. #define PORT_LED_QCFG_RESP_LED3_TYPE_SPEED 0x0UL
  2946. #define PORT_LED_QCFG_RESP_LED3_TYPE_ACTIVITY 0x1UL
  2947. #define PORT_LED_QCFG_RESP_LED3_TYPE_INVALID 0xffUL
  2948. #define PORT_LED_QCFG_RESP_LED3_TYPE_LAST PORT_LED_QCFG_RESP_LED3_TYPE_INVALID
  2949. u8 led3_state;
  2950. #define PORT_LED_QCFG_RESP_LED3_STATE_DEFAULT 0x0UL
  2951. #define PORT_LED_QCFG_RESP_LED3_STATE_OFF 0x1UL
  2952. #define PORT_LED_QCFG_RESP_LED3_STATE_ON 0x2UL
  2953. #define PORT_LED_QCFG_RESP_LED3_STATE_BLINK 0x3UL
  2954. #define PORT_LED_QCFG_RESP_LED3_STATE_BLINKALT 0x4UL
  2955. #define PORT_LED_QCFG_RESP_LED3_STATE_LAST PORT_LED_QCFG_RESP_LED3_STATE_BLINKALT
  2956. u8 led3_color;
  2957. #define PORT_LED_QCFG_RESP_LED3_COLOR_DEFAULT 0x0UL
  2958. #define PORT_LED_QCFG_RESP_LED3_COLOR_AMBER 0x1UL
  2959. #define PORT_LED_QCFG_RESP_LED3_COLOR_GREEN 0x2UL
  2960. #define PORT_LED_QCFG_RESP_LED3_COLOR_GREENAMBER 0x3UL
  2961. #define PORT_LED_QCFG_RESP_LED3_COLOR_LAST PORT_LED_QCFG_RESP_LED3_COLOR_GREENAMBER
  2962. u8 unused_3;
  2963. __le16 led3_blink_on;
  2964. __le16 led3_blink_off;
  2965. u8 led3_group_id;
  2966. u8 unused_4[6];
  2967. u8 valid;
  2968. };
  2969. /* hwrm_port_led_qcaps_input (size:192b/24B) */
  2970. struct hwrm_port_led_qcaps_input {
  2971. __le16 req_type;
  2972. __le16 cmpl_ring;
  2973. __le16 seq_id;
  2974. __le16 target_id;
  2975. __le64 resp_addr;
  2976. __le16 port_id;
  2977. u8 unused_0[6];
  2978. };
  2979. /* hwrm_port_led_qcaps_output (size:384b/48B) */
  2980. struct hwrm_port_led_qcaps_output {
  2981. __le16 error_code;
  2982. __le16 req_type;
  2983. __le16 seq_id;
  2984. __le16 resp_len;
  2985. u8 num_leds;
  2986. u8 unused[3];
  2987. u8 led0_id;
  2988. u8 led0_type;
  2989. #define PORT_LED_QCAPS_RESP_LED0_TYPE_SPEED 0x0UL
  2990. #define PORT_LED_QCAPS_RESP_LED0_TYPE_ACTIVITY 0x1UL
  2991. #define PORT_LED_QCAPS_RESP_LED0_TYPE_INVALID 0xffUL
  2992. #define PORT_LED_QCAPS_RESP_LED0_TYPE_LAST PORT_LED_QCAPS_RESP_LED0_TYPE_INVALID
  2993. u8 led0_group_id;
  2994. u8 unused_0;
  2995. __le16 led0_state_caps;
  2996. #define PORT_LED_QCAPS_RESP_LED0_STATE_CAPS_ENABLED 0x1UL
  2997. #define PORT_LED_QCAPS_RESP_LED0_STATE_CAPS_OFF_SUPPORTED 0x2UL
  2998. #define PORT_LED_QCAPS_RESP_LED0_STATE_CAPS_ON_SUPPORTED 0x4UL
  2999. #define PORT_LED_QCAPS_RESP_LED0_STATE_CAPS_BLINK_SUPPORTED 0x8UL
  3000. #define PORT_LED_QCAPS_RESP_LED0_STATE_CAPS_BLINK_ALT_SUPPORTED 0x10UL
  3001. __le16 led0_color_caps;
  3002. #define PORT_LED_QCAPS_RESP_LED0_COLOR_CAPS_RSVD 0x1UL
  3003. #define PORT_LED_QCAPS_RESP_LED0_COLOR_CAPS_AMBER_SUPPORTED 0x2UL
  3004. #define PORT_LED_QCAPS_RESP_LED0_COLOR_CAPS_GREEN_SUPPORTED 0x4UL
  3005. u8 led1_id;
  3006. u8 led1_type;
  3007. #define PORT_LED_QCAPS_RESP_LED1_TYPE_SPEED 0x0UL
  3008. #define PORT_LED_QCAPS_RESP_LED1_TYPE_ACTIVITY 0x1UL
  3009. #define PORT_LED_QCAPS_RESP_LED1_TYPE_INVALID 0xffUL
  3010. #define PORT_LED_QCAPS_RESP_LED1_TYPE_LAST PORT_LED_QCAPS_RESP_LED1_TYPE_INVALID
  3011. u8 led1_group_id;
  3012. u8 unused_1;
  3013. __le16 led1_state_caps;
  3014. #define PORT_LED_QCAPS_RESP_LED1_STATE_CAPS_ENABLED 0x1UL
  3015. #define PORT_LED_QCAPS_RESP_LED1_STATE_CAPS_OFF_SUPPORTED 0x2UL
  3016. #define PORT_LED_QCAPS_RESP_LED1_STATE_CAPS_ON_SUPPORTED 0x4UL
  3017. #define PORT_LED_QCAPS_RESP_LED1_STATE_CAPS_BLINK_SUPPORTED 0x8UL
  3018. #define PORT_LED_QCAPS_RESP_LED1_STATE_CAPS_BLINK_ALT_SUPPORTED 0x10UL
  3019. __le16 led1_color_caps;
  3020. #define PORT_LED_QCAPS_RESP_LED1_COLOR_CAPS_RSVD 0x1UL
  3021. #define PORT_LED_QCAPS_RESP_LED1_COLOR_CAPS_AMBER_SUPPORTED 0x2UL
  3022. #define PORT_LED_QCAPS_RESP_LED1_COLOR_CAPS_GREEN_SUPPORTED 0x4UL
  3023. u8 led2_id;
  3024. u8 led2_type;
  3025. #define PORT_LED_QCAPS_RESP_LED2_TYPE_SPEED 0x0UL
  3026. #define PORT_LED_QCAPS_RESP_LED2_TYPE_ACTIVITY 0x1UL
  3027. #define PORT_LED_QCAPS_RESP_LED2_TYPE_INVALID 0xffUL
  3028. #define PORT_LED_QCAPS_RESP_LED2_TYPE_LAST PORT_LED_QCAPS_RESP_LED2_TYPE_INVALID
  3029. u8 led2_group_id;
  3030. u8 unused_2;
  3031. __le16 led2_state_caps;
  3032. #define PORT_LED_QCAPS_RESP_LED2_STATE_CAPS_ENABLED 0x1UL
  3033. #define PORT_LED_QCAPS_RESP_LED2_STATE_CAPS_OFF_SUPPORTED 0x2UL
  3034. #define PORT_LED_QCAPS_RESP_LED2_STATE_CAPS_ON_SUPPORTED 0x4UL
  3035. #define PORT_LED_QCAPS_RESP_LED2_STATE_CAPS_BLINK_SUPPORTED 0x8UL
  3036. #define PORT_LED_QCAPS_RESP_LED2_STATE_CAPS_BLINK_ALT_SUPPORTED 0x10UL
  3037. __le16 led2_color_caps;
  3038. #define PORT_LED_QCAPS_RESP_LED2_COLOR_CAPS_RSVD 0x1UL
  3039. #define PORT_LED_QCAPS_RESP_LED2_COLOR_CAPS_AMBER_SUPPORTED 0x2UL
  3040. #define PORT_LED_QCAPS_RESP_LED2_COLOR_CAPS_GREEN_SUPPORTED 0x4UL
  3041. u8 led3_id;
  3042. u8 led3_type;
  3043. #define PORT_LED_QCAPS_RESP_LED3_TYPE_SPEED 0x0UL
  3044. #define PORT_LED_QCAPS_RESP_LED3_TYPE_ACTIVITY 0x1UL
  3045. #define PORT_LED_QCAPS_RESP_LED3_TYPE_INVALID 0xffUL
  3046. #define PORT_LED_QCAPS_RESP_LED3_TYPE_LAST PORT_LED_QCAPS_RESP_LED3_TYPE_INVALID
  3047. u8 led3_group_id;
  3048. u8 unused_3;
  3049. __le16 led3_state_caps;
  3050. #define PORT_LED_QCAPS_RESP_LED3_STATE_CAPS_ENABLED 0x1UL
  3051. #define PORT_LED_QCAPS_RESP_LED3_STATE_CAPS_OFF_SUPPORTED 0x2UL
  3052. #define PORT_LED_QCAPS_RESP_LED3_STATE_CAPS_ON_SUPPORTED 0x4UL
  3053. #define PORT_LED_QCAPS_RESP_LED3_STATE_CAPS_BLINK_SUPPORTED 0x8UL
  3054. #define PORT_LED_QCAPS_RESP_LED3_STATE_CAPS_BLINK_ALT_SUPPORTED 0x10UL
  3055. __le16 led3_color_caps;
  3056. #define PORT_LED_QCAPS_RESP_LED3_COLOR_CAPS_RSVD 0x1UL
  3057. #define PORT_LED_QCAPS_RESP_LED3_COLOR_CAPS_AMBER_SUPPORTED 0x2UL
  3058. #define PORT_LED_QCAPS_RESP_LED3_COLOR_CAPS_GREEN_SUPPORTED 0x4UL
  3059. u8 unused_4[3];
  3060. u8 valid;
  3061. };
  3062. /* hwrm_queue_qportcfg_input (size:192b/24B) */
  3063. struct hwrm_queue_qportcfg_input {
  3064. __le16 req_type;
  3065. __le16 cmpl_ring;
  3066. __le16 seq_id;
  3067. __le16 target_id;
  3068. __le64 resp_addr;
  3069. __le32 flags;
  3070. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH 0x1UL
  3071. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_TX 0x0UL
  3072. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_RX 0x1UL
  3073. #define QUEUE_QPORTCFG_REQ_FLAGS_PATH_LAST QUEUE_QPORTCFG_REQ_FLAGS_PATH_RX
  3074. __le16 port_id;
  3075. u8 drv_qmap_cap;
  3076. #define QUEUE_QPORTCFG_REQ_DRV_QMAP_CAP_DISABLED 0x0UL
  3077. #define QUEUE_QPORTCFG_REQ_DRV_QMAP_CAP_ENABLED 0x1UL
  3078. #define QUEUE_QPORTCFG_REQ_DRV_QMAP_CAP_LAST QUEUE_QPORTCFG_REQ_DRV_QMAP_CAP_ENABLED
  3079. u8 unused_0;
  3080. };
  3081. /* hwrm_queue_qportcfg_output (size:256b/32B) */
  3082. struct hwrm_queue_qportcfg_output {
  3083. __le16 error_code;
  3084. __le16 req_type;
  3085. __le16 seq_id;
  3086. __le16 resp_len;
  3087. u8 max_configurable_queues;
  3088. u8 max_configurable_lossless_queues;
  3089. u8 queue_cfg_allowed;
  3090. u8 queue_cfg_info;
  3091. #define QUEUE_QPORTCFG_RESP_QUEUE_CFG_INFO_ASYM_CFG 0x1UL
  3092. u8 queue_pfcenable_cfg_allowed;
  3093. u8 queue_pri2cos_cfg_allowed;
  3094. u8 queue_cos2bw_cfg_allowed;
  3095. u8 queue_id0;
  3096. u8 queue_id0_service_profile;
  3097. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSY 0x0UL
  3098. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS 0x1UL
  3099. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3100. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3101. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3102. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN 0xffUL
  3103. #define QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN
  3104. u8 queue_id1;
  3105. u8 queue_id1_service_profile;
  3106. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSY 0x0UL
  3107. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS 0x1UL
  3108. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3109. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3110. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3111. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN 0xffUL
  3112. #define QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN
  3113. u8 queue_id2;
  3114. u8 queue_id2_service_profile;
  3115. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSY 0x0UL
  3116. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS 0x1UL
  3117. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3118. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3119. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3120. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN 0xffUL
  3121. #define QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN
  3122. u8 queue_id3;
  3123. u8 queue_id3_service_profile;
  3124. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSY 0x0UL
  3125. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS 0x1UL
  3126. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3127. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3128. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3129. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN 0xffUL
  3130. #define QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN
  3131. u8 queue_id4;
  3132. u8 queue_id4_service_profile;
  3133. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSY 0x0UL
  3134. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS 0x1UL
  3135. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3136. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3137. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3138. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN 0xffUL
  3139. #define QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN
  3140. u8 queue_id5;
  3141. u8 queue_id5_service_profile;
  3142. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSY 0x0UL
  3143. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS 0x1UL
  3144. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3145. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3146. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3147. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN 0xffUL
  3148. #define QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN
  3149. u8 queue_id6;
  3150. u8 queue_id6_service_profile;
  3151. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSY 0x0UL
  3152. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS 0x1UL
  3153. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3154. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3155. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3156. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN 0xffUL
  3157. #define QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN
  3158. u8 queue_id7;
  3159. u8 queue_id7_service_profile;
  3160. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSY 0x0UL
  3161. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS 0x1UL
  3162. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_ROCE 0x1UL
  3163. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSY_ROCE_CNP 0x2UL
  3164. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_NIC 0x3UL
  3165. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN 0xffUL
  3166. #define QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_LAST QUEUE_QPORTCFG_RESP_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN
  3167. u8 valid;
  3168. };
  3169. /* hwrm_queue_cfg_input (size:320b/40B) */
  3170. struct hwrm_queue_cfg_input {
  3171. __le16 req_type;
  3172. __le16 cmpl_ring;
  3173. __le16 seq_id;
  3174. __le16 target_id;
  3175. __le64 resp_addr;
  3176. __le32 flags;
  3177. #define QUEUE_CFG_REQ_FLAGS_PATH_MASK 0x3UL
  3178. #define QUEUE_CFG_REQ_FLAGS_PATH_SFT 0
  3179. #define QUEUE_CFG_REQ_FLAGS_PATH_TX 0x0UL
  3180. #define QUEUE_CFG_REQ_FLAGS_PATH_RX 0x1UL
  3181. #define QUEUE_CFG_REQ_FLAGS_PATH_BIDIR 0x2UL
  3182. #define QUEUE_CFG_REQ_FLAGS_PATH_LAST QUEUE_CFG_REQ_FLAGS_PATH_BIDIR
  3183. __le32 enables;
  3184. #define QUEUE_CFG_REQ_ENABLES_DFLT_LEN 0x1UL
  3185. #define QUEUE_CFG_REQ_ENABLES_SERVICE_PROFILE 0x2UL
  3186. __le32 queue_id;
  3187. __le32 dflt_len;
  3188. u8 service_profile;
  3189. #define QUEUE_CFG_REQ_SERVICE_PROFILE_LOSSY 0x0UL
  3190. #define QUEUE_CFG_REQ_SERVICE_PROFILE_LOSSLESS 0x1UL
  3191. #define QUEUE_CFG_REQ_SERVICE_PROFILE_UNKNOWN 0xffUL
  3192. #define QUEUE_CFG_REQ_SERVICE_PROFILE_LAST QUEUE_CFG_REQ_SERVICE_PROFILE_UNKNOWN
  3193. u8 unused_0[7];
  3194. };
  3195. /* hwrm_queue_cfg_output (size:128b/16B) */
  3196. struct hwrm_queue_cfg_output {
  3197. __le16 error_code;
  3198. __le16 req_type;
  3199. __le16 seq_id;
  3200. __le16 resp_len;
  3201. u8 unused_0[7];
  3202. u8 valid;
  3203. };
  3204. /* hwrm_queue_pfcenable_qcfg_input (size:192b/24B) */
  3205. struct hwrm_queue_pfcenable_qcfg_input {
  3206. __le16 req_type;
  3207. __le16 cmpl_ring;
  3208. __le16 seq_id;
  3209. __le16 target_id;
  3210. __le64 resp_addr;
  3211. __le16 port_id;
  3212. u8 unused_0[6];
  3213. };
  3214. /* hwrm_queue_pfcenable_qcfg_output (size:128b/16B) */
  3215. struct hwrm_queue_pfcenable_qcfg_output {
  3216. __le16 error_code;
  3217. __le16 req_type;
  3218. __le16 seq_id;
  3219. __le16 resp_len;
  3220. __le32 flags;
  3221. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI0_PFC_ENABLED 0x1UL
  3222. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI1_PFC_ENABLED 0x2UL
  3223. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI2_PFC_ENABLED 0x4UL
  3224. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI3_PFC_ENABLED 0x8UL
  3225. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI4_PFC_ENABLED 0x10UL
  3226. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI5_PFC_ENABLED 0x20UL
  3227. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI6_PFC_ENABLED 0x40UL
  3228. #define QUEUE_PFCENABLE_QCFG_RESP_FLAGS_PRI7_PFC_ENABLED 0x80UL
  3229. u8 unused_0[3];
  3230. u8 valid;
  3231. };
  3232. /* hwrm_queue_pfcenable_cfg_input (size:192b/24B) */
  3233. struct hwrm_queue_pfcenable_cfg_input {
  3234. __le16 req_type;
  3235. __le16 cmpl_ring;
  3236. __le16 seq_id;
  3237. __le16 target_id;
  3238. __le64 resp_addr;
  3239. __le32 flags;
  3240. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI0_PFC_ENABLED 0x1UL
  3241. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI1_PFC_ENABLED 0x2UL
  3242. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI2_PFC_ENABLED 0x4UL
  3243. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI3_PFC_ENABLED 0x8UL
  3244. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI4_PFC_ENABLED 0x10UL
  3245. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI5_PFC_ENABLED 0x20UL
  3246. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI6_PFC_ENABLED 0x40UL
  3247. #define QUEUE_PFCENABLE_CFG_REQ_FLAGS_PRI7_PFC_ENABLED 0x80UL
  3248. __le16 port_id;
  3249. u8 unused_0[2];
  3250. };
  3251. /* hwrm_queue_pfcenable_cfg_output (size:128b/16B) */
  3252. struct hwrm_queue_pfcenable_cfg_output {
  3253. __le16 error_code;
  3254. __le16 req_type;
  3255. __le16 seq_id;
  3256. __le16 resp_len;
  3257. u8 unused_0[7];
  3258. u8 valid;
  3259. };
  3260. /* hwrm_queue_pri2cos_qcfg_input (size:192b/24B) */
  3261. struct hwrm_queue_pri2cos_qcfg_input {
  3262. __le16 req_type;
  3263. __le16 cmpl_ring;
  3264. __le16 seq_id;
  3265. __le16 target_id;
  3266. __le64 resp_addr;
  3267. __le32 flags;
  3268. #define QUEUE_PRI2COS_QCFG_REQ_FLAGS_PATH 0x1UL
  3269. #define QUEUE_PRI2COS_QCFG_REQ_FLAGS_PATH_TX 0x0UL
  3270. #define QUEUE_PRI2COS_QCFG_REQ_FLAGS_PATH_RX 0x1UL
  3271. #define QUEUE_PRI2COS_QCFG_REQ_FLAGS_PATH_LAST QUEUE_PRI2COS_QCFG_REQ_FLAGS_PATH_RX
  3272. #define QUEUE_PRI2COS_QCFG_REQ_FLAGS_IVLAN 0x2UL
  3273. u8 port_id;
  3274. u8 unused_0[3];
  3275. };
  3276. /* hwrm_queue_pri2cos_qcfg_output (size:192b/24B) */
  3277. struct hwrm_queue_pri2cos_qcfg_output {
  3278. __le16 error_code;
  3279. __le16 req_type;
  3280. __le16 seq_id;
  3281. __le16 resp_len;
  3282. u8 pri0_cos_queue_id;
  3283. u8 pri1_cos_queue_id;
  3284. u8 pri2_cos_queue_id;
  3285. u8 pri3_cos_queue_id;
  3286. u8 pri4_cos_queue_id;
  3287. u8 pri5_cos_queue_id;
  3288. u8 pri6_cos_queue_id;
  3289. u8 pri7_cos_queue_id;
  3290. u8 queue_cfg_info;
  3291. #define QUEUE_PRI2COS_QCFG_RESP_QUEUE_CFG_INFO_ASYM_CFG 0x1UL
  3292. u8 unused_0[6];
  3293. u8 valid;
  3294. };
  3295. /* hwrm_queue_pri2cos_cfg_input (size:320b/40B) */
  3296. struct hwrm_queue_pri2cos_cfg_input {
  3297. __le16 req_type;
  3298. __le16 cmpl_ring;
  3299. __le16 seq_id;
  3300. __le16 target_id;
  3301. __le64 resp_addr;
  3302. __le32 flags;
  3303. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_MASK 0x3UL
  3304. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_SFT 0
  3305. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_TX 0x0UL
  3306. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_RX 0x1UL
  3307. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_BIDIR 0x2UL
  3308. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_LAST QUEUE_PRI2COS_CFG_REQ_FLAGS_PATH_BIDIR
  3309. #define QUEUE_PRI2COS_CFG_REQ_FLAGS_IVLAN 0x4UL
  3310. __le32 enables;
  3311. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI0_COS_QUEUE_ID 0x1UL
  3312. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI1_COS_QUEUE_ID 0x2UL
  3313. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI2_COS_QUEUE_ID 0x4UL
  3314. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI3_COS_QUEUE_ID 0x8UL
  3315. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI4_COS_QUEUE_ID 0x10UL
  3316. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI5_COS_QUEUE_ID 0x20UL
  3317. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI6_COS_QUEUE_ID 0x40UL
  3318. #define QUEUE_PRI2COS_CFG_REQ_ENABLES_PRI7_COS_QUEUE_ID 0x80UL
  3319. u8 port_id;
  3320. u8 pri0_cos_queue_id;
  3321. u8 pri1_cos_queue_id;
  3322. u8 pri2_cos_queue_id;
  3323. u8 pri3_cos_queue_id;
  3324. u8 pri4_cos_queue_id;
  3325. u8 pri5_cos_queue_id;
  3326. u8 pri6_cos_queue_id;
  3327. u8 pri7_cos_queue_id;
  3328. u8 unused_0[7];
  3329. };
  3330. /* hwrm_queue_pri2cos_cfg_output (size:128b/16B) */
  3331. struct hwrm_queue_pri2cos_cfg_output {
  3332. __le16 error_code;
  3333. __le16 req_type;
  3334. __le16 seq_id;
  3335. __le16 resp_len;
  3336. u8 unused_0[7];
  3337. u8 valid;
  3338. };
  3339. /* hwrm_queue_cos2bw_qcfg_input (size:192b/24B) */
  3340. struct hwrm_queue_cos2bw_qcfg_input {
  3341. __le16 req_type;
  3342. __le16 cmpl_ring;
  3343. __le16 seq_id;
  3344. __le16 target_id;
  3345. __le64 resp_addr;
  3346. __le16 port_id;
  3347. u8 unused_0[6];
  3348. };
  3349. /* hwrm_queue_cos2bw_qcfg_output (size:896b/112B) */
  3350. struct hwrm_queue_cos2bw_qcfg_output {
  3351. __le16 error_code;
  3352. __le16 req_type;
  3353. __le16 seq_id;
  3354. __le16 resp_len;
  3355. u8 queue_id0;
  3356. u8 unused_0;
  3357. __le16 unused_1;
  3358. __le32 queue_id0_min_bw;
  3359. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3360. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_SFT 0
  3361. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_SCALE 0x10000000UL
  3362. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_SCALE_BITS (0x0UL << 28)
  3363. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3364. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_SCALE_BYTES
  3365. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3366. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT 29
  3367. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3368. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3369. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3370. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3371. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3372. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3373. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
  3374. __le32 queue_id0_max_bw;
  3375. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3376. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_SFT 0
  3377. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_SCALE 0x10000000UL
  3378. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_SCALE_BITS (0x0UL << 28)
  3379. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3380. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_SCALE_BYTES
  3381. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3382. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT 29
  3383. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3384. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3385. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3386. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3387. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3388. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3389. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
  3390. u8 queue_id0_tsa_assign;
  3391. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_TSA_ASSIGN_SP 0x0UL
  3392. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_TSA_ASSIGN_ETS 0x1UL
  3393. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3394. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3395. u8 queue_id0_pri_lvl;
  3396. u8 queue_id0_bw_weight;
  3397. u8 queue_id1;
  3398. __le32 queue_id1_min_bw;
  3399. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3400. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_SFT 0
  3401. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_SCALE 0x10000000UL
  3402. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_SCALE_BITS (0x0UL << 28)
  3403. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3404. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_SCALE_BYTES
  3405. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3406. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT 29
  3407. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3408. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3409. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3410. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3411. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3412. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3413. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
  3414. __le32 queue_id1_max_bw;
  3415. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3416. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_SFT 0
  3417. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_SCALE 0x10000000UL
  3418. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_SCALE_BITS (0x0UL << 28)
  3419. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3420. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_SCALE_BYTES
  3421. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3422. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT 29
  3423. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3424. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3425. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3426. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3427. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3428. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3429. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
  3430. u8 queue_id1_tsa_assign;
  3431. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_TSA_ASSIGN_SP 0x0UL
  3432. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_TSA_ASSIGN_ETS 0x1UL
  3433. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3434. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3435. u8 queue_id1_pri_lvl;
  3436. u8 queue_id1_bw_weight;
  3437. u8 queue_id2;
  3438. __le32 queue_id2_min_bw;
  3439. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3440. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_SFT 0
  3441. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_SCALE 0x10000000UL
  3442. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_SCALE_BITS (0x0UL << 28)
  3443. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3444. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_SCALE_BYTES
  3445. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3446. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT 29
  3447. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3448. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3449. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3450. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3451. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3452. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3453. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
  3454. __le32 queue_id2_max_bw;
  3455. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3456. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_SFT 0
  3457. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_SCALE 0x10000000UL
  3458. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_SCALE_BITS (0x0UL << 28)
  3459. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3460. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_SCALE_BYTES
  3461. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3462. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT 29
  3463. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3464. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3465. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3466. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3467. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3468. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3469. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
  3470. u8 queue_id2_tsa_assign;
  3471. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_TSA_ASSIGN_SP 0x0UL
  3472. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_TSA_ASSIGN_ETS 0x1UL
  3473. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3474. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3475. u8 queue_id2_pri_lvl;
  3476. u8 queue_id2_bw_weight;
  3477. u8 queue_id3;
  3478. __le32 queue_id3_min_bw;
  3479. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3480. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_SFT 0
  3481. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_SCALE 0x10000000UL
  3482. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_SCALE_BITS (0x0UL << 28)
  3483. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3484. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_SCALE_BYTES
  3485. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3486. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT 29
  3487. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3488. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3489. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3490. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3491. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3492. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3493. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
  3494. __le32 queue_id3_max_bw;
  3495. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3496. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_SFT 0
  3497. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_SCALE 0x10000000UL
  3498. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_SCALE_BITS (0x0UL << 28)
  3499. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3500. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_SCALE_BYTES
  3501. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3502. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT 29
  3503. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3504. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3505. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3506. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3507. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3508. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3509. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
  3510. u8 queue_id3_tsa_assign;
  3511. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_TSA_ASSIGN_SP 0x0UL
  3512. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_TSA_ASSIGN_ETS 0x1UL
  3513. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3514. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3515. u8 queue_id3_pri_lvl;
  3516. u8 queue_id3_bw_weight;
  3517. u8 queue_id4;
  3518. __le32 queue_id4_min_bw;
  3519. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3520. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_SFT 0
  3521. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_SCALE 0x10000000UL
  3522. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_SCALE_BITS (0x0UL << 28)
  3523. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3524. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_SCALE_BYTES
  3525. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3526. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT 29
  3527. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3528. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3529. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3530. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3531. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3532. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3533. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
  3534. __le32 queue_id4_max_bw;
  3535. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3536. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_SFT 0
  3537. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_SCALE 0x10000000UL
  3538. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_SCALE_BITS (0x0UL << 28)
  3539. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3540. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_SCALE_BYTES
  3541. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3542. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT 29
  3543. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3544. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3545. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3546. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3547. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3548. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3549. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
  3550. u8 queue_id4_tsa_assign;
  3551. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_TSA_ASSIGN_SP 0x0UL
  3552. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_TSA_ASSIGN_ETS 0x1UL
  3553. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3554. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3555. u8 queue_id4_pri_lvl;
  3556. u8 queue_id4_bw_weight;
  3557. u8 queue_id5;
  3558. __le32 queue_id5_min_bw;
  3559. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3560. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_SFT 0
  3561. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_SCALE 0x10000000UL
  3562. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_SCALE_BITS (0x0UL << 28)
  3563. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3564. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_SCALE_BYTES
  3565. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3566. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT 29
  3567. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3568. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3569. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3570. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3571. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3572. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3573. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
  3574. __le32 queue_id5_max_bw;
  3575. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3576. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_SFT 0
  3577. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_SCALE 0x10000000UL
  3578. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_SCALE_BITS (0x0UL << 28)
  3579. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3580. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_SCALE_BYTES
  3581. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3582. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT 29
  3583. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3584. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3585. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3586. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3587. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3588. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3589. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
  3590. u8 queue_id5_tsa_assign;
  3591. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_TSA_ASSIGN_SP 0x0UL
  3592. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_TSA_ASSIGN_ETS 0x1UL
  3593. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3594. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3595. u8 queue_id5_pri_lvl;
  3596. u8 queue_id5_bw_weight;
  3597. u8 queue_id6;
  3598. __le32 queue_id6_min_bw;
  3599. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3600. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_SFT 0
  3601. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_SCALE 0x10000000UL
  3602. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_SCALE_BITS (0x0UL << 28)
  3603. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3604. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_SCALE_BYTES
  3605. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3606. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT 29
  3607. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3608. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3609. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3610. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3611. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3612. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3613. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
  3614. __le32 queue_id6_max_bw;
  3615. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3616. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_SFT 0
  3617. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_SCALE 0x10000000UL
  3618. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_SCALE_BITS (0x0UL << 28)
  3619. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3620. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_SCALE_BYTES
  3621. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3622. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT 29
  3623. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3624. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3625. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3626. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3627. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3628. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3629. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
  3630. u8 queue_id6_tsa_assign;
  3631. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_TSA_ASSIGN_SP 0x0UL
  3632. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_TSA_ASSIGN_ETS 0x1UL
  3633. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3634. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3635. u8 queue_id6_pri_lvl;
  3636. u8 queue_id6_bw_weight;
  3637. u8 queue_id7;
  3638. __le32 queue_id7_min_bw;
  3639. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3640. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_SFT 0
  3641. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_SCALE 0x10000000UL
  3642. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_SCALE_BITS (0x0UL << 28)
  3643. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3644. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_SCALE_BYTES
  3645. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3646. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT 29
  3647. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3648. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3649. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3650. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3651. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3652. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3653. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
  3654. __le32 queue_id7_max_bw;
  3655. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3656. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_SFT 0
  3657. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_SCALE 0x10000000UL
  3658. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_SCALE_BITS (0x0UL << 28)
  3659. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3660. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_SCALE_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_SCALE_BYTES
  3661. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3662. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT 29
  3663. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3664. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3665. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3666. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3667. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3668. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3669. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
  3670. u8 queue_id7_tsa_assign;
  3671. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_TSA_ASSIGN_SP 0x0UL
  3672. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_TSA_ASSIGN_ETS 0x1UL
  3673. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3674. #define QUEUE_COS2BW_QCFG_RESP_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3675. u8 queue_id7_pri_lvl;
  3676. u8 queue_id7_bw_weight;
  3677. u8 unused_2[4];
  3678. u8 valid;
  3679. };
  3680. /* hwrm_queue_cos2bw_cfg_input (size:1024b/128B) */
  3681. struct hwrm_queue_cos2bw_cfg_input {
  3682. __le16 req_type;
  3683. __le16 cmpl_ring;
  3684. __le16 seq_id;
  3685. __le16 target_id;
  3686. __le64 resp_addr;
  3687. __le32 flags;
  3688. __le32 enables;
  3689. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID0_VALID 0x1UL
  3690. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID1_VALID 0x2UL
  3691. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID2_VALID 0x4UL
  3692. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID3_VALID 0x8UL
  3693. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID4_VALID 0x10UL
  3694. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID5_VALID 0x20UL
  3695. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID6_VALID 0x40UL
  3696. #define QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID7_VALID 0x80UL
  3697. __le16 port_id;
  3698. u8 queue_id0;
  3699. u8 unused_0;
  3700. __le32 queue_id0_min_bw;
  3701. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3702. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_SFT 0
  3703. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_SCALE 0x10000000UL
  3704. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_SCALE_BITS (0x0UL << 28)
  3705. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3706. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_SCALE_BYTES
  3707. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3708. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT 29
  3709. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3710. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3711. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3712. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3713. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3714. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3715. #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
  3716. __le32 queue_id0_max_bw;
  3717. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3718. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_SFT 0
  3719. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_SCALE 0x10000000UL
  3720. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_SCALE_BITS (0x0UL << 28)
  3721. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3722. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_SCALE_BYTES
  3723. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3724. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT 29
  3725. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3726. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3727. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3728. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3729. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3730. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3731. #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
  3732. u8 queue_id0_tsa_assign;
  3733. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_SP 0x0UL
  3734. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_ETS 0x1UL
  3735. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3736. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3737. u8 queue_id0_pri_lvl;
  3738. u8 queue_id0_bw_weight;
  3739. u8 queue_id1;
  3740. __le32 queue_id1_min_bw;
  3741. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3742. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_SFT 0
  3743. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_SCALE 0x10000000UL
  3744. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_SCALE_BITS (0x0UL << 28)
  3745. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3746. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_SCALE_BYTES
  3747. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3748. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT 29
  3749. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3750. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3751. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3752. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3753. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3754. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3755. #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
  3756. __le32 queue_id1_max_bw;
  3757. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3758. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_SFT 0
  3759. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_SCALE 0x10000000UL
  3760. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_SCALE_BITS (0x0UL << 28)
  3761. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3762. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_SCALE_BYTES
  3763. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3764. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT 29
  3765. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3766. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3767. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3768. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3769. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3770. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3771. #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
  3772. u8 queue_id1_tsa_assign;
  3773. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_SP 0x0UL
  3774. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_ETS 0x1UL
  3775. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3776. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3777. u8 queue_id1_pri_lvl;
  3778. u8 queue_id1_bw_weight;
  3779. u8 queue_id2;
  3780. __le32 queue_id2_min_bw;
  3781. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3782. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_SFT 0
  3783. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_SCALE 0x10000000UL
  3784. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_SCALE_BITS (0x0UL << 28)
  3785. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3786. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_SCALE_BYTES
  3787. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3788. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT 29
  3789. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3790. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3791. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3792. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3793. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3794. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3795. #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
  3796. __le32 queue_id2_max_bw;
  3797. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3798. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_SFT 0
  3799. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_SCALE 0x10000000UL
  3800. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_SCALE_BITS (0x0UL << 28)
  3801. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3802. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_SCALE_BYTES
  3803. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3804. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT 29
  3805. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3806. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3807. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3808. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3809. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3810. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3811. #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
  3812. u8 queue_id2_tsa_assign;
  3813. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_SP 0x0UL
  3814. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_ETS 0x1UL
  3815. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3816. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3817. u8 queue_id2_pri_lvl;
  3818. u8 queue_id2_bw_weight;
  3819. u8 queue_id3;
  3820. __le32 queue_id3_min_bw;
  3821. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3822. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_SFT 0
  3823. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_SCALE 0x10000000UL
  3824. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_SCALE_BITS (0x0UL << 28)
  3825. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3826. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_SCALE_BYTES
  3827. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3828. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT 29
  3829. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3830. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3831. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3832. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3833. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3834. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3835. #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
  3836. __le32 queue_id3_max_bw;
  3837. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3838. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_SFT 0
  3839. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_SCALE 0x10000000UL
  3840. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_SCALE_BITS (0x0UL << 28)
  3841. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3842. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_SCALE_BYTES
  3843. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3844. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT 29
  3845. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3846. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3847. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3848. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3849. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3850. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3851. #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
  3852. u8 queue_id3_tsa_assign;
  3853. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_SP 0x0UL
  3854. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_ETS 0x1UL
  3855. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3856. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3857. u8 queue_id3_pri_lvl;
  3858. u8 queue_id3_bw_weight;
  3859. u8 queue_id4;
  3860. __le32 queue_id4_min_bw;
  3861. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3862. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_SFT 0
  3863. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_SCALE 0x10000000UL
  3864. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_SCALE_BITS (0x0UL << 28)
  3865. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3866. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_SCALE_BYTES
  3867. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3868. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT 29
  3869. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3870. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3871. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3872. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3873. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3874. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3875. #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
  3876. __le32 queue_id4_max_bw;
  3877. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3878. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_SFT 0
  3879. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_SCALE 0x10000000UL
  3880. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_SCALE_BITS (0x0UL << 28)
  3881. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3882. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_SCALE_BYTES
  3883. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3884. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT 29
  3885. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3886. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3887. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3888. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3889. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3890. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3891. #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
  3892. u8 queue_id4_tsa_assign;
  3893. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_SP 0x0UL
  3894. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_ETS 0x1UL
  3895. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3896. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3897. u8 queue_id4_pri_lvl;
  3898. u8 queue_id4_bw_weight;
  3899. u8 queue_id5;
  3900. __le32 queue_id5_min_bw;
  3901. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3902. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_SFT 0
  3903. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_SCALE 0x10000000UL
  3904. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_SCALE_BITS (0x0UL << 28)
  3905. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3906. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_SCALE_BYTES
  3907. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3908. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT 29
  3909. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3910. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3911. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3912. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3913. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3914. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3915. #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
  3916. __le32 queue_id5_max_bw;
  3917. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3918. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_SFT 0
  3919. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_SCALE 0x10000000UL
  3920. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_SCALE_BITS (0x0UL << 28)
  3921. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3922. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_SCALE_BYTES
  3923. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3924. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT 29
  3925. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3926. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3927. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3928. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3929. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3930. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3931. #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
  3932. u8 queue_id5_tsa_assign;
  3933. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_SP 0x0UL
  3934. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_ETS 0x1UL
  3935. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3936. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3937. u8 queue_id5_pri_lvl;
  3938. u8 queue_id5_bw_weight;
  3939. u8 queue_id6;
  3940. __le32 queue_id6_min_bw;
  3941. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3942. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_SFT 0
  3943. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_SCALE 0x10000000UL
  3944. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_SCALE_BITS (0x0UL << 28)
  3945. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3946. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_SCALE_BYTES
  3947. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3948. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT 29
  3949. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3950. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3951. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3952. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3953. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3954. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3955. #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
  3956. __le32 queue_id6_max_bw;
  3957. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3958. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_SFT 0
  3959. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_SCALE 0x10000000UL
  3960. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_SCALE_BITS (0x0UL << 28)
  3961. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_SCALE_BYTES (0x1UL << 28)
  3962. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_SCALE_BYTES
  3963. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3964. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT 29
  3965. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3966. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3967. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3968. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3969. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3970. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3971. #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
  3972. u8 queue_id6_tsa_assign;
  3973. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_SP 0x0UL
  3974. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_ETS 0x1UL
  3975. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  3976. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST 0xffUL
  3977. u8 queue_id6_pri_lvl;
  3978. u8 queue_id6_bw_weight;
  3979. u8 queue_id7;
  3980. __le32 queue_id7_min_bw;
  3981. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_MASK 0xfffffffUL
  3982. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_SFT 0
  3983. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_SCALE 0x10000000UL
  3984. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_SCALE_BITS (0x0UL << 28)
  3985. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_SCALE_BYTES (0x1UL << 28)
  3986. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_SCALE_BYTES
  3987. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  3988. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT 29
  3989. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  3990. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  3991. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  3992. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  3993. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  3994. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  3995. #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
  3996. __le32 queue_id7_max_bw;
  3997. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  3998. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_SFT 0
  3999. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_SCALE 0x10000000UL
  4000. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_SCALE_BITS (0x0UL << 28)
  4001. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_SCALE_BYTES (0x1UL << 28)
  4002. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_SCALE_LAST QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_SCALE_BYTES
  4003. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  4004. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT 29
  4005. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  4006. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  4007. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  4008. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  4009. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  4010. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  4011. #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
  4012. u8 queue_id7_tsa_assign;
  4013. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_SP 0x0UL
  4014. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_ETS 0x1UL
  4015. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST 0x2UL
  4016. #define QUEUE_COS2BW_CFG_REQ_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST 0xffUL
  4017. u8 queue_id7_pri_lvl;
  4018. u8 queue_id7_bw_weight;
  4019. u8 unused_1[5];
  4020. };
  4021. /* hwrm_queue_cos2bw_cfg_output (size:128b/16B) */
  4022. struct hwrm_queue_cos2bw_cfg_output {
  4023. __le16 error_code;
  4024. __le16 req_type;
  4025. __le16 seq_id;
  4026. __le16 resp_len;
  4027. u8 unused_0[7];
  4028. u8 valid;
  4029. };
  4030. /* hwrm_queue_dscp_qcaps_input (size:192b/24B) */
  4031. struct hwrm_queue_dscp_qcaps_input {
  4032. __le16 req_type;
  4033. __le16 cmpl_ring;
  4034. __le16 seq_id;
  4035. __le16 target_id;
  4036. __le64 resp_addr;
  4037. u8 port_id;
  4038. u8 unused_0[7];
  4039. };
  4040. /* hwrm_queue_dscp_qcaps_output (size:128b/16B) */
  4041. struct hwrm_queue_dscp_qcaps_output {
  4042. __le16 error_code;
  4043. __le16 req_type;
  4044. __le16 seq_id;
  4045. __le16 resp_len;
  4046. u8 num_dscp_bits;
  4047. u8 unused_0;
  4048. __le16 max_entries;
  4049. u8 unused_1[3];
  4050. u8 valid;
  4051. };
  4052. /* hwrm_queue_dscp2pri_qcfg_input (size:256b/32B) */
  4053. struct hwrm_queue_dscp2pri_qcfg_input {
  4054. __le16 req_type;
  4055. __le16 cmpl_ring;
  4056. __le16 seq_id;
  4057. __le16 target_id;
  4058. __le64 resp_addr;
  4059. __le64 dest_data_addr;
  4060. u8 port_id;
  4061. u8 unused_0;
  4062. __le16 dest_data_buffer_size;
  4063. u8 unused_1[4];
  4064. };
  4065. /* hwrm_queue_dscp2pri_qcfg_output (size:128b/16B) */
  4066. struct hwrm_queue_dscp2pri_qcfg_output {
  4067. __le16 error_code;
  4068. __le16 req_type;
  4069. __le16 seq_id;
  4070. __le16 resp_len;
  4071. __le16 entry_cnt;
  4072. u8 default_pri;
  4073. u8 unused_0[4];
  4074. u8 valid;
  4075. };
  4076. /* hwrm_queue_dscp2pri_cfg_input (size:320b/40B) */
  4077. struct hwrm_queue_dscp2pri_cfg_input {
  4078. __le16 req_type;
  4079. __le16 cmpl_ring;
  4080. __le16 seq_id;
  4081. __le16 target_id;
  4082. __le64 resp_addr;
  4083. __le64 src_data_addr;
  4084. __le32 flags;
  4085. #define QUEUE_DSCP2PRI_CFG_REQ_FLAGS_USE_HW_DEFAULT_PRI 0x1UL
  4086. __le32 enables;
  4087. #define QUEUE_DSCP2PRI_CFG_REQ_ENABLES_DEFAULT_PRI 0x1UL
  4088. u8 port_id;
  4089. u8 default_pri;
  4090. __le16 entry_cnt;
  4091. u8 unused_0[4];
  4092. };
  4093. /* hwrm_queue_dscp2pri_cfg_output (size:128b/16B) */
  4094. struct hwrm_queue_dscp2pri_cfg_output {
  4095. __le16 error_code;
  4096. __le16 req_type;
  4097. __le16 seq_id;
  4098. __le16 resp_len;
  4099. u8 unused_0[7];
  4100. u8 valid;
  4101. };
  4102. /* hwrm_vnic_alloc_input (size:192b/24B) */
  4103. struct hwrm_vnic_alloc_input {
  4104. __le16 req_type;
  4105. __le16 cmpl_ring;
  4106. __le16 seq_id;
  4107. __le16 target_id;
  4108. __le64 resp_addr;
  4109. __le32 flags;
  4110. #define VNIC_ALLOC_REQ_FLAGS_DEFAULT 0x1UL
  4111. u8 unused_0[4];
  4112. };
  4113. /* hwrm_vnic_alloc_output (size:128b/16B) */
  4114. struct hwrm_vnic_alloc_output {
  4115. __le16 error_code;
  4116. __le16 req_type;
  4117. __le16 seq_id;
  4118. __le16 resp_len;
  4119. __le32 vnic_id;
  4120. u8 unused_0[3];
  4121. u8 valid;
  4122. };
  4123. /* hwrm_vnic_free_input (size:192b/24B) */
  4124. struct hwrm_vnic_free_input {
  4125. __le16 req_type;
  4126. __le16 cmpl_ring;
  4127. __le16 seq_id;
  4128. __le16 target_id;
  4129. __le64 resp_addr;
  4130. __le32 vnic_id;
  4131. u8 unused_0[4];
  4132. };
  4133. /* hwrm_vnic_free_output (size:128b/16B) */
  4134. struct hwrm_vnic_free_output {
  4135. __le16 error_code;
  4136. __le16 req_type;
  4137. __le16 seq_id;
  4138. __le16 resp_len;
  4139. u8 unused_0[7];
  4140. u8 valid;
  4141. };
  4142. /* hwrm_vnic_cfg_input (size:320b/40B) */
  4143. struct hwrm_vnic_cfg_input {
  4144. __le16 req_type;
  4145. __le16 cmpl_ring;
  4146. __le16 seq_id;
  4147. __le16 target_id;
  4148. __le64 resp_addr;
  4149. __le32 flags;
  4150. #define VNIC_CFG_REQ_FLAGS_DEFAULT 0x1UL
  4151. #define VNIC_CFG_REQ_FLAGS_VLAN_STRIP_MODE 0x2UL
  4152. #define VNIC_CFG_REQ_FLAGS_BD_STALL_MODE 0x4UL
  4153. #define VNIC_CFG_REQ_FLAGS_ROCE_DUAL_VNIC_MODE 0x8UL
  4154. #define VNIC_CFG_REQ_FLAGS_ROCE_ONLY_VNIC_MODE 0x10UL
  4155. #define VNIC_CFG_REQ_FLAGS_RSS_DFLT_CR_MODE 0x20UL
  4156. #define VNIC_CFG_REQ_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_MODE 0x40UL
  4157. __le32 enables;
  4158. #define VNIC_CFG_REQ_ENABLES_DFLT_RING_GRP 0x1UL
  4159. #define VNIC_CFG_REQ_ENABLES_RSS_RULE 0x2UL
  4160. #define VNIC_CFG_REQ_ENABLES_COS_RULE 0x4UL
  4161. #define VNIC_CFG_REQ_ENABLES_LB_RULE 0x8UL
  4162. #define VNIC_CFG_REQ_ENABLES_MRU 0x10UL
  4163. #define VNIC_CFG_REQ_ENABLES_DEFAULT_RX_RING_ID 0x20UL
  4164. #define VNIC_CFG_REQ_ENABLES_DEFAULT_CMPL_RING_ID 0x40UL
  4165. __le16 vnic_id;
  4166. __le16 dflt_ring_grp;
  4167. __le16 rss_rule;
  4168. __le16 cos_rule;
  4169. __le16 lb_rule;
  4170. __le16 mru;
  4171. __le16 default_rx_ring_id;
  4172. __le16 default_cmpl_ring_id;
  4173. };
  4174. /* hwrm_vnic_cfg_output (size:128b/16B) */
  4175. struct hwrm_vnic_cfg_output {
  4176. __le16 error_code;
  4177. __le16 req_type;
  4178. __le16 seq_id;
  4179. __le16 resp_len;
  4180. u8 unused_0[7];
  4181. u8 valid;
  4182. };
  4183. /* hwrm_vnic_qcaps_input (size:192b/24B) */
  4184. struct hwrm_vnic_qcaps_input {
  4185. __le16 req_type;
  4186. __le16 cmpl_ring;
  4187. __le16 seq_id;
  4188. __le16 target_id;
  4189. __le64 resp_addr;
  4190. __le32 enables;
  4191. u8 unused_0[4];
  4192. };
  4193. /* hwrm_vnic_qcaps_output (size:192b/24B) */
  4194. struct hwrm_vnic_qcaps_output {
  4195. __le16 error_code;
  4196. __le16 req_type;
  4197. __le16 seq_id;
  4198. __le16 resp_len;
  4199. __le16 mru;
  4200. u8 unused_0[2];
  4201. __le32 flags;
  4202. #define VNIC_QCAPS_RESP_FLAGS_UNUSED 0x1UL
  4203. #define VNIC_QCAPS_RESP_FLAGS_VLAN_STRIP_CAP 0x2UL
  4204. #define VNIC_QCAPS_RESP_FLAGS_BD_STALL_CAP 0x4UL
  4205. #define VNIC_QCAPS_RESP_FLAGS_ROCE_DUAL_VNIC_CAP 0x8UL
  4206. #define VNIC_QCAPS_RESP_FLAGS_ROCE_ONLY_VNIC_CAP 0x10UL
  4207. #define VNIC_QCAPS_RESP_FLAGS_RSS_DFLT_CR_CAP 0x20UL
  4208. #define VNIC_QCAPS_RESP_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_CAP 0x40UL
  4209. #define VNIC_QCAPS_RESP_FLAGS_OUTERMOST_RSS_CAP 0x80UL
  4210. u8 unused_1[7];
  4211. u8 valid;
  4212. };
  4213. /* hwrm_vnic_tpa_cfg_input (size:320b/40B) */
  4214. struct hwrm_vnic_tpa_cfg_input {
  4215. __le16 req_type;
  4216. __le16 cmpl_ring;
  4217. __le16 seq_id;
  4218. __le16 target_id;
  4219. __le64 resp_addr;
  4220. __le32 flags;
  4221. #define VNIC_TPA_CFG_REQ_FLAGS_TPA 0x1UL
  4222. #define VNIC_TPA_CFG_REQ_FLAGS_ENCAP_TPA 0x2UL
  4223. #define VNIC_TPA_CFG_REQ_FLAGS_RSC_WND_UPDATE 0x4UL
  4224. #define VNIC_TPA_CFG_REQ_FLAGS_GRO 0x8UL
  4225. #define VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_ECN 0x10UL
  4226. #define VNIC_TPA_CFG_REQ_FLAGS_AGG_WITH_SAME_GRE_SEQ 0x20UL
  4227. #define VNIC_TPA_CFG_REQ_FLAGS_GRO_IPID_CHECK 0x40UL
  4228. #define VNIC_TPA_CFG_REQ_FLAGS_GRO_TTL_CHECK 0x80UL
  4229. __le32 enables;
  4230. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_SEGS 0x1UL
  4231. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGGS 0x2UL
  4232. #define VNIC_TPA_CFG_REQ_ENABLES_MAX_AGG_TIMER 0x4UL
  4233. #define VNIC_TPA_CFG_REQ_ENABLES_MIN_AGG_LEN 0x8UL
  4234. __le16 vnic_id;
  4235. __le16 max_agg_segs;
  4236. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_1 0x0UL
  4237. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_2 0x1UL
  4238. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_4 0x2UL
  4239. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_8 0x3UL
  4240. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_MAX 0x1fUL
  4241. #define VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_LAST VNIC_TPA_CFG_REQ_MAX_AGG_SEGS_MAX
  4242. __le16 max_aggs;
  4243. #define VNIC_TPA_CFG_REQ_MAX_AGGS_1 0x0UL
  4244. #define VNIC_TPA_CFG_REQ_MAX_AGGS_2 0x1UL
  4245. #define VNIC_TPA_CFG_REQ_MAX_AGGS_4 0x2UL
  4246. #define VNIC_TPA_CFG_REQ_MAX_AGGS_8 0x3UL
  4247. #define VNIC_TPA_CFG_REQ_MAX_AGGS_16 0x4UL
  4248. #define VNIC_TPA_CFG_REQ_MAX_AGGS_MAX 0x7UL
  4249. #define VNIC_TPA_CFG_REQ_MAX_AGGS_LAST VNIC_TPA_CFG_REQ_MAX_AGGS_MAX
  4250. u8 unused_0[2];
  4251. __le32 max_agg_timer;
  4252. __le32 min_agg_len;
  4253. };
  4254. /* hwrm_vnic_tpa_cfg_output (size:128b/16B) */
  4255. struct hwrm_vnic_tpa_cfg_output {
  4256. __le16 error_code;
  4257. __le16 req_type;
  4258. __le16 seq_id;
  4259. __le16 resp_len;
  4260. u8 unused_0[7];
  4261. u8 valid;
  4262. };
  4263. /* hwrm_vnic_tpa_qcfg_input (size:192b/24B) */
  4264. struct hwrm_vnic_tpa_qcfg_input {
  4265. __le16 req_type;
  4266. __le16 cmpl_ring;
  4267. __le16 seq_id;
  4268. __le16 target_id;
  4269. __le64 resp_addr;
  4270. __le16 vnic_id;
  4271. u8 unused_0[6];
  4272. };
  4273. /* hwrm_vnic_tpa_qcfg_output (size:256b/32B) */
  4274. struct hwrm_vnic_tpa_qcfg_output {
  4275. __le16 error_code;
  4276. __le16 req_type;
  4277. __le16 seq_id;
  4278. __le16 resp_len;
  4279. __le32 flags;
  4280. #define VNIC_TPA_QCFG_RESP_FLAGS_TPA 0x1UL
  4281. #define VNIC_TPA_QCFG_RESP_FLAGS_ENCAP_TPA 0x2UL
  4282. #define VNIC_TPA_QCFG_RESP_FLAGS_RSC_WND_UPDATE 0x4UL
  4283. #define VNIC_TPA_QCFG_RESP_FLAGS_GRO 0x8UL
  4284. #define VNIC_TPA_QCFG_RESP_FLAGS_AGG_WITH_ECN 0x10UL
  4285. #define VNIC_TPA_QCFG_RESP_FLAGS_AGG_WITH_SAME_GRE_SEQ 0x20UL
  4286. #define VNIC_TPA_QCFG_RESP_FLAGS_GRO_IPID_CHECK 0x40UL
  4287. #define VNIC_TPA_QCFG_RESP_FLAGS_GRO_TTL_CHECK 0x80UL
  4288. __le16 max_agg_segs;
  4289. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_1 0x0UL
  4290. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_2 0x1UL
  4291. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_4 0x2UL
  4292. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_8 0x3UL
  4293. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_MAX 0x1fUL
  4294. #define VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_LAST VNIC_TPA_QCFG_RESP_MAX_AGG_SEGS_MAX
  4295. __le16 max_aggs;
  4296. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_1 0x0UL
  4297. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_2 0x1UL
  4298. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_4 0x2UL
  4299. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_8 0x3UL
  4300. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_16 0x4UL
  4301. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_MAX 0x7UL
  4302. #define VNIC_TPA_QCFG_RESP_MAX_AGGS_LAST VNIC_TPA_QCFG_RESP_MAX_AGGS_MAX
  4303. __le32 max_agg_timer;
  4304. __le32 min_agg_len;
  4305. u8 unused_0[7];
  4306. u8 valid;
  4307. };
  4308. /* hwrm_vnic_rss_cfg_input (size:384b/48B) */
  4309. struct hwrm_vnic_rss_cfg_input {
  4310. __le16 req_type;
  4311. __le16 cmpl_ring;
  4312. __le16 seq_id;
  4313. __le16 target_id;
  4314. __le64 resp_addr;
  4315. __le32 hash_type;
  4316. #define VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 0x1UL
  4317. #define VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4 0x2UL
  4318. #define VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4 0x4UL
  4319. #define VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 0x8UL
  4320. #define VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6 0x10UL
  4321. #define VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6 0x20UL
  4322. __le16 vnic_id;
  4323. u8 ring_table_pair_index;
  4324. u8 hash_mode_flags;
  4325. #define VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_DEFAULT 0x1UL
  4326. #define VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_INNERMOST_4 0x2UL
  4327. #define VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_INNERMOST_2 0x4UL
  4328. #define VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_OUTERMOST_4 0x8UL
  4329. #define VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_OUTERMOST_2 0x10UL
  4330. __le64 ring_grp_tbl_addr;
  4331. __le64 hash_key_tbl_addr;
  4332. __le16 rss_ctx_idx;
  4333. u8 unused_1[6];
  4334. };
  4335. /* hwrm_vnic_rss_cfg_output (size:128b/16B) */
  4336. struct hwrm_vnic_rss_cfg_output {
  4337. __le16 error_code;
  4338. __le16 req_type;
  4339. __le16 seq_id;
  4340. __le16 resp_len;
  4341. u8 unused_0[7];
  4342. u8 valid;
  4343. };
  4344. /* hwrm_vnic_plcmodes_cfg_input (size:320b/40B) */
  4345. struct hwrm_vnic_plcmodes_cfg_input {
  4346. __le16 req_type;
  4347. __le16 cmpl_ring;
  4348. __le16 seq_id;
  4349. __le16 target_id;
  4350. __le64 resp_addr;
  4351. __le32 flags;
  4352. #define VNIC_PLCMODES_CFG_REQ_FLAGS_REGULAR_PLACEMENT 0x1UL
  4353. #define VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT 0x2UL
  4354. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 0x4UL
  4355. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6 0x8UL
  4356. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_FCOE 0x10UL
  4357. #define VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_ROCE 0x20UL
  4358. __le32 enables;
  4359. #define VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID 0x1UL
  4360. #define VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_OFFSET_VALID 0x2UL
  4361. #define VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID 0x4UL
  4362. __le32 vnic_id;
  4363. __le16 jumbo_thresh;
  4364. __le16 hds_offset;
  4365. __le16 hds_threshold;
  4366. u8 unused_0[6];
  4367. };
  4368. /* hwrm_vnic_plcmodes_cfg_output (size:128b/16B) */
  4369. struct hwrm_vnic_plcmodes_cfg_output {
  4370. __le16 error_code;
  4371. __le16 req_type;
  4372. __le16 seq_id;
  4373. __le16 resp_len;
  4374. u8 unused_0[7];
  4375. u8 valid;
  4376. };
  4377. /* hwrm_vnic_rss_cos_lb_ctx_alloc_input (size:128b/16B) */
  4378. struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {
  4379. __le16 req_type;
  4380. __le16 cmpl_ring;
  4381. __le16 seq_id;
  4382. __le16 target_id;
  4383. __le64 resp_addr;
  4384. };
  4385. /* hwrm_vnic_rss_cos_lb_ctx_alloc_output (size:128b/16B) */
  4386. struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {
  4387. __le16 error_code;
  4388. __le16 req_type;
  4389. __le16 seq_id;
  4390. __le16 resp_len;
  4391. __le16 rss_cos_lb_ctx_id;
  4392. u8 unused_0[5];
  4393. u8 valid;
  4394. };
  4395. /* hwrm_vnic_rss_cos_lb_ctx_free_input (size:192b/24B) */
  4396. struct hwrm_vnic_rss_cos_lb_ctx_free_input {
  4397. __le16 req_type;
  4398. __le16 cmpl_ring;
  4399. __le16 seq_id;
  4400. __le16 target_id;
  4401. __le64 resp_addr;
  4402. __le16 rss_cos_lb_ctx_id;
  4403. u8 unused_0[6];
  4404. };
  4405. /* hwrm_vnic_rss_cos_lb_ctx_free_output (size:128b/16B) */
  4406. struct hwrm_vnic_rss_cos_lb_ctx_free_output {
  4407. __le16 error_code;
  4408. __le16 req_type;
  4409. __le16 seq_id;
  4410. __le16 resp_len;
  4411. u8 unused_0[7];
  4412. u8 valid;
  4413. };
  4414. /* hwrm_ring_alloc_input (size:704b/88B) */
  4415. struct hwrm_ring_alloc_input {
  4416. __le16 req_type;
  4417. __le16 cmpl_ring;
  4418. __le16 seq_id;
  4419. __le16 target_id;
  4420. __le64 resp_addr;
  4421. __le32 enables;
  4422. #define RING_ALLOC_REQ_ENABLES_RING_ARB_CFG 0x2UL
  4423. #define RING_ALLOC_REQ_ENABLES_STAT_CTX_ID_VALID 0x8UL
  4424. #define RING_ALLOC_REQ_ENABLES_MAX_BW_VALID 0x20UL
  4425. #define RING_ALLOC_REQ_ENABLES_RX_RING_ID_VALID 0x40UL
  4426. #define RING_ALLOC_REQ_ENABLES_NQ_RING_ID_VALID 0x80UL
  4427. #define RING_ALLOC_REQ_ENABLES_RX_BUF_SIZE_VALID 0x100UL
  4428. u8 ring_type;
  4429. #define RING_ALLOC_REQ_RING_TYPE_L2_CMPL 0x0UL
  4430. #define RING_ALLOC_REQ_RING_TYPE_TX 0x1UL
  4431. #define RING_ALLOC_REQ_RING_TYPE_RX 0x2UL
  4432. #define RING_ALLOC_REQ_RING_TYPE_ROCE_CMPL 0x3UL
  4433. #define RING_ALLOC_REQ_RING_TYPE_RX_AGG 0x4UL
  4434. #define RING_ALLOC_REQ_RING_TYPE_NQ 0x5UL
  4435. #define RING_ALLOC_REQ_RING_TYPE_LAST RING_ALLOC_REQ_RING_TYPE_NQ
  4436. u8 unused_0[3];
  4437. __le64 page_tbl_addr;
  4438. __le32 fbo;
  4439. u8 page_size;
  4440. u8 page_tbl_depth;
  4441. u8 unused_1[2];
  4442. __le32 length;
  4443. __le16 logical_id;
  4444. __le16 cmpl_ring_id;
  4445. __le16 queue_id;
  4446. __le16 rx_buf_size;
  4447. __le16 rx_ring_id;
  4448. __le16 nq_ring_id;
  4449. __le16 ring_arb_cfg;
  4450. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_MASK 0xfUL
  4451. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_SFT 0
  4452. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_SP 0x1UL
  4453. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_WFQ 0x2UL
  4454. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_LAST RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_WFQ
  4455. #define RING_ALLOC_REQ_RING_ARB_CFG_RSVD_MASK 0xf0UL
  4456. #define RING_ALLOC_REQ_RING_ARB_CFG_RSVD_SFT 4
  4457. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_PARAM_MASK 0xff00UL
  4458. #define RING_ALLOC_REQ_RING_ARB_CFG_ARB_POLICY_PARAM_SFT 8
  4459. __le16 unused_3;
  4460. __le32 reserved3;
  4461. __le32 stat_ctx_id;
  4462. __le32 reserved4;
  4463. __le32 max_bw;
  4464. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_MASK 0xfffffffUL
  4465. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_SFT 0
  4466. #define RING_ALLOC_REQ_MAX_BW_SCALE 0x10000000UL
  4467. #define RING_ALLOC_REQ_MAX_BW_SCALE_BITS (0x0UL << 28)
  4468. #define RING_ALLOC_REQ_MAX_BW_SCALE_BYTES (0x1UL << 28)
  4469. #define RING_ALLOC_REQ_MAX_BW_SCALE_LAST RING_ALLOC_REQ_MAX_BW_SCALE_BYTES
  4470. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_MASK 0xe0000000UL
  4471. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_SFT 29
  4472. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_MEGA (0x0UL << 29)
  4473. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_KILO (0x2UL << 29)
  4474. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_BASE (0x4UL << 29)
  4475. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_GIGA (0x6UL << 29)
  4476. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  4477. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_INVALID (0x7UL << 29)
  4478. #define RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_LAST RING_ALLOC_REQ_MAX_BW_BW_VALUE_UNIT_INVALID
  4479. u8 int_mode;
  4480. #define RING_ALLOC_REQ_INT_MODE_LEGACY 0x0UL
  4481. #define RING_ALLOC_REQ_INT_MODE_RSVD 0x1UL
  4482. #define RING_ALLOC_REQ_INT_MODE_MSIX 0x2UL
  4483. #define RING_ALLOC_REQ_INT_MODE_POLL 0x3UL
  4484. #define RING_ALLOC_REQ_INT_MODE_LAST RING_ALLOC_REQ_INT_MODE_POLL
  4485. u8 unused_4[3];
  4486. __le64 cq_handle;
  4487. };
  4488. /* hwrm_ring_alloc_output (size:128b/16B) */
  4489. struct hwrm_ring_alloc_output {
  4490. __le16 error_code;
  4491. __le16 req_type;
  4492. __le16 seq_id;
  4493. __le16 resp_len;
  4494. __le16 ring_id;
  4495. __le16 logical_ring_id;
  4496. u8 unused_0[3];
  4497. u8 valid;
  4498. };
  4499. /* hwrm_ring_free_input (size:192b/24B) */
  4500. struct hwrm_ring_free_input {
  4501. __le16 req_type;
  4502. __le16 cmpl_ring;
  4503. __le16 seq_id;
  4504. __le16 target_id;
  4505. __le64 resp_addr;
  4506. u8 ring_type;
  4507. #define RING_FREE_REQ_RING_TYPE_L2_CMPL 0x0UL
  4508. #define RING_FREE_REQ_RING_TYPE_TX 0x1UL
  4509. #define RING_FREE_REQ_RING_TYPE_RX 0x2UL
  4510. #define RING_FREE_REQ_RING_TYPE_ROCE_CMPL 0x3UL
  4511. #define RING_FREE_REQ_RING_TYPE_RX_AGG 0x4UL
  4512. #define RING_FREE_REQ_RING_TYPE_NQ 0x5UL
  4513. #define RING_FREE_REQ_RING_TYPE_LAST RING_FREE_REQ_RING_TYPE_NQ
  4514. u8 unused_0;
  4515. __le16 ring_id;
  4516. u8 unused_1[4];
  4517. };
  4518. /* hwrm_ring_free_output (size:128b/16B) */
  4519. struct hwrm_ring_free_output {
  4520. __le16 error_code;
  4521. __le16 req_type;
  4522. __le16 seq_id;
  4523. __le16 resp_len;
  4524. u8 unused_0[7];
  4525. u8 valid;
  4526. };
  4527. /* hwrm_ring_aggint_qcaps_input (size:128b/16B) */
  4528. struct hwrm_ring_aggint_qcaps_input {
  4529. __le16 req_type;
  4530. __le16 cmpl_ring;
  4531. __le16 seq_id;
  4532. __le16 target_id;
  4533. __le64 resp_addr;
  4534. };
  4535. /* hwrm_ring_aggint_qcaps_output (size:384b/48B) */
  4536. struct hwrm_ring_aggint_qcaps_output {
  4537. __le16 error_code;
  4538. __le16 req_type;
  4539. __le16 seq_id;
  4540. __le16 resp_len;
  4541. __le32 cmpl_params;
  4542. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_INT_LAT_TMR_MIN 0x1UL
  4543. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_INT_LAT_TMR_MAX 0x2UL
  4544. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_TIMER_RESET 0x4UL
  4545. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_RING_IDLE 0x8UL
  4546. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_NUM_CMPL_DMA_AGGR 0x10UL
  4547. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_NUM_CMPL_DMA_AGGR_DURING_INT 0x20UL
  4548. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_CMPL_AGGR_DMA_TMR 0x40UL
  4549. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_CMPL_AGGR_DMA_TMR_DURING_INT 0x80UL
  4550. #define RING_AGGINT_QCAPS_RESP_CMPL_PARAMS_NUM_CMPL_AGGR_INT 0x100UL
  4551. __le32 nq_params;
  4552. #define RING_AGGINT_QCAPS_RESP_NQ_PARAMS_INT_LAT_TMR_MIN 0x1UL
  4553. __le16 num_cmpl_dma_aggr_min;
  4554. __le16 num_cmpl_dma_aggr_max;
  4555. __le16 num_cmpl_dma_aggr_during_int_min;
  4556. __le16 num_cmpl_dma_aggr_during_int_max;
  4557. __le16 cmpl_aggr_dma_tmr_min;
  4558. __le16 cmpl_aggr_dma_tmr_max;
  4559. __le16 cmpl_aggr_dma_tmr_during_int_min;
  4560. __le16 cmpl_aggr_dma_tmr_during_int_max;
  4561. __le16 int_lat_tmr_min_min;
  4562. __le16 int_lat_tmr_min_max;
  4563. __le16 int_lat_tmr_max_min;
  4564. __le16 int_lat_tmr_max_max;
  4565. __le16 num_cmpl_aggr_int_min;
  4566. __le16 num_cmpl_aggr_int_max;
  4567. __le16 timer_units;
  4568. u8 unused_0[1];
  4569. u8 valid;
  4570. };
  4571. /* hwrm_ring_cmpl_ring_qaggint_params_input (size:192b/24B) */
  4572. struct hwrm_ring_cmpl_ring_qaggint_params_input {
  4573. __le16 req_type;
  4574. __le16 cmpl_ring;
  4575. __le16 seq_id;
  4576. __le16 target_id;
  4577. __le64 resp_addr;
  4578. __le16 ring_id;
  4579. u8 unused_0[6];
  4580. };
  4581. /* hwrm_ring_cmpl_ring_qaggint_params_output (size:256b/32B) */
  4582. struct hwrm_ring_cmpl_ring_qaggint_params_output {
  4583. __le16 error_code;
  4584. __le16 req_type;
  4585. __le16 seq_id;
  4586. __le16 resp_len;
  4587. __le16 flags;
  4588. #define RING_CMPL_RING_QAGGINT_PARAMS_RESP_FLAGS_TIMER_RESET 0x1UL
  4589. #define RING_CMPL_RING_QAGGINT_PARAMS_RESP_FLAGS_RING_IDLE 0x2UL
  4590. __le16 num_cmpl_dma_aggr;
  4591. __le16 num_cmpl_dma_aggr_during_int;
  4592. __le16 cmpl_aggr_dma_tmr;
  4593. __le16 cmpl_aggr_dma_tmr_during_int;
  4594. __le16 int_lat_tmr_min;
  4595. __le16 int_lat_tmr_max;
  4596. __le16 num_cmpl_aggr_int;
  4597. u8 unused_0[7];
  4598. u8 valid;
  4599. };
  4600. /* hwrm_ring_cmpl_ring_cfg_aggint_params_input (size:320b/40B) */
  4601. struct hwrm_ring_cmpl_ring_cfg_aggint_params_input {
  4602. __le16 req_type;
  4603. __le16 cmpl_ring;
  4604. __le16 seq_id;
  4605. __le16 target_id;
  4606. __le64 resp_addr;
  4607. __le16 ring_id;
  4608. __le16 flags;
  4609. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_FLAGS_TIMER_RESET 0x1UL
  4610. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_FLAGS_RING_IDLE 0x2UL
  4611. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_FLAGS_IS_NQ 0x4UL
  4612. __le16 num_cmpl_dma_aggr;
  4613. __le16 num_cmpl_dma_aggr_during_int;
  4614. __le16 cmpl_aggr_dma_tmr;
  4615. __le16 cmpl_aggr_dma_tmr_during_int;
  4616. __le16 int_lat_tmr_min;
  4617. __le16 int_lat_tmr_max;
  4618. __le16 num_cmpl_aggr_int;
  4619. __le16 enables;
  4620. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_NUM_CMPL_DMA_AGGR 0x1UL
  4621. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_NUM_CMPL_DMA_AGGR_DURING_INT 0x2UL
  4622. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_CMPL_AGGR_DMA_TMR 0x4UL
  4623. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_INT_LAT_TMR_MIN 0x8UL
  4624. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_INT_LAT_TMR_MAX 0x10UL
  4625. #define RING_CMPL_RING_CFG_AGGINT_PARAMS_REQ_ENABLES_NUM_CMPL_AGGR_INT 0x20UL
  4626. u8 unused_0[4];
  4627. };
  4628. /* hwrm_ring_cmpl_ring_cfg_aggint_params_output (size:128b/16B) */
  4629. struct hwrm_ring_cmpl_ring_cfg_aggint_params_output {
  4630. __le16 error_code;
  4631. __le16 req_type;
  4632. __le16 seq_id;
  4633. __le16 resp_len;
  4634. u8 unused_0[7];
  4635. u8 valid;
  4636. };
  4637. /* hwrm_ring_grp_alloc_input (size:192b/24B) */
  4638. struct hwrm_ring_grp_alloc_input {
  4639. __le16 req_type;
  4640. __le16 cmpl_ring;
  4641. __le16 seq_id;
  4642. __le16 target_id;
  4643. __le64 resp_addr;
  4644. __le16 cr;
  4645. __le16 rr;
  4646. __le16 ar;
  4647. __le16 sc;
  4648. };
  4649. /* hwrm_ring_grp_alloc_output (size:128b/16B) */
  4650. struct hwrm_ring_grp_alloc_output {
  4651. __le16 error_code;
  4652. __le16 req_type;
  4653. __le16 seq_id;
  4654. __le16 resp_len;
  4655. __le32 ring_group_id;
  4656. u8 unused_0[3];
  4657. u8 valid;
  4658. };
  4659. /* hwrm_ring_grp_free_input (size:192b/24B) */
  4660. struct hwrm_ring_grp_free_input {
  4661. __le16 req_type;
  4662. __le16 cmpl_ring;
  4663. __le16 seq_id;
  4664. __le16 target_id;
  4665. __le64 resp_addr;
  4666. __le32 ring_group_id;
  4667. u8 unused_0[4];
  4668. };
  4669. /* hwrm_ring_grp_free_output (size:128b/16B) */
  4670. struct hwrm_ring_grp_free_output {
  4671. __le16 error_code;
  4672. __le16 req_type;
  4673. __le16 seq_id;
  4674. __le16 resp_len;
  4675. u8 unused_0[7];
  4676. u8 valid;
  4677. };
  4678. /* hwrm_cfa_l2_filter_alloc_input (size:768b/96B) */
  4679. struct hwrm_cfa_l2_filter_alloc_input {
  4680. __le16 req_type;
  4681. __le16 cmpl_ring;
  4682. __le16 seq_id;
  4683. __le16 target_id;
  4684. __le64 resp_addr;
  4685. __le32 flags;
  4686. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH 0x1UL
  4687. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_TX 0x0UL
  4688. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX 0x1UL
  4689. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_LAST CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX
  4690. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x2UL
  4691. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_DROP 0x4UL
  4692. #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_OUTERMOST 0x8UL
  4693. __le32 enables;
  4694. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR 0x1UL
  4695. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR_MASK 0x2UL
  4696. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_OVLAN 0x4UL
  4697. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_OVLAN_MASK 0x8UL
  4698. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN 0x10UL
  4699. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN_MASK 0x20UL
  4700. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_ADDR 0x40UL
  4701. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_ADDR_MASK 0x80UL
  4702. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_OVLAN 0x100UL
  4703. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_OVLAN_MASK 0x200UL
  4704. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_IVLAN 0x400UL
  4705. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_T_L2_IVLAN_MASK 0x800UL
  4706. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_SRC_TYPE 0x1000UL
  4707. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_SRC_ID 0x2000UL
  4708. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x4000UL
  4709. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x8000UL
  4710. #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x10000UL
  4711. u8 l2_addr[6];
  4712. u8 unused_0[2];
  4713. u8 l2_addr_mask[6];
  4714. __le16 l2_ovlan;
  4715. __le16 l2_ovlan_mask;
  4716. __le16 l2_ivlan;
  4717. __le16 l2_ivlan_mask;
  4718. u8 unused_1[2];
  4719. u8 t_l2_addr[6];
  4720. u8 unused_2[2];
  4721. u8 t_l2_addr_mask[6];
  4722. __le16 t_l2_ovlan;
  4723. __le16 t_l2_ovlan_mask;
  4724. __le16 t_l2_ivlan;
  4725. __le16 t_l2_ivlan_mask;
  4726. u8 src_type;
  4727. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_NPORT 0x0UL
  4728. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_PF 0x1UL
  4729. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_VF 0x2UL
  4730. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_VNIC 0x3UL
  4731. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_KONG 0x4UL
  4732. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_APE 0x5UL
  4733. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_BONO 0x6UL
  4734. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_TANG 0x7UL
  4735. #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_LAST CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_TANG
  4736. u8 unused_3;
  4737. __le32 src_id;
  4738. u8 tunnel_type;
  4739. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  4740. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  4741. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  4742. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  4743. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  4744. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  4745. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  4746. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  4747. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  4748. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  4749. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  4750. #define CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_LAST CFA_L2_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL
  4751. u8 unused_4;
  4752. __le16 dst_id;
  4753. __le16 mirror_vnic_id;
  4754. u8 pri_hint;
  4755. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_NO_PREFER 0x0UL
  4756. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_ABOVE_FILTER 0x1UL
  4757. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_BELOW_FILTER 0x2UL
  4758. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_MAX 0x3UL
  4759. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_MIN 0x4UL
  4760. #define CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_LAST CFA_L2_FILTER_ALLOC_REQ_PRI_HINT_MIN
  4761. u8 unused_5;
  4762. __le32 unused_6;
  4763. __le64 l2_filter_id_hint;
  4764. };
  4765. /* hwrm_cfa_l2_filter_alloc_output (size:192b/24B) */
  4766. struct hwrm_cfa_l2_filter_alloc_output {
  4767. __le16 error_code;
  4768. __le16 req_type;
  4769. __le16 seq_id;
  4770. __le16 resp_len;
  4771. __le64 l2_filter_id;
  4772. __le32 flow_id;
  4773. u8 unused_0[3];
  4774. u8 valid;
  4775. };
  4776. /* hwrm_cfa_l2_filter_free_input (size:192b/24B) */
  4777. struct hwrm_cfa_l2_filter_free_input {
  4778. __le16 req_type;
  4779. __le16 cmpl_ring;
  4780. __le16 seq_id;
  4781. __le16 target_id;
  4782. __le64 resp_addr;
  4783. __le64 l2_filter_id;
  4784. };
  4785. /* hwrm_cfa_l2_filter_free_output (size:128b/16B) */
  4786. struct hwrm_cfa_l2_filter_free_output {
  4787. __le16 error_code;
  4788. __le16 req_type;
  4789. __le16 seq_id;
  4790. __le16 resp_len;
  4791. u8 unused_0[7];
  4792. u8 valid;
  4793. };
  4794. /* hwrm_cfa_l2_filter_cfg_input (size:320b/40B) */
  4795. struct hwrm_cfa_l2_filter_cfg_input {
  4796. __le16 req_type;
  4797. __le16 cmpl_ring;
  4798. __le16 seq_id;
  4799. __le16 target_id;
  4800. __le64 resp_addr;
  4801. __le32 flags;
  4802. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH 0x1UL
  4803. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_TX 0x0UL
  4804. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_RX 0x1UL
  4805. #define CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_LAST CFA_L2_FILTER_CFG_REQ_FLAGS_PATH_RX
  4806. #define CFA_L2_FILTER_CFG_REQ_FLAGS_DROP 0x2UL
  4807. __le32 enables;
  4808. #define CFA_L2_FILTER_CFG_REQ_ENABLES_DST_ID 0x1UL
  4809. #define CFA_L2_FILTER_CFG_REQ_ENABLES_NEW_MIRROR_VNIC_ID 0x2UL
  4810. __le64 l2_filter_id;
  4811. __le32 dst_id;
  4812. __le32 new_mirror_vnic_id;
  4813. };
  4814. /* hwrm_cfa_l2_filter_cfg_output (size:128b/16B) */
  4815. struct hwrm_cfa_l2_filter_cfg_output {
  4816. __le16 error_code;
  4817. __le16 req_type;
  4818. __le16 seq_id;
  4819. __le16 resp_len;
  4820. u8 unused_0[7];
  4821. u8 valid;
  4822. };
  4823. /* hwrm_cfa_l2_set_rx_mask_input (size:448b/56B) */
  4824. struct hwrm_cfa_l2_set_rx_mask_input {
  4825. __le16 req_type;
  4826. __le16 cmpl_ring;
  4827. __le16 seq_id;
  4828. __le16 target_id;
  4829. __le64 resp_addr;
  4830. __le32 vnic_id;
  4831. __le32 mask;
  4832. #define CFA_L2_SET_RX_MASK_REQ_MASK_MCAST 0x2UL
  4833. #define CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST 0x4UL
  4834. #define CFA_L2_SET_RX_MASK_REQ_MASK_BCAST 0x8UL
  4835. #define CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS 0x10UL
  4836. #define CFA_L2_SET_RX_MASK_REQ_MASK_OUTERMOST 0x20UL
  4837. #define CFA_L2_SET_RX_MASK_REQ_MASK_VLANONLY 0x40UL
  4838. #define CFA_L2_SET_RX_MASK_REQ_MASK_VLAN_NONVLAN 0x80UL
  4839. #define CFA_L2_SET_RX_MASK_REQ_MASK_ANYVLAN_NONVLAN 0x100UL
  4840. __le64 mc_tbl_addr;
  4841. __le32 num_mc_entries;
  4842. u8 unused_0[4];
  4843. __le64 vlan_tag_tbl_addr;
  4844. __le32 num_vlan_tags;
  4845. u8 unused_1[4];
  4846. };
  4847. /* hwrm_cfa_l2_set_rx_mask_output (size:128b/16B) */
  4848. struct hwrm_cfa_l2_set_rx_mask_output {
  4849. __le16 error_code;
  4850. __le16 req_type;
  4851. __le16 seq_id;
  4852. __le16 resp_len;
  4853. u8 unused_0[7];
  4854. u8 valid;
  4855. };
  4856. /* hwrm_cfa_l2_set_rx_mask_cmd_err (size:64b/8B) */
  4857. struct hwrm_cfa_l2_set_rx_mask_cmd_err {
  4858. u8 code;
  4859. #define CFA_L2_SET_RX_MASK_CMD_ERR_CODE_UNKNOWN 0x0UL
  4860. #define CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR 0x1UL
  4861. #define CFA_L2_SET_RX_MASK_CMD_ERR_CODE_LAST CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR
  4862. u8 unused_0[7];
  4863. };
  4864. /* hwrm_cfa_tunnel_filter_alloc_input (size:704b/88B) */
  4865. struct hwrm_cfa_tunnel_filter_alloc_input {
  4866. __le16 req_type;
  4867. __le16 cmpl_ring;
  4868. __le16 seq_id;
  4869. __le16 target_id;
  4870. __le64 resp_addr;
  4871. __le32 flags;
  4872. #define CFA_TUNNEL_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  4873. __le32 enables;
  4874. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_FILTER_ID 0x1UL
  4875. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_ADDR 0x2UL
  4876. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L2_IVLAN 0x4UL
  4877. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L3_ADDR 0x8UL
  4878. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_L3_ADDR_TYPE 0x10UL
  4879. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_T_L3_ADDR_TYPE 0x20UL
  4880. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_T_L3_ADDR 0x40UL
  4881. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x80UL
  4882. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_VNI 0x100UL
  4883. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_DST_VNIC_ID 0x200UL
  4884. #define CFA_TUNNEL_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x400UL
  4885. __le64 l2_filter_id;
  4886. u8 l2_addr[6];
  4887. __le16 l2_ivlan;
  4888. __le32 l3_addr[4];
  4889. __le32 t_l3_addr[4];
  4890. u8 l3_addr_type;
  4891. u8 t_l3_addr_type;
  4892. u8 tunnel_type;
  4893. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  4894. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  4895. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  4896. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  4897. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  4898. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  4899. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  4900. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  4901. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  4902. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  4903. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  4904. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_LAST CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL
  4905. u8 tunnel_flags;
  4906. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_FLAGS_TUN_FLAGS_OAM_CHECKSUM_EXPLHDR 0x1UL
  4907. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_FLAGS_TUN_FLAGS_CRITICAL_OPT_S1 0x2UL
  4908. #define CFA_TUNNEL_FILTER_ALLOC_REQ_TUNNEL_FLAGS_TUN_FLAGS_EXTHDR_SEQNUM_S0 0x4UL
  4909. __le32 vni;
  4910. __le32 dst_vnic_id;
  4911. __le32 mirror_vnic_id;
  4912. };
  4913. /* hwrm_cfa_tunnel_filter_alloc_output (size:192b/24B) */
  4914. struct hwrm_cfa_tunnel_filter_alloc_output {
  4915. __le16 error_code;
  4916. __le16 req_type;
  4917. __le16 seq_id;
  4918. __le16 resp_len;
  4919. __le64 tunnel_filter_id;
  4920. __le32 flow_id;
  4921. u8 unused_0[3];
  4922. u8 valid;
  4923. };
  4924. /* hwrm_cfa_tunnel_filter_free_input (size:192b/24B) */
  4925. struct hwrm_cfa_tunnel_filter_free_input {
  4926. __le16 req_type;
  4927. __le16 cmpl_ring;
  4928. __le16 seq_id;
  4929. __le16 target_id;
  4930. __le64 resp_addr;
  4931. __le64 tunnel_filter_id;
  4932. };
  4933. /* hwrm_cfa_tunnel_filter_free_output (size:128b/16B) */
  4934. struct hwrm_cfa_tunnel_filter_free_output {
  4935. __le16 error_code;
  4936. __le16 req_type;
  4937. __le16 seq_id;
  4938. __le16 resp_len;
  4939. u8 unused_0[7];
  4940. u8 valid;
  4941. };
  4942. /* hwrm_vxlan_ipv4_hdr (size:128b/16B) */
  4943. struct hwrm_vxlan_ipv4_hdr {
  4944. u8 ver_hlen;
  4945. #define VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_MASK 0xfUL
  4946. #define VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_SFT 0
  4947. #define VXLAN_IPV4_HDR_VER_HLEN_VERSION_MASK 0xf0UL
  4948. #define VXLAN_IPV4_HDR_VER_HLEN_VERSION_SFT 4
  4949. u8 tos;
  4950. __be16 ip_id;
  4951. __be16 flags_frag_offset;
  4952. u8 ttl;
  4953. u8 protocol;
  4954. __be32 src_ip_addr;
  4955. __be32 dest_ip_addr;
  4956. };
  4957. /* hwrm_vxlan_ipv6_hdr (size:320b/40B) */
  4958. struct hwrm_vxlan_ipv6_hdr {
  4959. __be32 ver_tc_flow_label;
  4960. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_SFT 0x1cUL
  4961. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_MASK 0xf0000000UL
  4962. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_SFT 0x14UL
  4963. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_MASK 0xff00000UL
  4964. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_SFT 0x0UL
  4965. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK 0xfffffUL
  4966. #define VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_LAST VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK
  4967. __be16 payload_len;
  4968. u8 next_hdr;
  4969. u8 ttl;
  4970. __be32 src_ip_addr[4];
  4971. __be32 dest_ip_addr[4];
  4972. };
  4973. /* hwrm_cfa_encap_data_vxlan (size:576b/72B) */
  4974. struct hwrm_cfa_encap_data_vxlan {
  4975. u8 src_mac_addr[6];
  4976. __le16 unused_0;
  4977. u8 dst_mac_addr[6];
  4978. u8 num_vlan_tags;
  4979. u8 unused_1;
  4980. __be16 ovlan_tpid;
  4981. __be16 ovlan_tci;
  4982. __be16 ivlan_tpid;
  4983. __be16 ivlan_tci;
  4984. __le32 l3[10];
  4985. #define CFA_ENCAP_DATA_VXLAN_L3_VER_MASK 0xfUL
  4986. #define CFA_ENCAP_DATA_VXLAN_L3_VER_IPV4 0x4UL
  4987. #define CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6 0x6UL
  4988. #define CFA_ENCAP_DATA_VXLAN_L3_LAST CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6
  4989. __be16 src_port;
  4990. __be16 dst_port;
  4991. __be32 vni;
  4992. };
  4993. /* hwrm_cfa_encap_record_alloc_input (size:832b/104B) */
  4994. struct hwrm_cfa_encap_record_alloc_input {
  4995. __le16 req_type;
  4996. __le16 cmpl_ring;
  4997. __le16 seq_id;
  4998. __le16 target_id;
  4999. __le64 resp_addr;
  5000. __le32 flags;
  5001. #define CFA_ENCAP_RECORD_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  5002. u8 encap_type;
  5003. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_VXLAN 0x1UL
  5004. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_NVGRE 0x2UL
  5005. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_L2GRE 0x3UL
  5006. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_IPIP 0x4UL
  5007. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_GENEVE 0x5UL
  5008. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_MPLS 0x6UL
  5009. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_VLAN 0x7UL
  5010. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_IPGRE 0x8UL
  5011. #define CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_LAST CFA_ENCAP_RECORD_ALLOC_REQ_ENCAP_TYPE_IPGRE
  5012. u8 unused_0[3];
  5013. __le32 encap_data[20];
  5014. };
  5015. /* hwrm_cfa_encap_record_alloc_output (size:128b/16B) */
  5016. struct hwrm_cfa_encap_record_alloc_output {
  5017. __le16 error_code;
  5018. __le16 req_type;
  5019. __le16 seq_id;
  5020. __le16 resp_len;
  5021. __le32 encap_record_id;
  5022. u8 unused_0[3];
  5023. u8 valid;
  5024. };
  5025. /* hwrm_cfa_encap_record_free_input (size:192b/24B) */
  5026. struct hwrm_cfa_encap_record_free_input {
  5027. __le16 req_type;
  5028. __le16 cmpl_ring;
  5029. __le16 seq_id;
  5030. __le16 target_id;
  5031. __le64 resp_addr;
  5032. __le32 encap_record_id;
  5033. u8 unused_0[4];
  5034. };
  5035. /* hwrm_cfa_encap_record_free_output (size:128b/16B) */
  5036. struct hwrm_cfa_encap_record_free_output {
  5037. __le16 error_code;
  5038. __le16 req_type;
  5039. __le16 seq_id;
  5040. __le16 resp_len;
  5041. u8 unused_0[7];
  5042. u8 valid;
  5043. };
  5044. /* hwrm_cfa_ntuple_filter_alloc_input (size:1024b/128B) */
  5045. struct hwrm_cfa_ntuple_filter_alloc_input {
  5046. __le16 req_type;
  5047. __le16 cmpl_ring;
  5048. __le16 seq_id;
  5049. __le16 target_id;
  5050. __le64 resp_addr;
  5051. __le32 flags;
  5052. #define CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_LOOPBACK 0x1UL
  5053. #define CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_DROP 0x2UL
  5054. #define CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_METER 0x4UL
  5055. __le32 enables;
  5056. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_L2_FILTER_ID 0x1UL
  5057. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_ETHERTYPE 0x2UL
  5058. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x4UL
  5059. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_MACADDR 0x8UL
  5060. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_IPADDR_TYPE 0x10UL
  5061. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_IPADDR 0x20UL
  5062. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_IPADDR_MASK 0x40UL
  5063. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_IPADDR 0x80UL
  5064. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_IPADDR_MASK 0x100UL
  5065. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_IP_PROTOCOL 0x200UL
  5066. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_PORT 0x400UL
  5067. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_SRC_PORT_MASK 0x800UL
  5068. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_PORT 0x1000UL
  5069. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_PORT_MASK 0x2000UL
  5070. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_PRI_HINT 0x4000UL
  5071. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_NTUPLE_FILTER_ID 0x8000UL
  5072. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x10000UL
  5073. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x20000UL
  5074. #define CFA_NTUPLE_FILTER_ALLOC_REQ_ENABLES_DST_MACADDR 0x40000UL
  5075. __le64 l2_filter_id;
  5076. u8 src_macaddr[6];
  5077. __be16 ethertype;
  5078. u8 ip_addr_type;
  5079. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_UNKNOWN 0x0UL
  5080. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV4 0x4UL
  5081. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV6 0x6UL
  5082. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_LAST CFA_NTUPLE_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV6
  5083. u8 ip_protocol;
  5084. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_UNKNOWN 0x0UL
  5085. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_TCP 0x6UL
  5086. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_UDP 0x11UL
  5087. #define CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_LAST CFA_NTUPLE_FILTER_ALLOC_REQ_IP_PROTOCOL_UDP
  5088. __le16 dst_id;
  5089. __le16 mirror_vnic_id;
  5090. u8 tunnel_type;
  5091. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  5092. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  5093. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  5094. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  5095. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  5096. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  5097. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  5098. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  5099. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  5100. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  5101. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  5102. #define CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_LAST CFA_NTUPLE_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL
  5103. u8 pri_hint;
  5104. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_NO_PREFER 0x0UL
  5105. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_ABOVE 0x1UL
  5106. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_BELOW 0x2UL
  5107. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_HIGHEST 0x3UL
  5108. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_LOWEST 0x4UL
  5109. #define CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_LAST CFA_NTUPLE_FILTER_ALLOC_REQ_PRI_HINT_LOWEST
  5110. __be32 src_ipaddr[4];
  5111. __be32 src_ipaddr_mask[4];
  5112. __be32 dst_ipaddr[4];
  5113. __be32 dst_ipaddr_mask[4];
  5114. __be16 src_port;
  5115. __be16 src_port_mask;
  5116. __be16 dst_port;
  5117. __be16 dst_port_mask;
  5118. __le64 ntuple_filter_id_hint;
  5119. };
  5120. /* hwrm_cfa_ntuple_filter_alloc_output (size:192b/24B) */
  5121. struct hwrm_cfa_ntuple_filter_alloc_output {
  5122. __le16 error_code;
  5123. __le16 req_type;
  5124. __le16 seq_id;
  5125. __le16 resp_len;
  5126. __le64 ntuple_filter_id;
  5127. __le32 flow_id;
  5128. u8 unused_0[3];
  5129. u8 valid;
  5130. };
  5131. /* hwrm_cfa_ntuple_filter_alloc_cmd_err (size:64b/8B) */
  5132. struct hwrm_cfa_ntuple_filter_alloc_cmd_err {
  5133. u8 code;
  5134. #define CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_UNKNOWN 0x0UL
  5135. #define CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR 0x1UL
  5136. #define CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_LAST CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR
  5137. u8 unused_0[7];
  5138. };
  5139. /* hwrm_cfa_ntuple_filter_free_input (size:192b/24B) */
  5140. struct hwrm_cfa_ntuple_filter_free_input {
  5141. __le16 req_type;
  5142. __le16 cmpl_ring;
  5143. __le16 seq_id;
  5144. __le16 target_id;
  5145. __le64 resp_addr;
  5146. __le64 ntuple_filter_id;
  5147. };
  5148. /* hwrm_cfa_ntuple_filter_free_output (size:128b/16B) */
  5149. struct hwrm_cfa_ntuple_filter_free_output {
  5150. __le16 error_code;
  5151. __le16 req_type;
  5152. __le16 seq_id;
  5153. __le16 resp_len;
  5154. u8 unused_0[7];
  5155. u8 valid;
  5156. };
  5157. /* hwrm_cfa_ntuple_filter_cfg_input (size:384b/48B) */
  5158. struct hwrm_cfa_ntuple_filter_cfg_input {
  5159. __le16 req_type;
  5160. __le16 cmpl_ring;
  5161. __le16 seq_id;
  5162. __le16 target_id;
  5163. __le64 resp_addr;
  5164. __le32 enables;
  5165. #define CFA_NTUPLE_FILTER_CFG_REQ_ENABLES_NEW_DST_ID 0x1UL
  5166. #define CFA_NTUPLE_FILTER_CFG_REQ_ENABLES_NEW_MIRROR_VNIC_ID 0x2UL
  5167. #define CFA_NTUPLE_FILTER_CFG_REQ_ENABLES_NEW_METER_INSTANCE_ID 0x4UL
  5168. u8 unused_0[4];
  5169. __le64 ntuple_filter_id;
  5170. __le32 new_dst_id;
  5171. __le32 new_mirror_vnic_id;
  5172. __le16 new_meter_instance_id;
  5173. #define CFA_NTUPLE_FILTER_CFG_REQ_NEW_METER_INSTANCE_ID_INVALID 0xffffUL
  5174. #define CFA_NTUPLE_FILTER_CFG_REQ_NEW_METER_INSTANCE_ID_LAST CFA_NTUPLE_FILTER_CFG_REQ_NEW_METER_INSTANCE_ID_INVALID
  5175. u8 unused_1[6];
  5176. };
  5177. /* hwrm_cfa_ntuple_filter_cfg_output (size:128b/16B) */
  5178. struct hwrm_cfa_ntuple_filter_cfg_output {
  5179. __le16 error_code;
  5180. __le16 req_type;
  5181. __le16 seq_id;
  5182. __le16 resp_len;
  5183. u8 unused_0[7];
  5184. u8 valid;
  5185. };
  5186. /* hwrm_cfa_decap_filter_alloc_input (size:832b/104B) */
  5187. struct hwrm_cfa_decap_filter_alloc_input {
  5188. __le16 req_type;
  5189. __le16 cmpl_ring;
  5190. __le16 seq_id;
  5191. __le16 target_id;
  5192. __le64 resp_addr;
  5193. __le32 flags;
  5194. #define CFA_DECAP_FILTER_ALLOC_REQ_FLAGS_OVS_TUNNEL 0x1UL
  5195. __le32 enables;
  5196. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_TUNNEL_TYPE 0x1UL
  5197. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_TUNNEL_ID 0x2UL
  5198. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_SRC_MACADDR 0x4UL
  5199. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_MACADDR 0x8UL
  5200. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_OVLAN_VID 0x10UL
  5201. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_IVLAN_VID 0x20UL
  5202. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_T_OVLAN_VID 0x40UL
  5203. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_T_IVLAN_VID 0x80UL
  5204. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_ETHERTYPE 0x100UL
  5205. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_SRC_IPADDR 0x200UL
  5206. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_IPADDR 0x400UL
  5207. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_IPADDR_TYPE 0x800UL
  5208. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_IP_PROTOCOL 0x1000UL
  5209. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_SRC_PORT 0x2000UL
  5210. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_PORT 0x4000UL
  5211. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x8000UL
  5212. #define CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_MIRROR_VNIC_ID 0x10000UL
  5213. __be32 tunnel_id;
  5214. u8 tunnel_type;
  5215. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_NONTUNNEL 0x0UL
  5216. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  5217. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_NVGRE 0x2UL
  5218. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_L2GRE 0x3UL
  5219. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPIP 0x4UL
  5220. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  5221. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_MPLS 0x6UL
  5222. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_STT 0x7UL
  5223. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_IPGRE 0x8UL
  5224. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  5225. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL 0xffUL
  5226. #define CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_LAST CFA_DECAP_FILTER_ALLOC_REQ_TUNNEL_TYPE_ANYTUNNEL
  5227. u8 unused_0;
  5228. __le16 unused_1;
  5229. u8 src_macaddr[6];
  5230. u8 unused_2[2];
  5231. u8 dst_macaddr[6];
  5232. __be16 ovlan_vid;
  5233. __be16 ivlan_vid;
  5234. __be16 t_ovlan_vid;
  5235. __be16 t_ivlan_vid;
  5236. __be16 ethertype;
  5237. u8 ip_addr_type;
  5238. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_ADDR_TYPE_UNKNOWN 0x0UL
  5239. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV4 0x4UL
  5240. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV6 0x6UL
  5241. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_ADDR_TYPE_LAST CFA_DECAP_FILTER_ALLOC_REQ_IP_ADDR_TYPE_IPV6
  5242. u8 ip_protocol;
  5243. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_PROTOCOL_UNKNOWN 0x0UL
  5244. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_PROTOCOL_TCP 0x6UL
  5245. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_PROTOCOL_UDP 0x11UL
  5246. #define CFA_DECAP_FILTER_ALLOC_REQ_IP_PROTOCOL_LAST CFA_DECAP_FILTER_ALLOC_REQ_IP_PROTOCOL_UDP
  5247. __le16 unused_3;
  5248. __le32 unused_4;
  5249. __be32 src_ipaddr[4];
  5250. __be32 dst_ipaddr[4];
  5251. __be16 src_port;
  5252. __be16 dst_port;
  5253. __le16 dst_id;
  5254. __le16 l2_ctxt_ref_id;
  5255. };
  5256. /* hwrm_cfa_decap_filter_alloc_output (size:128b/16B) */
  5257. struct hwrm_cfa_decap_filter_alloc_output {
  5258. __le16 error_code;
  5259. __le16 req_type;
  5260. __le16 seq_id;
  5261. __le16 resp_len;
  5262. __le32 decap_filter_id;
  5263. u8 unused_0[3];
  5264. u8 valid;
  5265. };
  5266. /* hwrm_cfa_decap_filter_free_input (size:192b/24B) */
  5267. struct hwrm_cfa_decap_filter_free_input {
  5268. __le16 req_type;
  5269. __le16 cmpl_ring;
  5270. __le16 seq_id;
  5271. __le16 target_id;
  5272. __le64 resp_addr;
  5273. __le32 decap_filter_id;
  5274. u8 unused_0[4];
  5275. };
  5276. /* hwrm_cfa_decap_filter_free_output (size:128b/16B) */
  5277. struct hwrm_cfa_decap_filter_free_output {
  5278. __le16 error_code;
  5279. __le16 req_type;
  5280. __le16 seq_id;
  5281. __le16 resp_len;
  5282. u8 unused_0[7];
  5283. u8 valid;
  5284. };
  5285. /* hwrm_cfa_flow_alloc_input (size:1024b/128B) */
  5286. struct hwrm_cfa_flow_alloc_input {
  5287. __le16 req_type;
  5288. __le16 cmpl_ring;
  5289. __le16 seq_id;
  5290. __le16 target_id;
  5291. __le64 resp_addr;
  5292. __le16 flags;
  5293. #define CFA_FLOW_ALLOC_REQ_FLAGS_TUNNEL 0x1UL
  5294. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_MASK 0x6UL
  5295. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_SFT 1
  5296. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_NONE (0x0UL << 1)
  5297. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_ONE (0x1UL << 1)
  5298. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_TWO (0x2UL << 1)
  5299. #define CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_LAST CFA_FLOW_ALLOC_REQ_FLAGS_NUM_VLAN_TWO
  5300. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_MASK 0x38UL
  5301. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_SFT 3
  5302. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_L2 (0x0UL << 3)
  5303. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_IPV4 (0x1UL << 3)
  5304. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_IPV6 (0x2UL << 3)
  5305. #define CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_LAST CFA_FLOW_ALLOC_REQ_FLAGS_FLOWTYPE_IPV6
  5306. __le16 src_fid;
  5307. __le32 tunnel_handle;
  5308. __le16 action_flags;
  5309. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_FWD 0x1UL
  5310. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_RECYCLE 0x2UL
  5311. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_DROP 0x4UL
  5312. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_METER 0x8UL
  5313. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_TUNNEL 0x10UL
  5314. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_NAT_SRC 0x20UL
  5315. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_NAT_DEST 0x40UL
  5316. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_NAT_IPV4_ADDRESS 0x80UL
  5317. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_L2_HEADER_REWRITE 0x100UL
  5318. #define CFA_FLOW_ALLOC_REQ_ACTION_FLAGS_TTL_DECREMENT 0x200UL
  5319. __le16 dst_fid;
  5320. __be16 l2_rewrite_vlan_tpid;
  5321. __be16 l2_rewrite_vlan_tci;
  5322. __le16 act_meter_id;
  5323. __le16 ref_flow_handle;
  5324. __be16 ethertype;
  5325. __be16 outer_vlan_tci;
  5326. __be16 dmac[3];
  5327. __be16 inner_vlan_tci;
  5328. __be16 smac[3];
  5329. u8 ip_dst_mask_len;
  5330. u8 ip_src_mask_len;
  5331. __be32 ip_dst[4];
  5332. __be32 ip_src[4];
  5333. __be16 l4_src_port;
  5334. __be16 l4_src_port_mask;
  5335. __be16 l4_dst_port;
  5336. __be16 l4_dst_port_mask;
  5337. __be32 nat_ip_address[4];
  5338. __be16 l2_rewrite_dmac[3];
  5339. __be16 nat_port;
  5340. __be16 l2_rewrite_smac[3];
  5341. u8 ip_proto;
  5342. u8 unused_0;
  5343. };
  5344. /* hwrm_cfa_flow_alloc_output (size:128b/16B) */
  5345. struct hwrm_cfa_flow_alloc_output {
  5346. __le16 error_code;
  5347. __le16 req_type;
  5348. __le16 seq_id;
  5349. __le16 resp_len;
  5350. __le16 flow_handle;
  5351. u8 unused_0[5];
  5352. u8 valid;
  5353. };
  5354. /* hwrm_cfa_flow_free_input (size:192b/24B) */
  5355. struct hwrm_cfa_flow_free_input {
  5356. __le16 req_type;
  5357. __le16 cmpl_ring;
  5358. __le16 seq_id;
  5359. __le16 target_id;
  5360. __le64 resp_addr;
  5361. __le16 flow_handle;
  5362. u8 unused_0[6];
  5363. };
  5364. /* hwrm_cfa_flow_free_output (size:256b/32B) */
  5365. struct hwrm_cfa_flow_free_output {
  5366. __le16 error_code;
  5367. __le16 req_type;
  5368. __le16 seq_id;
  5369. __le16 resp_len;
  5370. __le64 packet;
  5371. __le64 byte;
  5372. u8 unused_0[7];
  5373. u8 valid;
  5374. };
  5375. /* hwrm_cfa_flow_stats_input (size:320b/40B) */
  5376. struct hwrm_cfa_flow_stats_input {
  5377. __le16 req_type;
  5378. __le16 cmpl_ring;
  5379. __le16 seq_id;
  5380. __le16 target_id;
  5381. __le64 resp_addr;
  5382. __le16 num_flows;
  5383. __le16 flow_handle_0;
  5384. __le16 flow_handle_1;
  5385. __le16 flow_handle_2;
  5386. __le16 flow_handle_3;
  5387. __le16 flow_handle_4;
  5388. __le16 flow_handle_5;
  5389. __le16 flow_handle_6;
  5390. __le16 flow_handle_7;
  5391. __le16 flow_handle_8;
  5392. __le16 flow_handle_9;
  5393. u8 unused_0[2];
  5394. };
  5395. /* hwrm_cfa_flow_stats_output (size:1408b/176B) */
  5396. struct hwrm_cfa_flow_stats_output {
  5397. __le16 error_code;
  5398. __le16 req_type;
  5399. __le16 seq_id;
  5400. __le16 resp_len;
  5401. __le64 packet_0;
  5402. __le64 packet_1;
  5403. __le64 packet_2;
  5404. __le64 packet_3;
  5405. __le64 packet_4;
  5406. __le64 packet_5;
  5407. __le64 packet_6;
  5408. __le64 packet_7;
  5409. __le64 packet_8;
  5410. __le64 packet_9;
  5411. __le64 byte_0;
  5412. __le64 byte_1;
  5413. __le64 byte_2;
  5414. __le64 byte_3;
  5415. __le64 byte_4;
  5416. __le64 byte_5;
  5417. __le64 byte_6;
  5418. __le64 byte_7;
  5419. __le64 byte_8;
  5420. __le64 byte_9;
  5421. u8 unused_0[7];
  5422. u8 valid;
  5423. };
  5424. /* hwrm_cfa_vfr_alloc_input (size:448b/56B) */
  5425. struct hwrm_cfa_vfr_alloc_input {
  5426. __le16 req_type;
  5427. __le16 cmpl_ring;
  5428. __le16 seq_id;
  5429. __le16 target_id;
  5430. __le64 resp_addr;
  5431. __le16 vf_id;
  5432. __le16 reserved;
  5433. u8 unused_0[4];
  5434. char vfr_name[32];
  5435. };
  5436. /* hwrm_cfa_vfr_alloc_output (size:128b/16B) */
  5437. struct hwrm_cfa_vfr_alloc_output {
  5438. __le16 error_code;
  5439. __le16 req_type;
  5440. __le16 seq_id;
  5441. __le16 resp_len;
  5442. __le16 rx_cfa_code;
  5443. __le16 tx_cfa_action;
  5444. u8 unused_0[3];
  5445. u8 valid;
  5446. };
  5447. /* hwrm_cfa_vfr_free_input (size:384b/48B) */
  5448. struct hwrm_cfa_vfr_free_input {
  5449. __le16 req_type;
  5450. __le16 cmpl_ring;
  5451. __le16 seq_id;
  5452. __le16 target_id;
  5453. __le64 resp_addr;
  5454. char vfr_name[32];
  5455. };
  5456. /* hwrm_cfa_vfr_free_output (size:128b/16B) */
  5457. struct hwrm_cfa_vfr_free_output {
  5458. __le16 error_code;
  5459. __le16 req_type;
  5460. __le16 seq_id;
  5461. __le16 resp_len;
  5462. u8 unused_0[7];
  5463. u8 valid;
  5464. };
  5465. /* hwrm_tunnel_dst_port_query_input (size:192b/24B) */
  5466. struct hwrm_tunnel_dst_port_query_input {
  5467. __le16 req_type;
  5468. __le16 cmpl_ring;
  5469. __le16 seq_id;
  5470. __le16 target_id;
  5471. __le64 resp_addr;
  5472. u8 tunnel_type;
  5473. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  5474. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  5475. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  5476. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_IPGRE_V1 0xaUL
  5477. #define TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_LAST TUNNEL_DST_PORT_QUERY_REQ_TUNNEL_TYPE_IPGRE_V1
  5478. u8 unused_0[7];
  5479. };
  5480. /* hwrm_tunnel_dst_port_query_output (size:128b/16B) */
  5481. struct hwrm_tunnel_dst_port_query_output {
  5482. __le16 error_code;
  5483. __le16 req_type;
  5484. __le16 seq_id;
  5485. __le16 resp_len;
  5486. __le16 tunnel_dst_port_id;
  5487. __be16 tunnel_dst_port_val;
  5488. u8 unused_0[3];
  5489. u8 valid;
  5490. };
  5491. /* hwrm_tunnel_dst_port_alloc_input (size:192b/24B) */
  5492. struct hwrm_tunnel_dst_port_alloc_input {
  5493. __le16 req_type;
  5494. __le16 cmpl_ring;
  5495. __le16 seq_id;
  5496. __le16 target_id;
  5497. __le64 resp_addr;
  5498. u8 tunnel_type;
  5499. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  5500. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  5501. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  5502. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_IPGRE_V1 0xaUL
  5503. #define TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_LAST TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_IPGRE_V1
  5504. u8 unused_0;
  5505. __be16 tunnel_dst_port_val;
  5506. u8 unused_1[4];
  5507. };
  5508. /* hwrm_tunnel_dst_port_alloc_output (size:128b/16B) */
  5509. struct hwrm_tunnel_dst_port_alloc_output {
  5510. __le16 error_code;
  5511. __le16 req_type;
  5512. __le16 seq_id;
  5513. __le16 resp_len;
  5514. __le16 tunnel_dst_port_id;
  5515. u8 unused_0[5];
  5516. u8 valid;
  5517. };
  5518. /* hwrm_tunnel_dst_port_free_input (size:192b/24B) */
  5519. struct hwrm_tunnel_dst_port_free_input {
  5520. __le16 req_type;
  5521. __le16 cmpl_ring;
  5522. __le16 seq_id;
  5523. __le16 target_id;
  5524. __le64 resp_addr;
  5525. u8 tunnel_type;
  5526. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN 0x1UL
  5527. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE 0x5UL
  5528. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN_V4 0x9UL
  5529. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_IPGRE_V1 0xaUL
  5530. #define TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_LAST TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_IPGRE_V1
  5531. u8 unused_0;
  5532. __le16 tunnel_dst_port_id;
  5533. u8 unused_1[4];
  5534. };
  5535. /* hwrm_tunnel_dst_port_free_output (size:128b/16B) */
  5536. struct hwrm_tunnel_dst_port_free_output {
  5537. __le16 error_code;
  5538. __le16 req_type;
  5539. __le16 seq_id;
  5540. __le16 resp_len;
  5541. u8 unused_1[7];
  5542. u8 valid;
  5543. };
  5544. /* ctx_hw_stats (size:1280b/160B) */
  5545. struct ctx_hw_stats {
  5546. __le64 rx_ucast_pkts;
  5547. __le64 rx_mcast_pkts;
  5548. __le64 rx_bcast_pkts;
  5549. __le64 rx_discard_pkts;
  5550. __le64 rx_drop_pkts;
  5551. __le64 rx_ucast_bytes;
  5552. __le64 rx_mcast_bytes;
  5553. __le64 rx_bcast_bytes;
  5554. __le64 tx_ucast_pkts;
  5555. __le64 tx_mcast_pkts;
  5556. __le64 tx_bcast_pkts;
  5557. __le64 tx_discard_pkts;
  5558. __le64 tx_drop_pkts;
  5559. __le64 tx_ucast_bytes;
  5560. __le64 tx_mcast_bytes;
  5561. __le64 tx_bcast_bytes;
  5562. __le64 tpa_pkts;
  5563. __le64 tpa_bytes;
  5564. __le64 tpa_events;
  5565. __le64 tpa_aborts;
  5566. };
  5567. /* hwrm_stat_ctx_alloc_input (size:256b/32B) */
  5568. struct hwrm_stat_ctx_alloc_input {
  5569. __le16 req_type;
  5570. __le16 cmpl_ring;
  5571. __le16 seq_id;
  5572. __le16 target_id;
  5573. __le64 resp_addr;
  5574. __le64 stats_dma_addr;
  5575. __le32 update_period_ms;
  5576. u8 stat_ctx_flags;
  5577. #define STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE 0x1UL
  5578. u8 unused_0[3];
  5579. };
  5580. /* hwrm_stat_ctx_alloc_output (size:128b/16B) */
  5581. struct hwrm_stat_ctx_alloc_output {
  5582. __le16 error_code;
  5583. __le16 req_type;
  5584. __le16 seq_id;
  5585. __le16 resp_len;
  5586. __le32 stat_ctx_id;
  5587. u8 unused_0[3];
  5588. u8 valid;
  5589. };
  5590. /* hwrm_stat_ctx_free_input (size:192b/24B) */
  5591. struct hwrm_stat_ctx_free_input {
  5592. __le16 req_type;
  5593. __le16 cmpl_ring;
  5594. __le16 seq_id;
  5595. __le16 target_id;
  5596. __le64 resp_addr;
  5597. __le32 stat_ctx_id;
  5598. u8 unused_0[4];
  5599. };
  5600. /* hwrm_stat_ctx_free_output (size:128b/16B) */
  5601. struct hwrm_stat_ctx_free_output {
  5602. __le16 error_code;
  5603. __le16 req_type;
  5604. __le16 seq_id;
  5605. __le16 resp_len;
  5606. __le32 stat_ctx_id;
  5607. u8 unused_0[3];
  5608. u8 valid;
  5609. };
  5610. /* hwrm_stat_ctx_query_input (size:192b/24B) */
  5611. struct hwrm_stat_ctx_query_input {
  5612. __le16 req_type;
  5613. __le16 cmpl_ring;
  5614. __le16 seq_id;
  5615. __le16 target_id;
  5616. __le64 resp_addr;
  5617. __le32 stat_ctx_id;
  5618. u8 unused_0[4];
  5619. };
  5620. /* hwrm_stat_ctx_query_output (size:1408b/176B) */
  5621. struct hwrm_stat_ctx_query_output {
  5622. __le16 error_code;
  5623. __le16 req_type;
  5624. __le16 seq_id;
  5625. __le16 resp_len;
  5626. __le64 tx_ucast_pkts;
  5627. __le64 tx_mcast_pkts;
  5628. __le64 tx_bcast_pkts;
  5629. __le64 tx_err_pkts;
  5630. __le64 tx_drop_pkts;
  5631. __le64 tx_ucast_bytes;
  5632. __le64 tx_mcast_bytes;
  5633. __le64 tx_bcast_bytes;
  5634. __le64 rx_ucast_pkts;
  5635. __le64 rx_mcast_pkts;
  5636. __le64 rx_bcast_pkts;
  5637. __le64 rx_err_pkts;
  5638. __le64 rx_drop_pkts;
  5639. __le64 rx_ucast_bytes;
  5640. __le64 rx_mcast_bytes;
  5641. __le64 rx_bcast_bytes;
  5642. __le64 rx_agg_pkts;
  5643. __le64 rx_agg_bytes;
  5644. __le64 rx_agg_events;
  5645. __le64 rx_agg_aborts;
  5646. u8 unused_0[7];
  5647. u8 valid;
  5648. };
  5649. /* hwrm_stat_ctx_clr_stats_input (size:192b/24B) */
  5650. struct hwrm_stat_ctx_clr_stats_input {
  5651. __le16 req_type;
  5652. __le16 cmpl_ring;
  5653. __le16 seq_id;
  5654. __le16 target_id;
  5655. __le64 resp_addr;
  5656. __le32 stat_ctx_id;
  5657. u8 unused_0[4];
  5658. };
  5659. /* hwrm_stat_ctx_clr_stats_output (size:128b/16B) */
  5660. struct hwrm_stat_ctx_clr_stats_output {
  5661. __le16 error_code;
  5662. __le16 req_type;
  5663. __le16 seq_id;
  5664. __le16 resp_len;
  5665. u8 unused_0[7];
  5666. u8 valid;
  5667. };
  5668. /* hwrm_pcie_qstats_input (size:256b/32B) */
  5669. struct hwrm_pcie_qstats_input {
  5670. __le16 req_type;
  5671. __le16 cmpl_ring;
  5672. __le16 seq_id;
  5673. __le16 target_id;
  5674. __le64 resp_addr;
  5675. __le16 pcie_stat_size;
  5676. u8 unused_0[6];
  5677. __le64 pcie_stat_host_addr;
  5678. };
  5679. /* hwrm_pcie_qstats_output (size:128b/16B) */
  5680. struct hwrm_pcie_qstats_output {
  5681. __le16 error_code;
  5682. __le16 req_type;
  5683. __le16 seq_id;
  5684. __le16 resp_len;
  5685. __le16 pcie_stat_size;
  5686. u8 unused_0[5];
  5687. u8 valid;
  5688. };
  5689. /* pcie_ctx_hw_stats (size:768b/96B) */
  5690. struct pcie_ctx_hw_stats {
  5691. __le64 pcie_pl_signal_integrity;
  5692. __le64 pcie_dl_signal_integrity;
  5693. __le64 pcie_tl_signal_integrity;
  5694. __le64 pcie_link_integrity;
  5695. __le64 pcie_tx_traffic_rate;
  5696. __le64 pcie_rx_traffic_rate;
  5697. __le64 pcie_tx_dllp_statistics;
  5698. __le64 pcie_rx_dllp_statistics;
  5699. __le64 pcie_equalization_time;
  5700. __le32 pcie_ltssm_histogram[4];
  5701. __le64 pcie_recovery_histogram;
  5702. };
  5703. /* hwrm_fw_reset_input (size:192b/24B) */
  5704. struct hwrm_fw_reset_input {
  5705. __le16 req_type;
  5706. __le16 cmpl_ring;
  5707. __le16 seq_id;
  5708. __le16 target_id;
  5709. __le64 resp_addr;
  5710. u8 embedded_proc_type;
  5711. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_BOOT 0x0UL
  5712. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_MGMT 0x1UL
  5713. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_NETCTRL 0x2UL
  5714. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_ROCE 0x3UL
  5715. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_HOST 0x4UL
  5716. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_AP 0x5UL
  5717. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_CHIP 0x6UL
  5718. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_HOST_RESOURCE_REINIT 0x7UL
  5719. #define FW_RESET_REQ_EMBEDDED_PROC_TYPE_LAST FW_RESET_REQ_EMBEDDED_PROC_TYPE_HOST_RESOURCE_REINIT
  5720. u8 selfrst_status;
  5721. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTNONE 0x0UL
  5722. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP 0x1UL
  5723. #define FW_RESET_REQ_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  5724. #define FW_RESET_REQ_SELFRST_STATUS_LAST FW_RESET_REQ_SELFRST_STATUS_SELFRSTPCIERST
  5725. u8 host_idx;
  5726. u8 unused_0[5];
  5727. };
  5728. /* hwrm_fw_reset_output (size:128b/16B) */
  5729. struct hwrm_fw_reset_output {
  5730. __le16 error_code;
  5731. __le16 req_type;
  5732. __le16 seq_id;
  5733. __le16 resp_len;
  5734. u8 selfrst_status;
  5735. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTNONE 0x0UL
  5736. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTASAP 0x1UL
  5737. #define FW_RESET_RESP_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  5738. #define FW_RESET_RESP_SELFRST_STATUS_LAST FW_RESET_RESP_SELFRST_STATUS_SELFRSTPCIERST
  5739. u8 unused_0[6];
  5740. u8 valid;
  5741. };
  5742. /* hwrm_fw_qstatus_input (size:192b/24B) */
  5743. struct hwrm_fw_qstatus_input {
  5744. __le16 req_type;
  5745. __le16 cmpl_ring;
  5746. __le16 seq_id;
  5747. __le16 target_id;
  5748. __le64 resp_addr;
  5749. u8 embedded_proc_type;
  5750. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_BOOT 0x0UL
  5751. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_MGMT 0x1UL
  5752. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_NETCTRL 0x2UL
  5753. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_ROCE 0x3UL
  5754. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_HOST 0x4UL
  5755. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_AP 0x5UL
  5756. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_CHIP 0x6UL
  5757. #define FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_LAST FW_QSTATUS_REQ_EMBEDDED_PROC_TYPE_CHIP
  5758. u8 unused_0[7];
  5759. };
  5760. /* hwrm_fw_qstatus_output (size:128b/16B) */
  5761. struct hwrm_fw_qstatus_output {
  5762. __le16 error_code;
  5763. __le16 req_type;
  5764. __le16 seq_id;
  5765. __le16 resp_len;
  5766. u8 selfrst_status;
  5767. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTNONE 0x0UL
  5768. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTASAP 0x1UL
  5769. #define FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTPCIERST 0x2UL
  5770. #define FW_QSTATUS_RESP_SELFRST_STATUS_LAST FW_QSTATUS_RESP_SELFRST_STATUS_SELFRSTPCIERST
  5771. u8 unused_0[6];
  5772. u8 valid;
  5773. };
  5774. /* hwrm_fw_set_time_input (size:256b/32B) */
  5775. struct hwrm_fw_set_time_input {
  5776. __le16 req_type;
  5777. __le16 cmpl_ring;
  5778. __le16 seq_id;
  5779. __le16 target_id;
  5780. __le64 resp_addr;
  5781. __le16 year;
  5782. #define FW_SET_TIME_REQ_YEAR_UNKNOWN 0x0UL
  5783. #define FW_SET_TIME_REQ_YEAR_LAST FW_SET_TIME_REQ_YEAR_UNKNOWN
  5784. u8 month;
  5785. u8 day;
  5786. u8 hour;
  5787. u8 minute;
  5788. u8 second;
  5789. u8 unused_0;
  5790. __le16 millisecond;
  5791. __le16 zone;
  5792. #define FW_SET_TIME_REQ_ZONE_UTC 0x0UL
  5793. #define FW_SET_TIME_REQ_ZONE_UNKNOWN 0xffffUL
  5794. #define FW_SET_TIME_REQ_ZONE_LAST FW_SET_TIME_REQ_ZONE_UNKNOWN
  5795. u8 unused_1[4];
  5796. };
  5797. /* hwrm_fw_set_time_output (size:128b/16B) */
  5798. struct hwrm_fw_set_time_output {
  5799. __le16 error_code;
  5800. __le16 req_type;
  5801. __le16 seq_id;
  5802. __le16 resp_len;
  5803. u8 unused_0[7];
  5804. u8 valid;
  5805. };
  5806. /* hwrm_struct_hdr (size:128b/16B) */
  5807. struct hwrm_struct_hdr {
  5808. __le16 struct_id;
  5809. #define STRUCT_HDR_STRUCT_ID_LLDP_CFG 0x41bUL
  5810. #define STRUCT_HDR_STRUCT_ID_DCBX_ETS 0x41dUL
  5811. #define STRUCT_HDR_STRUCT_ID_DCBX_PFC 0x41fUL
  5812. #define STRUCT_HDR_STRUCT_ID_DCBX_APP 0x421UL
  5813. #define STRUCT_HDR_STRUCT_ID_DCBX_FEATURE_STATE 0x422UL
  5814. #define STRUCT_HDR_STRUCT_ID_LLDP_GENERIC 0x424UL
  5815. #define STRUCT_HDR_STRUCT_ID_LLDP_DEVICE 0x426UL
  5816. #define STRUCT_HDR_STRUCT_ID_AFM_OPAQUE 0x1UL
  5817. #define STRUCT_HDR_STRUCT_ID_PORT_DESCRIPTION 0xaUL
  5818. #define STRUCT_HDR_STRUCT_ID_RSS_V2 0x64UL
  5819. #define STRUCT_HDR_STRUCT_ID_LAST STRUCT_HDR_STRUCT_ID_RSS_V2
  5820. __le16 len;
  5821. u8 version;
  5822. u8 count;
  5823. __le16 subtype;
  5824. __le16 next_offset;
  5825. #define STRUCT_HDR_NEXT_OFFSET_LAST 0x0UL
  5826. u8 unused_0[6];
  5827. };
  5828. /* hwrm_struct_data_dcbx_app (size:64b/8B) */
  5829. struct hwrm_struct_data_dcbx_app {
  5830. __be16 protocol_id;
  5831. u8 protocol_selector;
  5832. #define STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_ETHER_TYPE 0x1UL
  5833. #define STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_PORT 0x2UL
  5834. #define STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_UDP_PORT 0x3UL
  5835. #define STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_UDP_PORT 0x4UL
  5836. #define STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_LAST STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_UDP_PORT
  5837. u8 priority;
  5838. u8 valid;
  5839. u8 unused_0[3];
  5840. };
  5841. /* hwrm_fw_set_structured_data_input (size:256b/32B) */
  5842. struct hwrm_fw_set_structured_data_input {
  5843. __le16 req_type;
  5844. __le16 cmpl_ring;
  5845. __le16 seq_id;
  5846. __le16 target_id;
  5847. __le64 resp_addr;
  5848. __le64 src_data_addr;
  5849. __le16 data_len;
  5850. u8 hdr_cnt;
  5851. u8 unused_0[5];
  5852. };
  5853. /* hwrm_fw_set_structured_data_output (size:128b/16B) */
  5854. struct hwrm_fw_set_structured_data_output {
  5855. __le16 error_code;
  5856. __le16 req_type;
  5857. __le16 seq_id;
  5858. __le16 resp_len;
  5859. u8 unused_0[7];
  5860. u8 valid;
  5861. };
  5862. /* hwrm_fw_set_structured_data_cmd_err (size:64b/8B) */
  5863. struct hwrm_fw_set_structured_data_cmd_err {
  5864. u8 code;
  5865. #define FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_UNKNOWN 0x0UL
  5866. #define FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_HDR_CNT 0x1UL
  5867. #define FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_FMT 0x2UL
  5868. #define FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID 0x3UL
  5869. #define FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_LAST FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID
  5870. u8 unused_0[7];
  5871. };
  5872. /* hwrm_fw_get_structured_data_input (size:256b/32B) */
  5873. struct hwrm_fw_get_structured_data_input {
  5874. __le16 req_type;
  5875. __le16 cmpl_ring;
  5876. __le16 seq_id;
  5877. __le16 target_id;
  5878. __le64 resp_addr;
  5879. __le64 dest_data_addr;
  5880. __le16 data_len;
  5881. __le16 structure_id;
  5882. __le16 subtype;
  5883. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_UNUSED 0x0UL
  5884. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_ALL 0xffffUL
  5885. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NEAR_BRIDGE_ADMIN 0x100UL
  5886. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NEAR_BRIDGE_PEER 0x101UL
  5887. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NEAR_BRIDGE_OPERATIONAL 0x102UL
  5888. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NON_TPMR_ADMIN 0x200UL
  5889. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NON_TPMR_PEER 0x201UL
  5890. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_NON_TPMR_OPERATIONAL 0x202UL
  5891. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_HOST_OPERATIONAL 0x300UL
  5892. #define FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_LAST FW_GET_STRUCTURED_DATA_REQ_SUBTYPE_HOST_OPERATIONAL
  5893. u8 count;
  5894. u8 unused_0;
  5895. };
  5896. /* hwrm_fw_get_structured_data_output (size:128b/16B) */
  5897. struct hwrm_fw_get_structured_data_output {
  5898. __le16 error_code;
  5899. __le16 req_type;
  5900. __le16 seq_id;
  5901. __le16 resp_len;
  5902. u8 hdr_cnt;
  5903. u8 unused_0[6];
  5904. u8 valid;
  5905. };
  5906. /* hwrm_fw_get_structured_data_cmd_err (size:64b/8B) */
  5907. struct hwrm_fw_get_structured_data_cmd_err {
  5908. u8 code;
  5909. #define FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_UNKNOWN 0x0UL
  5910. #define FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID 0x3UL
  5911. #define FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_LAST FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID
  5912. u8 unused_0[7];
  5913. };
  5914. /* hwrm_exec_fwd_resp_input (size:1024b/128B) */
  5915. struct hwrm_exec_fwd_resp_input {
  5916. __le16 req_type;
  5917. __le16 cmpl_ring;
  5918. __le16 seq_id;
  5919. __le16 target_id;
  5920. __le64 resp_addr;
  5921. __le32 encap_request[26];
  5922. __le16 encap_resp_target_id;
  5923. u8 unused_0[6];
  5924. };
  5925. /* hwrm_exec_fwd_resp_output (size:128b/16B) */
  5926. struct hwrm_exec_fwd_resp_output {
  5927. __le16 error_code;
  5928. __le16 req_type;
  5929. __le16 seq_id;
  5930. __le16 resp_len;
  5931. u8 unused_0[7];
  5932. u8 valid;
  5933. };
  5934. /* hwrm_reject_fwd_resp_input (size:1024b/128B) */
  5935. struct hwrm_reject_fwd_resp_input {
  5936. __le16 req_type;
  5937. __le16 cmpl_ring;
  5938. __le16 seq_id;
  5939. __le16 target_id;
  5940. __le64 resp_addr;
  5941. __le32 encap_request[26];
  5942. __le16 encap_resp_target_id;
  5943. u8 unused_0[6];
  5944. };
  5945. /* hwrm_reject_fwd_resp_output (size:128b/16B) */
  5946. struct hwrm_reject_fwd_resp_output {
  5947. __le16 error_code;
  5948. __le16 req_type;
  5949. __le16 seq_id;
  5950. __le16 resp_len;
  5951. u8 unused_0[7];
  5952. u8 valid;
  5953. };
  5954. /* hwrm_fwd_resp_input (size:1024b/128B) */
  5955. struct hwrm_fwd_resp_input {
  5956. __le16 req_type;
  5957. __le16 cmpl_ring;
  5958. __le16 seq_id;
  5959. __le16 target_id;
  5960. __le64 resp_addr;
  5961. __le16 encap_resp_target_id;
  5962. __le16 encap_resp_cmpl_ring;
  5963. __le16 encap_resp_len;
  5964. u8 unused_0;
  5965. u8 unused_1;
  5966. __le64 encap_resp_addr;
  5967. __le32 encap_resp[24];
  5968. };
  5969. /* hwrm_fwd_resp_output (size:128b/16B) */
  5970. struct hwrm_fwd_resp_output {
  5971. __le16 error_code;
  5972. __le16 req_type;
  5973. __le16 seq_id;
  5974. __le16 resp_len;
  5975. u8 unused_0[7];
  5976. u8 valid;
  5977. };
  5978. /* hwrm_fwd_async_event_cmpl_input (size:320b/40B) */
  5979. struct hwrm_fwd_async_event_cmpl_input {
  5980. __le16 req_type;
  5981. __le16 cmpl_ring;
  5982. __le16 seq_id;
  5983. __le16 target_id;
  5984. __le64 resp_addr;
  5985. __le16 encap_async_event_target_id;
  5986. u8 unused_0[6];
  5987. __le32 encap_async_event_cmpl[4];
  5988. };
  5989. /* hwrm_fwd_async_event_cmpl_output (size:128b/16B) */
  5990. struct hwrm_fwd_async_event_cmpl_output {
  5991. __le16 error_code;
  5992. __le16 req_type;
  5993. __le16 seq_id;
  5994. __le16 resp_len;
  5995. u8 unused_0[7];
  5996. u8 valid;
  5997. };
  5998. /* hwrm_temp_monitor_query_input (size:128b/16B) */
  5999. struct hwrm_temp_monitor_query_input {
  6000. __le16 req_type;
  6001. __le16 cmpl_ring;
  6002. __le16 seq_id;
  6003. __le16 target_id;
  6004. __le64 resp_addr;
  6005. };
  6006. /* hwrm_temp_monitor_query_output (size:128b/16B) */
  6007. struct hwrm_temp_monitor_query_output {
  6008. __le16 error_code;
  6009. __le16 req_type;
  6010. __le16 seq_id;
  6011. __le16 resp_len;
  6012. u8 temp;
  6013. u8 unused_0[6];
  6014. u8 valid;
  6015. };
  6016. /* hwrm_wol_filter_alloc_input (size:512b/64B) */
  6017. struct hwrm_wol_filter_alloc_input {
  6018. __le16 req_type;
  6019. __le16 cmpl_ring;
  6020. __le16 seq_id;
  6021. __le16 target_id;
  6022. __le64 resp_addr;
  6023. __le32 flags;
  6024. __le32 enables;
  6025. #define WOL_FILTER_ALLOC_REQ_ENABLES_MAC_ADDRESS 0x1UL
  6026. #define WOL_FILTER_ALLOC_REQ_ENABLES_PATTERN_OFFSET 0x2UL
  6027. #define WOL_FILTER_ALLOC_REQ_ENABLES_PATTERN_BUF_SIZE 0x4UL
  6028. #define WOL_FILTER_ALLOC_REQ_ENABLES_PATTERN_BUF_ADDR 0x8UL
  6029. #define WOL_FILTER_ALLOC_REQ_ENABLES_PATTERN_MASK_ADDR 0x10UL
  6030. #define WOL_FILTER_ALLOC_REQ_ENABLES_PATTERN_MASK_SIZE 0x20UL
  6031. __le16 port_id;
  6032. u8 wol_type;
  6033. #define WOL_FILTER_ALLOC_REQ_WOL_TYPE_MAGICPKT 0x0UL
  6034. #define WOL_FILTER_ALLOC_REQ_WOL_TYPE_BMP 0x1UL
  6035. #define WOL_FILTER_ALLOC_REQ_WOL_TYPE_INVALID 0xffUL
  6036. #define WOL_FILTER_ALLOC_REQ_WOL_TYPE_LAST WOL_FILTER_ALLOC_REQ_WOL_TYPE_INVALID
  6037. u8 unused_0[5];
  6038. u8 mac_address[6];
  6039. __le16 pattern_offset;
  6040. __le16 pattern_buf_size;
  6041. __le16 pattern_mask_size;
  6042. u8 unused_1[4];
  6043. __le64 pattern_buf_addr;
  6044. __le64 pattern_mask_addr;
  6045. };
  6046. /* hwrm_wol_filter_alloc_output (size:128b/16B) */
  6047. struct hwrm_wol_filter_alloc_output {
  6048. __le16 error_code;
  6049. __le16 req_type;
  6050. __le16 seq_id;
  6051. __le16 resp_len;
  6052. u8 wol_filter_id;
  6053. u8 unused_0[6];
  6054. u8 valid;
  6055. };
  6056. /* hwrm_wol_filter_free_input (size:256b/32B) */
  6057. struct hwrm_wol_filter_free_input {
  6058. __le16 req_type;
  6059. __le16 cmpl_ring;
  6060. __le16 seq_id;
  6061. __le16 target_id;
  6062. __le64 resp_addr;
  6063. __le32 flags;
  6064. #define WOL_FILTER_FREE_REQ_FLAGS_FREE_ALL_WOL_FILTERS 0x1UL
  6065. __le32 enables;
  6066. #define WOL_FILTER_FREE_REQ_ENABLES_WOL_FILTER_ID 0x1UL
  6067. __le16 port_id;
  6068. u8 wol_filter_id;
  6069. u8 unused_0[5];
  6070. };
  6071. /* hwrm_wol_filter_free_output (size:128b/16B) */
  6072. struct hwrm_wol_filter_free_output {
  6073. __le16 error_code;
  6074. __le16 req_type;
  6075. __le16 seq_id;
  6076. __le16 resp_len;
  6077. u8 unused_0[7];
  6078. u8 valid;
  6079. };
  6080. /* hwrm_wol_filter_qcfg_input (size:448b/56B) */
  6081. struct hwrm_wol_filter_qcfg_input {
  6082. __le16 req_type;
  6083. __le16 cmpl_ring;
  6084. __le16 seq_id;
  6085. __le16 target_id;
  6086. __le64 resp_addr;
  6087. __le16 port_id;
  6088. __le16 handle;
  6089. u8 unused_0[4];
  6090. __le64 pattern_buf_addr;
  6091. __le16 pattern_buf_size;
  6092. u8 unused_1[6];
  6093. __le64 pattern_mask_addr;
  6094. __le16 pattern_mask_size;
  6095. u8 unused_2[6];
  6096. };
  6097. /* hwrm_wol_filter_qcfg_output (size:256b/32B) */
  6098. struct hwrm_wol_filter_qcfg_output {
  6099. __le16 error_code;
  6100. __le16 req_type;
  6101. __le16 seq_id;
  6102. __le16 resp_len;
  6103. __le16 next_handle;
  6104. u8 wol_filter_id;
  6105. u8 wol_type;
  6106. #define WOL_FILTER_QCFG_RESP_WOL_TYPE_MAGICPKT 0x0UL
  6107. #define WOL_FILTER_QCFG_RESP_WOL_TYPE_BMP 0x1UL
  6108. #define WOL_FILTER_QCFG_RESP_WOL_TYPE_INVALID 0xffUL
  6109. #define WOL_FILTER_QCFG_RESP_WOL_TYPE_LAST WOL_FILTER_QCFG_RESP_WOL_TYPE_INVALID
  6110. __le32 unused_0;
  6111. u8 mac_address[6];
  6112. __le16 pattern_offset;
  6113. __le16 pattern_size;
  6114. __le16 pattern_mask_size;
  6115. u8 unused_1[3];
  6116. u8 valid;
  6117. };
  6118. /* hwrm_wol_reason_qcfg_input (size:320b/40B) */
  6119. struct hwrm_wol_reason_qcfg_input {
  6120. __le16 req_type;
  6121. __le16 cmpl_ring;
  6122. __le16 seq_id;
  6123. __le16 target_id;
  6124. __le64 resp_addr;
  6125. __le16 port_id;
  6126. u8 unused_0[6];
  6127. __le64 wol_pkt_buf_addr;
  6128. __le16 wol_pkt_buf_size;
  6129. u8 unused_1[6];
  6130. };
  6131. /* hwrm_wol_reason_qcfg_output (size:128b/16B) */
  6132. struct hwrm_wol_reason_qcfg_output {
  6133. __le16 error_code;
  6134. __le16 req_type;
  6135. __le16 seq_id;
  6136. __le16 resp_len;
  6137. u8 wol_filter_id;
  6138. u8 wol_reason;
  6139. #define WOL_REASON_QCFG_RESP_WOL_REASON_MAGICPKT 0x0UL
  6140. #define WOL_REASON_QCFG_RESP_WOL_REASON_BMP 0x1UL
  6141. #define WOL_REASON_QCFG_RESP_WOL_REASON_INVALID 0xffUL
  6142. #define WOL_REASON_QCFG_RESP_WOL_REASON_LAST WOL_REASON_QCFG_RESP_WOL_REASON_INVALID
  6143. u8 wol_pkt_len;
  6144. u8 unused_0[4];
  6145. u8 valid;
  6146. };
  6147. /* coredump_segment_record (size:128b/16B) */
  6148. struct coredump_segment_record {
  6149. __le16 component_id;
  6150. __le16 segment_id;
  6151. __le16 max_instances;
  6152. u8 version_hi;
  6153. u8 version_low;
  6154. u8 seg_flags;
  6155. u8 unused_0[7];
  6156. };
  6157. /* hwrm_dbg_coredump_list_input (size:256b/32B) */
  6158. struct hwrm_dbg_coredump_list_input {
  6159. __le16 req_type;
  6160. __le16 cmpl_ring;
  6161. __le16 seq_id;
  6162. __le16 target_id;
  6163. __le64 resp_addr;
  6164. __le64 host_dest_addr;
  6165. __le32 host_buf_len;
  6166. __le16 seq_no;
  6167. u8 unused_0[2];
  6168. };
  6169. /* hwrm_dbg_coredump_list_output (size:128b/16B) */
  6170. struct hwrm_dbg_coredump_list_output {
  6171. __le16 error_code;
  6172. __le16 req_type;
  6173. __le16 seq_id;
  6174. __le16 resp_len;
  6175. u8 flags;
  6176. #define DBG_COREDUMP_LIST_RESP_FLAGS_MORE 0x1UL
  6177. u8 unused_0;
  6178. __le16 total_segments;
  6179. __le16 data_len;
  6180. u8 unused_1;
  6181. u8 valid;
  6182. };
  6183. /* hwrm_dbg_coredump_initiate_input (size:256b/32B) */
  6184. struct hwrm_dbg_coredump_initiate_input {
  6185. __le16 req_type;
  6186. __le16 cmpl_ring;
  6187. __le16 seq_id;
  6188. __le16 target_id;
  6189. __le64 resp_addr;
  6190. __le16 component_id;
  6191. __le16 segment_id;
  6192. __le16 instance;
  6193. __le16 unused_0;
  6194. u8 seg_flags;
  6195. u8 unused_1[7];
  6196. };
  6197. /* hwrm_dbg_coredump_initiate_output (size:128b/16B) */
  6198. struct hwrm_dbg_coredump_initiate_output {
  6199. __le16 error_code;
  6200. __le16 req_type;
  6201. __le16 seq_id;
  6202. __le16 resp_len;
  6203. u8 unused_0[7];
  6204. u8 valid;
  6205. };
  6206. /* coredump_data_hdr (size:128b/16B) */
  6207. struct coredump_data_hdr {
  6208. __le32 address;
  6209. __le32 flags_length;
  6210. __le32 instance;
  6211. __le32 next_offset;
  6212. };
  6213. /* hwrm_dbg_coredump_retrieve_input (size:448b/56B) */
  6214. struct hwrm_dbg_coredump_retrieve_input {
  6215. __le16 req_type;
  6216. __le16 cmpl_ring;
  6217. __le16 seq_id;
  6218. __le16 target_id;
  6219. __le64 resp_addr;
  6220. __le64 host_dest_addr;
  6221. __le32 host_buf_len;
  6222. __le32 unused_0;
  6223. __le16 component_id;
  6224. __le16 segment_id;
  6225. __le16 instance;
  6226. __le16 unused_1;
  6227. u8 seg_flags;
  6228. u8 unused_2;
  6229. __le16 unused_3;
  6230. __le32 unused_4;
  6231. __le32 seq_no;
  6232. __le32 unused_5;
  6233. };
  6234. /* hwrm_dbg_coredump_retrieve_output (size:128b/16B) */
  6235. struct hwrm_dbg_coredump_retrieve_output {
  6236. __le16 error_code;
  6237. __le16 req_type;
  6238. __le16 seq_id;
  6239. __le16 resp_len;
  6240. u8 flags;
  6241. #define DBG_COREDUMP_RETRIEVE_RESP_FLAGS_MORE 0x1UL
  6242. u8 unused_0;
  6243. __le16 data_len;
  6244. u8 unused_1[3];
  6245. u8 valid;
  6246. };
  6247. /* hwrm_nvm_read_input (size:320b/40B) */
  6248. struct hwrm_nvm_read_input {
  6249. __le16 req_type;
  6250. __le16 cmpl_ring;
  6251. __le16 seq_id;
  6252. __le16 target_id;
  6253. __le64 resp_addr;
  6254. __le64 host_dest_addr;
  6255. __le16 dir_idx;
  6256. u8 unused_0[2];
  6257. __le32 offset;
  6258. __le32 len;
  6259. u8 unused_1[4];
  6260. };
  6261. /* hwrm_nvm_read_output (size:128b/16B) */
  6262. struct hwrm_nvm_read_output {
  6263. __le16 error_code;
  6264. __le16 req_type;
  6265. __le16 seq_id;
  6266. __le16 resp_len;
  6267. u8 unused_0[7];
  6268. u8 valid;
  6269. };
  6270. /* hwrm_nvm_get_dir_entries_input (size:192b/24B) */
  6271. struct hwrm_nvm_get_dir_entries_input {
  6272. __le16 req_type;
  6273. __le16 cmpl_ring;
  6274. __le16 seq_id;
  6275. __le16 target_id;
  6276. __le64 resp_addr;
  6277. __le64 host_dest_addr;
  6278. };
  6279. /* hwrm_nvm_get_dir_entries_output (size:128b/16B) */
  6280. struct hwrm_nvm_get_dir_entries_output {
  6281. __le16 error_code;
  6282. __le16 req_type;
  6283. __le16 seq_id;
  6284. __le16 resp_len;
  6285. u8 unused_0[7];
  6286. u8 valid;
  6287. };
  6288. /* hwrm_nvm_get_dir_info_input (size:128b/16B) */
  6289. struct hwrm_nvm_get_dir_info_input {
  6290. __le16 req_type;
  6291. __le16 cmpl_ring;
  6292. __le16 seq_id;
  6293. __le16 target_id;
  6294. __le64 resp_addr;
  6295. };
  6296. /* hwrm_nvm_get_dir_info_output (size:192b/24B) */
  6297. struct hwrm_nvm_get_dir_info_output {
  6298. __le16 error_code;
  6299. __le16 req_type;
  6300. __le16 seq_id;
  6301. __le16 resp_len;
  6302. __le32 entries;
  6303. __le32 entry_length;
  6304. u8 unused_0[7];
  6305. u8 valid;
  6306. };
  6307. /* hwrm_nvm_write_input (size:384b/48B) */
  6308. struct hwrm_nvm_write_input {
  6309. __le16 req_type;
  6310. __le16 cmpl_ring;
  6311. __le16 seq_id;
  6312. __le16 target_id;
  6313. __le64 resp_addr;
  6314. __le64 host_src_addr;
  6315. __le16 dir_type;
  6316. __le16 dir_ordinal;
  6317. __le16 dir_ext;
  6318. __le16 dir_attr;
  6319. __le32 dir_data_length;
  6320. __le16 option;
  6321. __le16 flags;
  6322. #define NVM_WRITE_REQ_FLAGS_KEEP_ORIG_ACTIVE_IMG 0x1UL
  6323. __le32 dir_item_length;
  6324. __le32 unused_0;
  6325. };
  6326. /* hwrm_nvm_write_output (size:128b/16B) */
  6327. struct hwrm_nvm_write_output {
  6328. __le16 error_code;
  6329. __le16 req_type;
  6330. __le16 seq_id;
  6331. __le16 resp_len;
  6332. __le32 dir_item_length;
  6333. __le16 dir_idx;
  6334. u8 unused_0;
  6335. u8 valid;
  6336. };
  6337. /* hwrm_nvm_write_cmd_err (size:64b/8B) */
  6338. struct hwrm_nvm_write_cmd_err {
  6339. u8 code;
  6340. #define NVM_WRITE_CMD_ERR_CODE_UNKNOWN 0x0UL
  6341. #define NVM_WRITE_CMD_ERR_CODE_FRAG_ERR 0x1UL
  6342. #define NVM_WRITE_CMD_ERR_CODE_NO_SPACE 0x2UL
  6343. #define NVM_WRITE_CMD_ERR_CODE_LAST NVM_WRITE_CMD_ERR_CODE_NO_SPACE
  6344. u8 unused_0[7];
  6345. };
  6346. /* hwrm_nvm_modify_input (size:320b/40B) */
  6347. struct hwrm_nvm_modify_input {
  6348. __le16 req_type;
  6349. __le16 cmpl_ring;
  6350. __le16 seq_id;
  6351. __le16 target_id;
  6352. __le64 resp_addr;
  6353. __le64 host_src_addr;
  6354. __le16 dir_idx;
  6355. u8 unused_0[2];
  6356. __le32 offset;
  6357. __le32 len;
  6358. u8 unused_1[4];
  6359. };
  6360. /* hwrm_nvm_modify_output (size:128b/16B) */
  6361. struct hwrm_nvm_modify_output {
  6362. __le16 error_code;
  6363. __le16 req_type;
  6364. __le16 seq_id;
  6365. __le16 resp_len;
  6366. u8 unused_0[7];
  6367. u8 valid;
  6368. };
  6369. /* hwrm_nvm_find_dir_entry_input (size:256b/32B) */
  6370. struct hwrm_nvm_find_dir_entry_input {
  6371. __le16 req_type;
  6372. __le16 cmpl_ring;
  6373. __le16 seq_id;
  6374. __le16 target_id;
  6375. __le64 resp_addr;
  6376. __le32 enables;
  6377. #define NVM_FIND_DIR_ENTRY_REQ_ENABLES_DIR_IDX_VALID 0x1UL
  6378. __le16 dir_idx;
  6379. __le16 dir_type;
  6380. __le16 dir_ordinal;
  6381. __le16 dir_ext;
  6382. u8 opt_ordinal;
  6383. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_MASK 0x3UL
  6384. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_SFT 0
  6385. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_EQ 0x0UL
  6386. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_GE 0x1UL
  6387. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_GT 0x2UL
  6388. #define NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_LAST NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_GT
  6389. u8 unused_0[3];
  6390. };
  6391. /* hwrm_nvm_find_dir_entry_output (size:256b/32B) */
  6392. struct hwrm_nvm_find_dir_entry_output {
  6393. __le16 error_code;
  6394. __le16 req_type;
  6395. __le16 seq_id;
  6396. __le16 resp_len;
  6397. __le32 dir_item_length;
  6398. __le32 dir_data_length;
  6399. __le32 fw_ver;
  6400. __le16 dir_ordinal;
  6401. __le16 dir_idx;
  6402. u8 unused_0[7];
  6403. u8 valid;
  6404. };
  6405. /* hwrm_nvm_erase_dir_entry_input (size:192b/24B) */
  6406. struct hwrm_nvm_erase_dir_entry_input {
  6407. __le16 req_type;
  6408. __le16 cmpl_ring;
  6409. __le16 seq_id;
  6410. __le16 target_id;
  6411. __le64 resp_addr;
  6412. __le16 dir_idx;
  6413. u8 unused_0[6];
  6414. };
  6415. /* hwrm_nvm_erase_dir_entry_output (size:128b/16B) */
  6416. struct hwrm_nvm_erase_dir_entry_output {
  6417. __le16 error_code;
  6418. __le16 req_type;
  6419. __le16 seq_id;
  6420. __le16 resp_len;
  6421. u8 unused_0[7];
  6422. u8 valid;
  6423. };
  6424. /* hwrm_nvm_get_dev_info_input (size:128b/16B) */
  6425. struct hwrm_nvm_get_dev_info_input {
  6426. __le16 req_type;
  6427. __le16 cmpl_ring;
  6428. __le16 seq_id;
  6429. __le16 target_id;
  6430. __le64 resp_addr;
  6431. };
  6432. /* hwrm_nvm_get_dev_info_output (size:256b/32B) */
  6433. struct hwrm_nvm_get_dev_info_output {
  6434. __le16 error_code;
  6435. __le16 req_type;
  6436. __le16 seq_id;
  6437. __le16 resp_len;
  6438. __le16 manufacturer_id;
  6439. __le16 device_id;
  6440. __le32 sector_size;
  6441. __le32 nvram_size;
  6442. __le32 reserved_size;
  6443. __le32 available_size;
  6444. u8 unused_0[3];
  6445. u8 valid;
  6446. };
  6447. /* hwrm_nvm_mod_dir_entry_input (size:256b/32B) */
  6448. struct hwrm_nvm_mod_dir_entry_input {
  6449. __le16 req_type;
  6450. __le16 cmpl_ring;
  6451. __le16 seq_id;
  6452. __le16 target_id;
  6453. __le64 resp_addr;
  6454. __le32 enables;
  6455. #define NVM_MOD_DIR_ENTRY_REQ_ENABLES_CHECKSUM 0x1UL
  6456. __le16 dir_idx;
  6457. __le16 dir_ordinal;
  6458. __le16 dir_ext;
  6459. __le16 dir_attr;
  6460. __le32 checksum;
  6461. };
  6462. /* hwrm_nvm_mod_dir_entry_output (size:128b/16B) */
  6463. struct hwrm_nvm_mod_dir_entry_output {
  6464. __le16 error_code;
  6465. __le16 req_type;
  6466. __le16 seq_id;
  6467. __le16 resp_len;
  6468. u8 unused_0[7];
  6469. u8 valid;
  6470. };
  6471. /* hwrm_nvm_verify_update_input (size:192b/24B) */
  6472. struct hwrm_nvm_verify_update_input {
  6473. __le16 req_type;
  6474. __le16 cmpl_ring;
  6475. __le16 seq_id;
  6476. __le16 target_id;
  6477. __le64 resp_addr;
  6478. __le16 dir_type;
  6479. __le16 dir_ordinal;
  6480. __le16 dir_ext;
  6481. u8 unused_0[2];
  6482. };
  6483. /* hwrm_nvm_verify_update_output (size:128b/16B) */
  6484. struct hwrm_nvm_verify_update_output {
  6485. __le16 error_code;
  6486. __le16 req_type;
  6487. __le16 seq_id;
  6488. __le16 resp_len;
  6489. u8 unused_0[7];
  6490. u8 valid;
  6491. };
  6492. /* hwrm_nvm_install_update_input (size:192b/24B) */
  6493. struct hwrm_nvm_install_update_input {
  6494. __le16 req_type;
  6495. __le16 cmpl_ring;
  6496. __le16 seq_id;
  6497. __le16 target_id;
  6498. __le64 resp_addr;
  6499. __le32 install_type;
  6500. #define NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_NORMAL 0x0UL
  6501. #define NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_ALL 0xffffffffUL
  6502. #define NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_LAST NVM_INSTALL_UPDATE_REQ_INSTALL_TYPE_ALL
  6503. __le16 flags;
  6504. #define NVM_INSTALL_UPDATE_REQ_FLAGS_ERASE_UNUSED_SPACE 0x1UL
  6505. #define NVM_INSTALL_UPDATE_REQ_FLAGS_REMOVE_UNUSED_PKG 0x2UL
  6506. #define NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG 0x4UL
  6507. u8 unused_0[2];
  6508. };
  6509. /* hwrm_nvm_install_update_output (size:192b/24B) */
  6510. struct hwrm_nvm_install_update_output {
  6511. __le16 error_code;
  6512. __le16 req_type;
  6513. __le16 seq_id;
  6514. __le16 resp_len;
  6515. __le64 installed_items;
  6516. u8 result;
  6517. #define NVM_INSTALL_UPDATE_RESP_RESULT_SUCCESS 0x0UL
  6518. #define NVM_INSTALL_UPDATE_RESP_RESULT_LAST NVM_INSTALL_UPDATE_RESP_RESULT_SUCCESS
  6519. u8 problem_item;
  6520. #define NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_NONE 0x0UL
  6521. #define NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_PACKAGE 0xffUL
  6522. #define NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_LAST NVM_INSTALL_UPDATE_RESP_PROBLEM_ITEM_PACKAGE
  6523. u8 reset_required;
  6524. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_NONE 0x0UL
  6525. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_PCI 0x1UL
  6526. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_POWER 0x2UL
  6527. #define NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_LAST NVM_INSTALL_UPDATE_RESP_RESET_REQUIRED_POWER
  6528. u8 unused_0[4];
  6529. u8 valid;
  6530. };
  6531. /* hwrm_nvm_install_update_cmd_err (size:64b/8B) */
  6532. struct hwrm_nvm_install_update_cmd_err {
  6533. u8 code;
  6534. #define NVM_INSTALL_UPDATE_CMD_ERR_CODE_UNKNOWN 0x0UL
  6535. #define NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR 0x1UL
  6536. #define NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE 0x2UL
  6537. #define NVM_INSTALL_UPDATE_CMD_ERR_CODE_LAST NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE
  6538. u8 unused_0[7];
  6539. };
  6540. /* hwrm_nvm_get_variable_input (size:320b/40B) */
  6541. struct hwrm_nvm_get_variable_input {
  6542. __le16 req_type;
  6543. __le16 cmpl_ring;
  6544. __le16 seq_id;
  6545. __le16 target_id;
  6546. __le64 resp_addr;
  6547. __le64 dest_data_addr;
  6548. __le16 data_len;
  6549. __le16 option_num;
  6550. #define NVM_GET_VARIABLE_REQ_OPTION_NUM_RSVD_0 0x0UL
  6551. #define NVM_GET_VARIABLE_REQ_OPTION_NUM_RSVD_FFFF 0xffffUL
  6552. #define NVM_GET_VARIABLE_REQ_OPTION_NUM_LAST NVM_GET_VARIABLE_REQ_OPTION_NUM_RSVD_FFFF
  6553. __le16 dimensions;
  6554. __le16 index_0;
  6555. __le16 index_1;
  6556. __le16 index_2;
  6557. __le16 index_3;
  6558. u8 flags;
  6559. #define NVM_GET_VARIABLE_REQ_FLAGS_FACTORY_DFLT 0x1UL
  6560. u8 unused_0;
  6561. };
  6562. /* hwrm_nvm_get_variable_output (size:128b/16B) */
  6563. struct hwrm_nvm_get_variable_output {
  6564. __le16 error_code;
  6565. __le16 req_type;
  6566. __le16 seq_id;
  6567. __le16 resp_len;
  6568. __le16 data_len;
  6569. __le16 option_num;
  6570. #define NVM_GET_VARIABLE_RESP_OPTION_NUM_RSVD_0 0x0UL
  6571. #define NVM_GET_VARIABLE_RESP_OPTION_NUM_RSVD_FFFF 0xffffUL
  6572. #define NVM_GET_VARIABLE_RESP_OPTION_NUM_LAST NVM_GET_VARIABLE_RESP_OPTION_NUM_RSVD_FFFF
  6573. u8 unused_0[3];
  6574. u8 valid;
  6575. };
  6576. /* hwrm_nvm_get_variable_cmd_err (size:64b/8B) */
  6577. struct hwrm_nvm_get_variable_cmd_err {
  6578. u8 code;
  6579. #define NVM_GET_VARIABLE_CMD_ERR_CODE_UNKNOWN 0x0UL
  6580. #define NVM_GET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST 0x1UL
  6581. #define NVM_GET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR 0x2UL
  6582. #define NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT 0x3UL
  6583. #define NVM_GET_VARIABLE_CMD_ERR_CODE_LAST NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT
  6584. u8 unused_0[7];
  6585. };
  6586. /* hwrm_nvm_set_variable_input (size:320b/40B) */
  6587. struct hwrm_nvm_set_variable_input {
  6588. __le16 req_type;
  6589. __le16 cmpl_ring;
  6590. __le16 seq_id;
  6591. __le16 target_id;
  6592. __le64 resp_addr;
  6593. __le64 src_data_addr;
  6594. __le16 data_len;
  6595. __le16 option_num;
  6596. #define NVM_SET_VARIABLE_REQ_OPTION_NUM_RSVD_0 0x0UL
  6597. #define NVM_SET_VARIABLE_REQ_OPTION_NUM_RSVD_FFFF 0xffffUL
  6598. #define NVM_SET_VARIABLE_REQ_OPTION_NUM_LAST NVM_SET_VARIABLE_REQ_OPTION_NUM_RSVD_FFFF
  6599. __le16 dimensions;
  6600. __le16 index_0;
  6601. __le16 index_1;
  6602. __le16 index_2;
  6603. __le16 index_3;
  6604. u8 flags;
  6605. #define NVM_SET_VARIABLE_REQ_FLAGS_FORCE_FLUSH 0x1UL
  6606. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_MASK 0xeUL
  6607. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_SFT 1
  6608. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_NONE (0x0UL << 1)
  6609. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_HMAC_SHA1 (0x1UL << 1)
  6610. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_AES256 (0x2UL << 1)
  6611. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH (0x3UL << 1)
  6612. #define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_LAST NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH
  6613. u8 unused_0;
  6614. };
  6615. /* hwrm_nvm_set_variable_output (size:128b/16B) */
  6616. struct hwrm_nvm_set_variable_output {
  6617. __le16 error_code;
  6618. __le16 req_type;
  6619. __le16 seq_id;
  6620. __le16 resp_len;
  6621. u8 unused_0[7];
  6622. u8 valid;
  6623. };
  6624. /* hwrm_nvm_set_variable_cmd_err (size:64b/8B) */
  6625. struct hwrm_nvm_set_variable_cmd_err {
  6626. u8 code;
  6627. #define NVM_SET_VARIABLE_CMD_ERR_CODE_UNKNOWN 0x0UL
  6628. #define NVM_SET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST 0x1UL
  6629. #define NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR 0x2UL
  6630. #define NVM_SET_VARIABLE_CMD_ERR_CODE_LAST NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR
  6631. u8 unused_0[7];
  6632. };
  6633. /* hwrm_selftest_qlist_input (size:128b/16B) */
  6634. struct hwrm_selftest_qlist_input {
  6635. __le16 req_type;
  6636. __le16 cmpl_ring;
  6637. __le16 seq_id;
  6638. __le16 target_id;
  6639. __le64 resp_addr;
  6640. };
  6641. /* hwrm_selftest_qlist_output (size:2240b/280B) */
  6642. struct hwrm_selftest_qlist_output {
  6643. __le16 error_code;
  6644. __le16 req_type;
  6645. __le16 seq_id;
  6646. __le16 resp_len;
  6647. u8 num_tests;
  6648. u8 available_tests;
  6649. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_NVM_TEST 0x1UL
  6650. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_LINK_TEST 0x2UL
  6651. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_REGISTER_TEST 0x4UL
  6652. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_MEMORY_TEST 0x8UL
  6653. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_PCIE_SERDES_TEST 0x10UL
  6654. #define SELFTEST_QLIST_RESP_AVAILABLE_TESTS_ETHERNET_SERDES_TEST 0x20UL
  6655. u8 offline_tests;
  6656. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_NVM_TEST 0x1UL
  6657. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_LINK_TEST 0x2UL
  6658. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_REGISTER_TEST 0x4UL
  6659. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_MEMORY_TEST 0x8UL
  6660. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_PCIE_SERDES_TEST 0x10UL
  6661. #define SELFTEST_QLIST_RESP_OFFLINE_TESTS_ETHERNET_SERDES_TEST 0x20UL
  6662. u8 unused_0;
  6663. __le16 test_timeout;
  6664. u8 unused_1[2];
  6665. char test0_name[32];
  6666. char test1_name[32];
  6667. char test2_name[32];
  6668. char test3_name[32];
  6669. char test4_name[32];
  6670. char test5_name[32];
  6671. char test6_name[32];
  6672. char test7_name[32];
  6673. u8 unused_2[7];
  6674. u8 valid;
  6675. };
  6676. /* hwrm_selftest_exec_input (size:192b/24B) */
  6677. struct hwrm_selftest_exec_input {
  6678. __le16 req_type;
  6679. __le16 cmpl_ring;
  6680. __le16 seq_id;
  6681. __le16 target_id;
  6682. __le64 resp_addr;
  6683. u8 flags;
  6684. #define SELFTEST_EXEC_REQ_FLAGS_NVM_TEST 0x1UL
  6685. #define SELFTEST_EXEC_REQ_FLAGS_LINK_TEST 0x2UL
  6686. #define SELFTEST_EXEC_REQ_FLAGS_REGISTER_TEST 0x4UL
  6687. #define SELFTEST_EXEC_REQ_FLAGS_MEMORY_TEST 0x8UL
  6688. #define SELFTEST_EXEC_REQ_FLAGS_PCIE_SERDES_TEST 0x10UL
  6689. #define SELFTEST_EXEC_REQ_FLAGS_ETHERNET_SERDES_TEST 0x20UL
  6690. u8 unused_0[7];
  6691. };
  6692. /* hwrm_selftest_exec_output (size:128b/16B) */
  6693. struct hwrm_selftest_exec_output {
  6694. __le16 error_code;
  6695. __le16 req_type;
  6696. __le16 seq_id;
  6697. __le16 resp_len;
  6698. u8 requested_tests;
  6699. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_NVM_TEST 0x1UL
  6700. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_LINK_TEST 0x2UL
  6701. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_REGISTER_TEST 0x4UL
  6702. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_MEMORY_TEST 0x8UL
  6703. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_PCIE_SERDES_TEST 0x10UL
  6704. #define SELFTEST_EXEC_RESP_REQUESTED_TESTS_ETHERNET_SERDES_TEST 0x20UL
  6705. u8 test_success;
  6706. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_NVM_TEST 0x1UL
  6707. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_LINK_TEST 0x2UL
  6708. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_REGISTER_TEST 0x4UL
  6709. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_MEMORY_TEST 0x8UL
  6710. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_PCIE_SERDES_TEST 0x10UL
  6711. #define SELFTEST_EXEC_RESP_TEST_SUCCESS_ETHERNET_SERDES_TEST 0x20UL
  6712. u8 unused_0[5];
  6713. u8 valid;
  6714. };
  6715. /* hwrm_selftest_irq_input (size:128b/16B) */
  6716. struct hwrm_selftest_irq_input {
  6717. __le16 req_type;
  6718. __le16 cmpl_ring;
  6719. __le16 seq_id;
  6720. __le16 target_id;
  6721. __le64 resp_addr;
  6722. };
  6723. /* hwrm_selftest_irq_output (size:128b/16B) */
  6724. struct hwrm_selftest_irq_output {
  6725. __le16 error_code;
  6726. __le16 req_type;
  6727. __le16 seq_id;
  6728. __le16 resp_len;
  6729. u8 unused_0[7];
  6730. u8 valid;
  6731. };
  6732. #endif /* _BNXT_HSI_H_ */