1. 08 Apr, 2021 2 commits
    • Jolly Shah's avatar
      scsi: libsas: Reset num_scatter if libata marks qc as NODATA · 176ddd89
      Jolly Shah authored
      When the cache_type for the SCSI device is changed, the SCSI layer issues a
      MODE_SELECT command. The caching mode details are communicated via a
      request buffer associated with the SCSI command with data direction set as
      DMA_TO_DEVICE (scsi_mode_select()). When this command reaches the libata
      layer, as a part of generic initial setup, libata layer sets up the
      scatterlist for the command using the SCSI command (ata_scsi_qc_new()).
      This command is then translated by the libata layer into
      ATA_CMD_SET_FEATURES (ata_scsi_mode_select_xlat()). The libata layer treats
      this as a non-data command (ata_mselect_caching()), since it only needs an
      ATA taskfile to pass the caching on/off information to the device. It does
      not need the scatterlist that has been setup, so it does not perform
      dma_map_sg() on the scatterlist (ata_qc_issue()). Unfortunately, when this
      command reaches the libsas layer (sas_ata_qc_issue()), libsas layer sees it
      as a non-data command with a scatterlist. It cannot extract the correct DMA
      length since the scatterlist has not been mapped with dma_map_sg() for a
      DMA operation. When this partially constructed SAS task reaches pm80xx
      LLDD, it results in the following warning:
      
      "pm80xx_chip_sata_req 6058: The sg list address
      start_addr=0x0000000000000000 data_len=0x0end_addr_high=0xffffffff
      end_addr_low=0xffffffff has crossed 4G boundary"
      
      Update libsas to handle ATA non-data commands separately so num_scatter and
      total_xfer_len remain 0.
      
      Link: https://lore.kernel.org/r/20210318225632.2481291-1-jollys@google.com
      Fixes: 53de092f ("scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA")
      Tested-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarJolly Shah <jollys@google.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      176ddd89
    • Mike Christie's avatar
      scsi: iscsi: Fix iSCSI cls conn state · 0dcf8feb
      Mike Christie authored
      In commit 9e67600e ("scsi: iscsi: Fix race condition between login and
      sync thread") I missed that libiscsi was now setting the iSCSI class state,
      and that patch ended up resetting the state during conn stoppage and using
      the wrong state value during ep_disconnect. This patch moves the setting of
      the class state to the class module and then fixes the two issues above.
      
      Link: https://lore.kernel.org/r/20210406171746.5016-1-michael.christie@oracle.com
      Fixes: 9e67600e ("scsi: iscsi: Fix race condition between login and sync thread")
      Cc: Gulam Mohamed <gulam.mohamed@oracle.com>
      Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      0dcf8feb
  2. 06 Apr, 2021 3 commits
  3. 02 Apr, 2021 5 commits
  4. 30 Mar, 2021 1 commit
  5. 25 Mar, 2021 7 commits
  6. 17 Mar, 2021 3 commits
  7. 16 Mar, 2021 5 commits
  8. 04 Mar, 2021 10 commits
  9. 03 Mar, 2021 3 commits
  10. 01 Mar, 2021 1 commit
    • Linus Torvalds's avatar
      Merge branch 'kmap-conversion-for-5.12' of... · 7a7fd0de
      Linus Torvalds authored
      Merge branch 'kmap-conversion-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
      
      Pull kmap conversion updates from David Sterba:
       "This contains changes regarding kmap API use and eg conversion from
        kmap_atomic to kmap_local_page.
      
        The API belongs to memory management but to save cross-tree
        dependency headaches we've agreed to take it through the btrfs tree
        because there are some trivial conversions possible, while the rest
        will need some time and getting the easy cases out of the way would be
        convenient.
      
        The changes can be grouped:
      
         - function exports, new helpers
      
         - new VM_BUG_ON for additional verification; it's been discussed if
           it should be VM_BUG_ON or BUG_ON, the former was chosen due to
           performance reasons
      
         - code replaced by relevant helpers"
      
      [ This is an updated version of a request that originally came in during
        the merge window, but I asked for some updates:
      
          https://lore.kernel.org/lkml/cover.1614090658.git.dsterba@suse.com/
      
        which is why this got merge after the merge window closed.  - Linus ]
      
      * 'kmap-conversion-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: use copy_highpage() instead of 2 kmaps()
        btrfs: use memcpy_[to|from]_page() and kmap_local_page()
        mm/highmem: Add VM_BUG_ON() to mem*_page() calls
        mm/highmem: Introduce memcpy_page(), memmove_page(), and memset_page()
        mm/highmem: Convert memcpy_[to|from]_page() to kmap_local_page()
        mm/highmem: Lift memcpy_[to|from]_page to core
      7a7fd0de