1. 19 8月, 2016 1 次提交
  2. 12 4月, 2016 1 次提交
  3. 15 3月, 2016 1 次提交
  4. 19 12月, 2015 2 次提交
  5. 07 9月, 2015 1 次提交
  6. 18 7月, 2014 1 次提交
  7. 23 5月, 2014 1 次提交
    • J
      [SCSI] scsi_transport_sas: move bsg destructor into sas_rphy_remove · 6aa6caff
      Joe Lawrence 提交于
      The recent change in sysfs, bcdde7e2
      "sysfs: make __sysfs_remove_dir() recursive" revealed an asymmetric
      rphy device creation/deletion sequence in scsi_transport_sas:
      
        modprobe mpt2sas
          sas_rphy_add
            device_add A               rphy->dev
            device_add B               sas_device transport class
            device_add C               sas_end_device transport class
            device_add D               bsg class
      
        rmmod mpt2sas
          sas_rphy_delete
            sas_rphy_remove
              device_del B
              device_del C
              device_del A
                sysfs_remove_group     recursive sysfs dir removal
            sas_rphy_free
              device_del D             warning
      
        where device A is the parent of B, C, and D.
      
      When sas_rphy_free tries to unregister the bsg request queue (device D
      above), the ensuing sysfs cleanup discovers that its sysfs group has
      already been removed and emits a warning, "sysfs group... not found for
      kobject 'end_device-X:0'".
      
      Since bsg creation is a side effect of sas_rphy_add, move its
      complementary removal call into sas_rphy_remove. This imposes the
      following tear-down order for the devices above: D, B, C, A.
      
      Note the sas_device and sas_end_device transport class devices (B and C
      above) are created and destroyed both via the list match traversal in
      attribute_container_device_trigger, so the order in which they are
      handled is fixed. This is fine as long as they are deleted before their
      parent device.
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      6aa6caff
  8. 01 12月, 2012 1 次提交
  9. 01 3月, 2012 2 次提交
    • D
      [SCSI] scsi_transport_sas: 'enable' phys on reset · 16d3db1b
      Dan Williams 提交于
      If userspace requests a phy reset, treat that as a request for the phy
      to be enabled since that is the effect on hardware.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      16d3db1b
    • D
      [SCSI] libsas: fix sas_find_local_phy(), take phy references · f41a0c44
      Dan Williams 提交于
      In the direct-attached case this routine returns the phy on which this
      device was first discovered.  Which is broken if we want to support
      wide-targets, as this phy reference can become stale even though the
      port is still active.
      
      In the expander-attached case this routine tries to lookup the phy by
      scanning the attached sas addresses of the parent expander, and BUG_ONs
      if it can't find it.  However since eh and the libsas workqueue run
      independently we can still be attempting device recovery via eh after
      libsas has recorded the device as detached.  This is even easier to hit
      now that eh is blocked while device domain rediscovery takes place, and
      that libata is fed more timed out commands increasing the chances that
      it will try to recover the ata device.
      
      Arrange for dev->phy to always point to a last known good phy, it may be
      stale after the port is torn down, but it will catch up for wide port
      reconfigurations, and never be NULL.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      f41a0c44
  10. 20 2月, 2012 2 次提交
    • D
      [SCSI] libsas: perform sas-transport resets in shost->workq context · 0b3e09da
      Dan Williams 提交于
      Extend the sas transport class to allow transport users to attach extra
      data to a sas_phy (->hostdata).  Use this area in libsas to move resets
      to workq context in preparation for scheduling ata device resets through
      libata-eh.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0b3e09da
    • D
      [SCSI] libsas: prevent domain rediscovery competing with ata error handling · 87c8331f
      Dan Williams 提交于
      libata error handling provides for a timeout for link recovery.  libsas
      must not rescan for previously known devices in this interval otherwise
      it may remove a device that is simply waiting for its link to recover.
      Let libata-eh make the determination of when the link is stable and
      prevent libsas (host workqueue) from taking action while this
      determination is pending.
      
      Using a mutex (ha->disco_mutex) to flush and disable revalidation while
      eh is running requires any discovery action that may block on eh be
      moved to its own context outside the lock.  Probing ATA devices
      explicitly waits on ata-eh and the cache-flush-io issued during device
      removal may also pend awaiting eh completion.  Essentially any rphy
      add/remove activity needs to run outside the lock.
      
      This adds two new cleanup states for sas_unregister_domain_devices()
      'allocated-but-not-probed', and 'flagged-for-destruction'.  In the
      'allocated-but-not-probed' state  dev->rphy points to a rphy that is
      known to have not been through a sas_rphy_add() event.  At domain
      teardown check if this device is still pending probe and cleanup
      accordingly.  Similarly if a device has already been queued for removal
      then sas_unregister_domain_devices has nothing to do.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      87c8331f
  11. 03 10月, 2011 1 次提交
  12. 10 3月, 2011 1 次提交
  13. 09 2月, 2010 1 次提交
  14. 04 12月, 2009 1 次提交
  15. 23 8月, 2009 1 次提交
  16. 21 6月, 2009 1 次提交
  17. 11 5月, 2009 1 次提交
    • T
      block: implement and enforce request peek/start/fetch · 9934c8c0
      Tejun Heo 提交于
      Till now block layer allowed two separate modes of request execution.
      A request is always acquired from the request queue via
      elv_next_request().  After that, drivers are free to either dequeue it
      or process it without dequeueing.  Dequeue allows elv_next_request()
      to return the next request so that multiple requests can be in flight.
      
      Executing requests without dequeueing has its merits mostly in
      allowing drivers for simpler devices which can't do sg to deal with
      segments only without considering request boundary.  However, the
      benefit this brings is dubious and declining while the cost of the API
      ambiguity is increasing.  Segment based drivers are usually for very
      old or limited devices and as converting to dequeueing model isn't
      difficult, it doesn't justify the API overhead it puts on block layer
      and its more modern users.
      
      Previous patches converted all block low level drivers to dequeueing
      model.  This patch completes the API transition by...
      
      * renaming elv_next_request() to blk_peek_request()
      
      * renaming blkdev_dequeue_request() to blk_start_request()
      
      * adding blk_fetch_request() which is combination of peek and start
      
      * disallowing completion of queued (not started) requests
      
      * applying new API to all LLDs
      
      Renamings are for consistency and to break out of tree code so that
      it's apparent that out of tree drivers need updating.
      
      [ Impact: block request issue API cleanup, no functional change ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: unsik Kim <donari75@gmail.com>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: Pierre Ossman <drzeus@drzeus.cx>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Stefan Weinhuber <wein@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      9934c8c0
  18. 03 1月, 2009 1 次提交
  19. 27 7月, 2008 1 次提交
  20. 29 4月, 2008 1 次提交
  21. 23 4月, 2008 2 次提交
    • F
      [SCSI] scsi_transport_sas: fix the lifetime of sas bsg objects · 93c20a59
      FUJITA Tomonori 提交于
      scsi_transport_sas calls blk_cleanup_queue too early for bsg
      queues. If a user holds a sas_host, end_device, or expander device
      open, remove the device, then send a request to it, we get a kernel
      crash. We need to call blk_cleanup_queue in the release callback as we
      do with scsi devices.
      
      This patch moves blk_cleanup_queue to sas_expander_release and
      sas_end_device_release from sas_bsg_remove. sas_host can't use the
      release callback in struct device so use bsg's release callback.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      93c20a59
    • F
      [SCSI] bsg: add release callback support · 97f46ae4
      FUJITA Tomonori 提交于
      This patch adds release callback support, which is called when a bsg
      device goes away. bsg_register_queue() takes a pointer to a callback
      function. This feature is useful for stuff like sas_host that can't
      use the release callback in struct device.
      
      If a caller doesn't need bsg's release callback, it can call
      bsg_register_queue() with NULL pointer (e.g. scsi devices can use
      release callback in struct device so they don't need bsg's callback).
      
      With this patch, bsg uses kref for refcounts on bsg devices instead of
      get/put_device in fops->open/release. bsg calls put_device and the
      caller's release callback (if it was registered) in kref_put's
      release.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      97f46ae4
  22. 20 4月, 2008 1 次提交
  23. 03 2月, 2008 1 次提交
  24. 12 1月, 2008 2 次提交
  25. 21 7月, 2007 2 次提交
  26. 19 7月, 2007 1 次提交
  27. 18 2月, 2007 1 次提交
  28. 28 1月, 2007 2 次提交
    • D
      [SCSI] libsas: Check return values of sysfs_create_link · 21434966
      Darrick J. Wong 提交于
      Get rid of: "warning: ignoring return value of sysfs_create_link..."
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      21434966
    • D
      [SCSI] libsas: Clean up discovery failure handler code · 6f63caae
      Darrick J. Wong 提交于
      sas_rphy_delete does two things: it removes the sas_rphy from the transport
      layer and frees the sas_rphy.  This can be broken down into two functions,
      sas_rphy_remove and sas_rphy_free; sas_rphy_remove is of interest to
      sas_discover_root_expander because it calls functions that require
      sas_rphy_add as a prerequisite and can fail (namely sas_discover_expander).
      In that case, sas_discover_root_expander needs to be able to undo the effects
      of sas_rphy_add yet leave the job of freeing the sas_rphy to the caller of
      sas_discover_root_expander.
      
      This patch also removes some unnecessary code from sas_discover_end_dev
      to eliminate an unnecessary cycle of sas_notify_lldd_gone/found for SAS
      devices, thus eliminating a sas_rphy_remove call (and fixing a race condition
      where a SCSI target scan can come in between the gone and found call).
      It also moves the sas_rphy_free calls into sas_discover_domain and
      sas_ex_discover_end_dev to complement the sas_rphy_allocation via
      sas_get_port_device.
      
      This patch does not change the semantics of sas_rphy_delete.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6f63caae
  29. 27 1月, 2007 1 次提交
  30. 14 1月, 2007 3 次提交
  31. 04 12月, 2006 1 次提交