All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] mpt3sas: Add support for multi-port path topology
@ 2020-10-09 17:14 Sreekanth Reddy
  2020-10-09 17:14 ` [PATCH 01/14] mpt3sas: Define hba_port structure Sreekanth Reddy
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Sreekanth Reddy @ 2020-10-09 17:14 UTC (permalink / raw)
  To: martin.petersen
  Cc: linux-scsi, sathya.prakash, suganath-prabu.subramani, Sreekanth Reddy

[-- Attachment #1: Type: text/plain, Size: 4278 bytes --]

Multi-port path topology example:
    
         Zone 1             Zone 2
 |-----------------|   |----------------|
 |  HD1 ..... HD25 |   | HD26 ......HD50|
 | |==================================| |
 | |               |   |              | |
 | |              Expander            | |
 | |==================================| |
 |           |     |   |    |           |
 |-----------|-----|   |----|-----------|
           x8|              |x8 
      _______|______________|_______
      |            HBA             |
      |____________________________|

In this topology, zoning is enabled in such a way that drives from HD1
to HD25 are accessible only through zone1 and drives from HD26 to HD50 are
accessible only through zone2. Here the first x8 connection bw HBA to
Expander in zone1 will have one PortID and second x8 connection bw HBA to
Expander in Zone2 will another PortID.

Problem statement:
When zoning is enabled in expander then we will have two expander
instances (for a single real expander), one instance is accessible through
the first x8 connection and second instance is accessible through
second x8 connection from HBA. But for both the instances the
SAS Address of the expander will be the same.
But in current mpt3sas driver, driver add's only one expander instance,
when second expander instance's 'add' event comes then driver ignores
this event assumues that it is duplicate instance as it already
has a sas_expander object in it's sas_expander_list list with
the same SAS Address. So in this topology users will see only 25 drives
instead of 50 drives.

Current mpt3sas driver use ‘SAS Address’ as a key to uniquely identify
the End devices or Expander devices, but on the multi-port path topologies
(such as above topology) HBA firmware will provide multiple device entries
with different Device handles for a single device.
So here driver can't use ‘SAS Address’ as a key instead driver can use
‘SAS Address’ & ‘PhysicalPort (i.e. PortID)’ number as key to uniquely
identify the device.

where, PhysicalPort is a HBA port number through which the device is
accessible.

Solution:
Now driver uses both 'SAS Address' & 'PhysicalPort' number as a key to
uniquely identify the device object from the corresponding device
list's. So, when 'add' event comes for second instance of expander,
now driver can't find the sas_expander object with same 'SAS Address' &
'PhysicalPort' number (since for this second instance PhysicalPort
number will be different from first instance's PhysicalPort number)
from the sas_expander_list list. So the driver processes this event and
will create a new sas_expander object for this expander instance
and adds it sas_expander_list.
With this solution, the driver will have two sas_expander objects, one
object is for the first instance of the expander, another object is for
second instance of the driver. Now users will access all 50 drives from
above topology.

Like device SAS Address, PhysicalPort number is readily available
from below config pages,
* SAS IO Unit Page 0,
* SAS Device Page 0,
* SAS Expander Page 0,
* SAS Phy Page 0, etc

Through this patch set, the driver now manages the sas_device &
sas_expander objects using 'SAS Address' & 'PhysicalPort'
number as key.

Sreekanth Reddy (14):
  mpt3sas: Define hba_port structure
  mpt3sas: Allocate memory for hba_port objects
  mpt3sas: Rearrange _scsih_mark_responding_sas_device()
  mpt3sas: Update hba_port's sas_address & phy_mask
  mpt3sas: Get device objects using sas_address & portID
  mpt3sas: Rename transport_del_phy_from_an_existing_port
  mpt3sas: Get sas_device objects using device's rphy
  mpt3sas: Update hba_port objects after host reset
  mpt3sas: Set valid PhysicalPort in SMPPassThrough
  mpt3sas: Handling HBA vSES device
  mpt3sas: Add bypass_dirty_port_flag parameter
  mpt3sas: Handle vSES vphy object during HBA reset
  mpt3sas: add module parameter multipath_on_hba
  mpt3sas: Bump driver version to 35.101.00.00

 drivers/scsi/mpt3sas/mpt3sas_base.h      |  102 +-
 drivers/scsi/mpt3sas/mpt3sas_ctl.c       |    6 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c     | 1237 +++++++++++++++++++---
 drivers/scsi/mpt3sas/mpt3sas_transport.c |  312 +++++-
 4 files changed, 1455 insertions(+), 202 deletions(-)

-- 
2.18.4


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4175 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-10-12 12:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 17:14 [PATCH 00/14] mpt3sas: Add support for multi-port path topology Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 01/14] mpt3sas: Define hba_port structure Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 02/14] mpt3sas: Allocate memory for hba_port objects Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 03/14] mpt3sas: Rearrange _scsih_mark_responding_sas_device() Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 04/14] mpt3sas: Update hba_port's sas_address & phy_mask Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 05/14] mpt3sas: Get device objects using sas_address & portID Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 06/14] mpt3sas: Rename transport_del_phy_from_an_existing_port Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 07/14] mpt3sas: Get sas_device objects using device's rphy Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 08/14] mpt3sas: Update hba_port objects after host reset Sreekanth Reddy
2020-10-12 12:22   ` Dan Carpenter
2020-10-12 12:22     ` Dan Carpenter
2020-10-12 12:22     ` Dan Carpenter
2020-10-09 17:14 ` [PATCH 09/14] mpt3sas: Set valid PhysicalPort in SMPPassThrough Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 10/14] mpt3sas: Handling HBA vSES device Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 11/14] mpt3sas: Add bypass_dirty_port_flag parameter Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 12/14] mpt3sas: Handle vSES vphy object during HBA reset Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 13/14] mpt3sas: add module parameter multipath_on_hba Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 14/14] mpt3sas: Bump driver version to 35.101.00.00 Sreekanth Reddy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.