04 Jan, 2012

1 commit


14 Dec, 2011

1 commit

  • During session recovery, the conn_stop call will trigger a flush
    to all outstanding SCSI cmds in the xmit queue. This will set
    all outstanding task->sc to NULL prior to the session_teardown
    call which frees the task memory.

    In the bnx2i SCSI response processing path, only the task was being checked
    for NULL under the session lock before the task->sc->request dereferencing.
    If there are outstanding SCSI cmd responses pending for process, the
    following kernel panic can be exposed where task->sc was found to be NULL.

    Call Trace:
    [ 69.720205] [] bnx2i_process_new_cqes+0x290/0x3c0 [bnx2i]
    [ 69.804289] [] bnx2i_fastpath_notification+0x33/0xa0 [bnx2
    i]
    [ 69.891490] [] bnx2i_indicate_kcqe+0xdb/0x330 [bnx2i]
    [ 69.971427] [] service_kcqes+0x16e/0x1d0 [cnic]
    [ 70.045132] [] cnic_service_bnx2x_kcq+0x2a/0x50 [cnic]
    [ 70.126105] [] cnic_service_bnx2x_bh+0x43/0x140 [cnic]
    [ 70.207081] [] tasklet_action+0x66/0x110
    [ 70.273521] [] __do_softirq+0xef/0x220
    [ 70.337887] [] call_softirq+0x1c/0x30

    This patch adds the !task->sc check and also protects the sc dereferencing
    under the session lock.

    Signed-off-by: Eddie Wai
    Signed-off-by: James Bottomley

    Eddie Wai
     

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
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

29 Aug, 2011

1 commit

  • The iscsi_nopout task's TTT is defined as __be32 while the DMA
    memory to the chip is CPU specific. This creates a problem for
    unsolicited NOP-In responses where the TTT is not the RESERVED
    tag of 0xFFs. This patch adds a call to be32_to_cpu for the TTT
    specified.

    Signed-off-by: Eddie Wai
    Signed-off-by: James Bottomley

    Eddie Wai
     

27 Aug, 2011

3 commits


12 Aug, 2011

1 commit


11 Aug, 2011

1 commit

  • Moves the drivers for Broadcom devices into
    drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile
    changes.

    CC: Eilon Greenstein
    CC: Michael Chan
    CC: Matt Carlson
    CC: Gary Zambrano
    CC: "Maciej W. Rozycki"
    Signed-off-by: Jeff Kirsher

    Jeff Kirsher
     

28 Jul, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    target: Convert to DIV_ROUND_UP_SECTOR_T usage for sectors / dev_max_sectors
    kernel.h: Add DIV_ROUND_UP_ULL and DIV_ROUND_UP_SECTOR_T macro usage
    iscsi-target: Add iSCSI fabric support for target v4.1
    iscsi: Add Serial Number Arithmetic LT and GT into iscsi_proto.h
    iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]
    iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi

    Linus Torvalds
     

25 Jul, 2011

2 commits

  • struct scsi_lun is also just a struct with an array of 8 octets (64 bits)
    but using it instead in iscsi structs lets us call scsilun_to_int
    without a cast, and also lets us copy it using assignment, instead of
    memcpy().

    Signed-off-by: Andy Grover
    Signed-off-by: James Bottomley

    Andy Grover
     
  • This patch renames the following iscsi_proto.h structures to avoid
    namespace issues with drivers/target/iscsi/iscsi_target_core.h:

    *) struct iscsi_cmd -> struct iscsi_scsi_req
    *) struct iscsi_cmd_rsp -> struct iscsi_scsi_rsp
    *) struct iscsi_login -> struct iscsi_login_req

    This patch includes useful ISCSI_FLAG_LOGIN_[CURRENT,NEXT]_STAGE*,
    and ISCSI_FLAG_SNACK_TYPE_* definitions used by iscsi_target_mod, and
    fixes the incorrect definition of struct iscsi_snack to following
    RFC-3720 Section 10.16. SNACK Request.

    Also, this patch updates libiscsi, iSER, be2iscsi, and bn2xi to
    use the updated structure definitions in a handful of locations.

    Signed-off-by: Mike Christie
    Signed-off-by: Nicholas A. Bellinger

    Nicholas Bellinger
     

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
     

