smartpqi: Update 22.04 driver to include recent bug fixes and support current generation devices

Bug #1998643 reported by Don Brace
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
Undecided
Jeff Lane 
Jammy
Fix Released
Medium
Jeff Lane 

Bug Description

[Impact]
These patches provide bug fixes and add support for the latest generation of OEM PCI devices to ensure customers are able to use Jammy on the recent generations of server hardware. This will bring us in line with the other major linux distros.

[Fix]
There are some outstanding patches already in Linus's tree that can be applied to 22.04.
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

The following patches apply to
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy

f54f85dfd757 scsi: smartpqi: Update version to 2.1.18-045
e4b73b3fa2b9 scsi: smartpqi: Update copyright to current year
6d567dfee0b7 scsi: smartpqi: Add ctrl ready timeout module parameter
2d80f4054f7f scsi: smartpqi: Update deleting a LUN via sysfs
cf15c3e734e8 scsi: smartpqi: Add module param to disable managed ints
6ce3cfb365eb scsi: smartpqi: Fix RAID map race condition
69695aeaa662 scsi: smartpqi: Fix DMA direction for RAID requests
85b41834b0f4 scsi: smartpqi: Stop logging spurious PQI reset failures
2a9c2ba2bc47 scsi: smartpqi: Add PCI IDs for Lenovo controllers
44e68c4af5d2 scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i
331f7e998b20 scsi: smartpqi: Fix PCI control linkdown system hang
904f2bfda65e scsi: smartpqi: Add driver support for multi-LUN devices
297bdc540f0e scsi: smartpqi: Close write read holes
dab5378485f6 scsi: smartpqi: Add PCI IDs for ramaxel controllers
1d393227fc76 scsi: smartpqi: Add controller fw version to console log
4e7d26029ee7 scsi: smartpqi: Shorten drive visibility after removal
8946ea283808 scsi: smartpqi: Fix typo in comment
c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer
31b17c3aeb5e scsi: smartpqi: Fix unused variable pqi_pm_ops for clang
62ed6622aaf0 scsi: smartpqi: Update version to 2.1.14-035
291c2e0071ef scsi: smartpqi: Fix lsscsi -t SAS addresses
c66e078ad89e scsi: smartpqi: Fix hibernate and suspend
5e6935864d81 scsi: smartpqi: Fix BUILD_BUG_ON() statements
c52efc923856 scsi: smartpqi: Fix NUMA node not updated during init
00598b056aa6 scsi: smartpqi: Expose SAS address for SATA drives
5d8fbce04d36 scsi: smartpqi: Speed up RAID 10 sequential reads
27655e9db479 scsi: smartpqi: Update volume size after expansion
b73357a1fd39 scsi: smartpqi: Avoid drive spin-down during suspend
42dc0426fbbb scsi: smartpqi: Resolve delay issue with PQI_HZ value
9e98e60bfca3 scsi: smartpqi: Fix a typo in func pqi_aio_submit_io()
b4dc06a9070e scsi: smartpqi: Fix a name typo and cleanup code
94a68c814328 scsi: smartpqi: Quickly propagate path failures to SCSI midlayer
70ba20be4bb1 scsi: smartpqi: Eliminate drive spin down on warm boot
2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs
c57ee4ccb358 scsi: smartpqi: Add PCI IDs
c4ff687d25c0 scsi: smartpqi: Fix rmmod stack trace
64fc9015fbeb scsi: smartpqi: Switch to attribute groups
0ca190805784 scsi: smartpqi: Call scsi_done() directly

I added the above SHA1 IDs to a file called: backport_linus_6.1_into_22.04

