1. 20 7月, 2012 2 次提交
  2. 19 2月, 2012 1 次提交
  3. 16 1月, 2012 1 次提交
  4. 03 10月, 2011 2 次提交
  5. 30 6月, 2011 1 次提交
  6. 31 3月, 2011 1 次提交
  7. 13 2月, 2011 6 次提交
  8. 22 12月, 2010 2 次提交
  9. 17 11月, 2010 1 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  10. 26 10月, 2010 1 次提交
    • B
      [SCSI] libfc: Do not let disc work cancel itself · c531b9b4
      Bhanu Prakash Gollapudi 提交于
      When number of NPIV ports created are greater than the xids
      allocated per pool -- for eg., creating 255 NPIV ports on a
      system with nr_cpu_ids of 32, with each pool containing 128
      xids -- and then generating a link event - for eg.,
      shutdown/no shutdown -- on the switch port causes the hang
      with the following stack trace.
      
      Call Trace:
      schedule_timeout+0x19d/0x230
      wait_for_common+0xc0/0x170
      __cancel_work_timer+0xcf/0x1b0
      fc_disc_stop+0x16/0x30 [libfc]
      fc_lport_reset_locked+0x47/0x90 [libfc]
      fc_lport_enter_reset+0x67/0xe0 [libfc]
      fc_lport_disc_callback+0xbc/0xe0 [libfc]
      fc_disc_done+0xa8/0xf0 [libfc]
      fc_disc_timeout+0x29/0x40 [libfc]
      run_workqueue+0xb8/0x140
      worker_thread+0x96/0x110
      kthread+0x96/0xa0
      child_rip+0xa/0x20
      
      Fix is to not cancel the disc_work if discovery is already
      stopped, thus allowing lport state machine to restart and try
      discovery again.
      Signed-off-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Acked-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c531b9b4
  11. 28 7月, 2010 13 次提交
  12. 17 5月, 2010 2 次提交
  13. 12 4月, 2010 1 次提交
  14. 11 4月, 2010 1 次提交
    • J
      [SCSI] libfc, libfcoe, fcoe: use smp_processor_id() only when preempt disabled · f018b73a
      Joe Eykholt 提交于
      When the kernel is configured for preemption, using smp_processor_id()
      when preemption is enabled causes a warning backtrace and is wrong
      since we could move off of that CPU as soon as we get the ID,
      and we would be referencing the wrong CPU, and possibly an invalid one
      if it could be hotswapped out.
      
      Remove the fc_lport_get_stats() function and explicitly use per_cpu_ptr()
      to get the statistics.  Where preemption has been disabled by holding
      a _bh lock continue to use smp_processor_id(), but otherwise use
      get_cpu()/put_cpu().
      
      In fcoe_recv_frame() also changed the cases where we return in the
      middle to do a goto to the code which bumps ErrorFrames and does
      a put_cpu().  Two of these cases didn't bump ErrorFrames before, but
      doing so is harmless because they "can't happen", due to prior length
      checks.
      
      Also rearranged code in fcoe_recv_frame() to have only one call to
      fc_exch_recv().  It's just as efficient and saves a call to put_cpu().
      
      In fc_fcp.c, adjusted a FIXME comment for code which doesn't need fixing.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      f018b73a
  15. 05 12月, 2009 5 次提交
    • Y
      [SCSI] fcoe, libfc: add get_lesb() to allow LLD to fill the link error status block (LESB) · b84056bf
      Yi Zou 提交于
      Add a member function pointer as get_lesb to libfc_function_template so LLD
      can fill the LESB based on its own statistics. For fcoe, it fills the LESB
      as a fcoe_fc_els_lesb struct according to FC-BB-5.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      b84056bf
    • Y
      [SCSI] libfc: add FC-BB-5 LESB counters to fcoe_dev_stats · 6580bbd0
      Yi Zou 提交于
      FC-BB-5 Rev2.0, Clause 7.10 extends the FC-LS-3 LESB for FC-BB_E. We are
      already tracking Link Failure Count so add the rest in this patch.
      
      For VLinkFailureCount and MissDiscAdvCount, they are part of the per-cpu
      fcoe_dev_stats. For SymbolErrorCount, ErroredBlockCount, and FCSErrorCount,
      they are defined in IEEE 802.3-2008 and are per LLD. They are expected to
      come from LLD.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      6580bbd0
    • J
      [SCSI] libfc: register FC4 features with the FC switch · ab593b18
      Joe Eykholt 提交于
      Customers and certification tests have pointed out that we don't
      show up on the switch management software as an initiator.
      
      On some MDS switches 'show fcns database' command shows libfc
      initiators as 'fcp' not 'fcp:init' like other initiators.
      
      On others switches, I think the switch gets the features by doing a PRLI,
      but it may be only certain models or under certain configurations.
      
      Fix this by registering our FC4 features with the RFF_ID CT request
      after local port login and after the RFT_ID.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      ab593b18
    • J
      [SCSI] libfc: add set_fid function to libfc template · 093bb6a2
      Joe Eykholt 提交于
      This is to notify the LLD when an FC_ID is assigned to the local port.
      
      The fnic driver needs to push the assigned FC_ID to firmware.
      It currently does this by intercepting the FLOGI responses, and
      in order to make that code more common with FIP and NPIV, it
      makes more sense to wait until the local port has completely
      handled the FLOGI or FDISC response.  Also, when we fix
      point-to-point FC_ID assignment, we'll need this callback as well.
      
      Add a call to the libfc template, which is called whenever
      the local port FC_ID is being assigned.  It defaults to
      fc_lport_set_fid(), supplied by libfc.
      
      As additional benefit of this function, the LLD may determine
      the MAC address that caused the change by looking at the received frame.
      
      We also print the assigned port ID as long as it isn't 0.
      Setting port ID to 0 happens often in reset while retrying FLOGI,
      and would be uninteresting.  This replaces the previous message
      which didn't identify the host adapter instance.
      
      patch v2 note: changed one word in a comment.  "intercepted" -> "provided".
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      093bb6a2
    • R
      [SCSI] libfc: Formatting cleanups across libfc · 3a3b42bf
      Robert Love 提交于
      This patch makes a variety of cleanup changes to all libfc files.
      
      This patch adds kernel-doc headers to all functions lacking them
      and attempts to better format existing headers. It also add kernel-doc
      headers to structures.
      
      This patch ensures that the current naming conventions for local ports,
      remote ports and remote port private data is upheld in the following
      manner.
      
      struct               instance (i.e. variable name)
      --------------------------------------------------
      fc_lport                      lport
      fc_rport                      rport
      fc_rport_libfc_priv           rpriv
      fc_rport_priv                 rdata
      
      I also renamed dns_rp and ptp_rp to dns_rdata and ptp_rdata
      respectively.
      
      I used emacs 'indent-region' and 'tabify' on all libfc files
      to correct spacing alignments.
      
      I feel sorry for anyone attempting to review this patch.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      3a3b42bf