Public bug reported:

Hi, on my system I get exactly the same issue as reported by Christian Kühnke:
https://lore.kernel.org/all/1c79066a-9349-4f65-9ef2-dba4cf123...@kuehnke.de/

When I e.g. run "smartctl -H /dev/sda", my Ubuntu 6.8.0-52-generic kernel 
throws:
2025-02-10T14:08:53.031905+01:00 mirakel kernel: sas: Enter 
sas_scsi_recover_host busy: 1 failed: 1
2025-02-10T14:08:53.031945+01:00 mirakel kernel: sas: ata9: end_device-2:0: cmd 
error handler
2025-02-10T14:08:53.031950+01:00 mirakel kernel: sas: ata9: end_device-2:0: dev 
error handler
2025-02-10T14:08:53.031953+01:00 mirakel kernel: sas: ata11: end_device-2:2: 
dev error handler
2025-02-10T14:08:53.031955+01:00 mirakel kernel: sas: ata10: end_device-2:1: 
dev error handler
2025-02-10T14:08:53.031956+01:00 mirakel kernel: sas: ata12: end_device-2:3: 
dev error handler
2025-02-10T14:08:53.031958+01:00 mirakel kernel: sas: --- Exit 
sas_scsi_recover_host: busy: 0 failed: 1 tries: 1

(Also, The SMART output is):
...
=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

(Expected SMART output):
...
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

Christian Kühnke apparently has both identified the cause and the solution to 
the bug, which he claims he first discovered in kernel 6.6.62, and is fixed as 
of kernel 6.12.11:
https://lore.kernel.org/all/f437dee3-4236-4146-bd91-abb6f6118...@kuehnke.de/

I suggest the small patch Kühnke suggests is implemented in the Ubuntu-kernel:
---
  drivers/ata/libata-core.c | 8 ++++++++
  1 file changed, 8 insertions(+)

(limited to 'drivers/ata/libata-core.c')

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4f35aab81a0a38..45e3acb466c32a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4794,8 +4794,16 @@ static void fill_result_tf(struct ata_queued_cmd *qc)
  {
        struct ata_port *ap = qc->ap;
  
+       /*
+        * rtf may already be filled (e.g. for successful NCQ commands).
+        * If that is the case, we have nothing to do.
+        */
+       if (qc->flags & ATA_QCFLAG_RTF_FILLED)
+               return;
+
        qc->result_tf.flags = qc->tf.flags;
        ap->ops->qc_fill_rtf(qc);
+       qc->flags |= ATA_QCFLAG_RTF_FILLED;
  }
  
  static void ata_verify_xfer(struct ata_queued_cmd *qc)