22 Jul, 2011

2 commits

  • A kernel panic was observed when passing the sc->request->cpu = -1 to
    retrieve the per_cpu variable pointer:
    #0 [ffff880011203960] machine_kexec at ffffffff81022bc3
    #1 [ffff8800112039b0] crash_kexec at ffffffff81088630
    #2 [ffff880011203a80] __die at ffffffff8139ea20
    #3 [ffff880011203aa0] no_context at ffffffff8102f3a7
    #4 [ffff880011203ae0] __bad_area_nosemaphore at ffffffff8102f665
    #5 [ffff880011203ba0] retint_signal at ffffffff8139dd1f
    #6 [ffff880011203cc8] bnx2i_indicate_kcqe at ffffffffa03dc4f2
    #7 [ffff880011203da8] service_kcqes at ffffffffa03cb04f
    #8 [ffff880011203e68] cnic_service_bnx2x_kcq at ffffffffa03cb14a
    #9 [ffff880011203e88] cnic_service_bnx2x_bh at ffffffffa03cb1b3

    The problem lies in the slow path sg_io (and perhaps sg_scsi_ioctl) call to
    blk_get_request->get_request/wait->blk_alloc_request->blk_rq_init which
    re-initializes the request->cpu to -1. There is no assignment for cpu from
    that to the request_fn call to low level drivers.

    When this happens, the sc->request->cpu will be using the init value of
    -1. This will create a kernel panic when it hits bnx2i because the code
    refers it to get the per_cpu variables ptr.

    This change is to put in a guard against that and also for cases when
    bio affinity/queue completion to the same cpu is not enabled. In those
    cases, the request->cpu will remain a -1 also.

    This bug was created from commit: b5cf6b63f73abdc051035f0050b367beeb2ef94c

    For the case when the blk layer did not setup the request->cpu, bnx2i
    will complete the sc with the current CPU of the thread.

    Signed-off-by: Eddie Wai
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • The bnx2fc driver needs to handle netdev events on VLAN devices.

    Signed-off-by: Michael Chan
    Reviewed-by: Bhanu Prakash Gollapudi
    Signed-off-by: David S. Miller

    Michael Chan
     

30 Jun, 2011

4 commits

  • Bumped version from 2.6.2.3 to 2.7.0.3

    Signed-off-by: Eddie Wai
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • The init routine will now examine the cnic->max_iscsi_conn variable
    before registering to CNIC during ulp_init.

    Signed-off-by: Eddie Wai
    Acked-by: Michael Chan
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • This patch breaks the SCSI cmd completion into two parts:
    1. The bh will allocate and queued work to the cmd specific CPU IO
    completion kthread. The CPU for the cmd is from the sc->request->cpu.

    2. The CPU specific IO completion kthread will call the scsi_cmd_resp
    routine to do the actual cmd completion.

    In the normal case, these IO completion kthreads should complete before
    the blk IO times out at 60s. However, in the case when these kthreads
    are blocked for whatever reason and exceeded the timeout, the call
    to conn_destroy will have to iterate and exhaust all related work in the
    percpu work list for all online CPUs. This will guarantee the protection
    of the work->session and conn pointers before they get freed.

    Also modified the event coalescing formula to have at least the
    event_coal_min outstanding cmds in the pipeline so the SCSI producer
    would not get underrun.

    Also changed the following SCSI parameters:
    - can_queue from 1024 to 2048
    - cmds_per_lun from 24 to 128

    Signed-off-by: Eddie Wai
    Acked-by: Benjamin Li
    Acked-by: Michael Chan
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • struct scsi_lun is also just a struct with an array of 8 octets (64 bits)
    but using it instead in iscsi structs lets us call scsilun_to_int
    without a cast, and also lets us copy it using assignment, instead of
    memcpy().

    Signed-off-by: Andy Grover
    Signed-off-by: James Bottomley

    Andy Grover
     

22 Jun, 2011

1 commit


15 Jun, 2011

