1. 22 7月, 2011 2 次提交
    • E
      [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu · 0d83ab65
      Eddie Wai 提交于
      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:  b5cf6b63
      
      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: NEddie Wai <eddie.wai@broadcom.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0d83ab65
    • M
      cnic: Add VLAN ID as a parameter during netevent upcall · 415199f2
      Michael Chan 提交于
      The bnx2fc driver needs to handle netdev events on VLAN devices.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Reviewed-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      415199f2
  2. 30 6月, 2011 3 次提交
  3. 25 5月, 2011 2 次提交
    • E
      [SCSI] bnx2i: Optimized the iSCSI offload performance · 9ae58e14
      Eddie Wai 提交于
      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: NEddie Wai <eddie.wai@broadcom.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      9ae58e14
    • E
      [SCSI] bnx2i: Fixed packet error created when the sq_size is set to 16 · 7287c63e
      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: NEddie Wai <eddie.wai@broadcom.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      7287c63e
  4. 31 3月, 2011 1 次提交
  5. 25 2月, 2011 2 次提交
  6. 25 1月, 2011 1 次提交
  7. 24 12月, 2010 1 次提交
  8. 22 12月, 2010 6 次提交
  9. 07 10月, 2010 1 次提交
  10. 06 9月, 2010 2 次提交
  11. 28 7月, 2010 1 次提交
  12. 11 4月, 2010 1 次提交
  13. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  14. 10 12月, 2009 2 次提交
  15. 02 10月, 2009 1 次提交
  16. 21 9月, 2009 1 次提交
  17. 09 6月, 2009 1 次提交