~krzk/ubuntu/+source/linux:hirsute/n/hwe-5.11-scsi-smartpqi

Last commit made on 2021-07-05
Get this branch:
git clone -b hirsute/n/hwe-5.11-scsi-smartpqi https://git.launchpad.net/~krzk/ubuntu/+source/linux
Only Krzysztof Kozlowski can upload to this branch. If you are Krzysztof Kozlowski please log in for upload directions.

Branch merges

Branch information

Name:
hirsute/n/hwe-5.11-scsi-smartpqi
Repository:
lp:~krzk/ubuntu/+source/linux

Recent commits

f4af293... by Bart Van Assche

scsi: smartpqi: Remove unused functions

BugLink: https://bugs.launchpad.net/bugs/1933518

This was detected by building the kernel with clang and W=1.

Link: https://<email address hidden>
Cc: Don Brace <email address hidden>
Signed-off-by: Bart Van Assche <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit c64aab41c5e15063de41b15c0f1e301aef59ae2f)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

2e56092... by Don Brace

scsi: smartpqi: Fix device pointer variable reference static checker issue

BugLink: https://bugs.launchpad.net/bugs/1933518

Dan Carpenter found a possible NULL pointer dereference issue in function
pqi_sas_port_add_rphy():

   drivers/scsi/smartpqi/smartpqi_sas_transport.c:97
   pqi_sas_port_add_rphy() warn: variable dereferenced before
   check 'pqi_sas_port->device' (see line 95)

Correct issue by moving reference of pqi_sas_port->device after the check
for the device pointer being non-NULL.

Link: https://<email address hidden>/msg06329.html
Link: https://lore.kernel.org/r/161850493026.7302.10032784239320437353.stgit@brunhilda
Fixes: ec504b23df9d ("scsi: smartpqi: Add phy ID support for the physical drives")
Reported-by: Dan Carpenter <email address hidden>
Reported-by: kernel test robot <email address hidden>
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 5cad5a507241b4b72b7cad27cf769ac645e53d45)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

aa0a240... by Don Brace

scsi: smartpqi: Fix blocks_per_row static checker issue

BugLink: https://bugs.launchpad.net/bugs/1933518

Dan Carpenter found a possible divide by 0 issue in the smartpqi driver in
functions pci_get_aio_common_raid_map_values() and pqi_calc_aio_r5_or_r6().
The variable rmd->blocks_per_row is used as a divisor and could be 0.

       Using rmd->blocks_per_row as a divisor without checking
       it for 0 first.

Correct these possible divide by 0 conditions by insuring that
rmd->blocks_per_row is not zero before usage. The check for non-0 was too
late to prevent a divide by 0 condition. Add in a comment to explain why
the check for non-zero is necessary. If the member is 0, return
PQI_RAID_BYPASS_INELIGIBLE before any division is performed.

Link: https://lore.kernel.org/linux-scsi/YG%2F5kWHHAr7w5dU5@mwanda/
Link: https://lore.kernel.org/r/161850492435.7302.392780350442938047.stgit@brunhilda
Fixes: 6702d2c40f31 ("scsi: smartpqi: Add support for RAID5 and RAID6 writes")
Reported-by: Dan Carpenter <email address hidden>
Reported-by: kernel test robot <email address hidden>
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 667298ceaf042e28b856478e02cfa2cbe8ed83c6)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

b8632fb... by Don Brace

scsi: smartpqi: Update version to 2.1.8-045

BugLink: https://bugs.launchpad.net/bugs/1933518

Update version.

Link: https://lore.kernel.org/r/161549387469.25025.12859568843576080076.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Gerry Morong <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Reviewed-by: Martin Wilck <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit d56030f882a71e41732b544f98e1735b66a25d35)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

da7d400... by Kevin Barnett <email address hidden>

scsi: smartpqi: Correct system hangs when resuming from hibernation

BugLink: https://bugs.launchpad.net/bugs/1933518

Correct system hangs when resuming from hibernation after first successful
hibernation/resume cycle. Rare condition involving OFA.

