1. 11 1月, 2018 3 次提交
  2. 07 11月, 2017 1 次提交
    • A
      scsi: mpt3sas: fix dma_addr_t casts · d8335ae2
      Arnd Bergmann 提交于
      The newly added base_make_prp_nvme function triggers a build warning on
      some 32-bit configurations:
      
      drivers/scsi/mpt3sas/mpt3sas_base.c: In function 'base_make_prp_nvme':
      drivers/scsi/mpt3sas/mpt3sas_base.c:1664:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        msg_phys = (dma_addr_t)mpt3sas_base_get_pcie_sgl_dma(ioc, smid);
      
      After taking a closer look, I found that the problem is that the new
      code mixes up pointers and dma_addr_t values unnecessarily.
      
      This changes it to use the correct types consistently, which lets us get
      rid of a lot of type casts in the process. I'm also renaming some
      variables to avoid confusion between physical and dma address spaces
      that are often distinct.
      
      Fixes: 016d5c35 ("scsi: mpt3sas: SGL to PRP Translation for I/Os to NVMe devices")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NSathya Prakash Veerichetty <sathya.prakash@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      d8335ae2
  3. 04 11月, 2017 6 次提交
  4. 12 10月, 2017 3 次提交
  5. 08 8月, 2017 1 次提交
    • A
      scsi: mpt3sas: fix format overflow warning · bbfd8e8b
      Arnd Bergmann 提交于
      We print the driver name into one string and then add and ID
      and copy it into a second string of the same length, at which
      point gcc complains about a possible overflow:
      
      drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function '_scsih_probe':
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:8884:21: error: '_cm' directive writing 3 bytes into a region of size between 1 and 32 [-Werror=format-overflow=]
      printf(ioc->name, "%s_cm%d", ioc->driver_name, ioc->id);
                        ^~~~~~~~~
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:8884:21: note: directive argument in the range [0, 255]
      drivers/scsi/mpt3sas/mpt3sas_scsih.c:8884:2: note: 'sprintf' output between 5 and 38 bytes into a destination of size 32
        sprintf(ioc->name, "%s_cm%d", ioc->driver_name, ioc->id);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Making the first string shorter is sufficient to avoid the
      warning here, as we know it can only contain either "mpt2sas"
      or "mpt3sas".
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      bbfd8e8b
  6. 09 5月, 2017 1 次提交
  7. 02 3月, 2017 1 次提交
    • B
      scsi: mpt3sas: Avoid sleeping in interrupt context · 8893cf6c
      Bart Van Assche 提交于
      Commit 669f0441 ("scsi: srp_transport: Move queuecommand() wait code
      to SCSI core") can make scsi_internal_device_block() sleep.  However,
      the mpt3sas driver can call this function from an interrupt
      handler. Hence add a second argument to scsi_internal_device_block()
      that restores the old behavior of this function for the mpt3sas handler.
      
      The call chain that triggered an "IRQ handler enabled interrupts"
      complaint is as follows:
      
      _base_interrupt()
      -> _base_async_event()
         -> mpt3sas_scsih_event_callback()
            -> _scsih_check_topo_delete_events()
               -> _scsih_block_io_to_children_attached_directly()
                  -> _scsih_block_io_device()
                     -> _scsih_internal_device_block()
                        -> scsi_internal_device_block()
      Reported-by: NOmar Sandoval <osandov@osandov.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Omar Sandoval <osandov@osandov.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sathya Prakash <sathya.prakash@broadcom.com>
      Cc: Chaitra P B <chaitra.basappa@broadcom.com>
      Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Tested-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      8893cf6c
  8. 24 2月, 2017 1 次提交
  9. 01 2月, 2017 2 次提交
  10. 18 1月, 2017 1 次提交
  11. 15 12月, 2016 1 次提交
  12. 09 11月, 2016 7 次提交
  13. 09 8月, 2016 3 次提交
  14. 12 5月, 2016 3 次提交
  15. 16 4月, 2016 1 次提交
  16. 24 2月, 2016 5 次提交