1. 23 Aug, 2017 1 commit
  2. 17 Aug, 2017 6 commits
  3. 08 Aug, 2017 4 commits
    • Brian King's avatar
      scsi: ses: Fix wrong page error · 424f727b
      Brian King authored
      If a SES device returns an error on a requested diagnostic page, we are
      currently printing an error indicating the wrong page was received. Fix
      this up to simply return a failure and only check the returned page when
      the diagnostic page buffer was populated by the device.
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      424f727b
    • Brian King's avatar
      scsi: ipr: Fix scsi-mq lockdep issue · b0e17a9b
      Brian King authored
      Fixes the following lockdep warning that can occur when scsi-mq is
      enabled with ipr due to ipr calling scsi_unblock_requests from irq
      context. The fix is to move the call to scsi_unblock_requests to ipr's
      existing workqueue.
      
      stack backtrace:
      CPU: 28 PID: 0 Comm: swapper/28 Not tainted 4.13.0-rc2-gcc6x-gf74c89bd #1
      Call Trace:
      [c000001fffe97550] [c000000000b50818] dump_stack+0xe8/0x160 (unreliable)
      [c000001fffe97590] [c0000000001586d0] print_usage_bug+0x2d0/0x390
      [c000001fffe97640] [c000000000158f34] mark_lock+0x7a4/0x8e0
      [c000001fffe976f0] [c00000000015a000] __lock_acquire+0x6a0/0x1a70
      [c000001fffe97860] [c00000000015befc] lock_acquire+0xec/0x2e0
      [c000001fffe97930] [c000000000b71514] _raw_spin_lock+0x44/0x70
      [c000001fffe97960] [c0000000005b60f4] blk_mq_sched_dispatch_requests+0xa4/0x2a0
      [c000001fffe979c0] [c0000000005acac0] __blk_mq_run_hw_queue+0x100/0x2c0
      [c000001fffe97a00] [c0000000005ad478] __blk_mq_delay_run_hw_queue+0x118/0x130
      [c000001fffe97a40] [c0000000005ad61c] blk_mq_start_hw_queues+0x6c/0xa0
      [c000001fffe97a80] [c000000000797aac] scsi_kick_queue+0x2c/0x60
      [c000001fffe97aa0] [c000000000797cf0] scsi_run_queue+0x210/0x360
      [c000001fffe97b10] [c00000000079b888] scsi_run_host_queues+0x48/0x80
      [c000001fffe97b40] [c0000000007b6090] ipr_ioa_bringdown_done+0x70/0x1e0
      [c000001fffe97bc0] [c0000000007bc860] ipr_reset_ioa_job+0x80/0xf0
      [c000001fffe97bf0] [c0000000007b4d50] ipr_reset_timer_done+0xd0/0x100
      [c000001fffe97c30] [c0000000001937bc] call_timer_fn+0xdc/0x4b0
      [c000001fffe97cf0] [c000000000193d08] expire_timers+0x178/0x330
      [c000001fffe97d60] [c0000000001940c8] run_timer_softirq+0xb8/0x120
      [c000001fffe97de0] [c000000000b726a8] __do_softirq+0x168/0x6d8
      [c000001fffe97ef0] [c0000000000df2c8] irq_exit+0x108/0x150
      [c000001fffe97f10] [c000000000017bf4] __do_irq+0x2a4/0x4a0
      [c000001fffe97f90] [c00000000002da50] call_do_irq+0x14/0x24
      [c0000007fad93aa0] [c000000000017e8c] do_IRQ+0x9c/0x140
      [c0000007fad93af0] [c000000000008b98] hardware_interrupt_common+0x138/0x140
      Reported-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      b0e17a9b
    • Bodo Stroesser's avatar
      scsi: st: fix blk_get_queue usage · 180efde0
      Bodo Stroesser authored
      If blk_queue_get() in st_probe fails, disk->queue must not be set to
      SDp->request_queue, as that would result in put_disk() dropping a not
      taken reference.
      
      Thus, disk->queue should be set only after a successful blk_queue_get().
      
      Fixes: 2b5bebcc ("st: Take additional queue ref in st_probe")
      Signed-off-by: default avatarBodo Stroesser <bstroesser@ts.fujitsu.com>
      Acked-by: default avatarShirish Pargaonkar <spargaonkar@suse.com>
      Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
      Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
      Acked-by: default avatarKai Mäkisara <kai.makisara@kolumbus.fi>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      180efde0
    • Michael Hernandez's avatar
      scsi: qla2xxx: Fix system crash while triggering FW dump · be37aa4b
      Michael Hernandez authored
      This patch fixes system hang/crash while firmware dump is attempted with
      Block MQ enabled in qla2xxx driver. Fix is to remove check in fw dump
      template entries for existing request and response queues so that full
      buffer size is calculated during template size calculation.
      
      Following stack trace is seen during firmware dump capture process
      
      [  694.390588] qla2xxx [0000:81:00.0]-5003:11: ISP System Error - mbx1=4b1fh mbx2=10h mbx3=2ah mbx7=0h.
      [  694.402336] BUG: unable to handle kernel paging request at ffffc90008c7b000
      [  694.402372] IP: memcpy_erms+0x6/0x10
      [  694.402386] PGD 105f01a067
      [  694.402386] PUD 85f89c067
      [  694.402398] PMD 10490cb067
      [  694.402409] PTE 0
      [  694.402421]
      [  694.402437] Oops: 0002 [#1] PREEMPT SMP
      [  694.402452] Modules linked in: netconsole configfs qla2xxx scsi_transport_fc
      nvme_fc nvme_fabrics bnep bluetooth rfkill xt_tcpudp unix_diag xt_multiport
      ip6table_filter ip6_tables iptable_filter ip_tables x_tables af_packet
      iscsi_ibft iscsi_boot_sysfs xfs libcrc32c ipmi_ssif sb_edac edac_core
      x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass igb
      crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel iTCO_wdt
      aes_x86_64 crypto_simd ptp iTCO_vendor_support glue_helper cryptd lpc_ich joydev
      i2c_i801 pcspkr ioatdma mei_me pps_core tpm_tis mei mfd_core acpi_power_meter
      tpm_tis_core ipmi_si ipmi_devintf tpm ipmi_msghandler shpchp wmi dca button
      acpi_pad btrfs xor uas usb_storage hid_generic usbhid raid6_pq crc32c_intel ast
      i2c_algo_bit drm_kms_helper syscopyarea sysfillrect
      [  694.402692]  sysimgblt fb_sys_fops xhci_pci ttm ehci_pci sr_mod xhci_hcd
      cdrom ehci_hcd drm usbcore sg
      [  694.402730] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-1-default+ #19
      [  694.402753] Hardware name: Supermicro X10DRi/X10DRi, BIOS 1.1a 10/16/2015
      [  694.402776] task: ffffffff81c0e4c0 task.stack: ffffffff81c00000
      [  694.402798] RIP: 0010:memcpy_erms+0x6/0x10
      [  694.402813] RSP: 0018:ffff88085fc03cd0 EFLAGS: 00210006
      [  694.402832] RAX: ffffc90008c7ae0c RBX: 0000000000000004 RCX: 000000000001fe0c
      [  694.402856] RDX: 0000000000020000 RSI: ffff8810332c01f4 RDI: ffffc90008c7b000
      [  694.402879] RBP: ffff88085fc03d18 R08: 0000000000020000 R09: 0000000000279e0a
      [  694.402903] R10: 0000000000000000 R11: f000000000000000 R12: ffff88085fc03d80
      [  694.402927] R13: ffffc90008a01000 R14: ffffc90008a056d4 R15: ffff881052ef17e0
      [  694.402951] FS:  0000000000000000(0000) GS:ffff88085fc00000(0000) knlGS:0000000000000000
      [  694.402977] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  694.403012] CR2: ffffc90008c7b000 CR3: 0000000001c09000 CR4: 00000000001406f0
      [  694.403036] Call Trace:
      [  694.403047]  <IRQ>
      [  694.403072]  ? qla27xx_fwdt_entry_t263+0x18e/0x380 [qla2xxx]
      [  694.403099]  qla27xx_walk_template+0x9d/0x1a0 [qla2xxx]
      [  694.403124]  qla27xx_fwdump+0x1f3/0x272 [qla2xxx]
      [  694.403149]  qla2x00_async_event+0xb08/0x1a50 [qla2xxx]
      [  694.403169]  ? enqueue_task_fair+0xa2/0x9d0
      Signed-off-by: default avatarMike Hernandez <michael.hernandez@cavium.com>
      Signed-off-by: default avatarJoe Carnuccio <joe.carnuccio@cavium.com>
      Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      be37aa4b
  4. 27 Jul, 2017 8 commits
  5. 25 Jul, 2017 7 commits
    • Dan Carpenter's avatar
      scsi: qedi: Fix return code in qedi_ep_connect() · 2c675218
      Dan Carpenter authored
      We shouldn't be writing over the "ret" variable.  It means we return
      ERR_PTR(0) which is NULL and it results in a NULL dereference in the
      caller.
      
      Fixes: ace7f46b ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      2c675218
    • Arnd Bergmann's avatar
      scsi: lpfc: fix linking against modular NVMe support · cd069bb9
      Arnd Bergmann authored
      When LPFC is built-in but NVMe is a loadable module, we fail to link the
      kernel:
      
      drivers/scsi/built-in.o: In function `lpfc_nvme_create_localport':
      (.text+0x156a82): undefined reference to `nvme_fc_register_localport'
      drivers/scsi/built-in.o: In function `lpfc_nvme_destroy_localport':
      (.text+0x156eaa): undefined reference to `nvme_fc_unregister_remoteport'
      
      We can avoid this either by forcing lpfc to be a module, or by disabling
      NVMe support in this case. This implements the former.
      
      Fixes: 7d708033 ("scsi: lpfc: Finalize Kconfig options for nvme")
      Cc: stable@vger.kernel.org
      Link: https://patchwork.kernel.org/patch/9636569/Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      cd069bb9
    • Hannes Reinecke's avatar
      scsi: scsi_transport_fc: return -EBUSY for deleted vport · 260f4aed
      Hannes Reinecke authored
      When trying to delete a vport via 'vport_delete' sysfs attribute we
      should be checking if the port is already in state VPORT_DELETING; if so
      there's no need to do anything.
      Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      260f4aed
    • Varun Prakash's avatar
      scsi: libcxgbi: add check for valid cxgbi_task_data · 50292710
      Varun Prakash authored
      In error case it is possible that ->cleanup_task() gets called without
      calling ->alloc_pdu() in this case cxgbi_task_data is not valid, so add
      a check for for valid cxgbi_task_data in cxgbi_cleanup_task().
      Signed-off-by: default avatarVarun Prakash <varun@chelsio.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      50292710
    • Jakub Kicinski's avatar
      scsi: aic7xxx: fix firmware build with O=path · 516b7db5
      Jakub Kicinski authored
      Building firmware with O=path was apparently broken in aic7 for ever.
      Message of the previous commit to the Makefile (from 2008) mentions this
      unfortunate state of affairs already.  Fix this, mostly to make
      randconfig builds more reliable.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      516b7db5
    • Shu Wang's avatar
      scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion · 70c54e21
      Shu Wang authored
      Found this issue by kmemleak, a few kb mem was leaked in
      megasas_alloc_cmdlist_fusion when kzalloc failed for one
      megasas_cmd_fusion allocation.
      
      unreferenced object 0xffff88045dbd2000 (size 8192):
        comm "systemd-udevd", pid 323, jiffies 4294671759 (age 49.008s)
        backtrace:
          [<ffffffff8176166a>] kmemleak_alloc+0x4a/0xa0
          [<ffffffff812186a8>] __kmalloc+0xe8/0x220
          [<ffffffffc0060594>] megasas_alloc_cmdlist_fusion+0x34/0xe0 [megaraid_sas]
      (gdb) list *megasas_alloc_cmdlist_fusion+0x34
      0xd5c4 is in megasas_alloc_cmdlist_fusion
                     (drivers/scsi/megaraid/megaraid_sas_fusion.c:443).
          [<ffffffffc0060ca5>] megasas_alloc_cmds_fusion+0x25/0x410 [megaraid_sas]
          [<ffffffffc0061edf>] megasas_init_adapter_fusion+0x21f/0x640 [megaraid_sas]
          [<ffffffffc005df17>] megasas_init_fw+0x357/0xd30 [megaraid_sas]
          [<ffffffffc005ef26>] megasas_probe_one.part.33+0x636/0x1100 [megaraid_sas]
          [<ffffffffc005fa36>] megasas_probe_one+0x46/0xc0 [megaraid_sas]
          [<ffffffff813d2ca5>] local_pci_probe+0x45/0xa0
          [<ffffffff813d4222>] pci_device_probe+0x192/0x1b0
          [<ffffffff814e3658>] driver_probe_device+0x2a8/0x460
          [<ffffffff814e38ed>] __driver_attach+0xdd/0xe0
          [<ffffffff814e124c>] bus_for_each_dev+0x6c/0xc0
          [<ffffffff814e2dde>] driver_attach+0x1e/0x20
          [<ffffffff814e2775>] bus_add_driver+0x45/0x270
          [<ffffffff814e4400>] driver_register+0x60/0xe0
      unreferenced object 0xffff880454ce3600 (size 192):
        backtrace:
          [<ffffffff8176166a>] kmemleak_alloc+0x4a/0xa0
          [<ffffffff8121801a>] kmem_cache_alloc_trace+0xca/0x1d0
          [<ffffffffc00605d7>] megasas_alloc_cmdlist_fusion+0x77/0xe0 [megaraid_sas]
      (gdb) list *megasas_alloc_cmdlist_fusion+0x77
      0xd607 is in megasas_alloc_cmdlist_fusion
                      (drivers/scsi/megaraid/megaraid_sas_fusion.c:450).
          [<ffffffffc0060ca5>] megasas_alloc_cmds_fusion+0x25/0x410 [megaraid_sas]
          [<ffffffffc0061edf>] megasas_init_adapter_fusion+0x21f/0x640 [megaraid_sas]
          [<ffffffffc005df17>] megasas_init_fw+0x357/0xd30 [megaraid_sas]
          [<ffffffffc005ef26>] megasas_probe_one.part.33+0x636/0x1100 [megaraid_sas]
          [<ffffffffc005fa36>] megasas_probe_one+0x46/0xc0 [megaraid_sas]
          [<ffffffff813d2ca5>] local_pci_probe+0x45/0xa0
          [<ffffffff813d4222>] pci_device_probe+0x192/0x1b0
          [<ffffffff814e3658>] driver_probe_device+0x2a8/0x460
          [<ffffffff814e38ed>] __driver_attach+0xdd/0xe0
          [<ffffffff814e124c>] bus_for_each_dev+0x6c/0xc0
          [<ffffffff814e2dde>] driver_attach+0x1e/0x20
          [<ffffffff814e2775>] bus_add_driver+0x45/0x270
          [<ffffffff814e4400>] driver_register+0x60/0xe0
      Signed-off-by: default avatarShu Wang <shuwang@redhat.com>
      Acked-by: default avatarSumit Saxena <sumit.saxena@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      70c54e21
    • Nilesh Javali's avatar
      scsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig · cc20c29e
      Nilesh Javali authored
      qedi uses iscsi_boot_sysfs to export the targets used for boot to
      sysfs. Select the config option to make sure the module is built.
      
      This addresses the compile time issue,
          drivers/scsi/qedi/qedi_main.o: In function `qedi_remove':
          qedi_main.c:(.text+0x3bbd): undefined reference to `iscsi_boot_destroy_kset'
          drivers/scsi/qedi/qedi_main.o: In function `__qedi_probe.constprop.0':
          qedi_main.c:(.text+0x577a): undefined reference to `iscsi_boot_create_target'
          qedi_main.c:(.text+0x5807): undefined reference to `iscsi_boot_create_target'
          qedi_main.c:(.text+0x587f): undefined reference to `iscsi_boot_create_initiator'
          qedi_main.c:(.text+0x58f3): undefined reference to `iscsi_boot_create_ethernet'
          qedi_main.c:(.text+0x5927): undefined reference to `iscsi_boot_destroy_kset'
          qedi_main.c:(.text+0x5d7b): undefined reference to `iscsi_boot_create_host_kset'
      
      [mkp: fixed whitespace]
      Signed-off-by: default avatarNilesh Javali <nilesh.javali@cavium.com>
      Fixes: c57ec8fb ("scsi: qedi: Add support for Boot from SAN over iSCSI offload")
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      cc20c29e
  6. 18 Jul, 2017 3 commits
  7. 12 Jul, 2017 10 commits
  8. 11 Jul, 2017 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 130568d5
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
       "This is a followup for block changes, that didn't make the initial
        pull request. It's a bit of a mixed bag, this contains:
      
         - A followup pull request from Sagi for NVMe. Outside of fixups for
           NVMe, it also includes a series for ensuring that we properly
           quiesce hardware queues when browsing live tags.
      
         - Set of integrity fixes from Dmitry (mostly), fixing various issues
           for folks using DIF/DIX.
      
         - Fix for a bug introduced in cciss, with the req init changes. From
           Christoph.
      
         - Fix for a bug in BFQ, from Paolo.
      
         - Two followup fixes for lightnvm/pblk from Javier.
      
         - Depth fix from Ming for blk-mq-sched.
      
         - Also from Ming, performance fix for mtip32xx that was introduced
           with the dynamic initialization of commands"
      
      * 'for-linus' of git://git.kernel.dk/linux-block: (44 commits)
        block: call bio_uninit in bio_endio
        nvmet: avoid unneeded assignment of submit_bio return value
        nvme-pci: add module parameter for io queue depth
        nvme-pci: compile warnings in nvme_alloc_host_mem()
        nvmet_fc: Accept variable pad lengths on Create Association LS
        nvme_fc/nvmet_fc: revise Create Association descriptor length
        lightnvm: pblk: remove unnecessary checks
        lightnvm: pblk: control I/O flow also on tear down
        cciss: initialize struct scsi_req
        null_blk: fix error flow for shared tags during module_init
        block: Fix __blkdev_issue_zeroout loop
        nvme-rdma: unconditionally recycle the request mr
        nvme: split nvme_uninit_ctrl into stop and uninit
        virtio_blk: quiesce/unquiesce live IO when entering PM states
        mtip32xx: quiesce request queues to make sure no submissions are inflight
        nbd: quiesce request queues to make sure no submissions are inflight
        nvme: kick requeue list when requeueing a request instead of when starting the queues
        nvme-pci: quiesce/unquiesce admin_q instead of start/stop its hw queues
        nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues
        nvme-fc: quiesce/unquiesce admin_q instead of start/stop its hw queues
        ...
      130568d5