All the best,
Jon Ivar

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: linux-image-6.8.0-52-generic 6.8.0-52.53
ProcVersionSignature: Ubuntu 6.8.0-52.53-generic 6.8.12
Uname: Linux 6.8.0-52-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/timer', 
'/dev/snd/seq', '/dev/snd/pcmC1D3p', '/dev/snd/pcmC1D7p', '/dev/snd/pcmC1D8p', 
'/dev/snd/pcmC1D9p', '/dev/snd/hwC1D0', '/dev/snd/hwC1D1', '/dev/snd/hwC1D2', 
'/dev/snd/hwC1D3', '/dev/snd/controlC1', '/dev/snd/by-path', 
'/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D2c', 
'/dev/snd/hwC0D2', '/dev/snd/controlC0'] failed with exit code 1:
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Mon Feb 10 13:38:21 2025
HibernationDevice: RESUME=none
InstallationDate: Installed on 2018-08-03 (2383 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
IwConfig:
 lo        no wireless extensions.
 
 eth0      no wireless extensions.
 
 eth1      no wireless extensions.
MachineType: LENOVO 422911G
ProcEnviron:
 LANG=nb_NO.UTF-8
 LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
ProcFB: 0 nouveaudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.8.0-52-generic root=ZFS=SSD/ROOT ro
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: Det er 
enten ingen PulseAudio-bakgrunnsprosess som kjører, eller så kjører kjører ikke 
prosessen som en økt-bakgrunnsprosess.
RelatedPackageVersions:
 linux-restricted-modules-6.8.0-52-generic N/A
 linux-backports-modules-6.8.0-52-generic  N/A
 linux-firmware                            20240318.git3b128b60-0ubuntu2.7
RfKill:
 
SourcePackage: linux
UpgradeStatus: Upgraded to noble on 2025-01-25 (16 days ago)
dmi.bios.date: 02/06/2014
dmi.bios.release: 0.49
dmi.bios.vendor: LENOVO
dmi.bios.version: A1KT49AUS
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: LENOVO
dmi.board.vendor: LENOVO
dmi.board.version: NONE
dmi.chassis.type: 7
dmi.chassis.vendor: LENOVO
dmi.chassis.version: NONE
dmi.modalias: 
dmi:bvnLENOVO:bvrA1KT49AUS:bd02/06/2014:br0.49:svnLENOVO:pn422911G:pvrThinkStationD30:rvnLENOVO:rnLENOVO:rvrNONE:cvnLENOVO:ct7:cvrNONE:skuLENOVO_BI_A1:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: 422911G
dmi.product.sku: LENOVO_BI_A1
dmi.product.version: ThinkStation D30
dmi.sys.vendor: LENOVO

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2097761

Title:
  Problems while retrieving SMART information via C602 SAS controller

Status in linux package in Ubuntu:
  New

Bug description:
  Hi, on my system I get exactly the same issue as reported by Christian Kühnke:
  https://lore.kernel.org/all/1c79066a-9349-4f65-9ef2-dba4cf123...@kuehnke.de/

  When I e.g. run "smartctl -H /dev/sda", my Ubuntu 6.8.0-52-generic kernel 
throws:
  2025-02-10T14:08:53.031905+01:00 mirakel kernel: sas: Enter 
sas_scsi_recover_host busy: 1 failed: 1
  2025-02-10T14:08:53.031945+01:00 mirakel kernel: sas: ata9: end_device-2:0: 
cmd error handler
  2025-02-10T14:08:53.031950+01:00 mirakel kernel: sas: ata9: end_device-2:0: 
dev error handler
  2025-02-10T14:08:53.031953+01:00 mirakel kernel: sas: ata11: end_device-2:2: 
dev error handler
  2025-02-10T14:08:53.031955+01:00 mirakel kernel: sas: ata10: end_device-2:1: 
dev error handler
  2025-02-10T14:08:53.031956+01:00 mirakel kernel: sas: ata12: end_device-2:3: 
dev error handler
  2025-02-10T14:08:53.031958+01:00 mirakel kernel: sas: --- Exit 
sas_scsi_recover_host: busy: 0 failed: 1 tries: 1

  (Also, The SMART output is):
  ...
  === START OF READ SMART DATA SECTION ===
  SMART Status not supported: Incomplete response, ATA output registers missing
  SMART overall-health self-assessment test result: PASSED
  Warning: This result is based on an Attribute check.

  (Expected SMART output):
  ...
  === START OF READ SMART DATA SECTION ===
  SMART overall-health self-assessment test result: PASSED

  Christian Kühnke apparently has both identified the cause and the solution to 
the bug, which he claims he first discovered in kernel 6.6.62, and is fixed as 
of kernel 6.12.11:
  https://lore.kernel.org/all/f437dee3-4236-4146-bd91-abb6f6118...@kuehnke.de/

  I suggest the small patch Kühnke suggests is implemented in the Ubuntu-kernel:
  ---
    drivers/ata/libata-core.c | 8 ++++++++
    1 file changed, 8 insertions(+)

  (limited to 'drivers/ata/libata-core.c')

  diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
  index 4f35aab81a0a38..45e3acb466c32a 100644
  --- a/drivers/ata/libata-core.c
  +++ b/drivers/ata/libata-core.c
  @@ -4794,8 +4794,16 @@ static void fill_result_tf(struct ata_queued_cmd *qc)
    {
        struct ata_port *ap = qc->ap;
    
  +     /*
  +      * rtf may already be filled (e.g. for successful NCQ commands).
  +      * If that is the case, we have nothing to do.
  +      */
  +     if (qc->flags & ATA_QCFLAG_RTF_FILLED)
  +             return;
  +
        qc->result_tf.flags = qc->tf.flags;
        ap->ops->qc_fill_rtf(qc);
  +     qc->flags |= ATA_QCFLAG_RTF_FILLED;
    }
    
    static void ata_verify_xfer(struct ata_queued_cmd *qc)

  All the best,
  Jon Ivar

  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: linux-image-6.8.0-52-generic 6.8.0-52.53
  ProcVersionSignature: Ubuntu 6.8.0-52.53-generic 6.8.12
  Uname: Linux 6.8.0-52-generic x86_64
  NonfreeKernelModules: zfs
  ApportVersion: 2.28.1-0ubuntu3.3
  Architecture: amd64
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/timer', 
'/dev/snd/seq', '/dev/snd/pcmC1D3p', '/dev/snd/pcmC1D7p', '/dev/snd/pcmC1D8p', 
'/dev/snd/pcmC1D9p', '/dev/snd/hwC1D0', '/dev/snd/hwC1D1', '/dev/snd/hwC1D2', 
'/dev/snd/hwC1D3', '/dev/snd/controlC1', '/dev/snd/by-path', 
'/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D2c', 
'/dev/snd/hwC0D2', '/dev/snd/controlC0'] failed with exit code 1:
  CasperMD5CheckResult: unknown
  CurrentDesktop: XFCE
  Date: Mon Feb 10 13:38:21 2025
  HibernationDevice: RESUME=none
  InstallationDate: Installed on 2018-08-03 (2383 days ago)
  InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 
