1. 20 3月, 2019 5 次提交
  2. 07 3月, 2019 3 次提交
    • D
      scsi: qla2xxx: check for kstrtol() failure · b8870ec6
      Dan Carpenter 提交于
      The error handling was unintentionally left out so it introduces a Smatch
      static checker warning:
      
          drivers/scsi/qla2xxx/qla_attr.c:1655 qla2x00_port_speed_store()
          error: uninitialized symbol 'type'.
      
      Fixes: a7b9ca7fc87a ("scsi: qla2xxx: Add support for setting port speed")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      b8870ec6
    • A
      scsi: qla2xxx: avoid printf format warning · 038d710f
      Arnd Bergmann 提交于
      Depending on the target architecture and configuration, both phys_addr_t
      and dma_addr_t may be smaller than 'long long', so we get a warning when
      printing either of them using the %llx format string:
      
      drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_walk_and_build_prot_sglist':
      drivers/scsi/qla2xxx/qla_iocb.c:1140:46: error: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
               "%s: page boundary crossing (phys=%llx len=%x)\n",
                                                 ~~~^
                                                 %x
               __func__, sle_phys, sg->length);
                         ~~~~~~~~
      drivers/scsi/qla2xxx/qla_iocb.c:1180:29: error: format '%llx' expects argument of type 'long long unsigned int', but argument 7 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
              "%s: sg[%x] (phys=%llx sglen=%x) ldma_sg_len: %x dif_bundl_len: %x ldma_needed: %x\n",
                                ~~~^
      
      There are special %pad and %pap format strings in Linux that we could use
      here, but since the driver already does 64-bit arithmetic on the values,
      using a plain 'u64' seems more consistent here.
      
      Note: A possible related issue may be that the driver possibly checks the
      wrong kind of overflow: when an IOMMU is in use, buffers that cross a
      32-bit boundary in physical addresses would still be mapped into dma
      addresses within the low 4GB space, so I suspect that we actually want to
      check sg_dma_address() instead of sg_phys() here.
      
      Fixes: 50b81275 ("scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundary")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      038d710f
    • B
      scsi: qla2xxx: Fix panic in qla_dfs_tgt_counters_show · db0f166e
      Bill Kuzeja 提交于
      When trying to display tgt_counters in the debugfs, a panic can result.
      
      There is no null check for qpair after it is assigned in the for-loop.
      Unless vha->hw->queue_pair_map array is completely filled with entries, the
      system will panic dereferencing a null pointer.
      Signed-off-by: NBill Kuzeja <william.kuzeja@stratus.com>
      Acked-by: NHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      db0f166e
  3. 20 2月, 2019 14 次提交
  4. 13 2月, 2019 1 次提交
  5. 06 2月, 2019 13 次提交
  6. 05 2月, 2019 1 次提交
  7. 02 2月, 2019 1 次提交
  8. 29 1月, 2019 1 次提交
  9. 12 1月, 2019 1 次提交