1. 21 Nov, 2019 5 commits
    • Navid Emamdoost's avatar
      nbd: prevent memory leak · 03bf73c3
      Navid Emamdoost authored
      In nbd_add_socket when krealloc succeeds, if nsock's allocation fail the
      reallocted memory is leak. The correct behaviour should be assigning the
      reallocted memory to config->socks right after success.
      Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      03bf73c3
    • Jens Axboe's avatar
      Merge branch 'nvme-5.5' of git://git.infradead.org/nvme into for-5.5/drivers-post · 866ca95d
      Jens Axboe authored
      Pull NVMe changes from Keith:
      
      "- The only new feature is the optional hwmon support for nvme (Guenter
         and Akinobu)
      
       - A universal work-around for controllers reading discard payloads
         beyond the range boundary (Eduard)
      
       - Chaitanya graciously agreed to share the target driver maintenance"
      
      * 'nvme-5.5' of git://git.infradead.org/nvme:
        nvme: hwmon: add quirk to avoid changing temperature threshold
        nvme: hwmon: provide temperature min and max values for each sensor
        nvmet: add another maintainer
        nvme: Discard workaround for non-conformant devices
        nvme: Add hardware monitoring support
      866ca95d
    • Akinobu Mita's avatar
      nvme: hwmon: add quirk to avoid changing temperature threshold · 6c6aa2f2
      Akinobu Mita authored
      This adds a new quirk NVME_QUIRK_NO_TEMP_THRESH_CHANGE to avoid changing
      the value of the temperature threshold feature for specific devices that
      show undesirable behavior.
      
      Guenter reported:
      
      "On my Intel NVME drive (SSDPEKKW512G7), writing any minimum limit on the
      Composite temperature sensor results in a temperature warning, and that
      warning is sticky until I reset the controller.
      
      It doesn't seem to matter which temperature I write; writing -273000 has
      the same result."
      
      The Intel NVMe has the latest firmware version installed, so this isn't
      a problem that was ever fixed.
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Keith Busch <kbusch@kernel.org>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Jean Delvare <jdelvare@suse.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      6c6aa2f2
    • Akinobu Mita's avatar
      nvme: hwmon: provide temperature min and max values for each sensor · 52deba0f
      Akinobu Mita authored
      According to the NVMe specification, the over temperature threshold and
      under temperature threshold features shall be implemented for Composite
      Temperature if a non-zero WCTEMP field value is reported in the Identify
      Controller data structure.  The features are also implemented for all
      implemented temperature sensors (i.e., all Temperature Sensor fields that
      report a non-zero value).
      
      This provides the over temperature threshold and under temperature
      threshold for each sensor as temperature min and max values of hwmon
      sysfs attributes.
      
      The WCTEMP is already provided as a temperature max value for Composite
      Temperature, but this change isn't incompatible.  Because the default
      value of the over temperature threshold for Composite Temperature is
      the WCTEMP.
      
      Now the alarm attribute for Composite Temperature indicates one of the
      temperature is outside of a temperature threshold.  Because there is only
      a single bit in Critical Warning field that indicates a temperature is
      outside of a threshold.
      
      Example output from the "sensors" command:
      
      nvme-pci-0100
      Adapter: PCI adapter
      Composite:    +33.9°C  (low  = -273.1°C, high = +69.8°C)
                             (crit = +79.8°C)
      Sensor 1:     +34.9°C  (low  = -273.1°C, high = +65261.8°C)
      Sensor 2:     +31.9°C  (low  = -273.1°C, high = +65261.8°C)
      Sensor 5:     +47.9°C  (low  = -273.1°C, high = +65261.8°C)
      
      This also adds helper macros for kelvin from/to milli Celsius conversion,
      and replaces the repeated code in hwmon.c.
      
      Cc: Keith Busch <kbusch@kernel.org>
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Jean Delvare <jdelvare@suse.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      52deba0f
    • Christoph Hellwig's avatar
      nvmet: add another maintainer · 3aeb6a24
      Christoph Hellwig authored
      Sagi and I have been pretty busy lately, and Chaitanya has been
      helping a lot with target work and agreed to share the load.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      3aeb6a24
  2. 12 Nov, 2019 1 commit
  3. 11 Nov, 2019 1 commit
    • Guenter Roeck's avatar
      nvme: Add hardware monitoring support · 400b6a7b
      Guenter Roeck authored
      nvme devices report temperature information in the controller information
      (for limits) and in the smart log. Currently, the only means to retrieve
      this information is the nvme command line interface, which requires
      super-user privileges.
      
      At the same time, it would be desirable to be able to use NVMe temperature
      information for thermal control.
      
      This patch adds support to read NVMe temperatures from the kernel using the
      hwmon API and adds temperature zones for NVMe drives. The thermal subsystem
      can use this information to set thermal policies, and userspace can access
      it using libsensors and/or the "sensors" command.
      
      Example output from the "sensors" command:
      
      nvme0-pci-0100
      Adapter: PCI adapter
      Composite:    +39.0°C  (high = +85.0°C, crit = +85.0°C)
      Sensor 1:     +39.0°C
      Sensor 2:     +41.0°C
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      400b6a7b
  4. 07 Nov, 2019 10 commits
  5. 06 Nov, 2019 4 commits
  6. 05 Nov, 2019 1 commit
  7. 04 Nov, 2019 18 commits