linux/drivers/target/target_core_hba.c
<<
>>
Prefs
   1/*******************************************************************************
   2_core_hba.c#2">   2_core_h 
v2..10.2/drivers/target/target_core_h
33> 2_c3re_h v2..10.2/droption valueeadingbottom"> 34> 2_c4re_h v2..10.2/driTval 27b6 870aains the TCM HBA Transport related fun;"> s.option valueeadingbottom"> 35> 2_c5re_h v2..10.2/droption valueeadingbottom"> 36> 2_c6re_h v2..10.2/dri(c) Copyss="l 2003-2012 Risch_Tide Systems LLC.option valueeadingbottom"> 37> 2_c7re_h v2..10.2/droption valueeadingbottom"> 38> 2_c8re_h v2..10.2/driNicho > A. Belv> ger <nab@kernel.org 39> 2_c9re_h v2..10.2/droption valueeadingbottom"> 310s="comme0nt">/******************0 2.6.ption6" > v2..10.2/driTval program al 2ree software; you c6" redistris">e it and/or modifyoption valueeadingbottom"> 31ss="commeent">/***********************1***************************driit under the terms of the GNU General Pubspa License > pubspshed byoption valueeadingbottom"> 31"> 2_c1ore_h 1 v2..10.2/drithe Free Software Founda"> ; either ttomlect2 of the License, oroption valueeadingbottom"> 313> 2_c13re_h v2..10.2/dr (at your ) any later ttomlec.option valueeadingbottom"> 314> 2_c14re_h v2..10.2/droption valueeadingbottom"> 315> 2_c15re_h v2..10.2/driTval program al distris">ed in the hope that it will be useful,option valueeadingbottom"> 316> 2_c16re_h v2..10.2/dris"> WITHOUT ANY WARRANTY; wi"hi"> even the implied warranty ofoption valueeadingbottom"> 317> 2_c17re_h v2..10.2/dr MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theoption valueeadingbottom"> 318> 2_c18re_h v2..10.2/driGNU General Pubspa License for more deaails.option valueeadingbottom"> 319> 2_c19re_h v2..10.2/droption valueeadingbottom"> 320s="comm20nt">/*****************20 2.6.ption6" > v2..10.2/driYou shi"ld have receottd a 87py of the GNU General Pubspa Licenseoption valueeadingbottom"> 32ss="comm2ent">/*****************2*****2***************************drialong wi"h tval program; if not, wri>e toithe Free Softwareoption valueeadingbottom"> 32"> 2_coore_h > 2 v2..10.2/drivounda"> , Inc., 59 Temple Place - Sui>e 330, B" n , MA 02111-1307, USA.option valueeadingbottom"> 323> 2_c23re_h v2..10.2/droption valueeadingbottom"> 324> 2_c24re_h v2..10.2/drrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/option valueeadingbottom"> 325> 2_c25re_h 326> 2_c26re_h 327> 2_c27re_h 328> 2_c28re_h 329> 2_c29re_h 330s="comm30nt">/*****************30 30 33ss="comm3ent">/*****************3*****31 33"> 2_c3ore_h 32 333> 2_c33re_h net/sock.h 334> 2_c34re_h net/tcp.h 335> 2_c35re_h 336> 2_c36re_h base.hre_h > base.h 337> 2_c37re_h backend.hre_h > backend.h 338> 2_c38re_h fabric.hre_h > fabric.h 339> 2_c39re_h 340s="comm40nt">/*****************40 40 internal.hre_h > internal.h 34ss="comm4ent">/*****************4*****41 34"> 2_c4ore_h 42ref">LIST_HEADref">subsystem_li n 343> 2_c43re_h ref">DEFINE_MUTEXref">subsystem_mutex 344> 2_c44re_h 345> 2_c45re_h ref">u32ref"> _id/diunter 346> 2_c46re_h 347> 2_c47re_h ref">DEFINE_SPINLOCKref"> _lock 348> 2_c48re_h ref">LIST_HEADref"> _li n 349> 2_c49re_h 350s="comm50nt">/*****************50 50ref">transport_subsystem_regi nerref">se_subsystem_apiref">sub_api 35ss="comm5ent">/*****************5*****51 35"> 2_c5ore_h 52ref">se_subsystem_apiref">s 353> 2_c53re_h 354> 2_c54re_h ref">INIT_LIST_HEADref">sub_apiref">sub_api_li n 355> 2_c55re_h 356> 2_c56re_h ref">mutex_lockref">subsystem_mutex 357> 2_c57re_h ref">li n_for_each_entryref">sref">subsystem_li nref">sub_api_li n 358> 2_c58re_h ref">strcmpref">sref"> <ref">sub_apiref"> < 359> 2_c59re_h ref">pr_err string"t 360s="comm60nt">/*****************60 60 string"t 36ss="comm6ent">/*****************6*****61 string"tref">sref">sref"> < 36"> 2_c6ore_h 62ref">mutex_unlockref">subsystem_mutex 363> 2_c63re_h ref">EEXIST 364> 2_c64re_h 365> 2_c65re_h 366> 2_c66re_h ref">li n_add_aailref">sub_apiref">sub_api_li nref">subsystem_li n 367> 2_c67re_h ref">mutex_unlockref">subsystem_mutex 368> 2_c68re_h 369> 2_c69re_h ref">pr_debug string"t 370s="comm70nt">/*****************70 70 string"tref">sub_apiref"> <ref">sub_apiref">owner 37ss="comm7ent">/*****************7*****71 37"> 2_c7ore_h 72 373> 7m_mutexrefXPORT_SYMBOLcmpref">transport_subsystem_regi ner 364> 7_c64re_h <7in64 7 44 7 365> 7_c65re_h <7in65 7 65rede=transport_subsystemleas nerref">se_subsystem_apiref">sub_api 7 366> 7_c66re_h <7in66 76*51 7 37> 22_c7re_h ref">mutex_lockref">subsystem_mutex 7 368> 7_c68re_h <7in68 78 66ref">lideaEADref">sub_apiref">sub_api_li n 7 369> 7_c69re_h <7in69 7 69ref">mutex_unlockref">subsystem_mutex 8 370s="c8mm70nt">/**************8**70 80 72 8 37ss="c8mm7ent">/**************8**7**81 23refXPORT_SYMBOLcmprede=transport_subsystemleas ner 8 37"> 8_c7ore_h <8in7> 82 44 8 373> 8m_mutexref">se_subsystem_api backapiamontent">re backcmprede=sde= api 8 364> 8_c64re_h <8in64 84*51 8 365> 8_c65re_h <8in65 8 65ref">se_subsystem_apiref">s 8 366> 8_c66re_h <8in66 8 46 8 37> 82_c7re_h <8in67 8 67ref">mutex_lockref">subsystem_mutex 8 38> 22_c8re_h ref">li n_for_each_entryref">sref">subsystem_li nref">sub_api_li n 8 369> 8_c69re_h <8in69 8 59ref">strcmpref">sref"> <rede=sde= api 9 370s="c9mm70nt">/**************9**70 9 70refrivo">s 9 37ss="c9mm7ent">/**************9**7**9**71 9 37"> 9_c7ore_h <9in7> 92 67ref">mutex_unlockref">subsystem_mutex 9 373> 9m_mutexreNULL">s 9 364> 9_c64re_h <9in64 94 23refrivo">s<:pt;valueeadingbottom"> 9 365> 9_c65re_h <9in65 9 65ref">sref">ownerreden_cthmodi cmpref">sref">owner 9 366> 9_c66re_h <9in66 96 70ref">s< =pmp;ba.c" coNULLISTamontent">reNULL">s 9 37> 92_c7re_h <9in67 9 67ref">mutex_unlockref">subsystem_mutex 9 38> 92_c8re_h <9in68 98 63ref">s 9 39> 22_c9re_h 10 310s="commme0nt">/******************70*** 46 10 31ss="co0mmeent">/***************01*70**1 43 apiamontent">ref">v> api 10 31"> 20_c1ore_h apiamontent">re cmpreem plusde= <ref">u32reem plusdep_io <ref">u32 flagde=samontent">ref"> flagdapi 10 313> 20_c13re_h 10 314> 20_c14re_h apiamontent">ref">v> apie=samontent">ref">">s 10 315> 20_c15re_h rer cmp< =p" i0;valueeadingbottom"> 10 316> 20_c16re_h 10 317> 20_c17re_h e=samontent">ref">">s< =pmp;ba.c" cokzal_une=samontent">rekzal_unnere=samontent">ref">">s<)opt,hba.c" coGFP_KERNELISTamontent">reGFP_KERNELtex 10 318> 20_c18re_h e=samontent">ref">">s<)pt) {valueeadingbottom"> 10 319> 20_c19re_h ref">pr_err string"tv> 7;p\n"aptiopt);valueeadingbottom"> 1 310s="coomme0nt">/*******************011 70refRR_PTRerrrefNOMEMtex 1 31ss="commmeent">/****************1*70*1**71 1 31"> 22_c1ore_h 112 44 1 313> 22_c13re_h refi/stex_l_inilocke=samontent">ref">">sredevicetex_ltex 1 314> 22_c14re_h mutinili namontent">ref">mutinilocke=samontent">ref">">s acproctem_mutexamontent">ref"> acproctem_mutex 1 315> 22_c15re_h 1 316> 22_c16re_h e=samontent">ref">">s indmutexamontent">ref"> indmu">s< =pmp;ba.c" coscsii new indmutexamontent">rescsii new indmucmpreSCSI_INST_INDMUtex 1 317> 22_c17re_h e=samontent">ref">">s flagde=samontent">ref"> flagdapi< |=pmp;ba.c" cof"> flagde=samontent">ref"> flagdapi 1 318> 22_c18re_h 1 319> 22_c19re_h e=samontent">ref">">srede=transp">s< =pmp;ba.c" co backapiamontent">re backcmpreem plusde= < 1 320s="c1omm20nt">/**************1***2012 70e=samontent">ref">">srede=transp">s<)pt) {valueeadingbottom"> 1 32ss="c1omm2ent">/**************1***2*12**61rer cmp< =p" i-ba.c" codINVALISTamontent">refINVALapi 1 32"> 12_coore_h <1fin>>12 62 apiamontent">reout_al 2=v> api 1 313> 22_c23re_h <1fin23123 67 1 324> 12_c24re_h <1fin2412 44 1 325> 12_c25re_h <1fin25125 69rer cmp< =p (!ba.c" cof">e=samontent">ref">">srede=transp">se=samontent">reattr_eaf">cmpe=samontent">ref">">sreem plusdep_io < 1 316> 22_c26re_h <1fin26126 70rer cmp< de & 0opt)valueeadingbottom"> 1 327> 12_c27re_h <1fin27127 62reout_cthmodipu api 1 318> 22_c28re_h <1fin2812 68 1 329> 12_c29re_h <1fin2912 69refi/stex_lock _lockre_h ref"> _lock 1 330s="c1omm30nt">/**************1***30130 69e=samontent">ref">">s io ref"> iocmp< =p (!ba.c" cof"> _id/diunterre_h ref"> _id/diunter<++pt);valueeadingbottom"> 1 32ss="c1omm3ent">/**************1***3*131 69ref">li n_add_aaile=samontent">ref">">s n cterre_h ref"> n c">sref"> _li n 1 33"> 12_c3ore_h <1fin3>132 67refi/stex_unlock _lockre_h ref"> _lock 1 313> 2__c13re_h 1 334> 12_c34re_h <1fin3413 54ref">pr_debug string"t le:"aption valueeadingbottom"> 1 335> 12_c35re_h <1fin35135 62 string"te=samontent">ref">">s io ref"> iocmp 1 316> 22_c36re_h <1fin3613 46 1 337> 12_c37re_h <1fin37137 62e=samontent">ref">">s 1 338> 12_c38re_h <1fin3813 68 1 339> 12_c39re_h <1fin391 39reout_cthmodipu api<:pt;valueeadingbottom"> 1 340s="c1omm40nt">/**************1***4014 70e=samontent">ref">">srede=transp">sref">owner 1 32ss="c1omm4ent">/**************1***4*14**61recthmodipu apie=samontent">ref">">srede=transp">sref">owner 1 34"> 12_c4ore_h <1fin4>142 67e=samontent">ref">">srede=transp">s< =pmp;ba.c" coNULLISTamontent">reNULL">s 1 343> 12_c43re_h <1fin4314 23 apiamontent">reout_al 2=v> api<:pt;valueeadingbottom"> 1 314> 2__c14re_h rekal 2apie=samontent">ref">">s 1 335> 12_c45re_h <1fin45145 62refRR_PTRerrrer cmp 1 316> 22_c46re_h <1fin461 46 1 347> 12_c47re_h <1fin471 47 1 338> 12_c48re_h <1fin481 48 1 339> 12_c49re_h <1fin4914 39 apiamontent">re ner apiamontent">ref">v> apie=samontent">ref">">s 1 350s="c1omm50nt">/**************1***501 50 1 35ss="c1omm5ent">/**************1***5*151 69reWARN_ONapie=samontent">ref">">sredev_id/dicmp 1 35"> 12_c5ore_h <1fin5>152 44 1 353> 12_c53re_h <1fin53153 67e=samontent">ref">">srede=transp">se=samontent">rere d_eaf">apie=samontent">ref">">s 1 354> 12_c54re_h <1fin5415 44 1 355> 12_c55re_h <1fin55155 69refi/stex_lock _lockre_h ref"> _lock 1 356> 12_c56re_h <1fin561 56ref">lideaEADe=samontent">ref">">s n cterre_h ref"> n c">s 1 347> 12_c57re_h <1fin571 57refi/stex_unlock _lockre_h ref"> _lock 1 358> 12_c58re_h <1fin5815 68 1 359> 12_c59re_h <1fin5915 69ref">pr_debug string"t le:"aption valueeadingbottom"> 1 360s="c1omm60nt">/**************1***601 60 string"te=samontent">ref">">s io ref"> iocmp 1 36ss="c1omm6ent">/**************1***6*16**41 1 36"> 12_c6ore_h <1fin6>1 62e=samontent">ref">">srede=transp">sref">owner 1 363> 12_c63re_h <1fin631 63recthmodipu apie=samontent">ref">">srede=transp">sref">owner 1 364> 12_c64re_h <1fin6416 44 1 365> 12_c65re_h <1fin65165 69e=samontent">ref">">srede=transp">s< =pmp;ba.c" coNULLISTamontent">reNULL">s 16 316> 2__c16re_h rekal 2apie=samontent">ref">">s 1 367> 12_c67re_h <1fin67167 62 1 368> 12_c68re_h <1fin681 68 1 369> 12_c69re_h <1fin691 69<
The original LXRree softw by toitt}valueeahttp://sourcefo>
 .f">nprojects/lxnt>LXRr
  vunity">s  .norefxn@l">  .no">s<.
ts">
fxn.l">  .no kindly hostpshedtt}valueeahttp://www.redpill-l">pro.noreRedpill L">pro AS">sux7b6 v idstr it  opGeunda"s services since 1995.
ts">