1. 24 3月, 2016 1 次提交
    • C
      mpt3sas: Don't overreach ioc->reply_post[] during initialization · 5ec8a175
      Calvin Owens 提交于
      In _base_make_ioc_operational(), we walk ioc->reply_queue_list and pull
      a pointer out of successive elements of ioc->reply_post[] for each entry
      in that list if RDPQ is enabled.
      
      Since the code pulls the pointer for the next iteration at the bottom of
      the loop, it triggers the a KASAN dump on the final iteration:
      
          BUG: KASAN: slab-out-of-bounds in _base_make_ioc_operational+0x47b7/0x47e0 [mpt3sas] at addr ffff880754816ab0
          Read of size 8 by task modprobe/305
          <snip>
          Call Trace:
           [<ffffffff81dfc591>] dump_stack+0x4d/0x6c
           [<ffffffff814c9689>] print_trailer+0xf9/0x150
           [<ffffffff814ceda4>] object_err+0x34/0x40
           [<ffffffff814d1231>] kasan_report_error+0x221/0x530
           [<ffffffff814d1673>] __asan_report_load8_noabort+0x43/0x50
           [<ffffffffa0043637>] _base_make_ioc_operational+0x47b7/0x47e0 [mpt3sas]
           [<ffffffffa0049a51>] mpt3sas_base_attach+0x1991/0x2120 [mpt3sas]
           [<ffffffffa0053c93>] _scsih_probe+0xeb3/0x16b0 [mpt3sas]
           [<ffffffff81ebd047>] local_pci_probe+0xc7/0x170
           [<ffffffff81ebf2cf>] pci_device_probe+0x20f/0x290
           [<ffffffff820d50cd>] really_probe+0x17d/0x600
           [<ffffffff820d56a3>] __driver_attach+0x153/0x190
           [<ffffffff820cffac>] bus_for_each_dev+0x11c/0x1a0
           [<ffffffff820d421d>] driver_attach+0x3d/0x50
           [<ffffffff820d378a>] bus_add_driver+0x44a/0x5f0
           [<ffffffff820d666c>] driver_register+0x18c/0x3b0
           [<ffffffff81ebcb76>] __pci_register_driver+0x156/0x200
           [<ffffffffa00c8135>] _mpt3sas_init+0x135/0x1000 [mpt3sas]
           [<ffffffff81000423>] do_one_initcall+0x113/0x2b0
           [<ffffffff813caa5a>] do_init_module+0x1d0/0x4d8
           [<ffffffff81273909>] load_module+0x6729/0x8dc0
           [<ffffffff81276123>] SYSC_init_module+0x183/0x1a0
           [<ffffffff8127625e>] SyS_init_module+0xe/0x10
           [<ffffffff828fe7d7>] entry_SYSCALL_64_fastpath+0x12/0x6a
      
      Fix this by pulling the value at the beginning of the loop.
      Signed-off-by: NCalvin Owens <calvinowens@fb.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: NJens Axboe <axboe@fb.com>
      Acked-by: NChaitra Basappa <chaitra.basappa@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      5ec8a175
  2. 10 3月, 2016 1 次提交
  3. 24 2月, 2016 7 次提交
  4. 07 1月, 2016 1 次提交
  5. 12 11月, 2015 10 次提交
  6. 28 8月, 2015 8 次提交
  7. 27 8月, 2015 1 次提交
  8. 13 1月, 2015 4 次提交
  9. 09 1月, 2015 1 次提交
  10. 17 9月, 2014 4 次提交
    • S
      mpt3sas: Added Reply Descriptor Post Queue (RDPQ) Array support · 9b05c91a
      Sreekanth Reddy 提交于
      Up to now, Driver allocates a single contiguous block of memory
      pool for all reply queues and passes down a single address in the
      ReplyDescriptorPostQueueAddress field of the IOC Init Request
      Message to the firmware.
      
      When firmware receives this address, it will program each of the
      Reply Descriptor Post Queue registers, as each reply queue has its
      own register. Thus the firmware, starting from a base address it
      determines the starting address of the subsequent reply queues
      through some simple arithmetic calculations.
      
      The size of this contiguous block of memory pool is directly proportional
      to number of MSI-X vectors and the HBA queue depth. For example higher
      MSIX vectors requires larger contiguous block of memory pool.
      
      But some of the OS kernels are unable to allocate this larger
      contiguous block of memory pool.
      
      So, the proposal is to allocate memory independently for each
      Reply Queue and pass down all of the addresses to the firmware.
      Then the firmware will just take each address and program the value
      into the correct register.
      
      When HBAs with older firmware(i.e. without RDPQ capability) is used
      with this new driver then the max_msix_vectors value would be set
      to 8 by default.
      
      Change set in v1:
      
      1. Declared the _base_get_ioc_facts() functions at the beginning of the mpt3sas_base.c file
      instead of moving all these functions before mpt3sas_base_map_resources() function
              a. _base_wait_for_doorbell_int()
              b. _base_wait_for_doorbell_ack()
              c. _base_wait_for_doorbell_not_used()
              d. _base_handshake_req_reply_wait()
              e. _base_get_ioc_facts()
      
      2. Initially set the consistent DMA mask to 32 bit and then change it to 64 bit mask
      after allocating RDPQ pools by calling the function _base_change_consistent_dma_mask.
      This is to ensure that all the upper 32 bits of RDPQ entries's base address to be same.
      
      3. Reduced the redundancy between the RDPQ and non-RDPQ support in these following functions
              a. _base_release_memory_pools()
              b. _base_allocate_memory_pools()
              c. _base_send_ioc_init()
              d. _base_make_ioc_operational()
      Signed-off-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      9b05c91a
    • S
      mpt3sas: Added OEM branding Strings · 1117b31a
      Sreekanth Reddy 提交于
      Added following branding Strings for Intel custom HBAs support.
      
      Driver String:                                  Vendor ID       Device ID       SubSystemVendor ID      SubSystemDevice ID
      Intel(R) Integrated RAID Module RMS3JC080       0x1000          0x0097          0x8086                  0x3521
      Intel(R) RAID Controller RS3GC008               0x1000          0x0097          0x8086                  0x3522
      Intel(R) RAID Controller RS3FC044               0x1000          0x0097          0x8086                  0x3523
      Intel(R) RAID Controller RS3UC080               0x1000          0x0097          0x8086                  0x3524
      Signed-off-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1117b31a
    • S
      mpt3sas: Copyright in driver sources is updated for year the 2014. · a4ffce0d
      Sreekanth Reddy 提交于
      Copyright in driver sources is updated for year the 2014.
      Signed-off-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      a4ffce0d
    • A
      mpt3sas: Use pci_enable_msix_exact() instead of pci_enable_msix() · 6bfa6907
      Alexander Gordeev 提交于
      As result of deprecation of MSI-X/MSI enablement functions
      pci_enable_msix() and pci_enable_msi_block() all drivers
      using these two interfaces need to be updated to use the
      new pci_enable_msi_range()  or pci_enable_msi_exact()
      and pci_enable_msix_range() or pci_enable_msix_exact()
      interfaces.
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Reviewed-by: NTomas Henzl <thenzl@redhat.com>
      Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
      Cc: support@lsi.com
      Cc: DL-MPTFusionLinux@lsi.com
      Cc: linux-scsi@vger.kernel.org
      Cc: linux-pci@vger.kernel.org
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      6bfa6907
  11. 26 7月, 2014 2 次提交