07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

2 commits


31 Oct, 2011

3 commits

  • Adds more cases to do flogi retry, now also retry
    on getting bad response due to either no ELS response
    or flogi response payload length not large enough.
    In those cases flogi was not retried and that
    was leaving lport offline.

    Signed-off-by: Vasu Dev
    Tested-by: Bhanu Prakash Gollapudi
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Currently timer delay is large and is using msleep to avoid
    avoid exchanges collision across lport reset, so instead
    do this by initializing exches pool indexes during
    reset also.

    Signed-off-by: Vasu Dev
    Tested-by: Bhanu Prakash Gollapudi
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Its checked after skb freed, so instead have fh_type
    cached and then check FC_TYPE_BLS against cached
    fh_type value.

    This wrong check was causing double exch locking as
    reported by Bhanu at
    https://lists.open-fcoe.org/pipermail/devel/2011-October/011793.html

    Signed-off-by: Vasu Dev
    Tested-by: Bhanu Prakash Gollapudi
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     

29 Oct, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits)
    [SCSI] qla4xxx: export address/port of connection (fix udev disk names)
    [SCSI] ipr: Fix BUG on adapter dump timeout
    [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer
    [SCSI] hpsa: change confusing message to be more clear
    [SCSI] iscsi class: fix vlan configuration
    [SCSI] qla4xxx: fix data alignment and use nl helpers
    [SCSI] iscsi class: fix link local mispelling
    [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA
    [SCSI] aacraid: use lower snprintf() limit
    [SCSI] lpfc 8.3.27: Change driver version to 8.3.27
    [SCSI] lpfc 8.3.27: T10 additions for SLI4
    [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery
    [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name
    [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout
    [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes
    [SCSI] megaraid_sas: Changelog and version update
    [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic
    [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support
    [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers
    [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts
    ...

    Linus Torvalds
     

03 Oct, 2011

2 commits

  • fix holes and better cache aligned fields.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Re-arrange its fields to avoid padding and have better
    cacheline alignments.

    Removed not used start_time, end_time and last_pkt_time
    fields.

    This all reduced this struct size to 448 from 480 and
    that also reduced one cacheline on x86_64 beside
    eliminating 8 pads. However kept logical fields together.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     

29 Aug, 2011

3 commits

  • In commit 6a716a8, while releasing the DDP context in case frame_send() failed,
    the frame may already be freed, so we should store the pointer to fc_fcp_pkt and
    release the DDP context using the locally stored fsp instead of getting fsp from
    the fr_fsp(fp) on a frame.

    Signed-off-by: Yi Zou
    Reported-by: Bhanu Prakash Gollapudi
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • Call fc_block_scsi_eh() in all fcoe eh to blocks
    the scsi_eh thread for blocked rports.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Reviewed-by: Yi Zou
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Current fc_eh_host_reset leaves lport offline
    permanently due to FLOGI response getting
    handled by LOGO response from last reset as both
    had same exchange id.

    So fix this by having end to end exches clean-up
    using exchange abort along exches reset
    done from fc_eh_host_reset. This would avoid
    exchanges collision between the sessions across
    the reset. In this case implicit login should have
    done that but no aborting support for FIP
    frames, so just wait till lport->r_a_tov before
    restarting next flogi to ensure all exchanges
    are good to use again for next session.

    Below is the trace of LOGO from older session
    coming ahead of FLOGI response with same exche id
    0x203:-

    617 86.435165 4e.00.0b -> ff.ff.fc FC ELS LOGO 0x203
    618 86.435195 4e.00.0b -> b6.02.00 FC ELS LOGO 0x213
    619 86.435220 4e.00.0b -> 18.03.00 FC ELS LOGO 0x223
    620 86.435244 4e.00.0b -> 18.02.00 FC ELS LOGO 0x233
    621 86.435267 4e.00.0b -> 18.01.00 FC ELS LOGO 0x243
    622 86.435349 00.00.00 -> ff.ff.fe FC ELS FLOGI 0x203
    623 86.435549 ff.ff.fc -> 4e.00.0b FC ELS ACC (LOGO) 0x203
    624 86.438721 ff.ff.fe -> 4e.00.0b FC ELS ACC (FLOGI) 0x203
    625 86.442059 18.03.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x223
    626 86.443683 b6.02.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x213
    627 86.447693 18.01.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x243
    628 86.453499 18.02.00 -> 4e.00.0b FC ELS ACC (LOGO) 0x233

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Reviewed-by: Yi Zou
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     

28 Jul, 2011

7 commits

  • The lport retry timer hits warn on in case
    it has become ready in response from fip
    login from fcoe_ctlr_flogi_send(), this is
    possible but safe code path, therefore
    removing this warn on.

    Jun 22 03:16:30 10.0.16.6 [488198.316517] host3: Assigned Port ID 180f02
    Jun 22 03:16:32 10.0.16.6 [488200.091561] ------------[ cut here ]------------
    Jun 22 03:16:32 10.0.16.6 [488200.091586] WARNING: at
    drivers/scsi/libfc/fc_lport.c:1355 fc_lport_timeout+0xd9/0xe0 [libfc]()

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • fc_queuecommand() allocates an FCP packet for each SCSI command and sends
    it out on the wire. In the process it stores the reference to the FCP packet
    in the scsi_cmnd structure.
    Now, in case under stress testing the libfc exchange layer runs out of
    exchanges the fc_queuecommand() may not be able to send out commands out on
    the wire. In such a scenario if there is an error in sending the FCP packet
    out the wire; fc_queuecommand() deletes the FCP packet from internal queue,
    releases the FCP packet and returns a SCSI_MLQUEUE_HOST_BUSY status to the
    scsi-ml. But, the reference to the FCP packet set in the scsi_cmnd is not
    removed from the scsi_cmnd in this code path.

    This might lead to a crash under stress testing where the scsi_cmnd failed by
    fc_queuecommand() comes up to fc_eh_abort() via scsi eh thread. fc_eh_abort()
    will get reference to the FCP packet to be aborted from the scsi_cmnd for
    further FCP abort related processing and then try to release the FCP packet
    that has already been released.

    This patch removes the FCP packet reference from the scsi_cmnd before returning
    back from fc_queuecommand() in case of an error in sending out the FCP packet.

    Signed-off-by: Neerav Parikh
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Neerav Parikh
     
  • The variable on stack, namely cdb_op, is not used but removed.

    [ Patch reworked by Robert Love due to invalid patch format ]

    Signed-off-by: Hillf Danton
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Hillf Danton
     
  • One change is to cleanup typo in comment for fc_fcp_recv(), another corrects
    the misleading comment for fc_fcp_abts_resp().

    [ Patch reworked by Robert Love due to invalid patch format ]

    Signed-off-by: Hillf Danton
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Hillf Danton
     
  • Drop the rx frame having xid with wrong cpu info
    or received with xid not matching to our xid.

    Not dropping such frame is causing panic as
    that causes accessing data struct beyond their
    bounds.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • If fail to create workqueue, the newly created cache for exchg has to be
    released.

    Signed-off-by: Hillf Danton
    Reviewed-by: Vasu Dev
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Hillf Danton
     
  • Though defined, FC_MAX_ERROR_CNT is not used. It is used now for CRC error in
    the path of receiving FCP frame.

    Signed-off-by: Hillf Danton
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Hillf Danton
     

24 Jul, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (77 commits)
    [SCSI] fix crash in scsi_dispatch_cmd()
    [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise
    [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu
    [SCSI] bfa: Update the driver version to 3.0.2.1
    [SCSI] bfa: Driver and BSG enhancements.
    [SCSI] bfa: Added support to query PHY.
    [SCSI] bfa: Added HBA diagnostics support.
    [SCSI] bfa: Added support for flash configuration
    [SCSI] bfa: Added support to obtain SFP info.
    [SCSI] bfa: Added support for CEE info and stats query.
    [SCSI] bfa: Extend BSG interface.
    [SCSI] bfa: FCS bug fixes.
    [SCSI] bfa: DMA memory allocation enhancement.
    [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.
    [SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.
    [SCSI] bfa: Added Fabric Assigned Address(FAA) support
    [SCSI] bfa: IOC bug fixes.
    [SCSI] bfa: Enable ASIC block configuration and query.
    [SCSI] bnx2i: Updated copyright and bump version
    [SCSI] bnx2i: Modified to skip CNIC registration if iSCSI is not supported
    ...

    Fix up some trivial conflicts in:
    - drivers/scsi/bnx2fc/{bnx2fc.h,bnx2fc_fcoe.c}:
    Crazy broadcom version number conflicts
    - drivers/target/tcm_fc/tfc_cmd.c
    Just trivial cleanups done on adjacent lines

    Linus Torvalds
     

21 Jul, 2011

1 commit


30 Jun, 2011

3 commits

  • Post an FCH_EVT_LIPRESET event on lport reset as
    as lport reset occurs on FIP cleat virtual link,
    this could be due to change in fcoe vlan and this
    event will allow user app fcoemon to switch to
    new fcoe vlan.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • …et and connected to windows initaitor

    Problem: Linux based SW target (TCM) connected to windows initiator
    was unable to satisfy write request of size > 2K.

    Fix: Existing linux implememtation of FCoE stack is expecting sequence
    number to match w.r.t incoming framme. When DDP is used on target in
    response to write request from initiator, SW stack is notified only
    when last data frame arrives and only the pakcket header of last data
    frame is posted to NetRx queue of storage. When that last packet was
    processed in libfc:Exchange layer, implementation was expecting
    sequence number to match, but in this case sequence number which is
    embedded in FC Header is assigned by windows initaitor, hence due to
    sequence number mismatch post-processing which shall result into
    sending RSP is not done. Enhanced the code to utilize the sequence
    number of incoming last frame and process the packet so that, it will
    eventually complete the write request by sending write response (RSP)
    GOOD.

    Notes/Dependencies: This patch is validated using windows and linux
    initiator to make sure, it doesn't break anything.

    Signed-off-by: Kiran Patil <kiran.patil@intel.com>
    Signed-off-by: Robert Love <robert.w.love@intel.com>
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>

    Kiran Patil
     
  • Problem: Existing RPORT state machine continues witg FLOGI/PLOGI
    process only after it receices beacon from other end. Once claiming
    stage is over (either clain notify or clain repose), beacon is sent
    and state machine enters into operational mode where it initiates the
    rlogin process (FLOGI/PLOGI) to the peer but before this rlogin is
    initiated, exitsing implementation checks if it received beacon from
    other end, it beacon is not received yet, rlogin process is not
    initiated. Other end initiates FLOGI but peer end keeps on rejecting
    FLOGI, hence after 3 retries other end deletes associated rport, then
    sends a beacon. Once the beacon is received, peer end now initiates
    rlogin to the peer end but since associated rport is deleted FLOGI is
    neither accepted nor the reject response send out because rport is
    deleted. Hence unable to proceed withg FLOGI/PLOGI process and fails
    to establish VN2VN connection.

    Fix: VN2VN spec is not standard yet but based on exitsing collateral
    on T11, it appears that, both end shall send beacon and enter into
    'operational mode' without explictly waiting for beacon from other
    end. Fix is to allow the RPORT login process as long as respective
    RPORT is created (as part of claim notification / claim response) even
    though state of RPORT is INIT. Means don't wait for beacon from peer
    end, if peer end initiates FLOGI (means peer end exist and
    responding).

    Notes: This patch is preparing the FCoE stack for target wrt
    offload. This is generic patch and harmless even if applied on storage
    initiator because 'else if' condition of function 'fcoe_oem_found'
    shall evaluate to TRUE only for targets.

    Dependencies: None

    Signed-off-by: Kiran Patil
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Kiran Patil
     

25 May, 2011

5 commits

  • Currently, when seq_send() fails in fc_fcp_send_data(),
    fc_fcp_retry_cmd() would complete this failed I/O directly and let
    scsi-ml retry. However, target side is not notified which may hang the
    target. Instead, we should just bail out from from fc_fcp_send_data
    and let scsi-ml times it out and aborts this I/O instead.

    Signed-off-by: Yi Zou
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • In this case fsp was freed before error handler was invoked,
    this is fixed by having SRR fsp reference freed by exch
    destructor so that fsp will be always held until it exch
    is freed.

    Also don't reset fsp->recov_seq since this is needed by
    SRR error handler to do exch done.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • In cases exch is already timed out then exch layer could
    end up calling resp handler again for its response frame
    received after timeout, though in this case fc_exch_timeout
    handler would have already called resp with FC_EX_TIMEOUT.

    This would cause REC response handler to release its
    fsp pkt hold twice instead once and possibly similar issues
    with other ELS exchanges in this race.

    To avoid this race have resp updated under exch lock
    in rx path, the resp would get set to NULL in case
    of FC_EX_TIMEOUT under the same lock to prevent resp
    callback after FC_EX_TIMEOUT.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • In case frame_send() fails, make sure to let the underlying HW release the DDP
    context that has already been set up before calling frame_send().

    Signed-off-by: Yi Zou
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • When handling incoming request, if the operation code carried by the
    received frame is not RSCN, the frame should be freed as in the RSCN
    case, or there is memory leakage.

    Signed-off-by: Hillf Danton
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Hillf Danton
     

01 May, 2011

3 commits

  • Added REC_TOV_CONST intent was to have rec tov as e_d_tov + 1s
    but currently it is e_d_tov + 1ms since e_d_tov is stored in ms
    unit.

    Also returned rec tov by get_fsp_rec_tov is in ms and this ms tov
    is used as-is with fc_fcp_timer_set expecting jiffies tov.

    Fixed this by having get_fsp_rec_tov return rec tov in jiffies
    as e_d_tov + 1s and then use jiffies tov w/ fc_fcp_timer_set.

    Also some cleanup, no need to cache get_fsp_rec_tov return value
    in local rec_tov at various places.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • As ema_list is already initialized by libfc_host_alloc.

    Signed-off-by: Vasu Dev
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • The host_lock is still used to protect the can_queue
    value in the Scsi_Host, but it doesn't need to be held
    and released by each caller. This patch moves the lock
    usage into the fc_fcp_can_queue_ramp_up and
    fc_fcp_can_queue_ramp_down routines.

    Signed-off-by: Robert Love
    Tested-by: Ross Brattain
    Signed-off-by: James Bottomley

    Robert Love
     

31 Mar, 2011

1 commit


01 Mar, 2011

3 commits

  • EM anchors list initialization for only master port was not enough to
    keep npiv working as described here:-
    https://lists.open-fcoe.org/pipermail/devel/2011-January/011063.html

    So this patch moves fc_exch_mgr_list_clone to update npiv ports
    EMs once EM anchors list initialized.

    Also some cleanup, no need to set lport = NULL as that always
    get initialized later.

    Signed-off-by: Vasu Dev
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • When abort for an exchange timed out it didn't release the reference to
    the exchange resulting in a memory leak.

    After discussion with the author of the patch (CC) that introduced this
    bug it was suggested to revert that patch.

    This reverts commit ea3e2e72eeb3e8a9440a5da965914f9b12088626.

    Signed-off by: Neerav Parikh
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Parikh, Neerav
     
  • When an fcoe interface is being destroyed; in the process the
    fcoe driver will try to release all the resources it had allocated
    for that interface including rports. But, it seems that it does not
    release the reference held for the name server rport in that process
    resulting into a memory leak. This patch fixes that memory leak.

    Signed-off-by: Neerav Parikh
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Parikh, Neerav
     

13 Feb, 2011

4 commits

  • This patch enables LLD to listen to rport events and perform LLD
    specific operations based on the rport event. This patch also stores
    sp_features and spp_type in rdata for further reference by LLD.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • Problem:

    From initaitor machine, when queried role of target (other end of connection),
    it is "initiator", hence SCSI-ml doesn't send any LUN Inquiry commands.

    Fix:

    If there is a registered target for FC_TYPE_FCP, extend lport's params
    (capability) to be target as well, By default lport params are
    INITIATOR only. Having this fix, caused initiator to send SCSI LUN
    inquiry command to target.

    Signed-off-by: Kiran Patil
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Kiran Patil
     
  • Problem:

    In case of exchange responder case, EMA selection was defaulted to the
    last EMA from EMA list (lport.ema_list). If exchange ID is selected
    from offload pool and not setup DDP, resulting into incorrect
    selection of EMA, and eventually dropping the packet because unable to
    find exchange.

    Fix:

    Enhanced the exchange ID selection (depending upon request type and
    exchange responder) Made necessary enhancement in EMA selection
    algorithm.

    Signed-off-by: Kiran Patil
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Kiran Patil
     
  • Target modules using lport->tt.seq_assign() get a hold on the
    exchange but have no way of releasing it. Add that.

    Signed-off-by: Joe Eykholt
    Signed-off-by: James Bottomley

    Joe Eykholt