1. 12 7月, 2016 1 次提交
    • G
      nvme/quirk: Add a delay before checking for adapter readiness · 54adc010
      Guilherme G. Piccoli 提交于
      When disabling the controller, the specification says the register
      NVME_REG_CC should be written and then driver needs to wait the
      adapter to be ready, which is checked by reading another register
      bit (NVME_CSTS_RDY). There's a timeout validation in this checking,
      so in case this timeout is reached the driver gives up and removes
      the adapter from the system.
      
      After a firmware activation procedure, the PCI_DEVICE(0x1c58, 0x0003)
      (HGST adapter) end up being removed if we issue a reset_controller,
      because driver keeps verifying the NVME_REG_CSTS until the timeout is
      reached. This patch adds a necessary quirk for this adapter, by
      introducing a delay before nvme_wait_ready(), so the reset procedure
      is able to be completed. This quirk is needed because just increasing
      the timeout is not enough in case of this adapter - the driver must
      wait before start reading NVME_REG_CSTS register on this specific
      device.
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      54adc010
  2. 08 7月, 2016 1 次提交
  3. 06 7月, 2016 4 次提交
    • S
      nvme: add keep-alive support · 038bd4cb
      Sagi Grimberg 提交于
      Periodic keep-alive is a mandatory feature in NVMe over Fabrics, and
      optional in NVMe 1.2.1 for PCIe.  This patch adds periodic keep-alive
      sent from the host to verify that the controller is still responsive
      and vice-versa.  The keep-alive timeout is user-defined (with
      keep_alive_tmo connection parameter) and defaults to 5 seconds.
      
      In order to avoid a race condition where the host sends a keep-alive
      competing with the target side keep-alive timeout expiration, the host
      adds a grace period of 10 seconds when publishing the keep-alive timeout
      to the target.
      
      In case a keep-alive failed (or timed out), a transport specific error
      recovery kicks in.
      
      For now only NVMe over Fabrics is wired up to support keep alive, but
      we can add PCIe support easily once controllers actually supporting it
      become available.
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      Reviewed-by: NSteve Wise <swise@chelsio.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      038bd4cb
    • C
      nvme-fabrics: add a generic NVMe over Fabrics library · 07bfcd09
      Christoph Hellwig 提交于
      The NVMe over Fabrics library provides an interface for both transports
      and the nvme core to handle fabrics specific commands and attributes
      independent of the underlying transport.
      
      In addition, the fabrics library adds a misc device interface that allow
      actually creating a fabrics controller, as we can't just autodiscover
      it like in the PCI case.  The nvme-cli utility has been enhanced to use
      this interface to support fabric connect and discovery.
      
      Signed-off-by: Armen Baloyan <armenx.baloyan@intel.com>,
      Signed-off-by: Jay Freyensee <james.p.freyensee@intel.com>,
      Signed-off-by: NMing Lin <ming.l@ssi.samsung.com>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      07bfcd09
    • M
      nvme: add fabrics sysfs attributes · 1a353d85
      Ming Lin 提交于
      - delete_controller: This attribute allows to delete a controller.
        A driver is not obligated to support it (pci doesn't) so it is
        created only if the driver supports it. The new fabrics drivers
        will support it (essentialy a disconnect operation).
      
        Usage:
        echo > /sys/class/nvme/nvme0/delete_controller
      
      - subsysnqn: This attribute shows the subsystem nqn of the configured
        device. If a driver does not implement the get_subsysnqn method, the
        file will not appear in sysfs.
      
      - transport: This attribute shows the transport name. Added a "name"
        field to struct nvme_ctrl_ops.
      
        For loop,
        cat /sys/class/nvme/nvme0/transport
        loop
      
        For RDMA,
        cat /sys/class/nvme/nvme0/transport
        rdma
      
        For PCIe,
        cat /sys/class/nvme/nvme0/transport
        pcie
      
      - address: This attributes shows the controller address. The fabrics
        drivers that will implement get_address can show the address of the
        connected controller.
      
        example:
        cat /sys/class/nvme/nvme0/address
        traddr=192.168.2.2,trsvcid=1023
      Signed-off-by: NMing Lin <ming.l@ssi.samsung.com>
      Reviewed-by: NJay Freyensee <james.p.freyensee@intel.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      1a353d85
    • C
      nvme: Modify and export sync command submission for fabrics · eb71f435
      Christoph Hellwig 提交于
      NVMe over fabrics will use __nvme_submit_sync_cmd in the the
      transport and require a few tweaks to it.  For that we export it
      and add a few more paramters:
      
      1. allow passing a queue ID to the block layer
      
         For the NVMe over Fabrics connect command we need to able to specify a
         queue ID that we want to send the command on.  Add a qid parameter to
         the relevant functions to enable this behavior.
      
      2. allow submitting at_head commands
      
         In cases where we want to (re)connect to a controller
         where we have inflight queued commands we want to first
         connect and only then allow the other queued commands to
         be kicked. This will prevents failures in controller resets
         and reconnects.
      
      3. allow passing flags to blk_mq_allocate_request
      
         Both for Fabrics connect the the keep-alive feature in NVMe 1.2.1 we
         want to be able to use reserved requests.
      Reviewed-by: NJay Freyensee <james.p.freyensee@intel.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Tested-by: NMing Lin <ming.l@ssi.samsung.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      eb71f435
  4. 08 6月, 2016 2 次提交
  5. 18 5月, 2016 1 次提交
  6. 02 5月, 2016 5 次提交
  7. 26 4月, 2016 1 次提交
  8. 13 4月, 2016 2 次提交
  9. 16 3月, 2016 1 次提交
  10. 08 3月, 2016 1 次提交
  11. 04 3月, 2016 3 次提交
  12. 01 3月, 2016 1 次提交
  13. 29 2月, 2016 1 次提交
  14. 12 2月, 2016 1 次提交
  15. 11 2月, 2016 2 次提交
  16. 13 1月, 2016 3 次提交
  17. 23 12月, 2015 6 次提交
  18. 02 12月, 2015 4 次提交