1. 11 5月, 2009 2 次提交
    • T
      block: cleanup rq->data_len usages · b0790410
      Tejun Heo 提交于
      With recent unification of fields, it's now guaranteed that
      rq->data_len always equals blk_rq_bytes().  Convert all non-IDE direct
      users to accessors.  IDE will be converted in a separate patch.
      
      Boaz: spotted incorrect data_len/resid_len conversion in osd.
      
      [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b0790410
    • T
      block: add rq->resid_len · c3a4d78c
      Tejun Heo 提交于
      rq->data_len served two purposes - the length of data buffer on issue
      and the residual count on completion.  This duality creates some
      headaches.
      
      First of all, block layer and low level drivers can't really determine
      what rq->data_len contains while a request is executing.  It could be
      the total request length or it coulde be anything else one of the
      lower layers is using to keep track of residual count.  This
      complicates things because blk_rq_bytes() and thus
      [__]blk_end_request_all() relies on rq->data_len for PC commands.
      Drivers which want to report residual count should first cache the
      total request length, update rq->data_len and then complete the
      request with the cached data length.
      
      Secondly, it makes requests default to reporting full residual count,
      ie. reporting that no data transfer occurred.  The residual count is
      an exception not the norm; however, the driver should clear
      rq->data_len to zero to signify the normal cases while leaving it
      alone means no data transfer occurred at all.  This reverse default
      behavior complicates code unnecessarily and renders block PC on some
      drivers (ide-tape/floppy) unuseable.
      
      This patch adds rq->resid_len which is used only for residual count.
      
      While at it, remove now unnecessasry blk_rq_bytes() caching in
      ide_pc_intr() as rq->data_len is not changed anymore.
      
      Boaz	: spotted missing conversion in osd
      Sergei	: spotted too early conversion to blk_rq_bytes() in ide-tape
      
      [ Impact: cleanup residual count handling, report 0 resid by default ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Doug Gilbert <dgilbert@interlog.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c3a4d78c
  2. 03 4月, 2009 1 次提交
  3. 27 7月, 2008 1 次提交
  4. 05 6月, 2008 1 次提交
  5. 27 5月, 2008 1 次提交
    • M
      [SCSI] fusion mpt: fix target missing after resetting external raid · 7ba2db5f
      Michael Reed 提交于
      Following a hard reset of a SAS raid, one of the raid targets is occasionally
      missing.  I tracked this down to a pretty obscure little bug.
      
      The LSI fusion drivers for SAS and Fibre Channel both use their respective
      transport layers.  Those transport layers increment the target number
      assigned to new targets.
      
      The routine __scsi_scan_target uses the "this_id" element of the Scsi_Host
      structure to avoid scanning the scsi host adapter.  Both fusion drivers set
      "this_id" from a value returned in a firmware PortFacts response.  For my
      particular test case (SAS) the firmware id assigned to the initiator was
      173.  After enough raid resets to cause the raid targets to go and come a
      sufficient number of times, the id assigned by the transport to a raid
      target would match the id assigned by the host adapter to the "this_id"
      field, resulting in that target not being scanned.
      
      Fix by not assigning this_id and not checking it in slave_configure. 
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Acked-by: N"Moore, Eric" <Eric.Moore@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      7ba2db5f
  6. 08 4月, 2008 1 次提交
    • M
      [SCSI] mptsas: do not use ioc->handle to locate hba portinfo structure · 7748369f
      Michael Reed 提交于
      While performing hardware raid reset testing via the raid's client, I
      noticed that sometimes, following the reset, that there would be more
      raid targets in the lsscsi output than there actually were raid
      targets.  I tracked this down to the following issue.
      
      Fusion cannot always find the mptsas_portinfo structure for the hba
      because it uses the handle stored in ioc->handle to locate it.  The
      problem is that the firmware can change the handle associated with the
      hba when h/w raid is reset (via the raid client).  When this happens,
      the driver will allocate another mptsas_portinfo structure and link it
      into the chain of said structures.  This ultimately causes confusion
      within the driver resulting in targets not being removed when they
      should be.
      
      Eric Moore pointed out that the hba's portinfo structure is always the
      first structure on the sas_topology list.  This patch modifies
      mptsas.c to access the hba's portinfo structure by taking the first
      structure on said list.
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Acked-by: N"Moore, Eric" <Eric.Moore@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      7748369f
  7. 06 3月, 2008 1 次提交
  8. 12 1月, 2008 1 次提交
  9. 13 10月, 2007 12 次提交
  10. 01 8月, 2007 1 次提交
  11. 28 7月, 2007 1 次提交
  12. 19 7月, 2007 2 次提交
  13. 18 6月, 2007 1 次提交
  14. 11 3月, 2007 1 次提交
    • J
      [SCSI] mptsas: Fix oops for insmod during kexec · ba76ef24
      Judith Lebzelter 提交于
      This fix's an oops during driver load time.   mptsas_probe calls
      mpt_attach(over in mptbase.c).  Inside that call, we read some
      manufacturing config pages to setup some defaults.  While reading the
      config pages, the firmware doesn't complete the reply in time, and we
      have a timeout. The timeout results in hardreset handler being called.
      The hardreset handler calls all the fusion upper layer driver reset
      callback handlers.  The mptsas_ioc_reset function is the callback
      handler in mptsas.c.   So where I'm getting to, is mptsas_ioc_reset is
      getting called before scsi_host_alloc is called, and the pointer ioc->sh
      is NULL as well as the hostdata. 
      Signed-off-by: NJudith Lebzelter <judith@osdl.org>
      Acked-by: N"Moore, Eric" <Eric.Moore@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ba76ef24
  15. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  16. 03 2月, 2007 5 次提交
  17. 06 1月, 2007 2 次提交
  18. 22 11月, 2006 1 次提交
  19. 28 8月, 2006 1 次提交
    • J
      [SCSI] scsi_transport_sas: remove local_attached flag · f4ad7b58
      James Bottomley 提交于
      This flag denotes local attachment of the phy.  There are two problems
      with it:
      
      1) It's actually redundant ... you can get the same information simply
      by seeing whether a host is the phys parent
      2) we condition a lot of phy parameters on it on the false assumption
      that we can only control local phys.  I'm wiring up phy resets in the
      aic94xx now, and it will be able to reset non-local phys as well.
      
      I fixed 2) by moving the local check into the reset and stats function
      of the mptsas, since that seems to be the only HBA that can't
      (currently) control non-local phys.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      f4ad7b58
  20. 29 7月, 2006 1 次提交
  21. 13 7月, 2006 1 次提交
  22. 12 7月, 2006 1 次提交