ChangeLog.lpfc 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865
  1. Known issues :
  2. * Please read the associated RELEASE-NOTES file !!!
  3. * This source release intended for upstream kernel releases only!
  4. Changes from 20050323 to 20050413
  5. * Changed version number to 8.0.28
  6. * Fixed build warning for 2.6.12-rc2 kernels: mempool_alloc now
  7. requires a function which takes an unsigned int for gfp_flags.
  8. * Removed pci dma sync calls to coherent/consistent pci memory.
  9. * Merged patch from Christoph Hellwig <hch@lst.de>: split helpers
  10. for fabric and nport logins out of lpfc_cmpl_els_flogi.
  11. * Removed sysfs attributes that are used to dump the various
  12. discovery lists.
  13. * Fix for issue where not all luns are seen. Search all lists
  14. other than unmap list in lpfc_find_target(). Otherwise INQUIRY
  15. to luns on nodes in NPR or other relevant states (PLOGI,
  16. PRLI...) are errored back and scan() terminates.
  17. * Removed FC_TRANSPORT_PATCHESxxx defines. They're in 2.6.12-rc1.
  18. * Compare return value of lpfc_scsi_tgt_reset against SCSI
  19. midlayer codes SUCCESS/FAILED which that function returns rather
  20. than SLI return code.
  21. * Removed extraneous calls to lpfc_sli_next_iotag which should
  22. only be called from lpfc_sli_submit_iocb. Also make
  23. lpfc_sli_next_iotag static.
  24. * Added PCI ID for LP10000-S.
  25. * Changes in lpfc_abort_handler(): Return SUCCESS if we did not
  26. find command in both TX and TX completion queues. Return ERROR
  27. if we timed out waiting for command to complete after abort was
  28. issued.
  29. * Zero-out response sense length in lpfc_scsi_prep_cmnd to prevent
  30. interpretation of stale sense length when the command completes
  31. - was causing spurious 0710 messages.
  32. * Moved clearing of host_scribble inside host_lock in IO
  33. completion path.
  34. * Fixed a bunch of mixed tab/space indentation.
  35. * Allow hex format numbers in sysfs attribute setting. Fix
  36. application hang when invalid numbers are used in sysfs
  37. settings.
  38. * Removed extra iotag allocation by lpfc_abort_handler.
  39. * Clear host_scribble in the scsi_cmnd structure when failing in
  40. queuecommand.
  41. * Changed logic at top of lpfc_abort_handler so that if the
  42. command's host_scibble field is NULL, return SUCCESS because the
  43. driver has already returned the command to the midlayer.
  44. Changes from 20050308 to 20050323
  45. * Changed version number to 8.0.27
  46. * Changed a few lines from patch submitted by Christoph Hellwig
  47. (3/19). MAILBOX_WSIZE * (uint32_t) is replaced with an
  48. equivalent MAILBOX_CMDSIZE macro.
  49. * Merged patch from Christoph Hellwig (3/19): some misc patches
  50. against the latest drivers:
  51. - stop using volatile. if you need special ordering use memory
  52. barriers but that doesn't seem to be the case here
  53. - switch lpfc_sli_pcimem_bcopy to take void * arguments.
  54. - remove typecast for constants - a U postfix marks them
  55. unsigned int in C
  56. - add a MAILBOX_CMD_SIZE macro, as most users of
  57. MAILBOX_CMD_WSIZE didn't really want the word count
  58. - kill struct lpfc_scsi_dma_buf and embedded the two members
  59. directly in struct lpfc_scsi_buf
  60. - don't call dma_sync function on allocations from
  61. pci_pool_alloc - it's only for streaming mappings (pci_map_*)
  62. * Merged patch from Christoph Hellwig (3/19) - nlp_failMask isn't
  63. ever used by the driver, just reported to userspace (and that in
  64. a multi-value file which is against the sysfs guidelines).
  65. * Change pci_module_init to pci_register_module() with appropriate
  66. ifdefs.
  67. * Added #include <linux/dma-mapping.h> as required by the DMA
  68. 32bit and 64bit defines on some archs.
  69. * Merged patch from Christoph Hellwig (03/19) - fix initialization
  70. order - scsi_add_host must happen last from scsi POV. Also some
  71. minor style/comment fixups.
  72. * Fixed use of TRANSPORT_PATCHES_V2 by changing to
  73. FC_TRANSPORT_PATCHES_V2.
  74. Changes from 20050223 to 20050308
  75. * Changed version number to 8.0.26
  76. * Revise TRANSPORT_PATCHES_V2 so that lpfc_target is removed and
  77. rport data is used instead. Removed device_queue_hash[].
  78. * Changed RW attributes of scan_down, max_luns and fcp_bind_method
  79. to R only.
  80. * Fixed RSCN handling during initial link initialization.
  81. * Fixed issue with receiving PLOGI handling when node is on NPR
  82. list and marked for ADISC.
  83. * Fixed RSCN timeout issues.
  84. * Reduced severity of "SCSI layer issued abort device" message to
  85. KERN_WARNING.
  86. * Feedback from Christoph Hellwig (on 2/5) - In the LPFC_EVT_SCAN
  87. case the caller already has the target ID handly, so pass that
  88. one in evt_arg1.
  89. * Fix compile warning/resultant panic in
  90. lpfc_register_remote_port().
  91. Changes from 20050215 to 20050223
  92. * Changed version number to 8.0.25
  93. * Add appropriate comments to lpfc_sli.c.
  94. * Use DMA_64BIT_MASK and DMA_32BIT_MASK defines instead of
  95. 0xffffffffffffffffULL & 0xffffffffULL respectively. Use pci
  96. equivalents instead of dma_set_mask and also modify condition
  97. clause to actually exit on error condition.
  98. * Restart els timeout handler only if txcmplq_cnt. On submission,
  99. mod_timer the els_tmofunc. This prevents the worker thread from
  100. waking up the els_tmo handler un-necessarily. The thread was
  101. being woken up even when there were no pending els commands.
  102. * Added new typedefs for abort and reset functions.
  103. * Collapsed lpfc_sli_abort_iocb_xxx into a single function.
  104. * Collapsed lpfc_sli_sum_iocb_xxx into a single function.
  105. * Removed TXQ from all abort and reset handlers since it is never
  106. used.
  107. * Fixed Oops panic in 8.0.23 (reported on SourceForge). The
  108. driver was not handling LPFC_IO_POLL cases correctly in
  109. fast_ring_event and was setting the tgt_reset timeout to 0 in
  110. lpfc_reset_bus_handler. This 0 timeout would not allow the FW
  111. to timeout ABTS's on bad targets and allow the driver to have an
  112. iocb on two lists. Also split the lpfc_sli_ringtxcmpl_get
  113. function into two routines to match the fast and slow completion
  114. semantics - ELS completions worked for the wrong reasons. Also
  115. provided new log message number - had two 0326 entries.
  116. * Removed unused #define LPFC_SCSI_INITIAL_BPL_SIZE.
  117. * Removed unused struct lpfc_node_farp_pend definition.
  118. * Removed unused #define LPFC_SLIM2_PAGE_AREA.
  119. * Changed zeros used as pointers to NULL.
  120. * Removed unneeded braces around single line in lpfc_do_work.
  121. * Close humongous memory leak in lpfc_sli.c - driver was losing 13
  122. iocbq structures per LIP.
  123. * Removed last of GFP_ATOMIC allocations.
  124. * Locks are not taken outside of nportdisc, hbadisc, els and most
  125. of the init, sli, mbox and ct groups of functions
  126. * Fix comment for lpfc_sli_iocb_cmd_type to fit within 80 columns.
  127. * Replaced wait_event() with wait_event_interruptible().
  128. wait_event() puts the woker thread in an UNINTERRUPTIBLE state
  129. causing it to figure in load average calculations. Also add a
  130. BUG_ON to the ret code of wait_event_interruptible() since the
  131. premise is that the worker thread is signal-immune.
  132. Changes from 20050208 to 20050215
  133. * Changed version number to 8.0.24
  134. * Fixed a memory leak of iocbq structure. For ELS solicited iocbs
  135. sli layer now frees the response iocbs after processing it.
  136. * Closed large memory leak -- we were losing 13 iocbq structures
  137. per LIP.
  138. * Changing EIO and ENOMEM to -EIO and -ENOMEM respectively.
  139. * Cleanup of lpfc_sli_iocb_cmd_type array and typing of iocb type.
  140. * Implemented Christoph Hellwig's feedback from 02/05: Remove
  141. macros putLunHigh, putLunLow. Use lpfc_put_lun() inline instead.
  142. * Integrated Christoph Hellwig's feedback from 02/05: Instead of
  143. cpu_to_be32(), use swab16((uint16_t)lun). This is the same as
  144. "swab16() on LE" and "<<16 on BE".
  145. * Added updates for revised FC remote port patch (dev_loss_tmo
  146. moved to rport, hostdata renamed dd_data, add fc_remote_host()
  147. on shutdown).
  148. * Removed unnecessary function prototype.
  149. * Added code to prevent waking up worker thread after the exit of
  150. worker thread. Fixes panic seen with insmod/rmmod testing with
  151. 70 disks.
  152. * Integrated Christoph Hellwig's patch from 1/30: Make some
  153. variables/code static (namely lpfcAlpaArray and
  154. process_nodev_timeout()).
  155. * Integrated Christoph Hellwig's patch from 1/30: Use
  156. switch...case instead of if...else if...else if while decoding
  157. JDEC id.
  158. Changes from 20050201 to 20050208
  159. * Changed version number to 8.0.23
  160. * Make lpfc_work_done, lpfc_get_scsi_buf,
  161. lpfc_mbx_process_link_up, lpfc_mbx_issue_link_down and
  162. lpfc_sli_chipset_init static.
  163. * Cleaned up references to list_head->next field in the driver.
  164. * Replaced lpfc_discq_post_event with lpfc_workq_post_event.
  165. * Implmented Christoph Hellwig's review from 2/5: Check for return
  166. values of kmalloc.
  167. * Integrated Christoph Hellwig's patch from 1/30: Protecting
  168. scan_tmo and friends in !FC_TRANSPORT_PATCHES_V2 &&
  169. !USE_SCAN_TARGET.
  170. * Integrated Christoph Hellwig's patch from 1/30: Some fixes in
  171. the evt handling area.
  172. * Integrated Christoph Hellwig's patch from 1/30: Remove usage of
  173. intr_inited variable. The interrupt initilization from OS side
  174. now happens in lpfc_probe_one().
  175. * Integrated Christoph Hellwig's patch from 1/30: remove shim
  176. lpfc_alloc_transport_attr - remove shim lpfc_alloc_shost_attrs -
  177. remove shim lpfc_scsi_host_init - allocate phba mem in scsi's
  178. hostdata readjust code so that they are no use after free's
  179. (don't use after scsi_host_put) - make lpfc_alloc_sysfs_attr
  180. return errors
  181. * Fixed panic in lpfc_probe_one(). Do not delete in a list
  182. iterator that is not safe.
  183. * Clean up fast lookup array of the fcp_ring when aborting iocbs.
  184. * Following timeout handlers moved to the lpfc worker thread:
  185. lpfc_disc_timeout, lpfc_els_timeout, lpfc_mbox, lpfc_fdmi_tmo,
  186. lpfc_nodev_timeout, lpfc_els_retry_delay.
  187. * Removed unused NLP_NS_NODE #define.
  188. * Integrated Christoph Hellwig's patch from 1/30: remove unused
  189. lpfc_hba_list; remove unused lpfc_rdrev_wd30; remove
  190. lpfc_get_brd_no and use Linux provided IDR.
  191. * Changed board reset procedure so that lpfc_sli_send_reset()
  192. writes the INITFF bit and leaves lpfc_sli_brdreset() to clear
  193. the bit.
  194. * Removed outfcpio sysfs device attribute.
  195. * VPD changes: 1) Modify driver to use the model name and
  196. description from the VPD data if it exists 2) Rework use of DUMP
  197. mailbox command to support HBAs with 256 bytes of SLIM.
  198. * Fixed compile error for implicit definition of struct
  199. scsi_target
  200. Changes from 20050124 to 20050201
  201. * Changed version number to 8.0.22
  202. * Moved discovery timeout handler to worker thread. There are
  203. function calls in this function which are not safe to call from
  204. HW interrupt context.
  205. * Removed free_irq from the error path of HBA initialization.
  206. This will fix the free of uninitialised IRQ when config_port
  207. fails.
  208. * Make sure function which processes unsolicited IOCBs on ELS ring
  209. still is called with the lock held.
  210. * Clear LA bit from work_ha when we are not supposed to handle LA.
  211. * Fix double locking bug in the error handling part of
  212. lpfc_mbx_cmpl_read_la.
  213. * Implemented fast IOCB processing for FCP ring.
  214. * Since mboxes are now unconditionally allocated outside of the
  215. lock, free them in cases where they are not used.
  216. * Moved out a couple of GFP_ATOMICs in lpfc_disc_timeout, to
  217. before locks so that they can GFP_KERNEL instead. Also cleaned
  218. up code.
  219. * Collapsed interrupt handling code into one function.
  220. * Removed event posting and handling of solicited and unsolicited
  221. iocbs.
  222. * Remove ELS ring handling leftovers from the lpfc_sli_inter().
  223. * ELS ring (any slow ring) moved from the lpfc_sli_inter() into a
  224. worker thread. Link Attention, Mbox Attention, and Error
  225. Attention, as well as slow rings' attention is passed to the
  226. worker thread via worker thread copy of Host Attention
  227. register. Corresponding events are removed from the event queue
  228. handling.
  229. * Add entries to hba structure to delegate some functionality from
  230. the lpfc_sli_inter() to a worker thread.
  231. * Reduced used of GFP_ATOMIC for memory allocations.
  232. * Moved locks deeper in order to change GFP_ATOMIC to GFP_KERNEL.
  233. * IOCB initialization fix for Raw IO.
  234. * Removed qcmdcnt, iodonecnt, errcnt from lpfc_target and from
  235. driver.
  236. * Added call to lpfc_els_abort in lpfc_free_node. Modified
  237. lpfc_els_abort to reset txq and txcmplq iterator after a
  238. iocb_cmpl call.
  239. * Fixed a use after free issue in lpfc_init.c.
  240. * Defined default mailbox completion routine and removed code in
  241. the sli layer which checks the mbox_cmpl == 0 to free mail box
  242. resources.
  243. * In lpfc_workq_post_event, clean up comment formatting and remove
  244. unneeded cast of kmalloc's return.
  245. * Removed loop which calls fc_remote_port_unblock and
  246. fc_remote_port_delete for every target as this same effect is
  247. accomplished by the scsi_remove_host call.
  248. * Minor cleanup of header files. Stop header files including
  249. other header files. Removed sentinels which hide multiple
  250. inclusions. Removed unneeded #include directives.
  251. * Fixed memory leaks in mailbox error paths.
  252. * Moved lock from around of lpfc_work_done to lpfc_work_done
  253. itself.
  254. * Removed typedef for LPFC_WORK_EVT_t and left just struct
  255. lpfc_work_evt to comply with linux_scsi review coding style.
  256. * Fixed some trailing whitespaces, spaces used for indentation and
  257. ill-formatting multiline comments.
  258. * Bug fix for Raw IO errors. Reuse of IOCBs now mandates setting
  259. of ulpPU and fcpi_parm to avoid incorrect read check of Write IO
  260. and incorrect read length.
  261. Changes from 20050110 to 20050124
  262. * Changed version number to 8.0.21
  263. * Removed unpleasant casting in the definition and use of
  264. lpfc_disc_action function pointer array.
  265. * Makefile cleanup. Use ?= operator for setting default
  266. KERNELVERSION and BASEINCLUDE values. Use $(PWD) consistently.
  267. * Removed call to lpfc_sli_intr from lpfc_config_port_post. All
  268. Linux systems will service hardware interrupts while bringing up
  269. the driver.
  270. * Christoph Hellwig change request: Reorg of contents of
  271. lpfc_hbadisc.c, lpfc_scsi.h, lpfc_init.c, lpfc_sli.c,
  272. lpfc_attr.c, lpfc_scsi.c.
  273. * Renamed discovery thread to lpfc_worker thread. Moved handling
  274. of error attention and link attention and mbox event handler to
  275. lpfc_worker thread.
  276. * Removed .proc_info and .proc_name from the driver template and
  277. associated code.
  278. * Removed check of FC_UNLOADING flag in lpfc_queuecommand to
  279. determine what result to return.
  280. * Move modification of FC_UNLOADING flag under host_lock.
  281. * Fix IOERR_RCV_BUFFER_WAITING handling for CT and ELS subsystem.
  282. * Workaround firmware bug for IOERR_RCV_BUFFER_WAITING on ELS
  283. ring.
  284. * Fixed a couple lpfc_post_buffer problems in lpfc_init.c.
  285. * Add missing spaces to the parameter descriptions for
  286. lpfc_cr_delay, lpfc_cr_count and lpfc_discovery_threads.
  287. * Lock before calling lpfc_sli_hba_down().
  288. * Fix leak of "host" in the error path in the remove_one() path.
  289. * Fix comment for lpfc_cr_count. It defaults to 1.
  290. * Fix issue where we are calling lpfc_disc_done() recursively from
  291. lpfc_linkdown(), but list_for_each_entry_safe() is not safe for
  292. such use.
  293. * Bump lpfc_discovery_threads (count of outstading ELS commands in
  294. discovery) to 32
  295. * If the SCSI midlayer tries to recover from an error on a lun
  296. while the corresponding target is in the NPR state, lpfc driver
  297. will reject all the resets. This will cause the target to be
  298. moved to offline state and block all the I/Os. The fix for this
  299. is to delay the lun reset to a target which is not in MAPPED
  300. state until the target is rediscovered or nodev timeout is
  301. fired.
  302. Changes from 20041229 to 20050110
  303. * Changed version number to 8.0.20
  304. * rport fix: use new fc_remote_port_rolechg() function instead of
  305. direct structure change
  306. * rport fix: last null pointer check
  307. * Phase II of GFP_ATOMIC effort. Replaced iocb_mem_pool and
  308. scsibuf_mem_pool with kmalloc and linked list. Inserted list
  309. operations for mempool_alloc calls. General code cleanup. All
  310. abort and reset routines converted. Handle_ring_event
  311. converted.
  312. * If the mbox_cmpl == lpfc_sli_wake_mbox_wait in
  313. lpfc_sli_handle_mb_event, pmb->context1 points to a waitq. Do
  314. not free the structure.
  315. * rport fixes: fix for rmmod crash
  316. * rport fixes: when receiving PRLI's, set node/rport role values
  317. * rport fixes: fix for unload and for fabric port deletes
  318. * VPD info bug fix.
  319. * lpfc_linkdown() should be able to process all outstanding events
  320. by calling lpfc_disc_done() even if it is called from
  321. lpfc_disc_done() Moving all events from phba->dpc_disc to local
  322. local_dpc_disc prevents those events from being processed.
  323. Removing that queue. From now on we should not see "Illegal
  324. State Transition" messages.
  325. * Release host lock and enable interrupts when calling
  326. del_timer_sync()
  327. * All related to rports: Clean up issues with rport deletion
  328. Convert to using block/unblock on list remove (was del/add)
  329. Moved rport delete to freenode - so rport tracks node.
  330. * rport fixes: for fport, get maxframe and class support
  331. information
  332. * Added use of wait_event to work with kthread interface.
  333. * Ensure that scsi_transport_fc.h is always pulled in by
  334. lpfc_scsiport.c
  335. * In remote port changes: no longer nulling target->pnode when
  336. removing from mapped list. Pnode get nulled when the node is
  337. freed (after nodev tmo). This bug was causing i/o recieved in
  338. the small window while the device was blocked to be errored w/
  339. did_no_connect. With the fix, it returns host_busy
  340. (per the pre-remote port changes).
  341. * Merge in support for fc transport remote port use. This removes
  342. any consistent bindings within the driver. All scanning is now
  343. on a per-target basis driven by the discovery engine.
  344. Changes from 20041220 to 20041229
  345. * Changed version number to 8.0.19
  346. * Fixed bug for handling RSCN type 3. Terminate RSCN mode
  347. properly after ADISC handling completes.
  348. * Add list_remove_head macro. Macro cleans up memory allocation
  349. list handling. Also clean up lpfc_reset_bus_handler - routine
  350. does not need to allocate its own scsi_cmnd and scsi_device
  351. structures.
  352. * Fixed potential discovery bug, nlp list corrutpion fix potential
  353. memory leak
  354. * Part 1 of the memory allocation rework request by linux-scsi.
  355. This effort fixes the number of bdes per scsi_buf to 64, makes
  356. the scatter-gather count a module parameter, builds a linked
  357. list of scsi_bufs, and removes all dependencies on lpfc_mem.h.
  358. * Reverted lpfc_do_dpc, probe_one, remove_one to original
  359. implementation. Too many problems (driver not completing
  360. initial discovery, and IO not starting to disks). Backs out
  361. kthread patch.
  362. * Fix race condition in lpfc_do_dpc. If wake_up interrupt occurs
  363. while lpfc_do_dpc is running disc_done and the dpc list is
  364. empty, the latest insertion is missed and the schedule_timeout
  365. does not wakeup. The sleep interval is MAX_SCHEDULE_TIMEOUT
  366. defined as ~0UL >> 1, a very large number. Hacked it to 5*HZ
  367. for now.
  368. * Fixed bug introduced when discovery thread implementation was
  369. moved to kthread. kthread_stop() is not able to wake up thread
  370. waiting on a semaphore and "modprobe -r lpfc" is not always
  371. (most of the times) able to complete. Fix is in not using
  372. semaphore for the interruptable sleep.
  373. * Small Makefile cleanup - Remove remnants of 2.4 vs. 2.6
  374. determination.
  375. Changes from 20041213 to 20041220
  376. * Changed version number to 8.0.18
  377. * Janitorial cleanup after removal of sliinit and ringinit[] ring
  378. statistic is owned by the ring and SLI stats are in sli
  379. structure.
  380. * Integrated patch from Christoph Hellwig <hch@lst.de> Kill
  381. compile warnings on 64 bit platforms: %variables for %llx format
  382. specifiers must be caste to long long because %(u)int64_t can
  383. just be long on 64bit platforms.
  384. * Integrated patch from Christoph Hellwig <hch@lst.de> Removes
  385. dead code.
  386. * Integrated patch from Christoph Hellwig <hch@lst.de>: use
  387. kthread interface.
  388. * Print LPFC_MODULE_DESC banner in module init routine.
  389. * Removed sliinit structure and ringinit[] array.
  390. * Changed log message number from 324 to 326 in lpfc_sli.c.
  391. * Wait longer for commands to complete in lpfc_reset_bus_handler
  392. and lpfc_reset_bus_handler. Also use schedule_timeout() instead
  393. of msleep() and add error message in lpfc_abort_handler()
  394. * When setting lpfc_nodev_tmo, from dev_loss set routine, make 1
  395. sec minimum value.
  396. * Functions which assume lock being held were called without lock
  397. and kernel complained about unlocking lock which is not locked.
  398. * Added code in linkdown to unreg if we know login session will be
  399. terminated.
  400. * Removed automap config parameter and fixed up use_adisc logic to
  401. include FCP2 devices.
  402. Changes from 20041207 to 20041213
  403. * Changed version number to 8.0.17
  404. * Fix sparse warnings by adding __iomem markers to lpfc_compat.h.
  405. * Fix some sparse warnings -- 0 used as NULL pointer.
  406. * Make sure there's a space between every if and it's (.
  407. * Fix some overly long lines and make sure hard tabs are used for
  408. indentation.
  409. * Remove all trailing whitespace.
  410. * Integrate Christoph Hellwig's patch for 8.0.14: if
  411. pci_module_init fails we need to release the transport template.
  412. (also don't print the driver name at startup, linux drivers can
  413. be loaded without hardware present, and noise in the log for
  414. that case is considered unpolite, better print messages only for
  415. hardware actually found).
  416. * Integrate Christoph Hellwig's patch for 8.0.14: Add missing
  417. __iomem annotations, remove broken casts, mark functions static.
  418. Only major changes is chaning of some offsets from word-based to
  419. byte-based so we cans simply do void pointer arithmetics (gcc
  420. extension) instead of casting to uint32_t.
  421. * Integrate Christoph Hellwig's patch for 8.0.14: flag is always
  422. LPFC_SLI_ABORT_IMED, aka 0 - remove dead code.
  423. * Modified preprocessor #ifdef, #if, #ifndef to reflect upstream
  424. kernel submission. Clean build with make clean;make and make
  425. clean;make ADVANCED=1 on SMP x86, 2.6.10-rc2 on RHEL 4 Beta
  426. 1. IO with a few lips and a long cable pull behaved accordingly.
  427. * Implement full VPD support.
  428. * Abort handler will try to wait for abort completion before
  429. returning. Fixes some panics in iocb completion code path.
  430. Changes from 20041130 to 20041207
  431. * Changed version number to 8.0.16
  432. * Hung dt session fix. When the midlayer calls to abort a scsi
  433. command, make sure the driver does not complete post-abort
  434. handler. Just NULL the iocb_cmpl callback handler and let SLI
  435. take over.
  436. * Add Read check that uses SLI option to validate all READ data
  437. actually received.
  438. Changes from 20041123 to 20041130
  439. * Changed version number to 8.0.15
  440. * Ifdef'd unused "binary" attributes by DFC_DEBUG for clean
  441. compiles
  442. * Stop DID_ERROR from showing up along with QUEUE_FULL set by the
  443. Clarion array (SCSI error ret. val. 0x70028) There is no need
  444. for driver to hard fail command which was failed by the target
  445. device.
  446. * Fix for Scsi device scan bug reported on SourceForge. Driver
  447. was returning a DID_ERROR in lpfc_handle_fcp_error causing
  448. midlayer to mark report luns as failing even though it
  449. succeeded.
  450. * Don't ignore SCSI status on underrun conditions for inquiries,
  451. test unit ready's, etc. This was causing us to lose
  452. reservation conflicts, etc
  453. Changes from 20041018 to 20041123
  454. * Changed version number to 8.0.14
  455. * Added new function "iterator" lpfc_sli_next_iocb_slot() which
  456. returns pointer to iocb entry at cmdidx if queue is not full.
  457. It also updates next_cmdidx, and local_getidx (but not cmdidx)
  458. * lpfc_sli_submit_iocb() copies next_cmdidx into cmdidx. Now it is
  459. the only place were we are updating cmdidx.
  460. * lpfc_sli_update_ring() is split in to two --
  461. lpfc_sli_update_ring() and lpfc_sli_update_full_ring().
  462. * lpfc_sli_update_ring() don't to read back correct value of
  463. cmdidx.
  464. * Simplified lpfc_sli_resume_iocb() and its use.
  465. * New static function lpfc_sli_next_iocb(phba, pring, &piocb) to
  466. iterate through commands in the TX queue and new command (at the
  467. end).
  468. * Reduced max_lun to 256 (due to issues reported to some arrays).
  469. Fixed comment, and macro values so def=256, min=1, max=32768.
  470. * Fix an obvious typo/bug: kfree was used to free lpfc_scsi_buf
  471. instead of mempool_free in lpfc_scsiport.c.
  472. * Suppress nodev_tmo message for FABRIC nodes.
  473. * Fixed some usage of plain integer as NULL pointer.
  474. * Bug fix for FLOGI cmpl, lpfc_els_chk_latt error path code
  475. cleanup.
  476. * Fixup lpfc_els_chk_latt() to have Fabric NPorts go thru
  477. discovery state machine as well.
  478. * Fixes to lpfc_els_chk_latt().
  479. * Use DID not SCSI target id as a port_id and add some missing
  480. locks in lpfc_fcp.c.
  481. * Changed eh_abort_handler to return FAILED if command is not
  482. found in driver.
  483. * Fix crash: paging request at virtual address 0000000000100108 -
  484. a result of removing from the txcmpl list item which was already
  485. removed (100100 is a LIST_POISON1 value from the next pointer
  486. and 8 is an offset of the "prev") Driver runs out of iotags and
  487. does not handle that case well. The root of the proble is in the
  488. initialization code in lpfc_sli.c
  489. * Changes to work with proposed linux kernel patch to support
  490. hotplug.
  491. * Zero out seg_cnt in prep_io failure path to prevent double sg
  492. unmap calls.
  493. * Fix setting of upper 32 bits for Host Group Ring Pointers if in
  494. SLIM. Old code was inappropriately masking off low order bits.
  495. * Use scsi_[activate|deactivate]_tcq calls provided in scsi_tcq.h.
  496. * Integrated patch from Christoph Hellwig (hch@lst.de): don't call
  497. pci_dma_sync_* on coherent memory. pci_dma_sync_* is need and
  498. must be used only with streaming dma mappings pci_map_*, not
  499. coherent mappings. Note: There are more consistent mappings
  500. that are using pci_dma_sync calls. Probably these should be
  501. removed as well.
  502. * Modified lpfc_free_scsi_buf to accomodate all three scsi_buf
  503. free types to alleviate miscellaneous panics with cable pull
  504. testing.
  505. * Set hotplug to default 0 and lpfc_target_remove to not remove
  506. devices unless hotplug is enabled.
  507. * Fixed discovery bug: plogi cmpl uses ndlp after its freed.
  508. * Fixed discovery bug: rnid acc cmpl, can potentially use ndlp
  509. after its freed.
  510. * Modularize code path in lpfc_target_remove().
  511. * Changes to support SCSI hotplug (ifdef'ed out because they need
  512. kernel support USE_SCAN_TARGET requires kernel support to export
  513. the interface to scsi_scan_target and to move the SCAN_WILD_CARD
  514. define to a general scsi header file. USE_RESCAN_HOST requires
  515. kernel support to export an interface to scan_scsi_host() with
  516. the rescan flag turned on).
  517. * Removed redundant variable declaration of lpfc_linkdown_tmo.
  518. * Fix for large port count remove test.
  519. * Added check to see if BAR1 register is valid before using BAR1
  520. register for programming config_port mail box command.
  521. * Added lpfc_scsi_hotplug to enable/disable driver support of SCSI
  522. hotplug.
  523. * Changed lpfc_disc_neverdev() to lpfc_disc_illegal() and changed
  524. lpfc_disc_nodev() to lpfc_disc_noop(). Adjusted appropriate
  525. events to use these routines.
  526. * Add support for SCSI device hotplug.
  527. * Take dummy lpfc_target's into account for lpfc_slave_destroy().
  528. * Bug fix to store WWPN / WWNN in NameServer / FDMI lpfc_nodelist
  529. entries.
  530. * Added slavecnt in lpfc_target for diagnostic purposes.
  531. * Added lpfc_hba load/unload flags to take care of special cases
  532. for add/remove device.
  533. * Have target add/remove delay before scanning.
  534. * Have rmmod path cleanup blocked devices before scsi_remove_host.
  535. * Added a #define for msleep for 2.6.5 kernels.
  536. * In reset bus handler if memory allocation fails, return FAILED
  537. and not SUCCESS.
  538. * Have lpfc eh handlers, bus_reset and lun_reset, wait for all
  539. associated I/Os to complete before returning.
  540. * Fix memset byte count in lpfc_hba_init so that
  541. LP1050 would initialize correctly.
  542. * Backround nodev_timeout processing to DPC This enables us to
  543. unblock (stop dev_loss_tmo) when appopriate.
  544. * Fix array discovery with multiple luns. The max_luns was 0 at
  545. the time the host structure was intialized. lpfc_cfg_params
  546. then set the max_luns to the correct value afterwards.
  547. * Remove unused define LPFC_MAX_LUN and set the default value of
  548. lpfc_max_lun parameter to 512.
  549. * Reduced stack usage of lpfc_hba_init.
  550. * Cleaned up the following warning generated by
  551. scripts/checkincludes.pl lpfc_fcp.c: scsi/scsi_cmnd.h is
  552. included more than once.
  553. * Replaced "set_current_state(TASK_UNINTERRUPTIBLE);
  554. schedule_timeout(timeout)" with "msleep(timeout)".
  555. * Fixnode was loosing starget when rediscovered. We saw messages
  556. like: lpfc 0000:04:02.0: 0:0263 Cannot block scsi target as a
  557. result. Moved starget field into struct lpfc_target which is
  558. referenced from the node.
  559. * Add additional SLI layer logging in lpfc_sli.c.
  560. * Ignore more unexpected completions in lpfc_nportdisc.c.
  561. * Can not call lpfc_target_unblock from the soft interrupt
  562. context. It seems to be not nessasery to unblock target from
  563. nodev timeout.
  564. * Introduce and use less lethal event handler for unexpected
  565. events in lpfc_nportdisc.c.
  566. * Can not call fc_target_(un)block() functions with interrupts
  567. disabled in lpfc_scsiport.c.
  568. * Added new configuration parameter, lpfc_max_luns range 1-32768,
  569. default 32768.
  570. * Allow lpfc_fcp.c to call lpfc_get_hba_sym_node_name().
  571. * Increase nodev timeout from 20 seconds to 30 seconds.
  572. * Replace some kfree((void*)ptr) with kfree(ptr).
  573. * Make 3 functions static: lpfc_get_hba_sym_node_name,
  574. lpfc_intr_prep and lpfc_setup_slim_access. Move lpfc_intr_prep
  575. and lpfc_setup_slim_access so they're defined before being used.
  576. * Remove an unecessary list_del() in lpfc_hbadisc.c.
  577. * Set nlp_state before calling lpfc_nlp_list() since this will
  578. potentially call fc_target_unblock which may cause a race in
  579. queuecommand by releasing host_lock.
  580. * Since lpfc_nodev_tmo < dev_loss_tmo remove queuecommand
  581. DID_BAD_TARGET return for now.
  582. * Fix a problem with rcv logo.
  583. * Remove unused portstatistics_t structure.
  584. * Remove #if 0 and unnecessary checks in lpfc_fcp.c.
  585. * Simplify lpfc_issue_lip: Extra layer of protection removed.
  586. * Grab lock before calling lpfc_sli_issue_mbox(phba, pmb,
  587. MBX_NOWAIT) in lpfc_sli_issue_mbox_wait().
  588. Changes from 20040920 to 20041018
  589. * Changed version number to 8.0.13
  590. * Hide some attributes using #ifndef DFC_DEBUG ... #endif.
  591. * Modify Makefile to (1) make BUILD_NO_DEBUG=1 will hide some
  592. (binary) attributes (2) make BUILD_FC_TRANS=0 will build driver
  593. for 2.6.5 kernel with block/unblock patch.
  594. * Modified #ifdef names.
  595. * Added support for proposed FC transport host attributes (which
  596. replaces some of the attributes we had local to the driver).
  597. Removed the binary statistics sysfs attribute.
  598. * Added extra ELS verbose logging for ELS responses.
  599. * Added recognition for BUILD_FC_TRANS=2 to Makefile to define
  600. FC_TRANS_VER2.
  601. * Add a pointer for link stats allocation.
  602. * Exported lpfc_get_hba_sym_node_name for use by FC_TRANS_VER2
  603. sysfs routines.
  604. * Fix discovery problem in lip testing: if device sends an ELS cmd
  605. (i.e. LOGO) before our FLOGI completes it should be LS_RJT'ed.
  606. * Moved #defines around to provide target_add/remove for upstream
  607. kernel deliverables only not SLES9. Provided ifdefs to #include
  608. target_block/unblock only if FC_TRANS_VER1.
  609. * Add sanity check in lpfc_nlp_list move setting nlp_Target
  610. outside #ifdef.
  611. * Added a blocked member to the lpfc_target structure for
  612. block/unblock. This member allows the driver to know when to
  613. unblock for pci_remove_one or pci_add_one. #ifdef'd some more
  614. block/unblock stuff and removed some defensive checks from
  615. target_block/unblock.
  616. * Moved + 5 second window to dev_loss_tmo setting and updated
  617. comments.
  618. * Removed NULL target check from target_block/unblock and fixed up
  619. a few comments.
  620. * Enable sysfs attributes on 2.6.5 kernels and remove extra
  621. compatibility code.
  622. * Remove any and all trailing whitespace.
  623. * Added message 0718 and return error when dma_map_single fails.
  624. * Changed the fcpCntl2 commands to include an FCP_ prefix to get
  625. rid of build warnings on later 2.6.9-rc kernels. Build
  626. conflicts with scsi/scsi.h. Remove inclusions of scsi/scsi.h
  627. from hbadisc.c, sli.c, and fcp.c since these modules had no
  628. dependencies on scsi.h.
  629. * Fixed a bug with RSCN handling. A RSCN received on one device,
  630. shouldn't affect other devices not referenced by the RSCN.
  631. * Moved #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6) to include
  632. lpfc_jedec_to_ascii to prevent warning in SLES 9.
  633. * Update Makefile to account for SLES 9 and scsi-target upstream
  634. kernel.
  635. * This checkin provides block/unblock hooks for the upstream scsi
  636. target kernel and 2.6.5 on SLES9 SP1 with the block/unblock
  637. patch.
  638. * Discovery changes regarding setting targetp->pnode and
  639. ndlp->nlp_Target Ensure fc_target_* routines are called properly
  640. from discovery. Remove list_del's from lpfc_cleanup(). Ensure
  641. all the lpfc_consistent_bind_* routines don't set any driver
  642. structure objects.
  643. * Fix for timeout of READ_LA or READ_SPARAM mailbox command
  644. causing panic.
  645. * Cleanup list_del()'s for Discovery ndlp lists.
  646. * Bug fixes for some insmod/rmmod crashes, link down crashes and
  647. device loss crashes.
  648. * Removed NLP_SEARCH_DEQUE.
  649. * Call lpfc_target_unblock only if the targetp is nonNull and with
  650. the host_lock held.
  651. * Added qcmdcnt back along with misc bug fixes to discovery.
  652. * Changed tgt_io to outfcpio lpfc_fcp.c.
  653. * Fixed errors caused by LIP and cable pulls both with and without
  654. block/unblock patch.
  655. * For now we have to call fc_target_unblock and fc_target_block
  656. with interrupts enabled.
  657. * Save seg_cnt from dma_map_sg. Save scatter-gather start address
  658. and pass back to dma_unmap_sg in error with seg_cnt.
  659. * Incorporating block/unblock calls into driver with ifdefs. This
  660. change is supported by scsi-target-2.6 kernel and forward only.
  661. * Merged in some discovery bug fixes and added tgt io counters.
  662. * Added sysfs attributes/interfaces: read only attribute
  663. "management_version" and write only attribute "issue_lip".
  664. * Fix build on big endian machines: while #if was OK with
  665. __BIG_ENDIAN which defined as 4321, __BIG_ENDIAN_BITFIELD has to
  666. be tested with #ifdef because it does not have any value, it is
  667. either defined or not.
  668. * Add fabric_name and port_type attributes.
  669. * Change mdelay to msleep. mdelay works, but wastefully uses cpu
  670. resources without a lock held. Revert to msleep. Tested with
  671. sg_reset for bus and three attached targets.
  672. * Added the customary #ifndef...#define...#endif to
  673. lpfc_version.h.
  674. * Integrate patches from Christoph Hellwig: two new helpers common
  675. to lpfc_sli_resume_iocb and lpfc_sli_issue_iocb - singificant
  676. cleanup of those two functions - the unused SLI_IOCB_USE_TXQ is
  677. gone - lpfc_sli_issue_iocb_wait loses it's flags argument
  678. totally.
  679. * Fix in lpfc_sli.c: we can not store a 5 bit value in a 4-bit
  680. field.
  681. * Moved some routines out of lpfc_fcp.c into more appropriate
  682. files.
  683. * Whitespace cleanup: remove all trailing whitespace.
  684. * Make lpfc_disc_ndlp_show static to lpfc_fcp.c.
  685. * Remove leftover printk and replace some with
  686. printk(KERN_WARNING)
  687. * Trivial: fix a few long lines and a soft tab.
  688. * Remove warnings generated by Sparse against driver (make
  689. C=1). Mostly these are "using integer as pointer warnings"
  690. i.e. use NULL instead of 0.
  691. * Integrated patch from Christoph Hellwig: Quite a lot of changes
  692. here, the most notable is that the phba->slim2p lpfc_dmabuf goes
  693. away in favour of a typede pointer and a dma_addr_t. Due to the
  694. typed pointer lots of the cast mess can go away, and while at it
  695. I also replaced the messy SLI2_SLIM_t with a simple struct
  696. lpfc2_sli2_slim that only contains the part of the union we care
  697. about while using SLI2_SLIM_SIZE for all size calculations
  698. directly.
  699. * Integrated patch from Christoph Hellwig: This streamlines the
  700. I/O completion path a little more, especially taking care of
  701. fast-pathing the non-error case. Also removes tons of dead
  702. members and defines from lpfc_scsi.h - e.g. lpfc_target is down
  703. to nothing more then the lpfc_nodelist pointer.
  704. * Added binary sysfs file to issue mbox commands
  705. * Replaced #if __BIG_ENDIAN with #if __BIG_ENDIAN_BITFIELD for
  706. compatibility with the user space applications.
  707. * Decrease the amount of data in proc_info.
  708. * Condense nodelist flag members.
  709. * Expand INFO for discovery sysfs shost entries.
  710. * Notify user if information exceeds 4k sysfs limit.
  711. * Removed a bunch of unused #defines.
  712. * Added initial sysfs discovery shost attributes.
  713. * Remove unused #defines lpfc_disc.h.
  714. * Fixed failMask nodelist settings.
  715. * Cleanup some old comments / unused variables.
  716. * Add LP101 to list of recognized adapters.
  717. Changes from 20040908 to 20040920
  718. * Changed version number to 8.0.12
  719. * Removed used #defines: DEFAULT_PCI_LATENCY_CLOCKS and
  720. PCI_LATENCY_VALUE from lpfc_hw.h.
  721. * Changes to accomodate rnid.
  722. * Fix RSCN handling so RSCN NS queries only effect NPorts found in
  723. RSCN data.
  724. * If we rcv a plogi on a NPort queued up for discovery, clear the
  725. NLP_NPR_2B_DISC bit since rcv plogi logic will force NPort thru
  726. discovery.
  727. * Ensure lpfc_target is also cleaned up in lpfc_cleanup().
  728. * Preliminary changes for block/unblock kernel API extensions in
  729. progress with linux-scsi list. These are name changes and
  730. prototype changes only.
  731. * Added send_abts flag to lpfc_els_abort. For rcv LOGO when ADISC
  732. sent, the XRI of the LOGO rcv'ed is the same as the ADISC
  733. sent. Thus we cannot ABTS the ADISC before sending the LOGO ACC.
  734. * Weed out some unused fc_flags. Add FC_DISC_TMO.
  735. * board_online sysfs attribute added to support libdfc functions
  736. InitDiagEnv and SetBrdEnv.
  737. * Streamline code in lpfc_els_retry fixup abort case in
  738. lpfc_els_timeout_handler().
  739. * Flush discovery/ELS events when we bring SLI layer down.
  740. * ctlreg and slimem binary attributes added to support libdfc
  741. read/write mem/ctl functions.
  742. * Integrated Christoph Hellwig's patch: Cleanup
  743. lpfc_sli_ringpostbuf_get.
  744. * Modified lpfc_slave_alloc and lpfc_slave_destroy to allocate and
  745. free a dummy target pointer. This allows queuecommand to skip
  746. the NULL target pointer check and avoid the console spam when
  747. slave_alloc fails.
  748. * Fix cfg_scan_down logic, it was reversed.
  749. * Init list head ctrspbuflist.
  750. * Change name of lpfc_driver_abort to lpfc_els_abort since it is
  751. only valid for ELS ring.
  752. * Remove unused third argument for lpfc_consistent_bind_get().
  753. * Fix up iotag fields in lpfc_prep_els_iocb().
  754. * Remove log message on code path triggered by lpfc_els_abort().
  755. * Set host->unique_id in lpfc_fcp.c.
  756. * Removed deadwood: lpfc_target.pHba not necessary anymore.
  757. * Integrated patch from Christoph Hellwig: remove dead
  758. SLI_IOCB_POLL handling.
  759. * Integrated patch from Christoph Hellwig: Streamline I/O
  760. submission and completion path a little.
  761. * Remove unnecessary lpfc_brd_no. Ensure brd_no assignment is
  762. unique.
  763. * Removed unused MAX_FCP_LUN.
  764. * Use mod_timer instead of add_timer for fdmi in lpfc_ct.c.
  765. * Fixed misc discovery problems.
  766. * Move stopping timers till just before lpfc_mem_free() call.
  767. * Fix up NameServer reglogin error path.
  768. * Cleanup possible outstanding discovery timers on rmmod.
  769. * Fix discovery NPort to NPort pt2pt problem.
  770. * Get rid of ip_tmofunc / scsi_tmofunc.
  771. * Integrated patch from Christoph Hellwig:
  772. lpfc_disc_done/lpfc_do_dpc cleanup - lpfc_disc_done can return
  773. void - move lpfc_do_dpc and lpfc_disc_done to lpfc_hbadisc.c -
  774. remove checking of list emptiness before calling lpfc_disc_done,
  775. it handles the emtpy list case just fine and the additional
  776. instructions cost less then the bustlocked spinlock operations.
  777. * Integrated patch from Christoph Hellwig: This adds a new 64bit
  778. counter instead, brd_no isn't reused anymore. Also some tiny
  779. whitespace cleanups in surrounding code.
  780. * Reorder functions in lpfc_els.c to remove need for prototypes.
  781. * Removed unsed prototypes from lpfc_crtn.h -
  782. lpfc_ip_timeout_handler, lpfc_read_pci and lpfc_revoke.
  783. * Removed some unused prototypes from lpfc_crtn.h -
  784. lpfc_scsi_hba_reset, lpfc_scsi_issue_inqsn,
  785. lpfc_scsi_issue_inqp0, lpfc_scsi_timeout_handler.
  786. * Integrated patch from Christoph Hellwig: remove TRUE/FALSE
  787. usage.
  788. * Integrated patch from Christoph Hellwig: Remove unused function
  789. prototypes lpfc_set_pkt_len and lpfc_get_pkt_data from
  790. lpfc_crtn.h - fixes build warnings.
  791. * Removed unused struct lpfc_dmabufip definition from lpfc_mem.h.
  792. * Removed pre-2.6.5 MODULE_VERSION macro from lpfc_compat.h.
  793. * Fixing missing static and removing dead code.
  794. * Adding nodewwn, portwwn and portfcid shost attributes.
  795. * Initial support for CT via sysfs. request payloads of size less
  796. than PAGE_SIZE and rsp payloads of size PAGE_SIZE are supported.
  797. Driver maintains a list of rsp's and passes back rsp's
  798. corresponding to the pid of the calling process.
  799. * Support for RefreshInformation, GetAdapterAttributes,
  800. GetPortStatistics.
  801. * Make nodev-tmo default to 20 seconds.
  802. * Fix up some DSM error cases, unreg_login rpi where needed.
  803. * Fix up comments for fc_target_block / fc_target_unblock.
  804. * Fix up code for scsi_block_requests / scsi_unblock_requests.
  805. * Add NLP_FCP_TARGET for nodeinfo support.
  806. * Move suspend/resume in lpfc_nlp_list under appropriate case -
  807. Used host_lock for DPC to avoid race (remove dpc_lock)
  808. * Fix some corner cases for PLOGI receive - simplify error case
  809. for cmpl_reglogin_reglogin_issue.
  810. * Bug fix for ppc64 EEH MMIO panic - always do readl after
  811. writel's of HBA registers to force flush.
  812. * Get rid of initial static routine declarations in lpfc_hbadisc.c
  813. and lpfc_els.c.
  814. * Updates to discovery processing.
  815. Changes from 20040823 to 20040908
  816. * Changed version number to 8.0.11
  817. * Removed persistent binding code.
  818. * Display both ASC and ASCQ info.
  819. * Fixed link down->up transitions when linkdown tmo expires. Fix
  820. was in the defensive error checking at the start of
  821. queuecommand.
  822. * Removed lpfc_scsi_timeout_handler as this timer is no longer
  823. required. The midlayer will exhaust retries and then call
  824. lpfc_abort_handler, lpfc_reset_lun_handler, and
  825. lpfc_reset_target_handler.
  826. * Minimal support for SCSI flat space addressing/volume set
  827. addressing. Use 16 bits of LUN address so that flat
  828. addressing/VSA will work.
  829. * Changed 2 occurences of if( 1 != f(x)) to if(f(x) != 1)
  830. * Drop include of lpfc_cfgparm.h.
  831. * Reduce stack usage of lpfc_fdmi_cmd in lpfc_ct.c.
  832. * Add minimum range checking property to /sys write/store
  833. functions.
  834. * Fix display of node_name and port_name via fc transport
  835. attr.
  836. * Removed biosparam code.
  837. * Removed range checking. phba->config[] array elements are now
  838. embedded into the hba struct. lpfc_config_setup() has been
  839. removed.
  840. * Collapsed lpfc_scsi_cmd_start into lpfc_queuecommand and cleaned
  841. up combined routines.
  842. * Removed unused prototypes myprint and
  843. lpfc_sched_service_high_priority_queue.
  844. * Removed unused function lpfc_nodev.
  845. * Removed scsi_cmnd->timeout_per_command cancelation. SCSI midlayer
  846. now times out all commands - FW is instructed to not timeout.
  847. * Removed polling code from lpfc_scsi_cmd_start. Reorganized
  848. queuecommand and cmd_start some.
  849. Changes from 20040810 to 20040823
  850. * Changed version number to 8.0.10
  851. * Additional timer changes as per Arjan / Christoph's comments.
  852. * Used mod_timer() instead of del_timer_sync() where appropriate.
  853. * Fixed a use after free case (panic on 2.6.8.1 with
  854. CONFIG_DEBUG_SLAB set).
  855. * Fix compile warning in lpfc_fcp.c.
  856. * Minor fix for log message, that prints unassigned brdno which is
  857. zero.
  858. * Move scsi_host_alloc() to the beginning of probe_one(). This
  859. ensures that host_lock is available at later stages and also
  860. avoids tons of unnecessary initializing if host_alloc()
  861. fails.
  862. * Removed else clause from lpfc_slave_configure that set
  863. sdev->queue_depth. The driver informs the midlayer of its
  864. setting in the template and only overrides if queue tagging is
  865. enabled.
  866. * Added PCI_DEVICE_ID_ZEPHYR and PCI_DEVICE_ID_ZFLY (Junior
  867. Zephyr) support
  868. Changes from 20040730 to 20040810
  869. * Changed version number to 8.0.9
  870. * Removed per HBA driver lock. Driver now uses the host->host_lock
  871. * Restored support for the 2.6.5 kernel for those linux distributions
  872. shipped with the 2.6.5 kernel.
  873. * Applied patch from Christoph Hellwig (hch@infradead.org) as follows
  874. "[PATCH] use scsi host private data in ->proc_info.
  875. * Applied patch from Christoph Hellwig (hch@infradead.org) as follows
  876. "Re: [Emulex] Ready for next round. This patch cleans up the memory
  877. allocation routines a little and fixes a missing mempool_destroy and
  878. some missing error handling."
  879. * Changed pointers assignments from 0 to NULL.
  880. * Added fixes to the lpfc_reset_lun_handler and lpfc_reset_bus_handler
  881. entry points that caused kernel to Oops or hang.
  882. * Added fixes to targetless hosts that caused modprobe and insmod to hang.
  883. * Ongoing cleanup to many files
  884. Changes from 20040723 to 20040730
  885. * Changed version number to 8.0.8
  886. * Removed unused LPFN_DRIVER_VERSION #define.
  887. * Folded lpfc_findnode_scsiid into lpfc_find_target, its only
  888. caller.
  889. * Removed 2 unneeded arguments to lpfc_find_target (lun and
  890. create_flag).
  891. * Make lpfc_sli_reset_on_init = 1
  892. * Minor cleanup to quieten sparse.
  893. * Removed missing function = 0 in tmo routine in lpfc_els.c.
  894. * Moved additional binding parameters into lpfc_defaults.c:
  895. lpfc_automap / lpfc_fcp_bind_method
  896. * Use msecs_to_jiffies() where applicable.
  897. * Only use queue depth attribute only after SLI HBA setup was
  898. completed.
  899. * Put in memory barriers for PPC
  900. * Added PCI_DEVICE_ID_HELIOS and PCI_DEVICE_ID_JFLY (Junior
  901. Helios) support
  902. * Added 4&10 gigabit choices in user option link_speed
  903. * Updated timer logic: Set timer data after init_timer use
  904. timer_pending() instead of expires.
  905. * Removed some remnants of IP over FC support from Kconfig and
  906. Makefile.
  907. * Remove redundant prototypes for lpfc_handle_eratt,
  908. lpfc_handle_latt and lpfc_read_pci.
  909. * Ongoing cleanup of lpfc_init.c.
  910. * Changed LPFC_CFG_DFT_HBA_Q_DEPTH -> LPFC_CFG_HBA_Q_DEPTH.
  911. * Another cleanup stab at lpfc_ct.c. Remove castings, structure
  912. code sanely, remove redundant code, reorganize code so that
  913. functions are invoked after definition.
  914. Changes from 20040716 to 20040723
  915. * Changed version number to 8.0.7
  916. * Cleanup of lpfc_ct.c. Removed number of casts, removed tons of
  917. dead/redundant code, cleaned up badly and poorly written code,
  918. cleaned up return values.
  919. * Fixed Persistent binding implementation
  920. * Removed all references to lpfc_scsi_req_tmo
  921. * Removed last references to lun_skip config parameter.
  922. * Removed LPFC_DEV_RPTLUN node failure bit because we don't issue
  923. REPORT_LUNS from the driver anymore.
  924. * Removed LUN-tracking in driver. Removed lpfc_lun struct and
  925. moved any functionality we still need to lpfc_target.
  926. * Added new lpfc_jedec_to_ascii() call and replace two instances
  927. of duplicate code with calls to this function.
  928. * Removed Volume Set Addressing handling on LUN IDs.
  929. * Applied patch from Christoph Hellwig (hch@infradead.org) that
  930. removes dead code belonging to lpfc_build_scsi_cmnd() and its
  931. call path. This is related to the recently removed report_lun
  932. code.
  933. Changes from 20040709 to 20040716
  934. * Changed version number to 8.0.6
  935. * Removed internal report LUNs usage. Removed functions:
  936. lpfc_disc_issue_rptlun, lpfc_disc_cmpl_rptlun,
  937. lpfc_disc_retry_rptlun and their use.
  938. * Removed usused scheduler prototypes in lpfc_crtn.h
  939. * Replace lpfc_geportname() with generic memcmp().
  940. * Rearrange code in lpfc_rcv_plogi_plogi_issue() to make it a
  941. little more readable.
  942. * Remove redundant port_cmp != 2 check in if
  943. (!port_cmp) { .... if (port_cmp != 2).... }
  944. * Clock changes: removed struct clk_data and timerList.
  945. * Clock changes: seperate nodev_tmo and els_retry_delay into 2
  946. seperate timers and convert to 1 argument changed
  947. LPFC_NODE_FARP_PEND_t to struct lpfc_node_farp_pend convert
  948. ipfarp_tmo to 1 argument convert target struct tmofunc and
  949. rtplunfunc to 1 argument * cr_count, cr_delay and
  950. discovery_threads are only needed to be module_params and not
  951. visible via sysfs.
  952. Changes from 20040614 to 20040709
  953. * Changed version number to 8.0.5
  954. * Make lpfc_info static.
  955. * Make lpfc_get_scsi_buf static.
  956. * Print a warning if pci_set_mwi returns an error.
  957. * Changed SERV_PARM to struct serv_parm.
  958. * Changed LS_RJT to struct ls_rjt.
  959. * Changed CSP to struct csp.
  960. * Changed CLASS_PARMS to struct class_parms.
  961. * Some cosmetic coding style cleanups to lpfc_fcp.c.
  962. * Providing a sysfs interface that dumps the last 32
  963. LINK_[UP|DOWN] and RSCN events.
  964. * Get rid of delay_iodone timer.
  965. * Remove qfull timers and qfull logic.
  966. * Convert mbox_tmo, nlp_xri_tmo to 1 argment clock handler
  967. * Removed duplicate extern defs of the bind variables.
  968. * Streamline usage of the defines CLASS2 and CLASS3, removing
  969. un-necessary checks on config[LPFC_CFG_FCP_CLASS].
  970. * Moving the persistent binding variables to new file
  971. lpfc_defaults.c
  972. * Changed LPFC_SCSI_BUF_t to struct lpfc_scsi_buf.
  973. * Moved config specific code from probe_one() into
  974. config_setup(). Removing a redundant check on scandown value
  975. from bind_setup() as this is already done in config_setup().
  976. * Changed LPFC_SLI_t to struct lpfc_sli.
  977. * Changed FCP_CMND to struct fcp_cmnd.
  978. * Changed FCP_RSP to struct fcp_rsp.
  979. * Remove the need for buf_tmo.
  980. * Changed ULP_BDE64 to struct ulp_bde64.
  981. * Changed ULP_BDE to struct ulp_bde.
  982. * Cleanup lpfc_os_return_scsi_cmd() and it's call path.
  983. * Removed lpfc_no_device_delay.
  984. * Consolidating lpfc_hba_put_event() into lpfc_put_event().
  985. * Removed following attributes and their functionality:
  986. lpfc_extra_io_tmo, lpfc_nodev_holdio, lpfc_delay_rsp_err,
  987. lpfc_tgt_queue_depth and lpfc_check_cond_err.
  988. * Clock changes consolidating timers, just in the struct lpfc_hba,
  989. to get rid of clkData and pass only one argument to timeout
  990. routine. Also, removing need for outstanding clock linked list
  991. to stop these timers at rmmod.
  992. * Move lpfc.conf contents into lpfc_fcp.c. Removing per adapter
  993. attributes in favor of global attributes.
  994. * Fix a potential null pointer reference of pmbuf in lpfc_ct.c.
  995. * On reset_lun, issue LUN_RESET as opposed to ABORT_TASK_SET.
  996. * Removed SCSI_REQ_TMO related code.
  997. * Introducing two new defines LPFC_ATTR_R and LPFC_ATTR_RW that do
  998. a module_param, MODULE_PARM_DESC, lpfc_param_show,
  999. [lpfc_param_store] and CLASS_DEVICE_ATTRIBUTE.
  1000. * Properly clean up when allocation of a linked BDE fails in the
  1001. SCSI queuecommand path.
  1002. * Fail SCSI command if dma_map_sg call fails.
  1003. * Remove unused macros SWAP_ALWAYS and SWAP_ALWAYS16.
  1004. * Reset context2 to 0 on exit in
  1005. lpfc_sli_issue_iocb_wait_high_priority() and
  1006. lpfc_sli_issue_iocb_wait().
  1007. * Arranging lpfc_scsiport.c to follow style of use after
  1008. definition. This removes the need for the cruft of forward
  1009. declarations. Also removing a redundant #define ScsiResult as it
  1010. already available elsewhere.
  1011. * Applying "Streamline lpfc error handling" patch from Christoph
  1012. Hellwig (hch@infradead.org) with following modifications: fix
  1013. mem leaks, remove some misplaced code that need not be there,
  1014. print a message on exit (old code prints two (entry/exit)), make
  1015. ret values consistent (either 1/0 or SUCCESS/FAILURE), keep all
  1016. eh routines in a single file (lpfc_scsiport.c).
  1017. * Move contents of lpfc_module_param.h into lpfc_fcp.c.
  1018. * Changed sysfs attributes to CLASS_DEVICE_ATTRIBUTES (previously
  1019. DEVICE_ATTRIBUTES). They now appear in
  1020. /sys/class/scsi_host/hostx (previously in
  1021. /sys/bus/pci/drivers/lpfc/devx).
  1022. * Removed lpfc_syfs.h and lpfc_sysfs.c.
  1023. * Cleanup of config params. Throttle params have been removed.
  1024. max_lun has been removed. max_target is replaced with a #define,
  1025. lun_skip is removed. Remove ipfc config params and related
  1026. code.
  1027. * Changed DMABUF_t usage to struct lpfc_dmabuf.
  1028. * Downsizing iCfgParam structure to include a_string, a_low, a_hi
  1029. and a_default values only.
  1030. * Free SCSI buf safety memory pool on shutdown to eliminate memory
  1031. leak.
  1032. * Change lpfc_printf_log to a #define. Also include phba->brd_no
  1033. and newline in the print string rather than in the #define.
  1034. * Remove code that optionally locates Host Group Pointers in host
  1035. memory SLIM since this is no longer needed for PPC64, once
  1036. CONFIG_PORT uses HBA's view of its BAR0.
  1037. * Removed the forward declarations of the sli functions and
  1038. rearranging the code in lpfc_sli.c.
  1039. * Removed the preamble functionality from logging.
  1040. * Make lpfc_sli_hba_setup() return negative error codes on error
  1041. and correct the comment left over in lpfc_fcp.c
  1042. * Removed the lpfc_loadtime variable.
  1043. * Put a space between all ifs and their open parens '('.
  1044. * Change Studly_Caps LPFC_SCSI_BUF_t to struct lpfc_scsi_buf.
  1045. * Fixed insmod hang after hardware error.
  1046. * Relocated scsi_host alloc to before we enable the interrupt
  1047. handler
  1048. * Add .tmp_versions directory to Makefile clean target. This
  1049. directory is created in the 2.6.5+ build process (with Red Hat
  1050. kernels at least).
  1051. * Changing phba->config to kmalloc lpfc_icfgparam and not
  1052. *phba->config. This is manifesting itself as a panic in
  1053. pci_release_region().
  1054. * Fix for firmware download / board reset problem.
  1055. * Integrated patch from Christoph Hellwig (hch@infradead.org) to
  1056. reorganize and cleanup lpfc_fcp.c
  1057. * Don't abort commands immediately when there is an RSCN event to
  1058. give driver time to rediscover targets before the midlayer
  1059. retries the SCSI commands.
  1060. Changes from 20040604 to 20040614
  1061. * Changed version number to 8.0.4
  1062. * Removed lpfc_valid_lun function.
  1063. * Added scsi_buf safety pool to address scsi_buf failures in
  1064. queuecommand under low memory conditions. Allocations now come
  1065. from kmalloc initially, but if kmalloc fails, the allocation
  1066. comes from the safety pool.
  1067. * Modified lpfc_slave_alloc to only set the scsi_device->hostdata
  1068. pointer if the driver has discovered the target. This routine
  1069. always returns success now as well since no error ever occurs in
  1070. the alloc routine.
  1071. * Mask only info and warning messages. Print all error messages
  1072. irrespective of mask.
  1073. * Removing lpfc_log_chk_msg_disabled()
  1074. * Changed lpfc_printf_log to take struct lpfc_hba * directly
  1075. instead of a "board number".
  1076. * Convert dma_sync_single to pci_dma_sync_single_for_{device/cpu}.
  1077. * Implemented new style log messages. The message strings are now
  1078. embedded in the call to lpfc_printf_log.
  1079. * Decreased FLOGI discovery timeout to 20 seconds.
  1080. * On error in lpfc_pci_probe_one() return -1 and not 1.
  1081. * Allow for board numbers that are not sequential, paving the way
  1082. for hotplug support.
  1083. * scsi_add_host() can fail, so wrap it around in an if(). Also
  1084. initiate scsi_scan_host() after attaching the sysfs attributes.
  1085. * lpfc_release_version is used only in lpfc_ct.c, so move it there
  1086. and mark it as static.
  1087. * Removed lpfc_sleep_ms and replaced with mdelay or schedule calls
  1088. directly
  1089. * Removed all (struct list_head *) casts from clkData-related list
  1090. handling in list_add, list_del macros.
  1091. * Removed EXPORT_SYMBOLs.
  1092. * Removed LPFC_MIN_QFULL and lpfc_qthrottle_up.
  1093. * Replace LPFCSCSITARGET_t with struct lpfc_target.
  1094. * Replace LPFCSCSILUN_t with struct lpfc_lun.
  1095. * Remove unused struct declarations (fcPathId and fcRouteId) from
  1096. lpfc_scsi.h.
  1097. * Rewrite use of FC transport attributes.
  1098. * Fix crash when link is lost. This was due to lpfc_delay_iodone
  1099. calling list_del on an object that was never put on a list.
  1100. * Remove trailing spaces at the end of all lines.
  1101. * Set MAX_FCP_TARGET to 256 from 0xff. Set MAX_FCP_LUN and
  1102. MAX_FCP_CMDS to their decimal equivalents and updated
  1103. documentation.
  1104. Changes from 20040526 to 20040604
  1105. * Changed version number to 8.0.3
  1106. * Completed sysfs FC transport support.
  1107. * Removed unused fields in SCSI LUN and SCSI Target structures:
  1108. void *pTargetProto; void *pTargetOSEnv; void *pLunOSEnv;
  1109. * Modified list_for_each to list_for_each_entry. Modified
  1110. list_for_each_safe to list_for_each_entry_safe.
  1111. * Remove lpfc_dfc.h file.
  1112. * Changed pHba->phba, pCommand->pcmd
  1113. * Changed plogi_ndlp -> plogindlp, pos_tmp->postmp, pRsp->prsp,
  1114. pCmd->pcmd
  1115. * Changed pText -> ptext
  1116. * Changed p_tmp_buff -> ptmpbuff
  1117. * Changed pBufList -> pbuflist, pRsp -> prsp, pCmd -> pcmd
  1118. * Changed *pos_tmp -> *postmp, *p_mbuf -> *pmbuf
  1119. * Following changes are made to the SCSI fast path: Added
  1120. DMA_BUF_t member to the lpfc_scsi_buf_t. This will reduce a
  1121. memory allocation in the scsi fast path. Added check for
  1122. targetp == NULL in the scsi fast path. Increased number of
  1123. scatter gather entries in lpfc_scsi_dma_ext to 4 from 3 and
  1124. changed the size of lpfc_scsi_dma_ext to 264
  1125. * Fixing some missing static lpfc_nportdisc.c.
  1126. * Reordered #include lines so that lpfc.h doesn't have to #include
  1127. other header files.
  1128. * Remove lpfc_get_hba_sym_node_name() as a global EXPORT and make
  1129. it static.
  1130. * Move struct clk_data definition from lpfc_hw.h to lpfc_sli.h.
  1131. * Changed LPFC_IOCBQ_t to struct lpfc_iocbq.
  1132. * Changed LPFC_SLI_RING_t to struct lpfc_sli_ring.
  1133. * Changed LPFC_NODELIST_t to struct lpfc_nodelist.
  1134. * Rearranged lpfc_nportdisc.c by moving state machine array
  1135. (lpfc_disc_action) and the one function that uses it,
  1136. lpfc_disc_state_machine, to the end of the file, removing the
  1137. need for the raft of prototypes at the top.
  1138. * Changed LPFC_BINDLIST_t to struct lpfc_bindlist.
  1139. * Removed lpfc_issue_ct_rsp(), lpfc_sleep(), lpfc_add_bind(),
  1140. lpfc_del_bind(), lpfc_sli_wake_mbox_wait() and
  1141. lpfc_sli_issue_mbox_wait().
  1142. * Fixed a large number of overly-long lines.
  1143. * Fixed some discovery problems: Introduced deferred ndlp removal
  1144. when in DSM to avoid panic when in nested DMSs Fix NportId
  1145. fffc01 handling to not relogin after LOGO fixed handling of LOGO
  1146. on PLOGI issue.
  1147. * Changed SLI_CT_REQUEST to lpfc_sli_ct_request.
  1148. * Changed NAME_TYPE to struct lpfc_name.
  1149. * Changed lpfcCfgParam_t to struct lpfc_cfgparam.
  1150. * Changed LPFC_STAT_t to struct lpfc_stats.
  1151. * Changed HBAEVT_t to struct lpfc_hba_event.
  1152. * Changed Studly_Caps lpfcHBA_t to struct lpfc_hba.
  1153. * Removed no longer used tasklet_running flag.
  1154. * Removing *PSOME_VAR typedefs and using SOME_VAR* directly.
  1155. * Changing .use_clustering to ENABLE_CLUSTERING.
  1156. * Modify lpfc_queuecommand to return SCSI_MLQUEUE_HOST_BUSY when
  1157. it can't queue a SCSI command. Also, remove cmnds_in_flight
  1158. member of struct lpfcHBA for 2.6 kernels as it was only needed
  1159. to determine what to return from queuecommand.
  1160. * Change return type of lpfc_evt_iocb_free to void as it doesn't
  1161. return anything.
  1162. * Remove unused cmnd_retry_list and in_retry members in struct
  1163. lpfcHBA.
  1164. * Remove some instances of unneeded casting of kmalloc's return in
  1165. lpfc_scsiport.c
  1166. * Remove lpfc_linux_attach() and lpfc_linux_detach(). Integrate
  1167. them into lpfc_probe_one() and lpfc_release_one() respectively.
  1168. * Remove lpfc_num_iocbs, lpfc_num_bufs module parameters
  1169. * Remove #defines for NUM_NODES, NUM_BUFS and NUM_IOCBS
  1170. Changes from 20040515 to 20040526
  1171. * Changing version number to 8.0.2.
  1172. * Including dma-mapping.h as one of the include headers. Also
  1173. rearrange the #include order.
  1174. * Make functions static as appropriate.
  1175. * queuecommand() will now return SCSI_MLQUEUE_HOST_BUSY instead of
  1176. 1 to backpressure midlayer.
  1177. * Removed function prototypes for lpfc_start_timer() and
  1178. lpfc_stop_timer()
  1179. * Changed timer support to be inline. Clk_data is now declared
  1180. right next to the corresponding timer_list entry so we don't
  1181. have to allocate these clk_data dynamically.
  1182. * Add readls after writels to PCI space to flush the writes.
  1183. * Fix misspelled word "safety" in function names.
  1184. * Fix up comments in lpfc.conf for per HBA parameters to reflect
  1185. new implementation.
  1186. * Change lpfc_proc_info handler to get the Nodename from
  1187. fc_nodename and not fc_portname.
  1188. * Fix up some comments and whitespace in lpfc_fcp.c.
  1189. * Formatting changes: get rid of leading spaces in code
  1190. * Move discovery processing from tasklet to a kernel thread.
  1191. * Move ndlp node from unmap list to map list if ADISC completed
  1192. successfully.
  1193. * Flush all the ELS IOCBs when there is a link event.
  1194. * LP9802 qdepth is twice the LP9802DC qdepth. Delay
  1195. elx_sched_init after READ_CONFIG to get max_xri from the
  1196. firmware. Reset ELX_CFG_DFT_HBA_Q_DEPTH to max_xri after
  1197. READ_CONFIG
  1198. * Fix fc_get_cfg_parm() to be more robust and support embedded hex
  1199. values. The lpfc_param's are now defined as:
  1200. lpfc_log_verbose="lpfc:0,lpfc0:0x10,lpfc1:4,lpfc100:0xffff" The
  1201. "," delimter does not matter. It can be anything or not exist at
  1202. all. ie param = "lpfc:0lpfc0:0x10.lpfc1:4txtlpfc100:0xffff" will
  1203. also work. Additionally the string is treated as case
  1204. insensitive.
  1205. * Changed all usage of lpfc_find_lun_device() to lpfc_find_lun().
  1206. * Removed unnecessary wrappers lpfc_find_lun_device() and
  1207. lpfc_tran_find_lun().
  1208. * Switch from using internal bus/id/lun to similar data from
  1209. scsi_device structure.
  1210. * Eliminate one-line function lpfc_find_target()
  1211. * Added slave_alloc, slave_destory
  1212. * lpfc_scsi_cmd_start can now acquire lun pointer from
  1213. scsi_device->hostdata, which is setup in slave_alloc.
  1214. * Eliminate unnecessary checking on every cmd just to see if we
  1215. are accessing the device the first time.
  1216. * Remove assumption in lpfc_reset_lun_handler that a valid
  1217. lpfc_scsi_buf is hung off of linux's scsi_cmnd->host_scribble
  1218. when our reset is called.
  1219. Changes from 20040507 to 20040515
  1220. * Changed version to 8.0.1
  1221. * Fixed crash on driver rmmod after error injection tests and
  1222. lpfc_tasklet deadlock.
  1223. * Modified lpfc.conf to remove limit on number of support hosts
  1224. * Removed HBAAPI
  1225. * Removed duplication of SCSI opcodes from lpfc_fcp.h that are
  1226. available in scsi/scsi.h
  1227. * Rework module_param usage
  1228. * Added MODULE_PARAM_DESC for various module_params
  1229. * Removed #define EXPORT_SYMTAB
  1230. * Removed #includes of if_arp.h and rtnetlink.h
  1231. * Removed string "Open Source" from MODULE_DESC
  1232. * Cleanup duplicated string definitions used by MODULE_DESC
  1233. * Renamed lpfc_pci_[detect|release] to lpfc_pci_[probe|remove]_one
  1234. * Fix formatting of lpfc_driver
  1235. * Remove unnecessary memset to 0 of lpfcDRVR
  1236. * Attach driver attributes always unless pci_module_init failed
  1237. * Remove all one-line wrappers from lpfc_mem.
  1238. * Remove lpfc_sysfs_set_[show|store] as it is no longer needed
  1239. * Redo lpfc_sysfs_params_[show|store] to one value per attribute rule
  1240. * Breakdown lpfc_sysfs_info_show into smaller one value per attribute
  1241. * Use device attributes instead of driver attributes where appropriate
  1242. * Remove no longer needed EXPORT_SYMBOLs
  1243. * Remove some unused code (1600 msg's related)
  1244. Changes from 20040429 to 20040507
  1245. * Change version to 8.0.0
  1246. * Fix the number of cmd / rsp ring entries in lpfc_fcp.c to match
  1247. the divisions setup in lpfc_hw.h.
  1248. * Remove phba->iflag reference.
  1249. * Several locking improvements.
  1250. * Remove functions lpfc_drvr_init_lock, lpfc_drvr_lock,
  1251. lpfc_drvr_unlock and lpfc_hipri_*.
  1252. * Remove LPFC_DRVR_LOCK and LPFC_DRVR_UNLOCK macros.
  1253. * Make lpfc_info() use lpfc_get_hba_model_desc() instead of
  1254. rewriting almost identical code.
  1255. * Fix 1 overly long line in each of lpfc_cfgparm.h, lpfc_ftp.c and
  1256. lpfc_sli.c.
  1257. * Fix build for Red Hat 2.6.3 kernel by #defining MODULE_VERSION
  1258. only if it isn't already defined.
  1259. * Change elx_sli_issue_mbox_wait to return correct error code to
  1260. the caller.
  1261. * In some of the els completion routines, after calling
  1262. lpfc_elx_chk_latt, driver ignores the return code of the
  1263. lpfc_elx_chk_latt. This will prevent the discovery state machine
  1264. restarting correctly when there are link events in the middle of
  1265. discovery state machine running. Fix this by exiting discovery
  1266. state machine if lpfc_els_chk_latt returns a non zero value.
  1267. * Removed MAX_LPFC_BRDS from lpfc_diag.h
  1268. * Removed unused first_check.
  1269. * Remove some unused fields and defines.
  1270. * Change lpfc-param names to lpfc_param.
  1271. * Add use of MODULE_VERSION macro for 2.6 kernels.
  1272. * Shorten length of some of the comment lines to make them more
  1273. readable.
  1274. * Move FCP_* definitions to their own header file, lpfc_fcp.h.
  1275. * Remove unused prototypes from lpfc_crtn.h: fcptst, iptst,
  1276. lpfc_DELAYMS.
  1277. * Remove duplicated prototypes from lpfc_crtn.h:
  1278. lpfc_config_port_prep, lpfc_config_port_post,
  1279. lpfc_hba_down_prep.
  1280. * Removed some unused export_symbols.
  1281. * Install driver files into */drivers/scsi/lpfc instead of
  1282. */drivers/scsi.
  1283. Changes from 20040426 to 20040429
  1284. * Declared export symbol lpfc_page_alloc and lpfc_page_free
  1285. * Changed lpfc version number to 6.98.3
  1286. * Move the definition of MAX_LPFC_BRDS to the only header file
  1287. that uses it (lpfc_diag.h).
  1288. * Change lpfc_sli_wake_iocb_wait to do a regular wake_up since
  1289. lpfc_sli_issue_iocb_wait now sleeps uninterruptible.
  1290. * Replace list_for_each() with list_for_each_safe() when a list
  1291. element could be deleted.
  1292. * Fix IOCB memory leak
  1293. Changes from 20040416 to 20040426
  1294. * Change lpfc_config_port_prep() to interpret word 4 of the DUMP
  1295. mbox response as a byte-count
  1296. * Add info attribute to sysfs
  1297. * Minor formatting (spaces to tabs) cleanup in lpfc_sched.h
  1298. * Remove unused log message number 732
  1299. * Completing MODULE_PARM -> module_param changes
  1300. * Removed unused targetenable module parameter
  1301. * Removed locks from lpfc_sli_issue_mbox_wait routine
  1302. * Removed code that retry 29,00 check condition
  1303. * Removed code that manipulates rspSnsLen.
  1304. * Fix use of lun-q-depth config param
  1305. * Fix severity inconsistency with log message 249
  1306. * Removed lpfc_max_target from lpfc_linux_attach
  1307. * Replace references to lpfcDRVR.pHba[] with lpfc_get_phba_by_inst()
  1308. * Change lpfc_param to lpfc-param
  1309. * Partially removed 32 HBA restriction within driver. Incorported
  1310. lpfc_instcnt, lpfc_instance[], and pHba[] into lpfcDRVR
  1311. structure Added routines lpfc_get_phba_by_inst()
  1312. lpfc_get_inst_by_phba() lpfc_check_valid_phba()
  1313. * Turn on attributes "set" & "params" by default.
  1314. * Further formatting/whitespace/line length cleanup on: lpfc_ct.c
  1315. lpfc_els.c lpfc_fcp.c lpfc_hbadisc.c lpfc_init.c lpfc_ipport.c
  1316. lpfc_mbox.c lpfc_nportdisc.c lpfc_sched.c lpfc_sched.h
  1317. lpfc_scsi.h lpfc_scsiport.c lpfc_sli.c and lpfc_sli.h
  1318. * Add log message 249 to log any unsupported device addressing
  1319. modes encountered.
  1320. * Add support for 256 targets and 256 LUNs
  1321. * Fixed panic in lpfc_linkdown.
  1322. * Removed (struct list_head*) casting in several calls to list_del
  1323. * Free irq reservation and kill running timers when insmod or
  1324. modprobe are killed via ctrl-c
  1325. * Remove drivers/scsi from include path
  1326. * Wrap use of log message 311 in macro
  1327. * Detect failure return from pci_map_sg call in lpfc_os_prep_io
  1328. * Fix use-after-free of IOCB in lpfc_sli_process_sol_iocb which
  1329. was causing an Oops on 2.6.5 kernel.
  1330. * Cleanup use of several gotos not used for error exit.
  1331. * Replace memcpy_toio() and memcpy_toio() with endian-dependent
  1332. lpfc_memcpy_to_slim() and lpfc_memcpy_from_slim() so that for
  1333. big endian hosts like PPC64, the SLIM is accessed 4 bytes at a
  1334. time instead of as a byte-stream.
  1335. Changes from 20040409 to 20040416
  1336. * The scsi_register and scsi_alloc_host OS calls can fail and
  1337. return a zero-valued host pointer. A ctrl-C on 2.6 kernels
  1338. during driver load will cause this and the driver to panic.
  1339. Fixed this bug. Also found a bug in the error_x handling with
  1340. lpfc_sli_hba_down - it was in the wrong place and the driver
  1341. lock was not held, but needed to be (in lpfc_linux_attach) Fixed
  1342. both. Did some minor comment clean up.
  1343. * Removed unwanted (void *) castings.
  1344. * Replace define of INVALID_PHYS, with kernel 2.6.5's
  1345. dma_mapping_error() and add a inline function for earlier
  1346. kernels. Remove lpfc_bad_scatterlist().
  1347. * Clean up formatting in hbaapi.h, lpfc.h, lpfc_cfgparm.h,
  1348. lpfc_crtn.h, lpfc_ct.c, lpfc_diag.h, lpfc_disc.h, lpfc_els.c,
  1349. lpfc_fcp.c, lpfc_hbadisc.c, lpfc_hw.h, lpfc_init.c,
  1350. lpfc_ipport.c, lpfc_logmsg.c, lpfc_logmsg.h and lpfc_scsiport.c
  1351. - mostly replacing groups of 8 spaces with hard tabs and keeping
  1352. lines to 80 column max..
  1353. * Removed LPFC_DRVR_LOCK call from lpfc_unblock_requests for 2.4
  1354. kernels. The lpfc_scsi_done routine already unlocks the driver
  1355. lock since it expects this lock to be held.
  1356. * Removed global lock capabilities from driver lock routines
  1357. * Remove SA_INTERRUPT flag from request_irq
  1358. * Move dma_addr_t cast inside of getPaddr macro as everywhere
  1359. getPaddr is used, the return is cast to dma_addr_t.
  1360. * Clean up formatting in lpfc_sli.c and lpfc_sysfs.c - mostly
  1361. replacing groups of 8 spaces with hard tabs and keeping lines
  1362. to 80 column max.
  1363. * Fix build for RHEL 2.1 BOOT kernels by always #including
  1364. interrupt.h in lpfc.h.
  1365. * Fix RHEL 3 build by #defining EXPORT_SYMTAB.
  1366. * Replace sprintf with snprintf in lpfc_proc_info.
  1367. * Fix build warnings on 2.6 kernels - remove no longer used calls
  1368. to character device initialization.
  1369. * Initial support code for discovery in tasklet conversion.
  1370. * Removing char interface and ioctl code.
  1371. * Change all elx prefixes to lpfc
  1372. * Replace lpfc_write_slim() & lpfc_read_slim() with memcpy_toio(),
  1373. memcpy_fromio(), writel() & readl().
  1374. Changes from 20040402 to 20040409
  1375. * Replaced lpfc_read_hbaregs_plus_offset and
  1376. lpfc_write_hbaregs_plus_offset functions with readl and writel.
  1377. * Get rid of long mdelay's in insmod path
  1378. * Changed the way our pci_device_id structures are initialized
  1379. * Replace lpfc_read/write_CA/HA/HC/HS with calls to readl() &
  1380. writel() directly.
  1381. * Increase SLI2_SLIM to 16K Increase cmd / rsp IOCBs accordingly
  1382. * Removed lpfc_els_chk_latt from the lpfc_config_post function.
  1383. lpfc_els_chk_latt will enable the link event interrupts when
  1384. flogi is pending which causes two discovery state machines
  1385. running parallely.
  1386. * Add pci_disable_device to unload path.
  1387. * Move lpfc_sleep_event from lpfc_fcp.c to lpfc_util_ioctl.c
  1388. * Call dma_map_single() & pci_map_single() directly instead of via
  1389. macro lpfc_pci_map(). Allow address 0 for PPC64.
  1390. * Change sleep to uninterruptible in lpfc_sli_issue_icob_wait
  1391. because this function doesn't handle signals.
  1392. * Move lpfc_wakeup_event from lpfc_fcp.c to lpfc_ioctl.c
  1393. * Remove unneeded #include <linux/netdevice.h>
  1394. * Remove unused clock variables lpfc_clkCnt and lpfc_sec_clk.
  1395. * Get rid of capitalization of function names.
  1396. * Removed lpfc_addr_sprintf.
  1397. * Implemented gotos in lpfc_linux_attach for error cases.
  1398. * Replace mlist->dma.list = dmp->dma.list; to mlist = dmp.
  1399. * Remove functions lpfc_get_OsNameVersion and elx_wakeup. Change
  1400. elx_wakeup to wake_up_interruptible
  1401. * Add function lpfc_get_os_nameversion and change
  1402. lpfc_get_OsNameVersion to lpfc_get_os_nameversion.
  1403. * Remove lpfc_get_OsNameVersion
  1404. * Change driver name to a consistent lpfc in every visible place.
  1405. * Fix build warning: removed unused variable ret in lpfc_fdmi_tmo.
  1406. * Remove lpfc_utsname_nodename_check function
  1407. * Remove functions lpfc_register_intr and lpfc_unregister_intr
  1408. * Fill in owner field in lpfc_ops file_operations struct and
  1409. remove now unnecessary open and close entry points.
  1410. * Change function name prefixes from elx_ to lpfc_
  1411. * Remove special case check for TUR in elx_os_prep_io()
  1412. * Renamed elx_scsi.h to lpfc_scsi.h
  1413. * Renamed elx_sched.h to lpfc_sched.h
  1414. * Renamed elx_mem.h to lpfc_mem.h
  1415. * Renamed elx_sli.h to lpfc_sli.h
  1416. * Renamed elx_logmsg.h to lpfc_logmsg.h
  1417. * Renamed elx.h to lpfc.h
  1418. * Renamed elx_sli.c to lpfc_sli.c
  1419. * Renamed elx_sched.c to lpfc_sched.c
  1420. * Renamed elx_mem.c to lpfc_mem.c
  1421. * Renamed elx_logmsg.c to lpfc_logmsg.c
  1422. * Renamed lpfcLINUXfcp.c lpfc_fcp.c
  1423. * Renamed elx_clock.c to lpfc_clock.c
  1424. * Reduce stack usage in lpfc_info().
  1425. * Move lpip_stats structure from lpfc_hba.h to lpfc_ip.h.
  1426. * Move lpfc_stats and HBAEVT_t structures from lpfc_hba.h to
  1427. lpfc.h
  1428. * Remove lpfc_hba.h
  1429. * Remove duplicate rc definitions from
  1430. * Removed code which used next pointer to store mbox structure.
  1431. * Cleaned up list iterations.
  1432. * Removed non list manipulation of the next pointers.
  1433. * Change list_del()/INIT_LIST_HEAD sequences to list_del_init()
  1434. * In ELX_IOCBQ_t: Moved hipri_trigger field to iocb_flag. Combined
  1435. hipri_wait_queue and rsp_iocb in union
  1436. * Replaced casting from list_head with list_entry macro.
  1437. * Added ct_ndlp_context field to the ELX_IOCBQ_t.
  1438. * Do not use DMABUf_t list to store ndlp context
  1439. * Return 0 from lpfc_process_iotcl_util() when ELX_INITBRDS
  1440. succeeds.
  1441. * remove elx_os_scsiport.h
  1442. * Do not use DMABUf_t list to hold rpi context
  1443. * Replace elx_cfg_* names with lpfc_cfg-*
  1444. * Moved FCP activity to ring 0. Moved ELS/CT activity to ring 2.
  1445. * Clean up formatting of elx_sli.h (tabs for indents, 80 column
  1446. lines).
  1447. * Remove unused elxclock declaration in elx_sli.h.
  1448. * Since everywhere IOCB_ENTRY is used, the return value is cast,
  1449. move the cast into the macro.
  1450. * Split ioctls out into seperate files
  1451. Changes from 20040326 to 20040402
  1452. * Updated ChangeLog for 20040402 SourceForge drop.
  1453. * Use safe list iterator for ndlp list
  1454. * Added code to return NLP_STE_FREED_NODE from the discovery
  1455. state machine functions if the node is freed from the
  1456. function.
  1457. * Fixes to DMABUF_t handling
  1458. * Fix for load error in discovery
  1459. * Remove loop_cnt variable from lpfc_rcv_plogi_unused_node.
  1460. * Remove nle. reference.
  1461. * Remove support for building 2.4 drivers
  1462. * Remove elx_util.h and replace elx_disc.h with lpfc_disc.h
  1463. * Implemented the Linux list macros in the discovery code.
  1464. Also moved elx_disc.h contents into lpfc_disc.h
  1465. * Unused variable cleanup
  1466. * Use Linux list macros for DMABUF_t
  1467. * Break up ioctls into 3 sections, dfc, util, hbaapi
  1468. rearranged code so this could be easily seperated into a
  1469. differnet module later All 3 are currently turned on by
  1470. defines in lpfc_ioctl.c LPFC_DFC_IOCTL, LPFC_UTIL_IOCTL,
  1471. LPFC_HBAAPI_IOCTL
  1472. * Misc cleanup: some goto's; add comments; clarify function
  1473. args
  1474. * Added code to use list macro for ELXSCSITARGET_t.
  1475. * New list implementation for ELX_MBOXQ_t
  1476. * Cleaned up some list_head casting.
  1477. * Put IPFC ifdef around two members of struct lpfc_nodelist.
  1478. * Cleaned up iocb list using list macros and list_head data
  1479. structure.
  1480. * lpfc_online() was missing some timer routines that were
  1481. started by lpfc_linux_attach(). These routines are now also
  1482. started by lpfc_online(). lpfc_offline() only stopped
  1483. els_timeout routine. It now stops all timeout routines
  1484. associated with that hba.
  1485. * Replace seperate next and prev pointers in struct
  1486. lpfc_bindlist with list_head type. In elxHBA_t, replace
  1487. fc_nlpbind_start and _end with fc_nlpbind_list and use
  1488. list_head macros to access it.
  1489. * Fix ulpStatus for aborting I/Os overlaps with newer firmware
  1490. ulpStatus values
  1491. * Rework params_show/store to be consistent as the other
  1492. routines. Remove generic'ness and rely on set attribute.
  1493. * Remove unused log message.
  1494. * Collapse elx_crtn.h and prod_crtn.h into lpfc_crtn.h
  1495. * Ifdef Scheduler specific routines
  1496. * Removed following ununsed ioclt's: ELX_READ_IOCB
  1497. ELX_READ_MEMSEG ELX_READ_BINFO ELX_READ_EINVAL ELX_READ_LHBA
  1498. ELX_READ_LXHBA ELX_SET ELX_DBG LPFC_TRACE
  1499. * Removed variable fc_dbg_flg
  1500. * Fixed a bug where HBA_Q_DEPTH was set incorrectly for
  1501. 3-digit HBAs. Also changed can_queue so midlayer will only
  1502. send (HBA_Q_DEPTH - 10) cmds.
  1503. * Clean up code in the error path, check condition. Remove
  1504. ununsed sense-related fields in lun structure.
  1505. * Added code for safety pools for following objects: mbuf/bpl,
  1506. mbox, iocb, ndlp, bind
  1507. * Wrapped '#include <elx_sched.h>' in '#ifdef USE_SCHEDULER'.
  1508. * Fixed 'make clean' target.
  1509. * Build now ignores elx_sched.o, and includes lpfc_sysfs.o.
  1510. * Wrapped lpfndd.o target in BUILD_IPFC ifdef.
  1511. * Removed elx_os.h inclusion in implementation files.
  1512. * Removed ELX_OS_IO_t data structure and put data direction
  1513. and non scatter/gather physical address into the scsi buffer
  1514. structure directly. Moved DRVR_LOCK, putPaddr, getPaddr
  1515. macros and some defines into elx.h since they are required
  1516. by the whole driver.
  1517. * Migrated following ioctls (debug) ELX_DISPLAY_PCI_ALL
  1518. ELX_DEVP ELX_READ_BPLIST ELX_RESET_QDEPTH ELX_STAT.
  1519. * Step 1 of attempt to move all Debug ioctls to sysfs.
  1520. Implemented the following IOCTLs in sysfs: ELX_WRITE_HC
  1521. ELX_WRITE_HS ELX_WRITE_HA ELX_WRITE_CA ELX_READ_HC
  1522. ELX_READ_HS ELX_READ_HA ELX_READ_CA ELX_READ_MB ELX_RESET
  1523. ELX_READ_HBA ELX_INSTANCE ELX_LIP. Also introduced
  1524. attribute "set" to be used in conjuction with the above
  1525. attributes.
  1526. * Removed DLINK, enque and deque declarations now that clock
  1527. doesn't use them anymore
  1528. * Separated install rule so that BUILD_IPFC has to be set when
  1529. make is called in order for the install rule to attempt to
  1530. copy the lpfndd.o driver. This change fixes a bug that
  1531. occurs because the install rule by default attempted to
  1532. install lpfndd.o, whereas the default make rule did not by
  1533. default build lpfndd.o.
  1534. * Keep track if hbaapi index numbers need to be refreshed.
  1535. * Removed prod_os.h from include list.
  1536. * Removed LPFC_LOCK and LPFC_UNLOCK macros. Added OS calls
  1537. into elx_os_scsiport.c. This file is now empty.
  1538. * Added spin_lock_irqsave and spin_unlock_irqrestore calls
  1539. into code directly and removed LPFC_LOCK_ and _UNLOCK_
  1540. macros
  1541. * Remove references to "elx_clock.h"
  1542. * Added utsname.h to include list. The previous checkin to
  1543. elx_os.h removed its inclusion of utsname.h since there is
  1544. precious little in the file. However, lpfcLINUXfcp.c needs
  1545. it and now has it.
  1546. * Removed some commented-out code
  1547. * Removed elx_lck_t data structure, stray elxDRVR_t type, and
  1548. include from file. No longer used.
  1549. * Removed two PCI Sync defines. Removed includes - not
  1550. needed. Cleaned up macro lines.
  1551. * Added two functions from elxLINUXfcp.c. These functions
  1552. were IPFC specific.
  1553. * Removed hipri lock abstractions and added OS call into code.
  1554. Removed elx_lck_t and added spinlock_t directly. Moved two
  1555. IPFC functions into lpfc_ipport.c
  1556. * Moved IP specific structures to lpfc_ip.h file.
  1557. * lpfc_ipfarp_timeout() uses system timer. Remove all usages
  1558. of old internal clock support.
  1559. * Made changes to compile without IPFC support for the default
  1560. build. Added ifdef IPFC for all lpfc_ip.h includes.
  1561. * Patched elx_free_scsi_buf
  1562. * Removed elx_sched.o from 2.6 dependencies
  1563. * Reworked lpfc_pcimap.
  1564. * Use Linux swap macros to replace ELX swapping macros
  1565. (SWAP_SHORT, SWAP_LONG, SWAP_DATA, SWAP_DATA16,
  1566. PCIMEM_SHORT, PCIMEM_LONG, PCIMEM_DATA).
  1567. * move in_interrupt() check inside of elx_sleep_ms()
  1568. * Moved location of pci.h include.
  1569. * Restored elx_lck_t types in elxHBA_t.
  1570. * Removed elx_pci_dma_sync call. Also removed some PCI
  1571. defines from elx_hw.h and removed the spinlock_t locks that
  1572. are no longer used in elx.h
  1573. * elx_iodone() now uses system timer.
  1574. * elx_qfull_retry() now uses system timer.
  1575. * lpfc_put_buf(), lpfc_ip_xri_timeout() and
  1576. lpfc_ip_timeout_handler() now use system timer.
  1577. * lpfc_fdmi_tmo() and lpfc_qthrottle_up() now use system
  1578. timer.
  1579. * Removed num_bufs and num_iocbs configuration parameters.
  1580. * Fixed a memory corruption bug. This was caused by a memory
  1581. write to ndlp structure from lpfc_cmpl_els_acc function.
  1582. This ndlp structure was freed from lpfc_els_unsol_event.
  1583. * lpfc_disc_timeout() and lpfc_establish_link_tmo() now use
  1584. system timer. Also update lpfc_els_retry_delay() to do a
  1585. single lock release at the end.
  1586. * Remove use of PAN (pseudo adapter number).
  1587. * Reintroduced usage of the cross compiler for building on
  1588. ppc64 to remove build errors that were cropping up when
  1589. using the standard gcc compiler.
  1590. * Fix no-unlock-before return in lpfc_els_retry_delay which was
  1591. causing a deadlock on insmod in some environments.
  1592. * Minor format changes fix up comments
  1593. * Create utility clock function elx_start_timer() and
  1594. elx_stop_timer(). All timeout routines now use these common
  1595. routines.
  1596. * Minor formating changes fix up comments
  1597. * Minor formatting changes get rid of failover defines for
  1598. syntax checking
  1599. * Minor formatting changes remove ISCSI defines.
  1600. * Fix typo in install target for 2.4 kernels.
  1601. * Removed unused elx_scsi_add_timer extern function
  1602. declaration.
  1603. * Cleanup casting around DMA masks.
  1604. * Comment out lpfndd.o modules_install section as lpfndd.o is
  1605. not generated if CONFIG_NET_LPFC is not set. Also refer to
  1606. BASEINCLUDE only in out of kernel source module builds as it
  1607. will not exist otherwise.
  1608. * Removed unused malloc counters from lpfcLINUXfcp.c.
  1609. * Remove some unnecessary #includes in lpfcLINUXfcp.c
  1610. * Remove unncessary #includes in elxLINUXfcp.c
  1611. * Minor formatting cleanups in Makefile to avoid some
  1612. linewrapping.
  1613. * Removed unused elx_mem_pool data structure.
  1614. * Remove several unnecessary #includes.
  1615. * Moving fix for memory leak in ioctl lip area to sysfs's lip.
  1616. * Removed unused elx_dma_handle_t elx_acc_handle_t
  1617. FC_MAX_SEGSZ and FC_MAX_POOL.
  1618. * Rewrite of Makefile. Fixes breakages with make -j4 during
  1619. kernel compile. Does not recompile all files on every
  1620. build. Uses the kernel build's definitions of CFLAGS,
  1621. MODFLAGS etc. Removed "make rpm" option.
  1622. * Removed unused #defines CLOSED, DEAD, OPENED, NORMAL_OPEN
  1623. and unneeded #include of elx_sched.h in elx.h.
  1624. * Several log message updates
  1625. * Add PCI_DEVICE_ID_FIREFLY for LP6000
  1626. * Fixed known issues in 20040326: driver crashes on rmmod in
  1627. both 2.4 and 2.6 kernels
  1628. Changes from 20040319 to 20040326
  1629. * Updated ChangeLog for 20040326 SourceForge drop.
  1630. * remove lpfc_isr / lpfc_tmr logic fixed up 8 spaces from
  1631. previous checkins with tabs
  1632. * replace elx_in_intr() with in_interrupt()
  1633. * Remove unused messages 1602 and 1603.
  1634. * Fix the following issues with log messages: Remove unused
  1635. messages 406, 407, 409, 927, 928, 1201, 1202, 1204, 1205, 1206
  1636. and 1207. Create a new message 738 to fix duplicate instances
  1637. of 736.
  1638. * Removed remaining pci interface abstractions from elxLINUXfcp.c.
  1639. Implemented OS calls directly in all remaining files and cleaned
  1640. up modules. Removed prototypes as well.
  1641. * Removed following functions/structures elx_mem_dmapool
  1642. elx_idx_dmapool elx_size_dmapool elx_kmem_lock dfc_data_alloc
  1643. dfc_data_free dfc_mem struct mbuf_info elx_acc_handle_t
  1644. data_handle elx_dma_handle_t dma_handle struct elx_memseg
  1645. MEMSEG_t
  1646. * lpfc_els_timeout_handler() now uses system timer.
  1647. * Further cleanup of #ifdef powerpc
  1648. * lpfc_scsi_timeout_handler() now uses system timer.
  1649. * Replace common driver's own defines for endianess w/ Linux's
  1650. __BIG_ENDIAN etc.
  1651. * Added #ifdef IPFC for all IPFC specific code.
  1652. * lpfc_disc_retry_rptlun() now uses system timer.
  1653. * lpfc_npr_timeout() now uses system timer.
  1654. * Modified detect code, on insmod, to only wait a max of 2 secs if
  1655. link comes up and there are no devices.
  1656. * Move remaining message logging functions into
  1657. elx_logmsg.c/elx_logmsg.h.
  1658. * Added code to clear link attention bit when there is a pending
  1659. link event and the memory allocation for read_la mail box
  1660. command fails.
  1661. * Removed function calls for mapping bar registers and allocating
  1662. kernel virtual memory mappings to the mapped bars Removed
  1663. prototypes, lpfc_driver_cache_line, and pci_bar1_map rename to
  1664. pci_bar2_map.
  1665. * Allocate mbox only if the hba_state is in ready state.
  1666. * Complete lip support via sysfs. To lip, echo brdnum >
  1667. /sys/bus/pci/drivers/lpfc/lip.
  1668. * moving sysfs show/store implementations to lpfc_sysfs.c. Also add
  1669. support for lip.
  1670. * Add files: lpfc_sysfs.c, lpfc_sysfs.h
  1671. * move LPFC_DRIVER_NAME and LPFC_MODULE_DESC out of lpfcLINUXfcp.c
  1672. to lpfc_version.h, since it is now needed in lpfc_sysfs.c
  1673. * elx_mbox_timeout now uses system timer
  1674. * Changed lpfc_nodev_timeout, lpfc_els_retry_delay and
  1675. lpfc_linkdown_timeout to use the system timer instead of
  1676. internal clock support.
  1677. * Move remaining message logging functions in elx_util.c to
  1678. elx_logmsg.c.
  1679. * Remove some unnecessary typecasting.
  1680. * Remove log message that is no longer used (was used by
  1681. elx_str_atox).
  1682. * Replaced DLINK_t and SLINK_t by standard Linux list_head
  1683. * Removed deque macro
  1684. * Replaced ELX_DLINK_t ans ELX_SLINK_t by Linux struct list_head
  1685. (except for clock)
  1686. * Removed following functions from code: linux_kmalloc linux_kfree
  1687. elx_alloc_bigbuf elx_free_bigbuf
  1688. * Removed following abstract functions from the code. elx_malloc
  1689. elx_free elx_ip_get_rcv_buf elx_ip_free_rcv_buf
  1690. elx_mem_alloc_dmabuf elx_mem_alloc_dmabufext elx_mem_alloc_dma
  1691. elx_mem_alloc_buf lpfc_bufmap
  1692. * Removed custom PCI configuration #defines and replaced with
  1693. OS-provided #defines. Also added linux/pci.h to *.c files.
  1694. * Remove elx_str_ctox. Replace elx_str_atox with sscanf.
  1695. * Many indentation/whitespace fixes.
  1696. * Replace elx_str_ctox with isxdigit where it was only used to
  1697. check the value of a character.
  1698. * Removed following functions from the code. elx_kmem_free
  1699. elx_kmem_alloc elx_kmem_zalloc
  1700. * Change use of 2.4 SCSI typedef Scsi_Host_Template to struct
  1701. scsi_host_template for 2.6 kernels.
  1702. * Change use of 2.4 SCSI typedefs (Scsi_Device, Scsi_Cmnd,
  1703. Scsi_Request) the their real struct names.
  1704. * Move 2.6 compatibility irqreturn definitions to lpfc_compat.h.
  1705. Protect these definitions from conflicting with similar ones in
  1706. later 2.4 kernels.
  1707. * Remove unused definitions: LINUX_TGT_t, LINUX_LUN_t,
  1708. LINUX_BUF_t, elx_lun_t, SET_ADAPTER_STATUS.
  1709. * Convert pci_ calls to linux 2.6 dma_ equivalents.
  1710. * Removed unused types: struct buf, struct sc_buf, T_SCSIBUF
  1711. typedef.
  1712. * Fix Makefile so that 2.4 drivers don't always rebuild all files.
  1713. * Remove unused _static_ and fc_lun_t definitions.
  1714. * Cleaned up some memory pool implementation code.
  1715. * Fix panic with char dev changes. Turns out that 2.6.4 code does
  1716. the same in kernel space with the 2.4 interface style
  1717. definitions. So remove the new char dev code altogether.
  1718. * Remove typecasting from fc_get_cfg_param and consolidate
  1719. multiple instances of the parameter switch into a single
  1720. instance.
  1721. * Use lpfc_is_LC_HBA() macro that tests pcidev->device directly
  1722. instead of saving a private copy that undergoes varied shifting
  1723. & casting.
  1724. * Removed usage of all memory pools.
  1725. Changes from 20040312 to 20040319
  1726. * Use dev_warn instead of printk for 2.6 kernels
  1727. * Correct Iocbq completion routine for 2.6 kernel case
  1728. * Change void *pOSCmd to Scsi_Smnd *pCmd
  1729. * Change void *pOScmd to struct sk_buff *pCmd
  1730. * Remove data directon code.
  1731. * Removed memory pool for buf/bpl buffers and use kmalloc/kfree
  1732. pci_pool_alloc/free directly.
  1733. * Move PPC check for DMA address 0 in scatter-gather list, into
  1734. lpfc_compat.h
  1735. * Always use pci_unmap_single() instead of pci_unmap_page()
  1736. * Clean up the 2.6 vs 2.4 #if blocks.
  1737. * Conditionalize Scheduler
  1738. * Add a comment to explain a little what the first Makefile
  1739. section does.
  1740. * Removed lpfc_intr_post
  1741. * Sysfs new display format. Also added write functionality. You
  1742. can [ echo "0 log_verbose 3" >
  1743. /sys/bus/pci/drivers/lpfc/params]. Hex support yet to be added.
  1744. * Removed several #ifdef powerpc, including for a discovery issue
  1745. in lpfc_ValidLun()
  1746. * Change elx_printf_log to use vsprintf.
  1747. * Added lpfc_compat.h provides macros to aid compilation in the
  1748. Linux 2.4 kernel over various platform architectures. Initially
  1749. support mapping to a DMA address.
  1750. * Removed memory pool for nlp/bind buffers and use kmalloc/kfree
  1751. directly.
  1752. * Removed memory pool for iocb buffers and use kmalloc/kfree
  1753. directly.
  1754. * Removed memory pool for mailbox buffers and use kmalloc/kfree
  1755. directly.
  1756. * Cleaned up back and forth casts
  1757. * Initial support for sysfs for 2.6 kernel.
  1758. * Changed elx_dma_addr_t to dma_addr_t
  1759. * Fix a 2.6 kernel check to be >= 2.6.0 instead of > (was missing
  1760. 2.6.0).
  1761. * Remove elx_printf and elx_str_sprintf. Replace elx_print with
  1762. printk.
  1763. * Replace elx_printf with printk.
  1764. * Replace elx_str_sprintf with sprintf.
  1765. * Removed the mem_lock, its prototype, function, macro, and
  1766. iflags.
  1767. * Use kmalloc/kfree for ELX_SCSI_BUF_t
  1768. * Use linux pci_pools for SCSI_DMA_EXT
  1769. * Use linux pci_pools for BPLs.
  1770. * Minor cleanup of DFC args for PPC64.
  1771. * Several small indentation cleanups.
  1772. * New Linux 2.6 style of char device registration.
  1773. * Migrated members of LPFCHBA_t and LINUX_HBA_t into elxHBA_t
  1774. * Use strcpy, strncmp, isdigit, strlen instead of abstractions
  1775. * Cleanup of driver_template.
  1776. * Facilitate compile time turn on/off of lpfc_network_on.
  1777. * Split large source files into smaller, better named ones.
  1778. Changes from 2.10a to 20040312
  1779. * Fix build for 2.4 kernels
  1780. * Move driver version macros into lpfc_version.h file.
  1781. * Fixed data miscompare with LIP.
  1782. * Removed elx_sli, elx_ioc, elx_disc, elx_sch routines,
  1783. prototypes, and reference points.
  1784. * Correct the space insertions with hardtabs
  1785. * Remove routine call pointers in ELX_SLI_INIT_t struct.
  1786. * Removed module locks except for drvr, mem, and clock.
  1787. * Removed unused module locks from sourcebase. Kept drvr_lock,
  1788. mem_lock, and clock_lock.
  1789. * Change NULL to 0