1. 19 1月, 2014 4 次提交
    • N
      target/rd: Add support for protection SGL setup + release · d7e8eb5d
      Nicholas Bellinger 提交于
      This patch adds rd_build_prot_space() + rd_release_prot_space() logic
      to setup + release protection information scatterlists.
      
      It also adds rd_init_prot() + rd_free_prot() se_subsystem_api
      callbacks used by target core code for setup + release of
      protection information.
      
      v2 changes:
        - Drop unused sg_table from rd_release_prot_space (Wei)
        - Drop rd_release_prot_space call from rd_free_device
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d7e8eb5d
    • N
      target/rd: Refactor rd_build_device_space + rd_release_device_space · 4442dc8a
      Nicholas Bellinger 提交于
      This patch refactors rd_build_device_space() + rd_release_device_space()
      into rd_allocate_sgl_table() + rd_release_device_space() so that they
      may be used seperatly for setup + release of protection information
      scatterlists.
      
      Also add explicit memset of pages within rd_allocate_sgl_table() based
      upon passed 'init_payload' value.
      
      v2 changes:
        - Drop unused sg_table from rd_release_device_space (Wei)
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4442dc8a
    • N
      target/file: Add DIF protection support to fd_execute_rw · 42201b55
      Nicholas Bellinger 提交于
      This patch adds support for DIF protection into fd_execute_rw() code
      for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic.
      
      It adds fd_do_prot_rw() for handling interface with FILEIO PI, and
      uses a locally allocated fd_prot->prot_buf + fd_prot->prot_sg for
      interacting with SBC DIF verify emulation code.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      42201b55
    • N
      target/file: Add DIF protection init/format support · 0f5e2ec4
      Nicholas Bellinger 提交于
      This patch adds support for DIF protection init/format support into
      the FILEIO backend.
      
      It involves using a seperate $FILE.protection for storing PI that is
      opened via fd_init_prot() using the common pi_prot_type attribute.
      The actual formatting of the protection is done via fd_format_prot()
      using the common pi_prot_format attribute, that will populate the
      initial PI data based upon the currently configured pi_prot_type.
      
      Based on original FILEIO code from Sagi.
      
      v1 changes:
        - Fix sparse warnings in fd_init_format_buf (Fengguang)
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0f5e2ec4
  2. 18 1月, 2014 10 次提交
    • N
      target/iblock: Add blk_integrity + BIP passthrough support · ecebbf6c
      Nicholas Bellinger 提交于
      This patch adds blk_integrity passthrough support for block_device
      backends using IBLOCK.
      
      This includes iblock_alloc_bip() + setup of bio_integrity_payload
      information that attaches to the leading struct bio once bio_list
      is populated during fast-path iblock_execute_rw() I/O dispatch.
      
      It also updates setup in iblock_configure_device() to detect modes
      of protection + se dev->dev_attrib.pi_prot_type accordingly, along
      with creating required bio_set integrity mempools.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ecebbf6c
    • N
      target: Add protection SGLs to target_submit_cmd_map_sgls · def2b339
      Nicholas Bellinger 提交于
      This patch adds support to target_submit_cmd_map_sgls() for
      accepting 'sgl_prot' + 'sgl_prot_count' parameters for
      DIF protection information.
      
      Note the passed parameters are stored at se_cmd->t_prot_sg
      and se_cmd->t_prot_nents respectively.
      
      Also, update tcm_loop and vhost-scsi fabrics usage of
      target_submit_cmd_map_sgls() to take into account the
      new parameters.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      def2b339
    • N
      target/configfs: Expose protection device attributes · 2ed22c9c
      Nicholas Bellinger 提交于
      This patch adds support for exposing DIF protection device
      attributes via configfs.  This includes:
      
         pi_prot_type: Protection Type (0, 1, 3 currently support)
         pi_prot_format: Protection Format Operation (FILEIO only)
      
      Within se_dev_set_pi_prot_type() it also adds the se_subsystem_api
      device callbacks to setup per device protection information.
      
      v2 changes:
        - Drop pi_guard_type + pi_prot_version related code (MKP)
        - Add pi_prot_format logic (Sagi)
        - Add ->free_prot callback in target_free_device
        - Add hw_pi_prot_type read-only attribute
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2ed22c9c
    • N
      target/spc: Expose ATO bit in control mode page · 0c30f421
      Nicholas Bellinger 提交于
      This patch updates spc_modesense_control() to set the Application
      Tag Owner (ATO) bit when when DIF emulation is enabled by the
      backend device.
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0c30f421
    • N
      target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16 · 56dac14c
      Nicholas Bellinger 提交于
      This patch updates sbc_emulate_readcapacity_16() to set
      P_TYPE and PROT_EN bits when DIF emulation is enabled by
      the backend device.
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      56dac14c
    • N
      target/spc: Add protection related bits to INQUIRY EVPD=0x86 · 43bb95c7
      Nicholas Bellinger 提交于
      This patch updates spc_emulate_evpd_86() (extended INQUIRY) to
      report GRD_CHK (Guard Check) and REF_CHK (Reference Check) bits
      when DIF emulation is enabled by the backend device.
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      43bb95c7
    • N
      target/spc: Add protection bit to standard INQUIRY output · bdbad2bd
      Nicholas Bellinger 提交于
      This patch updates spc_emulate_inquiry_std() to set the
      PROTECT bit when DIF emulation is enabled by the backend
      device.
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bdbad2bd
    • N
      target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation · 41861fa8
      Nicholas Bellinger 提交于
      This patch adds support for DIF read/write verify emulation
      for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation.
      
      This includes sbc_dif_verify_write() + sbc_dif_verify_read()
      calls accessable by backend drivers to perform DIF verify
      for SGL based data and protection information.
      
      Also included is sbc_dif_copy_prot() logic to copy protection
      information to/from backend provided protection SGLs.
      
      Based on scsi_debug.c DIF TYPE1+TYPE3 emulation.
      
      v2 changes:
        - Select CRC_T10DIF for TARGET_CORE in Kconfig (Fengguang)
        - Drop IP checksum logic from sbc_dif_v1_verify (MKP)
        - Fix offset on app_tag = 0xffff in sbc_dif_verify_read()
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      41861fa8
    • N
      target/sbc: Add DIF setup in sbc_check_prot + sbc_parse_cdb · 499bf77b
      Nicholas Bellinger 提交于
      This patch adds sbc_check_prot() for performing various DIF
      related CDB sanity checks, along with setting cmd->prot_type
      once sanity checks have passed.
      
      Also, add calls in sbc_parse_cdb() for READ_[10,12,16] +
      WRITE_[10,12,16] to perform DIF sanity checking.
      
      v2 changes:
        - Make sbc_check_prot defined as static (Fengguang + Wei)
        - Remove unprotected READ/WRITE warning (mkp)
        - Populate cmd->prot_type + friends (Sagi)
        - Drop SCF_PROT usage
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      499bf77b
    • N
      target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases · fcc4f17b
      Nicholas Bellinger 提交于
      This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ
      exception cases into transport_send_check_condition_and_sense().
      
      This includes:
      
        LOGICAL BLOCK GUARD CHECK FAILED
        LOGICAL BLOCK APPLICATION TAG CHECK FAILED
        LOGICAL BLOCK REFERENCE TAG CHECK FAILED
      
      that used by DIF TYPE1 and TYPE3 failure cases.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      fcc4f17b
  3. 10 1月, 2014 8 次提交
  4. 18 12月, 2013 6 次提交
  5. 17 12月, 2013 6 次提交
  6. 05 12月, 2013 2 次提交
  7. 04 12月, 2013 3 次提交
    • D
      video: vt8500: fix error handling in probe() · 46ac2956
      Dan Carpenter 提交于
      We shouldn't kfree(fbi) because that was allocated with devm_kzalloc().
      There were several error paths which returned directly instead of
      releasing resources.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      46ac2956
    • J
      atmel_lcdfb: fix module autoload · 5a0973f3
      Johan Hovold 提交于
      Add missing module device table which is needed for module autoloading.
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5a0973f3
    • K
      cpuidle: Check for dev before deregistering it. · 813e8e3d
      Konrad Rzeszutek Wilk 提交于
      If not, we could end up in the unfortunate situation where
      we dereference a NULL pointer b/c we have cpuidle disabled.
      
      This is the case when booting under Xen (which uses the
      ACPI P/C states but disables the CPU idle driver) - and can
      be easily reproduced when booting with cpuidle.off=1.
      
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff8156db4a>] cpuidle_unregister_device+0x2a/0x90
      .. snip..
      Call Trace:
       [<ffffffff813b15b4>] acpi_processor_power_exit+0x3c/0x5c
       [<ffffffff813af0a9>] acpi_processor_stop+0x61/0xb6
       [<ffffffff814215bf>] __device_release_driver+0fffff81421653>] device_release_driver+0x23/0x30
       [<ffffffff81420ed8>] bus_remove_device+0x108/0x180
       [<ffffffff8141d9d9>] device_del+0x129/0x1c0
       [<ffffffff813cb4b0>] ? unregister_xenbus_watch+0x1f0/0x1f0
       [<ffffffff8141da8e>] device_unregister+0x1e/0x60
       [<ffffffff814243e9>] unregister_cpu+0x39/0x60
       [<ffffffff81019e03>] arch_unregister_cpu+0x23/0x30
       [<ffffffff813c3c51>] handle_vcpu_hotplug_event+0xc1/0xe0
       [<ffffffff813cb4f5>] xenwatch_thread+0x45/0x120
       [<ffffffff810af010>] ? abort_exclusive_wait+0xb0/0xb0
       [<ffffffff8108ec42>] kthread+0xd2/0xf0
       [<ffffffff8108eb70>] ? kthread_create_on_node+0x180/0x180
       [<ffffffff816ce17c>] ret_from_fork+0x7c/0xb0
       [<ffffffff8108eb70>] ? kthread_create_on_node+0x180/0x180
      
      This problem also appears in 3.12 and could be a candidate for backport.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      813e8e3d
  8. 03 12月, 2013 1 次提交