1. 04 Jul, 2024 8 commits
  2. 03 Jul, 2024 7 commits
  3. 30 Jun, 2024 4 commits
    • Niklas Cassel's avatar
      ata: ahci: Clean up sysfs file on error · eeb25a09
      Niklas Cassel authored
      .probe() (ahci_init_one()) calls sysfs_add_file_to_group(), however,
      if probe() fails after this call, we currently never call
      sysfs_remove_file_from_group().
      
      (The sysfs_remove_file_from_group() call in .remove() (ahci_remove_one())
      does not help, as .remove() is not called on .probe() error.)
      
      Thus, if probe() fails after the sysfs_add_file_to_group() call, the next
      time we insmod the module we will get:
      
      sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:04.0/remapped_nvme'
      CPU: 11 PID: 954 Comm: modprobe Not tainted 6.10.0-rc5 #43
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
      Call Trace:
       <TASK>
       dump_stack_lvl+0x5d/0x80
       sysfs_warn_dup.cold+0x17/0x23
       sysfs_add_file_mode_ns+0x11a/0x130
       sysfs_add_file_to_group+0x7e/0xc0
       ahci_init_one+0x31f/0xd40 [ahci]
      
      Fixes: 894fba7f ("ata: ahci: Add sysfs attribute to show remapped NVMe device count")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Link: https://lore.kernel.org/r/20240629124210.181537-10-cassel@kernel.orgSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      eeb25a09
    • Niklas Cassel's avatar
      ata: libata-core: Fix double free on error · ab9e0c52
      Niklas Cassel authored
      If e.g. the ata_port_alloc() call in ata_host_alloc() fails, we will jump
      to the err_out label, which will call devres_release_group().
      devres_release_group() will trigger a call to ata_host_release().
      ata_host_release() calls kfree(host), so executing the kfree(host) in
      ata_host_alloc() will lead to a double free:
      
      kernel BUG at mm/slub.c:553!
      Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 11 PID: 599 Comm: (udev-worker) Not tainted 6.10.0-rc5 #47
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
      RIP: 0010:kfree+0x2cf/0x2f0
      Code: 5d 41 5e 41 5f 5d e9 80 d6 ff ff 4d 89 f1 41 b8 01 00 00 00 48 89 d9 48 89 da
      RSP: 0018:ffffc90000f377f0 EFLAGS: 00010246
      RAX: ffff888112b1f2c0 RBX: ffff888112b1f2c0 RCX: ffff888112b1f320
      RDX: 000000000000400b RSI: ffffffffc02c9de5 RDI: ffff888112b1f2c0
      RBP: ffffc90000f37830 R08: 0000000000000000 R09: 0000000000000000
      R10: ffffc90000f37610 R11: 617461203a736b6e R12: ffffea00044ac780
      R13: ffff888100046400 R14: ffffffffc02c9de5 R15: 0000000000000006
      FS:  00007f2f1cabe980(0000) GS:ffff88813b380000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f2f1c3acf75 CR3: 0000000111724000 CR4: 0000000000750ef0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __die_body.cold+0x19/0x27
       ? die+0x2e/0x50
       ? do_trap+0xca/0x110
       ? do_error_trap+0x6a/0x90
       ? kfree+0x2cf/0x2f0
       ? exc_invalid_op+0x50/0x70
       ? kfree+0x2cf/0x2f0
       ? asm_exc_invalid_op+0x1a/0x20
       ? ata_host_alloc+0xf5/0x120 [libata]
       ? ata_host_alloc+0xf5/0x120 [libata]
       ? kfree+0x2cf/0x2f0
       ata_host_alloc+0xf5/0x120 [libata]
       ata_host_alloc_pinfo+0x14/0xa0 [libata]
       ahci_init_one+0x6c9/0xd20 [ahci]
      
      Ensure that we will not call kfree(host) twice, by performing the kfree()
      only if the devres_open_group() call failed.
      
      Fixes: dafd6c49 ("libata: ensure host is free'd on error exit paths")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Link: https://lore.kernel.org/r/20240629124210.181537-9-cassel@kernel.orgSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      ab9e0c52
    • Niklas Cassel's avatar
      ata,scsi: libata-core: Do not leak memory for ata_port struct members · f6549f53
      Niklas Cassel authored
      libsas is currently not freeing all the struct ata_port struct members,
      e.g. ncq_sense_buf for a driver supporting Command Duration Limits (CDL).
      
      Add a function, ata_port_free(), that is used to free a ata_port,
      including its struct members. It makes sense to keep the code related to
      freeing a ata_port in its own function, which will also free all the
      struct members of struct ata_port.
      
      Fixes: 18bd7718 ("scsi: ata: libata: Handle completion of CDL commands using policy 0xD")
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Link: https://lore.kernel.org/r/20240629124210.181537-8-cassel@kernel.orgSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      f6549f53
    • Niklas Cassel's avatar
      ata: libata-core: Fix null pointer dereference on error · 5d92c7c5
      Niklas Cassel authored
      If the ata_port_alloc() call in ata_host_alloc() fails,
      ata_host_release() will get called.
      
      However, the code in ata_host_release() tries to free ata_port struct
      members unconditionally, which can lead to the following:
      
      BUG: unable to handle page fault for address: 0000000000003990
      PGD 0 P4D 0
      Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 10 PID: 594 Comm: (udev-worker) Not tainted 6.10.0-rc5 #44
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
      RIP: 0010:ata_host_release.cold+0x2f/0x6e [libata]
      Code: e4 4d 63 f4 44 89 e2 48 c7 c6 90 ad 32 c0 48 c7 c7 d0 70 33 c0 49 83 c6 0e 41
      RSP: 0018:ffffc90000ebb968 EFLAGS: 00010246
      RAX: 0000000000000041 RBX: ffff88810fb52e78 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: ffff88813b3218c0 RDI: ffff88813b3218c0
      RBP: ffff88810fb52e40 R08: 0000000000000000 R09: 6c65725f74736f68
      R10: ffffc90000ebb738 R11: 73692033203a746e R12: 0000000000000004
      R13: 0000000000000000 R14: 0000000000000011 R15: 0000000000000006
      FS:  00007f6cc55b9980(0000) GS:ffff88813b300000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000003990 CR3: 00000001122a2000 CR4: 0000000000750ef0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __die_body.cold+0x19/0x27
       ? page_fault_oops+0x15a/0x2f0
       ? exc_page_fault+0x7e/0x180
       ? asm_exc_page_fault+0x26/0x30
       ? ata_host_release.cold+0x2f/0x6e [libata]
       ? ata_host_release.cold+0x2f/0x6e [libata]
       release_nodes+0x35/0xb0
       devres_release_group+0x113/0x140
       ata_host_alloc+0xed/0x120 [libata]
       ata_host_alloc_pinfo+0x14/0xa0 [libata]
       ahci_init_one+0x6c9/0xd20 [ahci]
      
      Do not access ata_port struct members unconditionally.
      
      Fixes: 633273a3 ("libata-pmp: hook PMP support and enable it")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Link: https://lore.kernel.org/r/20240629124210.181537-7-cassel@kernel.orgSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      5d92c7c5
  4. 28 Jun, 2024 1 commit
  5. 19 Jun, 2024 1 commit
    • Niklas Cassel's avatar
      ata: ahci: Do not enable LPM if no LPM states are supported by the HBA · fa997b05
      Niklas Cassel authored
      LPM consists of HIPM (host initiated power management) and DIPM
      (device initiated power management).
      
      ata_eh_set_lpm() will only enable HIPM if both the HBA and the device
      supports it.
      
      However, DIPM will be enabled as long as the device supports it.
      The HBA will later reject the device's request to enter a power state
      that it does not support (Slumber/Partial/DevSleep) (DevSleep is never
      initiated by the device).
      
      For a HBA that doesn't support any LPM states, simply don't set a LPM
      policy such that all the HIPM/DIPM probing/enabling will be skipped.
      
      Not enabling HIPM or DIPM in the first place is safer than relying on
      the device following the AHCI specification and respecting the NAK.
      (There are comments in the code that some devices misbehave when
      receiving a NAK.)
      
      Performing this check in ahci_update_initial_lpm_policy() also has the
      advantage that a HBA that doesn't support any LPM states will take the
      exact same code paths as a port that is external/hot plug capable.
      
      Side note: the port in ata_port_dbg() has not been given a unique id yet,
      but this is not overly important as the debug print is disabled unless
      explicitly enabled using dynamic debug. A follow-up series will make sure
      that the unique id assignment will be done earlier. For now, the important
      thing is that the function returns before setting the LPM policy.
      
      Fixes: 7627a0ed ("ata: ahci: Drop low power policy board type")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Link: https://lore.kernel.org/r/20240618152828.2686771-2-cassel@kernel.orgSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      fa997b05
  6. 18 Jun, 2024 1 commit
  7. 14 Jun, 2024 1 commit
    • Damien Le Moal's avatar
      ata: libata-scsi: Set the RMB bit only for removable media devices · a6a75edc
      Damien Le Moal authored
      The SCSI Removable Media Bit (RMB) should only be set for removable media,
      where the device stays and the media changes, e.g. CD-ROM or floppy.
      
      The ATA removable media device bit is obsoleted since ATA-8 ACS (2006),
      but before that it was used to indicate that the device can have its media
      removed (while the device stays).
      
      Commit 8a3e33cf ("ata: ahci: find eSATA ports and flag them as
      removable") introduced a change to set the RMB bit if the port has either
      the eSATA bit or the hot-plug capable bit set. The reasoning was that the
      author wanted his eSATA ports to get treated like a USB stick.
      
      This is however wrong. See "20-082r23SPC-6: Removable Medium Bit
      Expectations" which has since been integrated to SPC, which states that:
      
      """
      Reports have been received that some USB Memory Stick device servers set
      the removable medium (RMB) bit to one. The rub comes when the medium is
      actually removed, because... The device server is removed concurrently
      with the medium removal. If there is no device server, then there is no
      device server that is waiting to have removable medium inserted.
      
      Sufficient numbers of SCSI analysts see such a device:
      - not as a device that supports removable medium;
      but
      - as a removable, hot pluggable device.
      """
      
      The definition of the RMB bit in the SPC specification has since been
      clarified to match this.
      
      Thus, a USB stick should not have the RMB bit set (and neither shall an
      eSATA nor a hot-plug capable port).
      
      Commit dc8b4afc ("ata: ahci: don't mark HotPlugCapable Ports as
      external/removable") then changed so that the RMB bit is only set for the
      eSATA bit (and not for the hot-plug capable bit), because of a lot of bug
      reports of SATA devices were being automounted by udisks. However,
      treating eSATA and hot-plug capable ports differently is not correct.
      
      From the AHCI 1.3.1 spec:
      Hot Plug Capable Port (HPCP): When set to '1', indicates that this port's
      signal and power connectors are externally accessible via a joint signal
      and power connector for blindmate device hot plug.
      
      So a hot-plug capable port is an external port, just like commit
      45b96d65 ("ata: ahci: a hotplug capable port is an external port")
      claims.
      
      In order to not violate the SPC specification, modify the SCSI INQUIRY
      data to only set the RMB bit if the ATA device can have its media removed.
      
      This fixes a reported problem where GNOME/udisks was automounting devices
      connected to hot-plug capable ports.
      
      Fixes: 45b96d65 ("ata: ahci: a hotplug capable port is an external port")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Reviewed-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Tested-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Reported-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Closes: https://lore.kernel.org/linux-ide/c0de8262-dc4b-4c22-9fac-33432e5bddd3@t-8ch.de/Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      [cassel: wrote commit message]
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      a6a75edc
  8. 06 Jun, 2024 1 commit
    • Michael Ellerman's avatar
      ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K · 09fe2bfa
      Michael Ellerman authored
      The pata_macio driver advertises a max_segment_size of 0xff00, because
      the hardware doesn't cope with requests >= 64K.
      
      However the SCSI core requires max_segment_size to be at least
      PAGE_SIZE, which is a problem for pata_macio when the kernel is built
      with 64K pages.
      
      In older kernels the SCSI core would just increase the segment size to
      be equal to PAGE_SIZE, however since the commit tagged below it causes a
      warning and the device fails to probe:
      
        WARNING: CPU: 0 PID: 26 at block/blk-settings.c:202 .blk_validate_limits+0x2f8/0x35c
        CPU: 0 PID: 26 Comm: kworker/u4:1 Not tainted 6.10.0-rc1 #1
        Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac
        ...
        NIP .blk_validate_limits+0x2f8/0x35c
        LR  .blk_alloc_queue+0xc0/0x2f8
        Call Trace:
          .blk_alloc_queue+0xc0/0x2f8
          .blk_mq_alloc_queue+0x60/0xf8
          .scsi_alloc_sdev+0x208/0x3c0
          .scsi_probe_and_add_lun+0x314/0x52c
          .__scsi_add_device+0x170/0x1a4
          .ata_scsi_scan_host+0x2bc/0x3e4
          .async_port_probe+0x6c/0xa0
          .async_run_entry_fn+0x60/0x1bc
          .process_one_work+0x228/0x510
          .worker_thread+0x360/0x530
          .kthread+0x134/0x13c
          .start_kernel_thread+0x10/0x14
        ...
        scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
      
      Although the hardware can't cope with a 64K segment, the driver
      already deals with that internally by splitting large requests in
      pata_macio_qc_prep(). That is how the driver has managed to function
      until now on 64K kernels.
      
      So fix the driver to advertise a max_segment_size of 64K, which avoids
      the warning and keeps the SCSI core happy.
      
      Fixes: afd53a3d ("scsi: core: Initialize scsi midlayer limits before allocating the queue")
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Closes: https://lore.kernel.org/all/ce2bf6af-4382-4fe1-b392-cc6829f5ceb2@roeck-us.net/Reported-by: default avatarDoru Iorgulescu <doru.iorgulescu1@gmail.com>
      Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218858Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      09fe2bfa
  9. 31 May, 2024 3 commits
    • Niklas Cassel's avatar
      ata: libata-core: Add ATA_HORKAGE_NOLPM for Apacer AS340 · 3cb648c4
      Niklas Cassel authored
      Commit 7627a0ed ("ata: ahci: Drop low power policy board type")
      dropped the board_ahci_low_power board type, and instead enables LPM if:
      -The AHCI controller reports that it supports LPM (Partial/Slumber), and
      -CONFIG_SATA_MOBILE_LPM_POLICY != 0, and
      -The port is not defined as external in the per port PxCMD register, and
      -The port is not defined as hotplug capable in the per port PxCMD
       register.
      
      Partial and Slumber LPM states can either be initiated by HIPM or DIPM.
      
      For HIPM (host initiated power management) to get enabled, both the AHCI
      controller and the drive have to report that they support HIPM.
      
      For DIPM (device initiated power management) to get enabled, only the
      drive has to report that it supports DIPM. However, the HBA will reject
      device requests to enter LPM states which the HBA does not support.
      
      The problem is that Apacer AS340 drives do not handle low power modes
      correctly. The problem was most likely not seen before because no one
      had used this drive with a AHCI controller with LPM enabled.
      
      Add a quirk so that we do not enable LPM for this drive, since we see
      command timeouts if we do (even though the drive claims to support DIPM).
      
      Fixes: 7627a0ed ("ata: ahci: Drop low power policy board type")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarTim Teichmann <teichmanntim@outlook.de>
      Closes: https://lore.kernel.org/linux-ide/87bk4pbve8.ffs@tglx/Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      3cb648c4
    • Niklas Cassel's avatar
      ata: libata-core: Add ATA_HORKAGE_NOLPM for AMD Radeon S3 SSD · 47388036
      Niklas Cassel authored
      Commit 7627a0ed ("ata: ahci: Drop low power policy board type")
      dropped the board_ahci_low_power board type, and instead enables LPM if:
      -The AHCI controller reports that it supports LPM (Partial/Slumber), and
      -CONFIG_SATA_MOBILE_LPM_POLICY != 0, and
      -The port is not defined as external in the per port PxCMD register, and
      -The port is not defined as hotplug capable in the per port PxCMD
       register.
      
      Partial and Slumber LPM states can either be initiated by HIPM or DIPM.
      
      For HIPM (host initiated power management) to get enabled, both the AHCI
      controller and the drive have to report that they support HIPM.
      
      For DIPM (device initiated power management) to get enabled, only the
      drive has to report that it supports DIPM. However, the HBA will reject
      device requests to enter LPM states which the HBA does not support.
      
      The problem is that AMD Radeon S3 SSD drives do not handle low power modes
      correctly. The problem was most likely not seen before because no one
      had used this drive with a AHCI controller with LPM enabled.
      
      Add a quirk so that we do not enable LPM for this drive, since we see
      command timeouts if we do (even though the drive claims to support both
      HIPM and DIPM).
      
      Fixes: 7627a0ed ("ata: ahci: Drop low power policy board type")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarDoru Iorgulescu <doru.iorgulescu1@gmail.com>
      Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218832Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      47388036
    • Niklas Cassel's avatar
      ata: libata-core: Add ATA_HORKAGE_NOLPM for Crucial CT240BX500SSD1 · 86aaa7e9
      Niklas Cassel authored
      Commit 7627a0ed ("ata: ahci: Drop low power policy board type")
      dropped the board_ahci_low_power board type, and instead enables LPM if:
      -The AHCI controller reports that it supports LPM (Partial/Slumber), and
      -CONFIG_SATA_MOBILE_LPM_POLICY != 0, and
      -The port is not defined as external in the per port PxCMD register, and
      -The port is not defined as hotplug capable in the per port PxCMD
       register.
      
      Partial and Slumber LPM states can either be initiated by HIPM or DIPM.
      
      For HIPM (host initiated power management) to get enabled, both the AHCI
      controller and the drive have to report that they support HIPM.
      
      For DIPM (device initiated power management) to get enabled, only the
      drive has to report that it supports DIPM. However, the HBA will reject
      device requests to enter LPM states which the HBA does not support.
      
      The problem is that Crucial CT240BX500SSD1 drives do not handle low power
      modes correctly. The problem was most likely not seen before because no
      one had used this drive with a AHCI controller with LPM enabled.
      
      Add a quirk so that we do not enable LPM for this drive, since we see
      command timeouts if we do (even though the drive claims to support DIPM).
      
      Fixes: 7627a0ed ("ata: ahci: Drop low power policy board type")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarAarrayy <lp610mh@gmail.com>
      Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218832Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      86aaa7e9
  10. 27 May, 2024 2 commits
    • Mario Limonciello's avatar
      ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm · 5433f0e7
      Mario Limonciello authored
      Historically this was set to "keep_firmware_settings" to prevent problems
      with power management on very old drives. However it's been observed that
      almost all modern Linux distributions either set the policy to
      "med_power_with_dipm" in the kernel configuration or update it to this via
      userspace policy changes. Update the policy default in the kernel to
      "med_power_with_dipm" to match that behavior as well.
      
      Changing the default was previously not a good idea, because LPM disables
      detection of hot plug removals, however, since commit ae1f3db0 ("ata:
      ahci: do not enable LPM on external ports"), a port marked as external
      will always be initialized to "keep_firmware_settings", regardless of the
      SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is
      now considered safe (external ports included).
      Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      [cassel: rebased and reworded commit message]
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      5433f0e7
    • Jason Nader's avatar
      ata: ahci: Do not apply Intel PCS quirk on Intel Alder Lake · 9e2f46cd
      Jason Nader authored
      Commit b8b8b4e0 ("ata: ahci: Add Intel Alder Lake-P AHCI controller
      to low power chipsets list") added Intel Alder Lake to the ahci_pci_tbl.
      
      Because of the way that the Intel PCS quirk was implemented, having
      an explicit entry in the ahci_pci_tbl caused the Intel PCS quirk to
      be applied. (The quirk was not being applied if there was no explict
      entry.)
      
      Thus, entries that were added to the ahci_pci_tbl also got the Intel
      PCS quirk applied.
      
      The quirk was cleaned up in commit 7edbb605 ("ahci: clean up
      intel_pcs_quirk"), such that it is clear which entries that actually
      applies the Intel PCS quirk.
      
      Newer Intel AHCI controllers do not need the Intel PCS quirk,
      and applying it when not needed actually breaks some platforms.
      
      Do not apply the Intel PCS quirk for Intel Alder Lake.
      This is in line with how things worked before commit b8b8b4e0 ("ata:
      ahci: Add Intel Alder Lake-P AHCI controller to low power chipsets list"),
      such that certain platforms using Intel Alder Lake will work once again.
      
      Cc: stable@vger.kernel.org # 6.7
      Fixes: b8b8b4e0 ("ata: ahci: Add Intel Alder Lake-P AHCI controller to low power chipsets list")
      Signed-off-by: default avatarJason Nader <dev@kayoway.com>
      Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
      9e2f46cd
  11. 26 May, 2024 5 commits
  12. 25 May, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-05-25-09-13' of... · 9b62e02e
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "16 hotfixes, 11 of which are cc:stable.
      
        A few nilfs2 fixes, the remainder are for MM: a couple of selftests
        fixes, various singletons fixing various issues in various parts"
      
      * tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/ksm: fix possible UAF of stable_node
        mm/memory-failure: fix handling of dissolved but not taken off from buddy pages
        mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again
        nilfs2: fix potential hang in nilfs_detach_log_writer()
        nilfs2: fix unexpected freezing of nilfs_segctor_sync()
        nilfs2: fix use-after-free of timer for log writer thread
        selftests/mm: fix build warnings on ppc64
        arm64: patching: fix handling of execmem addresses
        selftests/mm: compaction_test: fix bogus test success and reduce probability of OOM-killer invocation
        selftests/mm: compaction_test: fix incorrect write of zero to nr_hugepages
        selftests/mm: compaction_test: fix bogus test success on Aarch64
        mailmap: update email address for Satya Priya
        mm/huge_memory: don't unpoison huge_zero_folio
        kasan, fortify: properly rename memintrinsics
        lib: add version into /proc/allocinfo output
        mm/vmalloc: fix vmalloc which may return null if called with __GFP_NOFAIL
      9b62e02e
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a0db36ed
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
      
       - Fix x86 IRQ vector leak caused by a CPU offlining race
      
       - Fix build failure in the riscv-imsic irqchip driver
         caused by an API-change semantic conflict
      
       - Fix use-after-free in irq_find_at_or_after()
      
      * tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/irqdesc: Prevent use-after-free in irq_find_at_or_after()
        genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
        irqchip/riscv-imsic: Fixup riscv_ipi_set_virq_range() conflict
      a0db36ed
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3a390f24
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
      
       - Fix regressions of the new x86 CPU VFM (vendor/family/model)
         enumeration/matching code
      
       - Fix crash kernel detection on buggy firmware with
         non-compliant ACPI MADT tables
      
       - Address Kconfig warning
      
      * tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
        crypto: x86/aes-xts - switch to new Intel CPU model defines
        x86/topology: Handle bogus ACPI tables correctly
        x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
      3a390f24
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi · 56676c4c
      Linus Torvalds authored
      Pull ipmi updates from Corey Minyard:
       "Mostly updates for deprecated interfaces, platform.remove and
        converting from a tasklet to a BH workqueue.
      
        Also use HAS_IOPORT for disabling inb()/outb()"
      
      * tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi:
        ipmi: kcs_bmc_npcm7xx: Convert to platform remove callback returning void
        ipmi: kcs_bmc_aspeed: Convert to platform remove callback returning void
        ipmi: ipmi_ssif: Convert to platform remove callback returning void
        ipmi: ipmi_si_platform: Convert to platform remove callback returning void
        ipmi: ipmi_powernv: Convert to platform remove callback returning void
        ipmi: bt-bmc: Convert to platform remove callback returning void
        char: ipmi: handle HAS_IOPORT dependencies
        ipmi: Convert from tasklet to BH workqueue
      56676c4c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.10-rc1' of https://github.com/ceph/ceph-client · 74eca356
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "A series from Xiubo that adds support for additional access checks
        based on MDS auth caps which were recently made available to clients.
      
        This is needed to prevent scenarios where the MDS quietly discards
        updates that a UID-restricted client previously (wrongfully) acked to
        the user.
      
        Other than that, just a documentation fixup"
      
      * tag 'ceph-for-6.10-rc1' of https://github.com/ceph/ceph-client:
        doc: ceph: update userspace command to get CephFS metadata
        ceph: add CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK feature bit
        ceph: check the cephx mds auth access for async dirop
        ceph: check the cephx mds auth access for open
        ceph: check the cephx mds auth access for setattr
        ceph: add ceph_mds_check_access() helper
        ceph: save cap_auths in MDS client when session is opened
      74eca356
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_6.10' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 89b61ca4
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
       "Fixes:
         - reusing of the file index (could cause the file to be trimmed)
         - infinite dir enumeration
         - taking DOS names into account during link counting
         - le32_to_cpu conversion, 32 bit overflow, NULL check
         - some code was refactored
      
        Changes:
         - removed max link count info display during driver init
      
        Remove:
         - atomic_open has been removed for lack of use"
      
      * tag 'ntfs3_for_6.10' of https://github.com/Paragon-Software-Group/linux-ntfs3:
        fs/ntfs3: Break dir enumeration if directory contents error
        fs/ntfs3: Fix case when index is reused during tree transformation
        fs/ntfs3: Mark volume as dirty if xattr is broken
        fs/ntfs3: Always make file nonresident on fallocate call
        fs/ntfs3: Redesign ntfs_create_inode to return error code instead of inode
        fs/ntfs3: Use variable length array instead of fixed size
        fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow
        fs/ntfs3: Check 'folio' pointer for NULL
        fs/ntfs3: Missed le32_to_cpu conversion
        fs/ntfs3: Remove max link count info display during driver init
        fs/ntfs3: Taking DOS names into account during link counting
        fs/ntfs3: remove atomic_open
        fs/ntfs3: use kcalloc() instead of kzalloc()
      89b61ca4