git-backport --sort -d /tmp/patches ../backport_linus_6.1_into_22.04
git am -s /tmp/patches/*.diff

All patches applied without any conflicts.

[Test Plan]
The upstream driver has undergone extensive testing by Microchip's test team before submitting those patches to the upstream kernel. All patches are tested and accepted in the upstream kernel at this time.

One should be able to load the smartpqi driver and verify the version is at 2.1.18-045

[Other Info]

https://code.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/jammy/+ref/smartpqi_2204_3

Revision history for this message
Don Brace (bracedon) wrote :

I want do to a build also to ensure that all patches will compile. I believe that they will.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1998643

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Don Brace (bracedon) wrote : Re: smartpqi: Update 22.04 driver to latest kernel.org

The compile test was successful.

There are some more outstanding patches from Martin Petersen's tree:

git remote add mkp_6.20-scsi-queue https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git -t 6.2/scsi-queue
git fetch mkp_6.20-scsi-queue

cat backport_mkp_6.2-scsi-queue_into_22.04
2ae45329a956 scsi: smartpqi: Change version to 2.1.20-035
921800a1deea scsi: smartpqi: Initialize feature section info
14063fb625c4 scsi: smartpqi: Add controller cache flush during rmmod
cc9befcbbb5e scsi: smartpqi: Correct device removal for multi-actuator devices
cbe42ac15698 scsi: smartpqi: Change sysfs raid_level attribute to N/A for controllers
7c56850637ea scsi: smartpqi: Correct max LUN number
0b93cf2a9097 scsi: smartpqi: Add new controller PCI IDs
b27ac2faa2fc scsi: smartpqi: Convert to host_tagset

git-backport --sort -d /tmp/patches_mkp ../backport_mkp_6.2-scsi-queue_into_22.04
git am -s /tmp/patches_mkp/*.diff

These also compile.

Don Brace (bracedon)
Changed in linux (Ubuntu):
assignee: nobody → Don Brace (bracedon)
status: Incomplete → New
Don Brace (bracedon)
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1998643

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeff Lane  (bladernr) wrote : Re: smartpqi: Update 22.04 driver to latest kernel.org

Thanks, Don... sorry to ask but to make this easier on me (I'm the one who has to find the time do do this) could you revise the list in the summary with all the desired patches (including the ones from the 6.2 MKP tree) in pick order?

And just to be sure, they all cleanly pick with no missing prerequisites or conflicts?

I will have to sort out what to pick for each affected kernel, as I will have to pull them back from 6.2 -> 5.19.

Also, Gerry said the target was 20.04.2, so that means the 5.19 HWE kernel, yes?

Thanks!

Revision history for this message
Don Brace (bracedon) wrote :

Thanks, Don... sorry to ask but to make this easier on me (I'm the one who has to find the time do do this) could you revise the list in the summary with all the desired patches (including the ones from the 6.2 MKP tree) in pick order?
DON> Sure.

And just to be sure, they all cleanly pick with no missing prerequisites or conflicts?
DON> No conflicts at all. They are now cutting over to 6.2. I have noticed that all are now in linux-next, so I can create the list from linux-next...
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
That will make if really easy. And I'll re-pick them just to be sure.

I will have to sort out what to pick for each affected kernel, as I will have to pull them back from 6.2 -> 5.19.

Also, Gerry said the target was 20.04.2, so that means the 5.19 HWE kernel, yes?
DON> Yes

Thanks!

Revision history for this message
Don Brace (bracedon) wrote :
Download full text (3.3 KiB)

Here is the list I pulled from linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

f54f85dfd757 scsi: smartpqi: Update version to 2.1.18-045
e4b73b3fa2b9 scsi: smartpqi: Update copyright to current year
6d567dfee0b7 scsi: smartpqi: Add ctrl ready timeout module parameter
2d80f4054f7f scsi: smartpqi: Update deleting a LUN via sysfs
cf15c3e734e8 scsi: smartpqi: Add module param to disable managed ints
6ce3cfb365eb scsi: smartpqi: Fix RAID map race condition
69695aeaa662 scsi: smartpqi: Fix DMA direction for RAID requests
85b41834b0f4 scsi: smartpqi: Stop logging spurious PQI reset failures
2a9c2ba2bc47 scsi: smartpqi: Add PCI IDs for Lenovo controllers
44e68c4af5d2 scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i
331f7e998b20 scsi: smartpqi: Fix PCI control linkdown system hang
904f2bfda65e scsi: smartpqi: Add driver support for multi-LUN devices
297bdc540f0e scsi: smartpqi: Close write read holes
dab5378485f6 scsi: smartpqi: Add PCI IDs for ramaxel controllers
1d393227fc76 scsi: smartpqi: Add controller fw version to console log
4e7d26029ee7 scsi: smartpqi: Shorten drive visibility after removal
8946ea283808 scsi: smartpqi: Fix typo in comment
c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer
31b17c3aeb5e scsi: smartpqi: Fix unused variable pqi_pm_ops for clang
62ed6622aaf0 scsi: smartpqi: Update version to 2.1.14-035
291c2e0071ef scsi: smartpqi: Fix lsscsi -t SAS addresses
c66e078ad89e scsi: smartpqi: Fix hibernate and suspend
5e6935864d81 scsi: smartpqi: Fix BUILD_BUG_ON() statements
c52efc923856 scsi: smartpqi: Fix NUMA node not updated during init
00598b056aa6 scsi: smartpqi: Expose SAS address for SATA drives
5d8fbce04d36 scsi: smartpqi: Speed up RAID 10 sequential reads
27655e9db479 scsi: smartpqi: Update volume size after expansion
b73357a1fd39 scsi: smartpqi: Avoid drive spin-down during suspend
42dc0426fbbb scsi: smartpqi: Resolve delay issue with PQI_HZ value
9e98e60bfca3 scsi: smartpqi: Fix a typo in func pqi_aio_submit_io()
b4dc06a9070e scsi: smartpqi: Fix a name typo and cleanup code
94a68c814328 scsi: smartpqi: Quickly propagate path failures to SCSI midlayer
70ba20be4bb1 scsi: smartpqi: Eliminate drive spin down on warm boot
2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs
c57ee4ccb358 scsi: smartpqi: Add PCI IDs
c4ff687d25c0 scsi: smartpqi: Fix rmmod stack trace
64fc9015fbeb scsi: smartpqi: Switch to attribute groups
0ca190805784 scsi: smartpqi: Call scsi_done() directly
2ae45329a956 scsi: smartpqi: Change version to 2.1.20-035
921800a1deea scsi: smartpqi: Initialize feature section info
14063fb625c4 scsi: smartpqi: Add controller cache flush during rmmod
cc9befcbbb5e scsi: smartpqi: Correct device removal for multi-actuator devices
cbe42ac15698 scsi: smartpqi: Change sysfs raid_level attribute to N/A for controllers
7c56850637ea scsi: smartpqi: Correct max LUN number
0b93cf2a9097 scsi: smartpqi: Add new controller PCI IDs
b27ac2faa2fc scsi: smartpqi: Convert to host_tagset

Steps:
1. Save the above list to file git_backport_6.2_scsi-next
2. git remote add linux_next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
3. git fetch linux_next
4. git-backpor...

Read more...

Revision history for this message
Don Brace (bracedon) wrote :

ok, I am spoiled by git-backport.

Here is the list that will work for you.

git cherry-pick -xs 0ca190805784
git cherry-pick -xs 64fc9015fbeb
git cherry-pick -xs c4ff687d25c0
git cherry-pick -xs c57ee4ccb358
git cherry-pick -xs 2a47834d9452
git cherry-pick -xs 70ba20be4bb1
git cherry-pick -xs 94a68c814328
git cherry-pick -xs b4dc06a9070e
git cherry-pick -xs 9e98e60bfca3
git cherry-pick -xs 42dc0426fbbb
git cherry-pick -xs b73357a1fd39
git cherry-pick -xs 27655e9db479
git cherry-pick -xs 5d8fbce04d36
git cherry-pick -xs 00598b056aa6
git cherry-pick -xs c52efc923856
git cherry-pick -xs 5e6935864d81
git cherry-pick -xs c66e078ad89e
git cherry-pick -xs 291c2e0071ef
git cherry-pick -xs 62ed6622aaf0
git cherry-pick -xs 31b17c3aeb5e
git cherry-pick -xs c1ea387d998a
git cherry-pick -xs 8946ea283808
git cherry-pick -xs 4e7d26029ee7
git cherry-pick -xs 1d393227fc76
git cherry-pick -xs dab5378485f6
git cherry-pick -xs 297bdc540f0e
git cherry-pick -xs 904f2bfda65e
git cherry-pick -xs 331f7e998b20
git cherry-pick -xs 44e68c4af5d2
git cherry-pick -xs 2a9c2ba2bc47
git cherry-pick -xs 85b41834b0f4
git cherry-pick -xs 69695aeaa662
git cherry-pick -xs 6ce3cfb365eb
git cherry-pick -xs cf15c3e734e8
git cherry-pick -xs 2d80f4054f7f
git cherry-pick -xs 6d567dfee0b7
git cherry-pick -xs e4b73b3fa2b9
git cherry-pick -xs f54f85dfd757
git cherry-pick -xs b27ac2faa2fc
git cherry-pick -xs 0b93cf2a9097
git cherry-pick -xs 7c56850637ea
git cherry-pick -xs cbe42ac15698
git cherry-pick -xs cc9befcbbb5e
git cherry-pick -xs 14063fb625c4
git cherry-pick -xs 921800a1deea
git cherry-pick -xs 2ae45329a956

Revision history for this message
Don Brace (bracedon) wrote :

Were these git commands useful?

Revision history for this message
Don Brace (bracedon) wrote :

Wondering on the status of this bug.

Jeff Lane  (bladernr)
description: updated
summary: - smartpqi: Update 22.04 driver to latest kernel.org
+ smartpqi: Update 22.04 driver to include recent bug fixes and support
+ current generation devices
Revision history for this message
Jeff Lane  (bladernr) wrote :

Hey Don,

Everything has been accepted by the kernel team. I don't have an eta on when it will be merged, but there's nothing more to do now but wait and eventually this should be updated with a request to test a proposed kernel in the next few weeks.

Revision history for this message
Gerry Morong (morongge) wrote :

Hi Jeff,

Downloaded 22.04.2 daily from today. Still no smartpqi driver update. Hopefully we will make 2/23.

Jeff Lane  (bladernr)
Changed in linux (Ubuntu):
status: Incomplete → In Progress
assignee: Don Brace (bracedon) → Jeff Lane  (bladernr)
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
assignee: nobody → Jeff Lane  (bladernr)
importance: Undecided → Medium
status: New → In Progress
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Committed
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
status: Fix Committed → In Progress
Revision history for this message
Jeff Lane  (bladernr) wrote (last edit ):

Hi Don,

The kernel team tried applying these pulls today and the test builds broke, this is the comment from the update on the mailing list:

Those will be dropped again because they break the build:

https://kernel.ubuntu.com/~kernel-ppa/test-build/jammy/linux/LP%231998643--bf73a7aff8a9516a913af89dc7a3bba77c2de62d/amd64/log

Changed in linux (Ubuntu Jammy):
status: In Progress → Incomplete
Revision history for this message
Don Brace (bracedon) wrote (last edit ):

Ok.

I redacted:
 0ca190805784 scsi: smartpqi: Call scsi_done() directly
 64fc9015fbeb scsi: smartpqi: Switch to attribute groups

Pulling 64fc9015fbeb scsi: smartpqi: Switch to attribute groups meant I had to update
3be5fe354d01 scsi: smartpqi: Enable SATA NCQ priority in sysfs

For some reason I thought they would be added to your latest kernel.

Sorry about that.

Can we try again?

I can give you some git format-patch tarball...

Revision history for this message
Gerry Morong (morongge) wrote :

Hello,

Don started this request at the beginning of December 2022 and it looks like last minute attempts to get the changes in were problematic. Our partner HPE has already reached out to our team and asked why our driver is not updated in the just released 22.04.2. What can we do to get our updated smartpqi driver into a 22.04.2 errata kernel, at least HWE?

Revision history for this message
Jeff Lane  (bladernr) wrote :

Hi Don,

When you say you redacted those two patches, just to be clear you're saying to remove them from the list of patches to apply, correct?

 0ca190805784 scsi: smartpqi: Call scsi_done() directly
 64fc9015fbeb scsi: smartpqi: Switch to attribute groups

I have a member of my team working through them to apply to the current master-next for our 5.15 kernel and he said he's having trouble getting them to pick cleanly and is working through them now.

Revision history for this message
Don Brace (bracedon) wrote :

BTW: I'm sending up 12 new patches today. Will take time for review/inclusion into Linux.

Revision history for this message
Don Brace (bracedon) wrote :

Yes.

Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Don,

I have 2 patches that do not cherry-pick cleanly to the jammy kernel based on master-next tags.

git describe --tags
Ubuntu-5.15.0-72.79-43-gc85205fa6c05

2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs
c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer

Revision history for this message
Michael Reed (mreed8855) wrote (last edit ):

Hi Don,

Here are the changes I made to adjust/backport the first patch. Is this correct?

2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs

drivers/scsi/smartpqi/smartpqi_init.c
@@ -7126,15 +7234,18 @@ static DEVICE_ATTR(sas_address, 0444, pqi_sas_address_show, NULL);
 static DEVICE_ATTR(ssd_smart_path_enabled, 0444, pqi_ssd_smart_path_enabled_show, NULL);
 static DEVICE_ATTR(raid_level, 0444, pqi_raid_level_show, NULL);
 static DEVICE_ATTR(raid_bypass_cnt, 0444, pqi_raid_bypass_cnt_show, NULL);
-
-static struct device_attribute *pqi_sdev_attrs[] = {
- &dev_attr_lunid,
- &dev_attr_unique_id,
- &dev_attr_path_info,
- &dev_attr_sas_address,
- &dev_attr_ssd_smart_path_enabled,
- &dev_attr_raid_level,
- &dev_attr_raid_bypass_cnt,
+static DEVICE_ATTR(sas_ncq_prio_enable, 0644,
+ pqi_sas_ncq_prio_enable_show, pqi_sas_ncq_prio_enable_store);
+
+static struct attribute *pqi_sdev_attrs[] = {
+ &dev_attr_lunid.attr,
+ &dev_attr_unique_id.attr,
+ &dev_attr_path_info.attr,
+ &dev_attr_sas_address.attr,
+ &dev_attr_ssd_smart_path_enabled.attr,
+ &dev_attr_raid_level.attr,
+ &dev_attr_raid_bypass_cnt.attr,
+ &dev_attr_sas_ncq_prio_enable.attr,
  NULL
 };

Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Don,

Here are the changes I made to the second patch

c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer

drivers/scsi/smartpqi/smartpqi_init.c
@@ -7256,8 +7265,9 @@ static struct scsi_host_template pqi_driver_template = {
  .slave_alloc = pqi_slave_alloc,
  .slave_configure = pqi_slave_configure,
  .map_queues = pqi_map_queues,
- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,
+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,
+ .cmd_size = sizeof(struct pqi_cmd_priv),
 };

The issue here is that the added lines cause the build to break. If I didn't add

+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,

and keep

- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,

My guess is that it will build. I haven't tried it yet but wanted some guidance.

Revision history for this message
Don Brace (bracedon) wrote : Re: [Bug 1998643] Re: smartpqi: Update 22.04 driver to include recent bug fixes and support current generation devices
Download full text (5.4 KiB)

Answers below.

________________________________
From: <email address hidden> <email address hidden> on behalf of Michael Reed <email address hidden>
Sent: Wednesday, April 19, 2023 12:21 PM
To: Don Brace - C33706 <email address hidden>
Subject: [Bug 1998643] Re: smartpqi: Update 22.04 driver to include recent bug fixes and support current generation devices

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Hi Don,

Here are the changes I made to the second patch

c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer

drivers/scsi/smartpqi/smartpqi_init.c
@@ -7256,8 +7265,9 @@ static struct scsi_host_template pqi_driver_template = {
        .slave_alloc = pqi_slave_alloc,
        .slave_configure = pqi_slave_configure,
        .map_queues = pqi_map_queues,
- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,
+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,
+ .cmd_size = sizeof(struct pqi_cmd_priv),
 };

The issue here is that the added lines cause the build to break. If I didn't add

+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,

and keep

- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,

My guess is that it will build. I haven't tried it yet but wanted some
guidance.
DON>>>>
That will work.

Great job. This is due to the following patch not applied.
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1998643

Title:
  smartpqi: Update 22.04 driver to include recent bug fixes and support
  current generation devices

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Jammy:
  Incomplete

Bug description:
  [Impact]
  These patches provide bug fixes and add support for the latest generation of OEM PCI devices to ensure customers are able to use Jammy on the recent generations of server hardware. This will bring us in line with the other major linux distros.

  [Fix]
  There are some outstanding patches already in Linus's tree that can be applied to 22.04.
  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

  The following patches apply to
  https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy

  f54f85dfd757 scsi: smartpqi: Update version to 2.1.18-045
  e4b73b3fa2b9 scsi: smartpqi: Update copyright to current year
  6d567dfee0b7 scsi: smartpqi: Add ctrl ready timeout module parameter
  2d80f4054f7f scsi: smartpqi: Update deleting a LUN via sysfs
  cf15c3e734e8 scsi: smartpqi: Add module param to disable managed ints
  6ce3cfb365eb scsi: smartpqi: Fix RAID map race condition
  69695aeaa662 scsi: smartpqi: Fix DMA direction for RAID requests
  85b41834b0f4 scsi: smartpqi: Stop logging spurious PQI reset failures
  2a9c2ba2bc47 scsi: smartpqi: Add PCI IDs for Lenovo controllers
  44e68c4af5d2 scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i
  331f7e998b20 scsi: smartpqi: Fix PCI control linkdown system hang
  904f2bfda65e scsi: smartpqi: Add driver support fo...

Read more...

Revision history for this message
Don Brace (bracedon) wrote :

.sdev_attrs...

That will work.

Great job. This is due to the following patch not applied.
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"

2a47834d9452 scsi: smartpqi: Enable SATA NCQ priority in sysfs
Also due to a contextual difference because of
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"
I'll bet it's because of this HUNK:
@@ -7137,6 +7247,7 @@ static struct attribute *pqi_sdev_attrs[] = {
        &dev_attr_ssd_smart_path_enabled.attr,
        &dev_attr_raid_level.attr,
        &dev_attr_raid_bypass_cnt.attr,
+ &dev_attr_sas_ncq_prio_enable.attr,
        NULL
 };

The structure definition also was changed in this HUNK
-static struct device_attribute *pqi_sdev_attrs[] = {
- &dev_attr_lunid,
- &dev_attr_unique_id,
- &dev_attr_path_info,
- &dev_attr_sas_address,
- &dev_attr_ssd_smart_path_enabled,
- &dev_attr_raid_level,
- &dev_attr_raid_bypass_cnt,
+static struct attribute *pqi_sdev_attrs[] = {
+ &dev_attr_lunid.attr,
+ &dev_attr_unique_id.attr,
+ &dev_attr_path_info.attr,
+ &dev_attr_sas_address.attr,
+ &dev_attr_ssd_smart_path_enabled.attr,
+ &dev_attr_raid_level.attr,
+ &dev_attr_raid_bypass_cnt.attr,
        NULL
 };

So, needs to be
static struct device_attribute *pqi_sdev_attrs[] = {
and remove all of the .attr suffixes.

c1ea387d998a scsi: smartpqi: Stop using the SCSI pointer
Also due to this HUNK
@@ -7262,6 +7271,7 @@ static struct scsi_host_template pqi_driver_template = {
        .map_queues = pqi_map_queues,
        .sdev_groups = pqi_sdev_groups,
        .shost_groups = pqi_shost_groups,
+ .cmd_size = sizeof(struct pqi_cmd_priv),
 };

The context without
patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)"

would be
.shost_attrs = pqi_shost_attrs,
.shost_attrs = pqi_shost_attrs,

The HUNK that changed this is below:
@@ -7153,8 +7157,8 @@ static struct scsi_host_template pqi_driver_template = {
        .slave_alloc = pqi_slave_alloc,
        .slave_configure = pqi_slave_configure,
        .map_queues = pqi_map_queues,
- .sdev_attrs = pqi_sdev_attrs,
- .shost_attrs = pqi_shost_attrs,
+ .sdev_groups = pqi_sdev_groups,
+ .shost_groups = pqi_shost_groups,
 };

Hope this helps.

Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Don,

I re-added this patch "(64fc9015fbeb scsi: smartpqi: Switch to attribute groups)" as it fixed the issues with cherry picking. The need to verify that I need to add this and remove the .attr suffix? This currently builds and it is in the 5.19 kernel as is. I just need to verify that I need to remove the .attr suffix?

static struct attribute *pqi_sdev_attrs[] = {
        &dev_attr_lunid.attr,
        &dev_attr_unique_id.attr,
        &dev_attr_path_info.attr,
        &dev_attr_sas_address.attr,
        &dev_attr_ssd_smart_path_enabled.attr,
        &dev_attr_raid_level.attr,
        &dev_attr_raid_bypass_cnt.attr,
        &dev_attr_sas_ncq_prio_enable.attr,
        NULL
};

Second, this following line breaks the build.

+ .shost_groups = pqi_shost_groups,

I need to know if it is needed? or is there another patch that fixes it or can I just remove it?
When I removed it, the build succeeded.

Michael Reed (mreed8855)
description: updated
Revision history for this message
Michael Reed (mreed8855) wrote :
Michael Reed (mreed8855)
Changed in linux (Ubuntu Jammy):
status: Incomplete → In Progress
Revision history for this message
Don Brace (bracedon) wrote :

Yes. I'll run some tests. I'll let you know.

Revision history for this message
Don Brace (bracedon) wrote :

apt install ./linux-headers-5.15.0-72_5.15.0-72.79_all.deb
apt install ./linux-image-unsigned-5.15.0-72-generic_5.15.0-72.79_amd64.deb ./linux-modules-5.15.0-72-generic_5.15.0-72.79_amd64.deb
# This has smartpqi
apt install ./linux-modules-extra-5.15.0-72-generic_5.15.0-72.79_amd64.deb

reboot

modinfo smartpqi
filename: /lib/modules/5.15.0-72-generic/kernel/drivers/scsi/smartpqi/smartpqi.ko
license: GPL
version: 2.1.20-035
description: Driver for Microchip Smart Family Controller version 2.1.20-035
author: Microchip

The version is correct.

Ran some I/O tests and it looks good.

Revision history for this message
Michael Reed (mreed8855) wrote :

This has been ack'ed by the kernel team and will need to be tested once it hits the proposed kernel.

Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Gerry Morong (morongge) wrote :

Hi Michael and Stefan,
When will a 22.04.2 errata kernel be available with this update driver included? We would like to notify our customers of the minimum kernel errata versions to get the update driver.

Revision history for this message
Gerry Morong (morongge) wrote :

Hi Michael and Stefan,
Do driver updates like this that are applied to base 5.15 and HWE 5.19 kernel of Jammy trickle down to the 20.04.5 HWE 5.15 kernel?

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.15.0-74.81 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux verification-needed-jammy
Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Don,

These patches are currently in the proposed kernel (linux: 5.15.0-74.81). Can you test them in the proposed kernel and verify they are working properly.

Revision history for this message
Michael Reed (mreed8855) wrote :

Hi Gerry,

This is in our currently SRU cycle. https://kernel.ubuntu.com/ If everything goes smoothly then the target release date is June 5. However, that is not guaranteed. I would not notify any of your customers about the driver until it actually gets released.

Revision history for this message
Don Brace (bracedon) wrote :

I cloned your repo and found the driver, however I could not find 5.15.0-74.81 to install.

Any thoughts? 5.15.0-74 does not even have smartpqi.

5.19 has the older driver.

Revision history for this message
Gerry Morong (morongge) wrote :

@mreed8855,
To be clear, we were able to downloaded the 5.15.0-74.81 kernel. However, the smartpqi driver seems to be missing completely from that kernel. How do we proceed? Is there some extra package necessary to the the smartpqi driver?

Revision history for this message
Don Brace (bracedon) wrote :

After installing linux-modules-extra-5.15.0-74-generic

The smartpqi driver is present.

root@drvtest-ProLiant-DL385-Gen11-1:~# uname -r
5.15.0-74-generic
root@drvtest-ProLiant-DL385-Gen11-1:~# modinfo smartpqi | head -4
filename: /lib/modules/5.15.0-74-generic/kernel/drivers/scsi/smartpqi/smartpqi.ko
license: GPL
version: 2.1.20-035
description: Driver for Microchip Smart Family Controller version 2.1.20-035
root@drvtest-ProLiant-DL385-Gen11-1:~# lsscsi
[2:0:0:0] disk ASMT 2115 0 /dev/sda
[3:0:0:0] disk HP EH0450JDYTK HPD0 /dev/sdb
[3:0:1:0] disk HP EH0450JDYTK HPD0 /dev/sdc
[3:0:2:0] disk HP EH0450JDYTK HPD0 /dev/sdd
[3:0:3:0] disk HP EH0450JDYTK HPD0 /dev/sde
[3:0:4:0] disk HP EH0450JDYTK HPD0 /dev/sdf
[3:0:5:0] disk HP EH0450JDYTK HPD0 /dev/sdg
[3:0:6:0] disk HP EH0450JDYTK HPD0 /dev/sdh
[3:0:7:0] disk HP EH0450JDYTK HPD0 /dev/sdi
[3:0:8:0] disk ATA MK000480GZXRA HP00 /dev/sdj
[3:0:9:0] disk ATA MK000480GZXRA HP00 /dev/sdk
[3:0:10:0] disk ATA MK000480GWJPN HP01 /dev/sdl
[3:0:11:0] enclosu HP D3700 5.04 -
[3:0:12:0] enclosu HP D3700 5.04 -
[3:0:13:0] enclosu Adaptec Smart Adapter 0118 -
[3:1:0:0] disk Adaptec LOGICAL VOLUME 0118 /dev/sdm
[3:2:0:0] storage Adaptec 3254-16e 0118 -

I tested insmod/rmmod, I/O testing, reboot testing.

Looks good.

Revision history for this message
Gerry Morong (morongge) wrote :

Michael and Jeff,
I am not sure Don or I have access to change tags to handle the following.

"If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'."

Michael Reed (mreed8855)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-intel-iotg-5.15/5.15.0-1033.38~20.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-intel-iotg-5.15 verification-needed-focal
Revision history for this message
Don Brace (bracedon) wrote :

How are these patches progressing?

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (40.5 KiB)

This bug was fixed in the package linux - 5.15.0-75.82

---------------
linux (5.15.0-75.82) jammy; urgency=medium

  * jammy/linux: 5.15.0-75.82 -proposed tracker (LP: #2023065)

  * Jammy update: v5.15.102 upstream stable release (LP: #2020393)
    - wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext"

  * Packaging resync (LP: #1786013)
    - [Packaging] resync git-ubuntu-log
    - [Packaging] resync getabis

  * fix typo in config-checks invocation (LP: #2020413)
    - [Packaging] fix typo when calling the old config-check
    - [Packaging] fix typo in 4-checks.mk

  * support python < 3.9 with annotations (LP: #2020531)
    - [Packaging] kconfig/annotations.py: support older way of merging dicts

linux (5.15.0-74.81) jammy; urgency=medium

  * jammy/linux: 5.15.0-74.81 -proposed tracker (LP: #2019420)

  * smartpqi: Update 22.04 driver to include recent bug fixes and support
    current generation devices (LP: #1998643)
    - scsi: smartpqi: Switch to attribute groups
    - scsi: smartpqi: Fix rmmod stack trace
    - scsi: smartpqi: Add PCI IDs
    - scsi: smartpqi: Enable SATA NCQ priority in sysfs
    - scsi: smartpqi: Eliminate drive spin down on warm boot
    - scsi: smartpqi: Quickly propagate path failures to SCSI midlayer
    - scsi: smartpqi: Fix a name typo and cleanup code
    - scsi: smartpqi: Fix a typo in func pqi_aio_submit_io()
    - scsi: smartpqi: Resolve delay issue with PQI_HZ value
    - scsi: smartpqi: Avoid drive spin-down during suspend
    - scsi: smartpqi: Update volume size after expansion
    - scsi: smartpqi: Speed up RAID 10 sequential reads
    - scsi: smartpqi: Expose SAS address for SATA drives
    - scsi: smartpqi: Fix NUMA node not updated during init
    - scsi: smartpqi: Fix BUILD_BUG_ON() statements
    - scsi: smartpqi: Fix hibernate and suspend
    - scsi: smartpqi: Fix lsscsi -t SAS addresses
    - scsi: smartpqi: Update version to 2.1.14-035
    - scsi: smartpqi: Fix unused variable pqi_pm_ops for clang
    - scsi: smartpqi: Stop using the SCSI pointer
    - scsi: smartpqi: Fix typo in comment
    - scsi: smartpqi: Shorten drive visibility after removal
    - scsi: smartpqi: Add controller fw version to console log
    - scsi: smartpqi: Add PCI IDs for ramaxel controllers
    - scsi: smartpqi: Close write read holes
    - scsi: smartpqi: Add driver support for multi-LUN devices
    - scsi: smartpqi: Fix PCI control linkdown system hang
    - scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i
    - scsi: smartpqi: Add PCI IDs for Lenovo controllers
    - scsi: smartpqi: Stop logging spurious PQI reset failures
    - scsi: smartpqi: Fix RAID map race condition
    - scsi: smartpqi: Add module param to disable managed ints
    - scsi: smartpqi: Update deleting a LUN via sysfs
    - scsi: smartpqi: Add ctrl ready timeout module parameter
    - scsi: smartpqi: Update copyright to current year
    - scsi: smartpqi: Update version to 2.1.18-045
    - scsi: smartpqi: Convert to host_tagset
    - scsi: smartpqi: Add new controller PCI IDs
    - scsi: smartpqi: Correct max LUN number
    - scsi: smartpqi: Change sysfs raid_level attribute to N/A for controllers
    - scsi: smar...

Changed in linux (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-nvidia-tegra/5.15.0-1015.15 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-nvidia-tegra verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-nvidia-tegra-igx/5.15.0-1001.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-nvidia-tegra-igx
Revision history for this message
Jeff Lane  (bladernr) wrote :

doesn't apply to iotg or tegra kernels

tags: added: verification-done-focal verification-done-jammy
removed: verification-needed-focal verification-needed-jammy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.15.0-1043.50 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-azure verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws/5.15.0-1041.46 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-aws
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws-5.15/5.15.0-1046.51~20.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal-linux-aws-5.15' to 'verification-done-focal-linux-aws-5.15'. If the problem still exists, change the tag 'verification-needed-focal-linux-aws-5.15' to 'verification-failed-focal-linux-aws-5.15'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-aws-5.15-v2 verification-needed-focal-linux-aws-5.15
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.