Note: Suspend/resume is not supported on many platforms. It was originally
intended for workstations.

Link: https://lore.kernel.org/r/161549386295.25025.14555840632114761610.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Signed-off-by: Kevin Barnett <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 43e97ef482eea96698af5cde99c9d55bbefe225d)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

35157c0... by Murthy Bhat <email address hidden>

scsi: smartpqi: Update enclosure identifier in sysfs

BugLink: https://bugs.launchpad.net/bugs/1933518

Update enclosure identifier field corresponding to physical devices in
lsscsi/sysfs.

During device add the SCSI devtype is filled in during slave_configure().
However, when pqi_scsi_update_device() runs (REGNEWD) the firmware returns
zero for the SCSI devtype field, and valid devtype is overwritten by
zero. Due to this, lsscsi output shows wrong values.

Link: https://lore.kernel.org/r/161549385708.25025.17234953506918043750.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Signed-off-by: Murthy Bhat <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit d0cba99fd7a3781a78f751cfd4f4e3ff4d0b1ea3)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

5711a12... by Kevin Barnett <email address hidden>

scsi: smartpqi: Add additional logging for LUN resets

BugLink: https://bugs.launchpad.net/bugs/1933518

LUN resets can take longer to complete. Adding in more driver logging helps
show where the driver is in the reset process.

Add a timeout in pqi_device_wait_for_pending_io() to cap how long the
driver will wait for outstanding commands.

Link: https://lore.kernel.org/r/161549385119.25025.10366493975709358647.stgit@brunhilda
Reviewed-by: Mahesh Rajashekhara <email address hidden>
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Signed-off-by: Kevin Barnett <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 18ff5f0877be9bf45079691939d2ff7af6e437ae)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

34320e0... by Murthy Bhat <email address hidden>

scsi: smartpqi: Update SAS initiator_port_protocols and target_port_protocols

BugLink: https://bugs.launchpad.net/bugs/1933518

Export valid sas initiator_port_protocols and target_port_protocols to
sysfs. Needed for lsscsi to show correct values.

Link: https://lore.kernel.org/r/161549384532.25025.1469409935400845385.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Reviewed-by: Martin Wilck <email address hidden>
Signed-off-by: Murthy Bhat <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 55732a46d6c5289fb555bbdbff9c7222efd983c1)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

b46136e... by Murthy Bhat <email address hidden>

scsi: smartpqi: Add phy ID support for the physical drives

BugLink: https://bugs.launchpad.net/bugs/1933518

Display topology using PHY numbers. PHY (both local and remote) numbers
corresponding to physical drives are read from
BMIC_IDENTIFY_PHYSICAL_DEVICE.

Link: https://lore.kernel.org/r/161549383947.25025.16977895345376485056.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Kevin Barnett <email address hidden>
Reviewed-by: Martin Wilck <email address hidden>
Signed-off-by: Murthy Bhat <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit ec504b23df9d33260602affc50389cf070707c9b)
Signed-off-by: Krzysztof Kozlowski <email address hidden>

4fc472c... by Kevin Barnett <email address hidden>

scsi: smartpqi: Convert snprintf() to scnprintf()

BugLink: https://bugs.launchpad.net/bugs/1933518

The entire Linux kernel has been slowly migrating from snprintf() to
scnprintf(), so we are doing our part. This article explains the rationale
for this change:

   https: //lwn.net/Articles/69419/

Link: https://lore.kernel.org/r/161549383357.25025.12363435617789964291.stgit@brunhilda
Reviewed-by: Scott Benesh <email address hidden>
Reviewed-by: Mike McGowen <email address hidden>
Reviewed-by: Scott Teel <email address hidden>
Reviewed-by: Martin Wilck <email address hidden>
Signed-off-by: Kevin Barnett <email address hidden>
Signed-off-by: Don Brace <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit a425625277a10dcb039ac05b90202d4f54f824ad)
Signed-off-by: Krzysztof Kozlowski <email address hidden>