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