mbox series

[v6,0/4] scsi: libsas: Fix the failure of adding phy with zero-address to port

Message ID 20240312141103.31358-1-yangxingui@huawei.com
Headers show
Series scsi: libsas: Fix the failure of adding phy with zero-address to port | expand

Message

yangxingui March 12, 2024, 2:10 p.m. UTC
This series is to solve the problem of a BUG() when adding phy with zero
address to a new port.

v5 -> v6
1. rename sas_add_parent_port() to sas_ex_add_parent_port() based on
   John's suggestion.
2. Distill port settings into a single patch.
3. Update comments information.

v4 -> v5
1. Add new helper sas_port_add_ex_phy() based on John's suggestion.
2. Move sas_add_parent_port() to sas_expander.c based on John's suggestion.
3. Update the comments.

v3 -> v4:
1. Update patch title and comments based on John's suggestion.

v2 -> v3:
1. Set ex_dev->parent_port to NULL when the number of PHYs of the parent
   port becomes 0.
2. Update the comments.

v1 -> v2:
1. Set ex_phy->port with parent_port when ex_phy is added to the parent
   port.
2. Set ex_phy to NULL when free expander.
3. Update the comments.

Xingui Yang (4):
  scsi: libsas: Add helper for port add ex_phy
  scsi: libsas: Move sas_add_parent_port() to sas_expander.c
  scsi: libsas: Set port when ex_phy is added or deleted
  scsi: libsas: Fix the failure of adding phy with zero-address to port

 drivers/scsi/libsas/sas_expander.c | 38 +++++++++++++++++++++++-------
 drivers/scsi/libsas/sas_internal.h | 15 ------------
 2 files changed, 30 insertions(+), 23 deletions(-)

Comments

Martin K. Petersen April 20, 2024, 2:44 p.m. UTC | #1
Xingui,

> This series is to solve the problem of a BUG() when adding phy with zero
> address to a new port.

Applied to 6.10/scsi-staging, thanks!
Martin K. Petersen May 7, 2024, 1:59 a.m. UTC | #2
On Tue, 12 Mar 2024 14:10:59 +0000, Xingui Yang wrote:

> This series is to solve the problem of a BUG() when adding phy with zero
> address to a new port.
> 
> v5 -> v6
> 1. rename sas_add_parent_port() to sas_ex_add_parent_port() based on
>    John's suggestion.
> 2. Distill port settings into a single patch.
> 3. Update comments information.
> 
> [...]

Applied to 6.10/scsi-queue, thanks!

[1/4] scsi: libsas: Add helper for port add ex_phy
      https://git.kernel.org/mkp/scsi/c/888ea1b12b06
[2/4] scsi: libsas: Move sas_add_parent_port() to sas_expander.c
      https://git.kernel.org/mkp/scsi/c/48032c0be6c7
[3/4] scsi: libsas: Set port when ex_phy is added or deleted
      https://git.kernel.org/mkp/scsi/c/7a165a81d55f
[4/4] scsi: libsas: Fix the failure of adding phy with zero-address to port
      https://git.kernel.org/mkp/scsi/c/06036a0a5db3