1 commit

  • New FW/HSI (7.0):
    - Added support to 578xx chips
    - Improved HSI - much less driver's direct access to the FW internal
    memory needed.

    New implementation of the HSI handling layer in the bnx2x (bnx2x_sp.c):
    - Introduced chip dependent objects that have chip independent interfaces
    for configuration of MACs, multicast addresses, Rx mode, indirection table,
    fast path queues and function initialization/cleanup.
    - Objects functionality is based on the private function pointers, which
    allows not only a per-chip but also PF/VF differentiation while still
    preserving the same interface towards the driver.
    - Objects interface is not influenced by the HSI changes which do not require
    providing new parameters keeping the code outside the bnx2x_sp.c invariant
    with regard to such HSI chnages.

    Changes in a CNIC, bnx2fc and bnx2i modules due to the new HSI.

    Signed-off-by: Vladislav Zolotarov
    Signed-off-by: Michael Chan
    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Vlad Zolotarov
     

25 May, 2011

3 commits

  • Modified the event coalescing code for iSCSI offload to combat both
    corner cases and optimize performance as follows:

    1. Added mechanism to loop back a second time to process any leftover
    CQEs that was generated by the hardware during the time the driver is
    busy processing previous CQEs in the bh. This not only helps the
    performance but also fixes the corner case when no more CQEs are being
    generated in the pipeline; so those leftover CQEs will get a a chance
    to be processed.

    2. Added ARM_CQE_FP to distinguish between fast path arming versus
    slow path arming. This change will guarantee that the CQEs will
    always get a chance to be re-armed during fast path completions.

    3. Removed the inline event coalescing division for perf optimization.
    Also fixed a division-by-zero error when the event_coal_div module
    param was set to 0.

    4. Changed the default SQ WQEs size from 256 to 128 to match chip
    default.

    5. Changed the cmd_per_lun from 32 to 24.

    Signed-off-by: Eddie Wai
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • Modified the 10s wait time for inflight offload connections to
    advance to the next state to 2s based on test result.
    Modified the 20s shutdown timeout to 30s based on test result.

    Signed-off-by: Eddie Wai
    Reviewed-by: Mike Christie
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • The number of chip's internal command cell, which is use to generate
    SCSI cmd packets to the target, was not initialized correctly by
    the driver when the sq_size is changed from the default 128.
    This, in turn, will create a problem where the chip's transmit pipe
    will erroneously reuse an old command cell that is no longer valid.
    The fix is to correctly initialize the chip's command cell upon setup.

    Signed-off-by: Eddie Wai
    Reviewed-by: Mike Christie
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Eddie Wai
     

31 Mar, 2011

1 commit


25 Feb, 2011

8 commits


25 Jan, 2011

1 commit


08 Jan, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits)
    [SCSI] arcmsr: fix write to device check
    [SCSI] lpfc: lower stack use in lpfc_fc_frame_check
    [SCSI] eliminate an unnecessary local variable from scsi_remove_target()
    [SCSI] libiscsi: use bh locking instead of irq with session lock
    [SCSI] libiscsi: do not take host lock in queuecommand
    [SCSI] be2iscsi: fix null ptr when accessing task hdr
    [SCSI] be2iscsi: fix gfp use in alloc_pdu
    [SCSI] libiscsi: add more informative failure message during iscsi scsi eh
    [SCSI] gdth: Add missing call to gdth_ioctl_free
    [SCSI] bfa: remove unused defintions and misc cleanups
    [SCSI] bfa: remove inactive functions
    [SCSI] bfa: replace bfa_assert with WARN_ON
    [SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
    [SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.
    [SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.
    [SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
    [SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
    [SCSI] qla2xxx: Remove redundant module parameter permission bits
    [SCSI] qla2xxx: Add sysfs node for displaying board temperature.
    [SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
    ...

    Linus Torvalds
     

24 Dec, 2010

1 commit

  • 1. Change first parameter from cnic_dev to ulp_handle which is the hba
    pointer. All other similar upcalls are using hba pointer. The callee
    can then directly reference the hba without conversion.

    2. Change return value from void to int so that an error code can be
    passed back. This allows the operation to be retried.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     

22 Dec, 2010

3 commits