Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase master on upstream master #32

Merged
merged 29 commits into from
Sep 19, 2024
Merged

Commits on May 17, 2024

  1. nightly build: Update kernel versions

    Another kernel versions update.
    lnocturno committed May 17, 2024
    Configuration menu
    Copy the full SHA
    aa2c925 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. scst/include/backport.h: Port to Linux kernel v6.10

    Support for the following fs layer changes in the Linux kernel v6.10:
    
    - 7c98f7cb8fda ("remove call_{read,write}_iter() functions")
    lnocturno committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    ad35eef View commit details
    Browse the repository at this point in the history
  2. scst_lib: use bdev_nr_bytes(bdev) instead of i_size_read(bdev->bd_inode)

    Use the helper to query the size of a block device in bytes.
    lnocturno committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    5f4eee5 View commit details
    Browse the repository at this point in the history
  3. qla2x00t-32gbit, scst_local: Port to Linux kernel v6.10

    Support for the following scsi layer changes in the Linux kernel v6.10:
    
    - 5b7dfbeff92a ("scsi: core: Add a dma_alignment field to the host and
      host template")
    lnocturno committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    c3bd33a View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. qla2x00t-32gbit: Drop driver owner assignment

    PCI core in pci_register_driver() already sets the .owner, so driver does
    not need to.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 4e64bbba5352 upstream ]
    lnocturno committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d776e70 View commit details
    Browse the repository at this point in the history
  2. qla2x00t-32gbit: Avoid possible run-time warning with long model_num

    The prior strlcpy() replacement of strncpy() here (which was
    later replaced with strscpy()) expected pinfo->model_num (and
    pinfo->model_description) to be NUL-terminated, but it is possible
    it was not, as the code pattern here shows vha->hw->model_number (and
    vha->hw->model_desc) being exactly 1 character larger, and the replaced
    strncpy() was copying only up to the size of the source character
    array. Replace this with memtostr(), which is the unambiguous way to
    convert a maybe not-NUL-terminated character array into a NUL-terminated
    string.
    
    Fixes: 527e9b704c3d ("scsi: qla2xxx: Use memcpy() and strlcpy() instead of strcpy() and strncpy()")
    Reviewed-by: Martin K. Petersen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    [ commit c3408c4ae041 upstream ]
    lnocturno committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ceba304 View commit details
    Browse the repository at this point in the history
  3. qla2x00t-32gbit: Fix debugfs output for fw_resource_count

    DebugFS output for fw_resource_count shows:
    
    estimate exchange used[0] high water limit [1945] n        estimate iocb2 used [0] high water limit [5141]
            estimate exchange2 used[0] high water limit [1945]
    
    Which shows incorrect display due to missing newline in seq_print().
    
    [mkp: fix checkpatch warning about space before newline]
    
    Fixes: 5f63a163ed2f ("scsi: qla2xxx: Fix exchange oversubscription for management commands")
    Signed-off-by: Himanshu Madhani <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 998d09c5ef61 upstream ]
    lnocturno committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    40675cf View commit details
    Browse the repository at this point in the history
  4. scst_local, qla2x00t-32gbit: Improve Linux kernel 6.10 porting

    Fix compilation warnings, errors.
    lnocturno committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    faa8f46 View commit details
    Browse the repository at this point in the history
  5. nightly build: Update kernel versions

    Another kernel versions update.
    lnocturno committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    7117490 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. scst_lib: Fix VPD inquiry handling on incorrect LUNs

    When SCST receives an INQUIRY request for an incorrect LUN, it calls
    scst_set_lun_not_supported_inquiry(), which returns an inquiry buffer with
    a peripheral qualifier of 011b and a peripheral device type of 1Fh.
    However, for a VPD inquiry, it is unable to populate the remaining fields.
    According to SPC-6, if the device server cannot return the requested data,
    it should terminate with CHECK CONDITION.
    
    Reported-by: Lev Vainblat <[email protected]>
    lnocturno committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    0b00e0a View commit details
    Browse the repository at this point in the history
  2. iscsi-scst: Add internal_portal parameter

    Add an internal_portal parameter to allow specified portals to
    bypass CHAP controls for both discovery and target login.  If not
    populated, then the current behavior will be preserved.
    bmeagherix authored and lnocturno committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    aa086c9 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. scst_lib: Port to Linux kernel v6.11

    Support for the following block layer changes in the Linux kernel v6.11:
    
    - e94b45d08b5d ("block: move dma_pad_mask into queue_limits")
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8c6a968 View commit details
    Browse the repository at this point in the history
  2. scst_vdisk: Port to Linux kernel v6.11

    Support for the following block layer changes in the Linux kernel v6.11:
    
    - e9f5f44ad372 ("block: remove the blk_integrity_profile structure")
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    ec1b85a View commit details
    Browse the repository at this point in the history
  3. scst_local: Port to Linux kernel v6.11

    Support for the following driver core changes in the Linux kernel v6.11:
    
    - d69d80484598 ("driver core: have match() callback in struct bus_type
      take a const *")
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    667ef76 View commit details
    Browse the repository at this point in the history
  4. qla2x00t-32gbit: Remove unused struct 'scsi_dif_tuple'

    'scsi_dif_tuple' is unused since commit 8cb2049c7448 ("[SCSI] qla2xxx: T10
    DIF - Handle uninitalized sectors.").
    
    Remove it.
    
    Signed-off-by: Dr. David Alan Gilbert <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 96281dfa266d upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    e73abbd View commit details
    Browse the repository at this point in the history
  5. qla2x00t-32gbit: Unable to act on RSCN for port online

    The device does not come online when the target port is online. There were
    multiple RSCNs indicating multiple devices were affected. Driver is in the
    process of finishing a fabric scan. A new RSCN (device up) arrived at the
    tail end of the last fabric scan. Driver mistakenly thinks the new RSCN is
    being taken care of by the previous fabric scan, where this notification is
    cleared and not acted on. The laser needs to be blinked again to get the
    device to show up.
    
    To prevent driver from accidentally clearing the RSCN notification, each
    RSCN is given a generation value.  A fabric scan will scan for that
    generation(s).  Any new RSCN arrive after the scan start will have a new
    generation value. This will trigger another scan to get latest data. The
    RSCN notification flag will be cleared when the scan is associate to that
    generation.
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Fixes: bb2ca6b3f09a ("scsi: qla2xxx: Relogin during fabric disturbance")
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit c3d98b12eef8 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1e5f77a View commit details
    Browse the repository at this point in the history
  6. qla2x00t-32gbit: validate nvme_local_port correctly

    The driver load failed with error message,
    
    qla2xxx [0000:04:00.0]-ffff:0: register_localport failed: ret=ffffffef
    
    and with a kernel crash,
    
    	BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
    	Workqueue: events_unbound qla_register_fcport_fn [qla2xxx]
    	RIP: 0010:nvme_fc_register_remoteport+0x16/0x430 [nvme_fc]
    	RSP: 0018:ffffaaa040eb3d98 EFLAGS: 00010282
    	RAX: 0000000000000000 RBX: ffff9dfb46b78c00 RCX: 0000000000000000
    	RDX: ffff9dfb46b78da8 RSI: ffffaaa040eb3e08 RDI: 0000000000000000
    	RBP: ffff9dfb612a0a58 R08: ffffffffaf1d6270 R09: 3a34303a30303030
    	R10: 34303a303030305b R11: 2078787832616c71 R12: ffff9dfb46b78dd4
    	R13: ffff9dfb46b78c24 R14: ffff9dfb41525300 R15: ffff9dfb46b78da8
    	FS:  0000000000000000(0000) GS:ffff9dfc67c00000(0000) knlGS:0000000000000000
    	CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    	CR2: 0000000000000070 CR3: 000000018da10004 CR4: 00000000000206f0
    	Call Trace:
    	qla_nvme_register_remote+0xeb/0x1f0 [qla2xxx]
    	? qla2x00_dfs_create_rport+0x231/0x270 [qla2xxx]
    	qla2x00_update_fcport+0x2a1/0x3c0 [qla2xxx]
    	qla_register_fcport_fn+0x54/0xc0 [qla2xxx]
    
    Exit the qla_nvme_register_remote() function when qla_nvme_register_hba()
    fails and correctly validate nvme_local_port.
    
    Cc: [email protected]
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit eb1d4ce26095 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    d002f0a View commit details
    Browse the repository at this point in the history
  7. qla2x00t-32gbit: Fix for possible memory corruption

    Init Control Block is dereferenced incorrectly.  Correctly dereference ICB
    
    Cc: [email protected]
    Signed-off-by: Shreyas Deodhar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit c03d740152f7 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    4580c85 View commit details
    Browse the repository at this point in the history
  8. qla2x00t-32gbit: Return ENOBUFS if sg_cnt is more than one for ELS cmds

    Firmware only supports single DSDs in ELS Pass-through IOCB (0x53h), sg cnt
    is decided by the SCSI ML. User is not aware of the cause of an acutal
    error.
    
    Return the appropriate return code that will be decoded by API and
    application and proper error message will be displayed to user.
    
    Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.")
    Cc: [email protected]
    Signed-off-by: Saurav Kashyap <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit ce2065c4cc4f upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8ec5a49 View commit details
    Browse the repository at this point in the history
  9. qla2x00t-32gbit: Fix flash read failure

    Link up failure is observed as a result of flash read failure.  Current
    code does not check flash read return code where it relies on FW checksum
    to detect the problem.
    
    Add check of flash read failure to detect the problem sooner.
    
    Reported-by: kernel test robot <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 29e222085d89 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    30cb67f View commit details
    Browse the repository at this point in the history
  10. qla2x00t-32gbit: Complete command early within lock

    A crash was observed while performing NPIV and FW reset,
    
     BUG: kernel NULL pointer dereference, address: 000000000000001c
     #PF: supervisor read access in kernel mode
     #PF: error_code(0x0000) - not-present page
     PGD 0 P4D 0
     Oops: 0000 1 PREEMPT_RT SMP NOPTI
     RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0
     RSP: 0018:ffffc90026f47b88 EFLAGS: 00010246
     RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000002
     RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8881041130d0
     RBP: ffff8881041130d0 R08: 0000000000000000 R09: 0000000000000034
     R10: ffffc90026f47c48 R11: 0000000000000031 R12: 0000000000000000
     R13: 0000000000000000 R14: ffff8881565e4a20 R15: 0000000000000000
     FS: 00007f4c69ed3d00(0000) GS:ffff889faac80000(0000) knlGS:0000000000000000
     CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 000000000000001c CR3: 0000000288a50002 CR4: 00000000007706e0
     DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
     DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
     PKRU: 55555554
     Call Trace:
     <TASK>
     ? __die_body+0x1a/0x60
     ? page_fault_oops+0x16f/0x4a0
     ? do_user_addr_fault+0x174/0x7f0
     ? exc_page_fault+0x69/0x1a0
     ? asm_exc_page_fault+0x22/0x30
     ? dma_direct_unmap_sg+0x51/0x1e0
     ? preempt_count_sub+0x96/0xe0
     qla2xxx_qpair_sp_free_dma+0x29f/0x3b0 [qla2xxx]
     qla2xxx_qpair_sp_compl+0x60/0x80 [qla2xxx]
     __qla2x00_abort_all_cmds+0xa2/0x450 [qla2xxx]
    
    The command completion was done early while aborting the commands in driver
    unload path but outside lock to avoid the WARN_ON condition of performing
    dma_free_attr within the lock. However this caused race condition while
    command completion via multiple paths causing system crash.
    
    Hence complete the command early in unload path but within the lock to
    avoid race condition.
    
    Fixes: 0367076b0817 ("scsi: qla2xxx: Perform lockless command completion in abort path")
    Cc: [email protected]
    Signed-off-by: Shreyas Deodhar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 4475afa2646d upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    500979d View commit details
    Browse the repository at this point in the history
  11. qla2x00t-32gbit: During vport delete send async logout explicitly

    During vport delete, it is observed that during unload we hit a crash
    because of stale entries in outstanding command array.  For all these stale
    I/O entries, eh_abort was issued and aborted (fast_fail_io = 2009h) but
    I/Os could not complete while vport delete is in process of deleting.
    
      BUG: kernel NULL pointer dereference, address: 000000000000001c
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 0 P4D 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      Workqueue: qla2xxx_wq qla_do_work [qla2xxx]
      RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0
      RSP: 0018:ffffa1e1e150fc68 EFLAGS: 00010046
      RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000001
      RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8ce208a7a0d0
      RBP: ffff8ce208a7a0d0 R08: 0000000000000000 R09: ffff8ce378aac9c8
      R10: ffff8ce378aac8a0 R11: ffffa1e1e150f9d8 R12: 0000000000000000
      R13: 0000000000000000 R14: ffff8ce378aac9c8 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff8d217f000000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 000000000000001c CR3: 0000002089acc000 CR4: 0000000000350ee0
      Call Trace:
      <TASK>
      qla2xxx_qpair_sp_free_dma+0x417/0x4e0
      ? qla2xxx_qpair_sp_compl+0x10d/0x1a0
      ? qla2x00_status_entry+0x768/0x2830
      ? newidle_balance+0x2f0/0x430
      ? dequeue_entity+0x100/0x3c0
      ? qla24xx_process_response_queue+0x6a1/0x19e0
      ? __schedule+0x2d5/0x1140
      ? qla_do_work+0x47/0x60
      ? process_one_work+0x267/0x440
      ? process_one_work+0x440/0x440
      ? worker_thread+0x2d/0x3d0
      ? process_one_work+0x440/0x440
      ? kthread+0x156/0x180
      ? set_kthread_struct+0x50/0x50
      ? ret_from_fork+0x22/0x30
      </TASK>
    
    Send out async logout explicitly for all the ports during vport delete.
    
    Cc: [email protected]
    Signed-off-by: Manish Rangankar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 76f480d7c717 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    e5da16a View commit details
    Browse the repository at this point in the history
  12. qla2x00t-32gbit: Fix optrom version displayed in FDMI

    Bios version was popluated for FDMI response. Systems with EFI would show
    optrom version as 0.  EFI version is populated here and BIOS version is
    already displayed under FDMI_HBA_BOOT_BIOS_NAME.
    
    Cc: [email protected]
    Signed-off-by: Shreyas Deodhar <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 348744f27a35 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    7920ac0 View commit details
    Browse the repository at this point in the history
  13. qla2x00t-32gbit: Reduce fabric scan duplicate code

    For fabric scan, current code uses switch scan opcode and flags as the
    method to iterate through different commands to carry out the process.
    This makes it hard to read. This patch convert those opcode and flags into
    steps. In addition, this help reduce some duplicate code.
    
    Consolidate routines that handle GPNFT & GNNFT.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit beafd6924614 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    d66e9de View commit details
    Browse the repository at this point in the history
  14. qla2x00t-32gbit: Use QP lock to search for bsg

    On bsg timeout, hardware_lock is used as part of search for the srb.
    Instead, qpair lock should be used to iterate through different qpair.
    
    Cc: [email protected]
    Signed-off-by: Quinn Tran <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit c449b4198701 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    4726c8a View commit details
    Browse the repository at this point in the history
  15. qla2x00t-32gbit: Update version to 10.02.09.300-k

    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit a1392b19ca59 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    096a727 View commit details
    Browse the repository at this point in the history
  16. qla2x00t-32gbit: Convert comma to semicolon

    Replace a comma between expression statements by a semicolon.
    
    Fixes: d4523bd6fd5d ("scsi: qla2xxx: Refactor asynchronous command initialization")
    Signed-off-by: Chen Ni <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ commit 6ca9fede7c73 upstream ]
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    ca51801 View commit details
    Browse the repository at this point in the history
  17. scripts/run-regression-tests: Improve support for RHEL kernels

    Additionally, update kernel versions.
    lnocturno committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    376838e View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. nightly build: Update kernel versions

    Another kernel versions update
    lnocturno committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    878bbad View commit details
    Browse the repository at this point in the history