[libsas] lldd_port_formed question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to understand the intention of the lldd_port_formed
callback from libsas. My assumption was libsas would only call this
function (if defined, of course) once per port, but it appears to be
called for each PHY added to the port. Is that by design or should the
function have an additional check on the number of PHYs in the port?
Something like

diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index 5257fdf..8d61938 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -140,7 +140,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
 		port->port_dev->pathways = port->num_phys;

 	/* Tell the LLDD about this port formation. */
-	if (si->dft->lldd_port_formed)
+	if (si->dft->lldd_port_formed && (port->num_phys == 1))
 		si->dft->lldd_port_formed(phy);

 	sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN);


---chuck
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux