1. 28 7月, 2010 7 次提交
    • K
      [SCSI] mptfusion: Added code for occationally SATA hotplug failure. · cc7e9f5f
      Kashyap, Desai 提交于
      Issue: SATA hotplug does not work sometimes.
      At the time of ADD device/ADD phys disk, drive may fail to add SATA device
      due to temporary SAS Address for SATA device generated by firmware. Final
      SAS address for SATA driver will be generated only after disk spinup is
      done. This may take some times for slow spining SATA drives.
      
      At phy link up driver gets attached device sas address and stores into
      phyinfo. At the time of ADD event driver will read sas device page0 using
      channel and FW ID provided in ADD Device event. Here in case of SATA drives,
      driver will see miss match in phyinfo->sas_address and latest sas address
      read from SAS DEVICE PAGE0 and eventually device won't be added to OS.
      
      Fix:
      When Driver read SAS DEVICE PAGE0, it can identify Device type looking at
      device_info. If device is SATA drive and sas address mismatch happens,
      Driver will do same stuffs which happened at the time of LINK UP to get
      correct piece of information from Pages. ( Find parent device and refresh
      parent device phys either HBA refresh/Exp refresh)
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      cc7e9f5f
    • K
      [SCSI] mptfusion: schedule_target_reset from all Reset context · b68bf096
      Kashyap, Desai 提交于
      Issue:
      target reset will be queued to driver's internal queue to get schedule
      later. When driver add target into internal target_reset queue we will block IOs
      on those target using scsi midlayer API. Now due to some cause driver is not
      executing those target_reset list and it is always in block state.
      
      Changes:
      now we are clearing target_reset queue from all other Callback context
      instead of only DeviceReset context.Now wherever driver is clearing
      taskmgmt_in_progress flag it is considering target_reset queue cleanup
      also.
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      b68bf096
    • K
      [SCSI] mptfusion: Added sanity to check B_T mapping for device before adding to OS · 51106ab5
      Kashyap, Desai 提交于
      Added sanity check before treating any device is a valid device.
      It is possible that firmware can have device page0 in its table, but that
      devicemay not be available in topology. Device will be available in topology
      only if there is Bus Target mapping is done in firmware. Driver will always
      check B_T mapping of firmware before reporting device to upper layer.
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      51106ab5
    • K
      [SCSI] mptfusion: Corrected declaration of device_missing_delay · aca794dd
      Kashyap, Desai 提交于
      device missing delay is 8 bit value in io unit pg1. Making correct variable
      declaration for device_missing_delay.
      
      The driver is storing the calculated device missing delay in IOC structure
      as a u8 instead of a u16. It needs to be a u16 if the delay is > 255.
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      aca794dd
    • K
      [SCSI] mptfusion: Use DID_TRANSPORT_DISRUPTED instead of DID_BUS_BUSY · 4d069566
      Kashyap, Desai 提交于
      Changed the return value for Nexus Loss IOs to be DID_TRANSPORT_DISRUPTED.
      What this will allow is the multi-path driver to delay the fail over
      process. They would like the path to keep up as long as the nexus loss
      Loginfo is return from firmware. With DID_BUS_BUSY the path fails over
      immediately.
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      4d069566
    • K
      [SCSI] mptfusion: Set fw_events_off to 1 at driver load time. · 8ce13de2
      Kashyap, Desai 提交于
      fw_events_off is flag checking for driver to do Event handling or not.
      Normally it should be OFF at the time of initialization. Only enable it at
      the time of INTR enable of device first time. This will always occur only
      after resource allocation.
      
      ioc->fw_events_off = 1 is set in mpt_attach()
      Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      8ce13de2
    • R
      [SCSI] mptsas: fix hangs caused by ATA pass-through · 2a1b7e57
      Ryan Kuester 提交于
      I may have an explanation for the LSI 1068 HBA hangs provoked by ATA
      pass-through commands, in particular by smartctl.
      
      First, my version of the symptoms.  On an LSI SAS1068E B3 HBA running
      01.29.00.00 firmware, with SATA disks, and with smartd running, I'm seeing
      occasional task, bus, and host resets, some of which lead to hard faults of
      the HBA requiring a reboot.  Abusively looping the smartctl command,
      
          # while true; do smartctl -a /dev/sdb > /dev/null; done
      
      dramatically increases the frequency of these failures to nearly one per
      minute.  A high IO load through the HBA while looping smartctl seems to
      improve the chance of a full scsi host reset or a non-recoverable hang.
      
      I reduced what smartctl was doing down to a simple test case which
      causes the hang with a single IO when pointed at the sd interface.  See
      the code at the bottom of this e-mail.  It uses an SG_IO ioctl to issue
      a single pass-through ATA identify device command.  If the buffer
      userspace gives for the read data has certain alignments, the task is
      issued to the HBA but the HBA fails to respond.  If run against the sg
      interface, neither the test code nor smartctl causes a hang.
      
      sd and sg handle the SG_IO ioctl slightly differently.  Unless you
      specifically set a flag to do direct IO, sg passes a buffer of its own,
      which is page-aligned, to the block layer and later copies the result
      into the userspace buffer regardless of its alignment.  sd, on the other
      hand, always does direct IO unless the userspace buffer fails an
      alignment test at block/blk-map.c line 57, in which case a page-aligned
      buffer is created and used for the transfer.
      
      The alignment test currently checks for word-alignment, the default
      setup by scsi_lib.c; therefore, userspace buffers of almost any
      alignment are given directly to the HBA as DMA targets.  The LSI 1068
      hardware doesn't seem to like at least a couple of the alignments which
      cross a page boundary (see the test code below).  Curiously, many
      page-boundary-crossing alignments do work just fine.
      
      So, either the hardware has an bug handling certain alignments or the
      hardware has a stricter alignment requirement than the driver is
      advertising.  If stricter alignment is required, then in no case should
      misaligned buffers from userspace be allowed through without being
      bounced or at least causing an error to be returned.
      
      It seems the mptsas driver could use blk_queue_dma_alignment() to advertise
      a stricter alignment requirement.  If it does, sd does the right thing and
      bounces misaligned buffers (see block/blk-map.c line 57).  The following
      patch to 2.6.34-rc5 makes my symptoms go away.  I'm sure this is the wrong
      place for this code, but it gets my idea across.
      Acked-by: N"Desai, Kashyap" <Kashyap.Desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      2a1b7e57
  2. 28 5月, 2010 1 次提交
  3. 24 5月, 2010 1 次提交
  4. 26 4月, 2010 1 次提交
  5. 11 4月, 2010 13 次提交
  6. 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
  7. 26 2月, 2010 2 次提交
  8. 18 2月, 2010 1 次提交
    • M
      [SCSI] fusion: hold off error recovery while alternate ioc is initializing · 03cb3829
      Michael Reed 提交于
      After discussing this patch with LSI, I resubmitting with a recommended
      40 second wait for the alternate ioc's initialization to complete.
      --
      Fusion FC chips are two function with some shared resources.  During
      initialization of one function its driver inhibits the ability of the
      other function's driver to allocate message frames by clearing its
      "active" flag.  Should mid-layer error recovery be initiated for a
      scsi command during this initialization (which can take up to 40 seconds)
      error recovery will escalate to the level of host reset.  This host
      reset might fail (as the other function is resetting) resulting in
      all connected targets being taken offline.
      
      This patch holds off mid-layer error recovery for up to 40 seconds
      to permit initialization of the other function to complete.
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Acked-by: N"Desai, Kashyap" <Kashyap.Desai@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      03cb3829
  9. 09 2月, 2010 1 次提交
  10. 05 2月, 2010 1 次提交
  11. 19 1月, 2010 6 次提交
  12. 18 1月, 2010 1 次提交
    • A
      [SCSI] mptsas: Fix issue with chain pools allocation on katmai · f1053a7c
      Anatolij Gustschin 提交于
      Since commit 9d2e9d66
      mptsas driver fails to allocate memory for the MPT chain buffers
      for second LSI adapter on PPC440SPe Katmai platform:
      ...
      ioc1: LSISAS1068E B3: Capabilities={Initiator}
      mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
      mptbase: ioc1: ERROR - didn't initialize properly! (-3)
      mptsas: probe of 0002:31:00.0 failed with error -3
      
      This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
      doesn't differentiate between SAS and FC causing increased allocation
      for SAS case, too. Later pci_alloc_consistent() fails to allocate
      increased chain buffer pool size for SAS case.
      
      Provide a fix by looking at the bus type and using appropriate
      MPT_SAS_CAN_QUEUE value while calculation of the number of chain
      buffers.
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Acked-by: NKashyap Desai <kashyap.desai@lsi.com>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      f1053a7c
  13. 07 1月, 2010 1 次提交
  14. 05 1月, 2010 1 次提交
  15. 10 12月, 2009 1 次提交
  16. 05 12月, 2009 1 次提交
    • M
      [SCSI] modify change_queue_depth to take in reason why it is being called · e881a172
      Mike Christie 提交于
      This patch modifies scsi_host_template->change_queue_depth so that
      it takes an argument indicating why it is being called. This will be
      used so that if a LLD needs to do some extra processing when
      handling queue fulls or later ramp ups, it can do so.
      
      This is a simple port of the drivers setting a change_queue_depth
      callback. In the patch I just have these LLDs adjust the queue depth
      if the user was requesting it.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      
      [Vasu.Dev: v2
      	Also converted pmcraid_change_queue_depth and then verified
      all modules compile  using "make allmodconfig" for any new build
      warnings on X86_64.
      
      	Updated original description after combing two original
      patches from Mike to make this patch git bisectable.]
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      [jejb: fixed up 53c700]
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e881a172