(20180725)
  IwConfig:
   lo        no wireless extensions.
   
   eth0      no wireless extensions.
   
   eth1      no wireless extensions.
  MachineType: LENOVO 422911G
  ProcEnviron:
   LANG=nb_NO.UTF-8
   LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
  ProcFB: 0 nouveaudrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.8.0-52-generic root=ZFS=SSD/ROOT ro
  PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: Det er 
enten ingen PulseAudio-bakgrunnsprosess som kjører, eller så kjører kjører ikke 
prosessen som en økt-bakgrunnsprosess.
  RelatedPackageVersions:
   linux-restricted-modules-6.8.0-52-generic N/A
   linux-backports-modules-6.8.0-52-generic  N/A
   linux-firmware                            20240318.git3b128b60-0ubuntu2.7
  RfKill:
   
  SourcePackage: linux
  UpgradeStatus: Upgraded to noble on 2025-01-25 (16 days ago)
  dmi.bios.date: 02/06/2014
  dmi.bios.release: 0.49
  dmi.bios.vendor: LENOVO
  dmi.bios.version: A1KT49AUS
  dmi.board.asset.tag: To be filled by O.E.M.
  dmi.board.name: LENOVO
  dmi.board.vendor: LENOVO
  dmi.board.version: NONE
  dmi.chassis.type: 7
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: NONE
  dmi.modalias: 
dmi:bvnLENOVO:bvrA1KT49AUS:bd02/06/2014:br0.49:svnLENOVO:pn422911G:pvrThinkStationD30:rvnLENOVO:rnLENOVO:rvrNONE:cvnLENOVO:ct7:cvrNONE:skuLENOVO_BI_A1:
  dmi.product.family: To be filled by O.E.M.
  dmi.product.name: 422911G
  dmi.product.sku: LENOVO_BI_A1
  dmi.product.version: ThinkStation D30
  dmi.sys.vendor: LENOVO

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2097761/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to