public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] aic94xx: fix routing algorithms
@ 2006-07-11 15:49 Robert Tarte
  2006-07-11 16:18 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Tarte @ 2006-07-11 15:49 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi


> No ... this is the programme in annex L of sas-2, isn't it?  Even if
it
> were available somewhere, the aic94xx doesn't yet have the necessary
SMP
> tap to try it.

[Tarte, Robert] I wrote an expander simulator that I ran in user space
for the adp94xx.  I extracted the routing code from the adp94xx driver
and ran through numerous configurations hand checking the table to make
sure that it came up with the right answer.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [PATCH] aic94xx: fix routing algorithms
@ 2006-07-11  8:30 Robert Tarte
  2006-07-11 12:54 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Tarte @ 2006-07-11  8:30 UTC (permalink / raw)
  To: James Bottomley, linux-scsi

> I've been trying to work out for a while why certain cascaded expander
> configurations work with the mptsas, but don't with the aic94xx.
> Eventually I discovered that the non-functional configurations are the
> ones where the cascaded expander is connected to the parent on table
> routed ports.  The problem is that the aic94xx routing algorithms
never
> seem to consider the necessity of a route back to the HBA.  This patch
> adds such a routing configuration, and now (at least for all my
> configurations) the hitherto unseen disks become visible.

[Tarte, Robert] There is a very specific algorithm for programming the
routing tables to avoid routing table thrashing in a mixed OS / adapter
multi-initiator environments (the last one I looked at was from the
SAS-1.1 draft, sas1r07.pdf, project T10/1601-D,
SASDiscoverSimulation.cpp or see section 4.8.7).  I had always assumed
that the original route table configuration code adhered to that
algorithm.  Has this patch been verified against that algorithm?  Or
does it now come up with the exact same route tables as mptsas? When you
say table routed ports, you mean that both the upstream and down stream
expanders are configured as table routed?


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] aic94xx: fix routing algorithms
@ 2006-07-09 20:41 James Bottomley
  0 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2006-07-09 20:41 UTC (permalink / raw)
  To: linux-scsi

I've been trying to work out for a while why certain cascaded expander
configurations work with the mptsas, but don't with the aic94xx.
Eventually I discovered that the non-functional configurations are the
ones where the cascaded expander is connected to the parent on table
routed ports.  The problem is that the aic94xx routing algorithms never
seem to consider the necessity of a route back to the HBA.  This patch
adds such a routing configuration, and now (at least for all my
configurations) the hitherto unseen disks become visible.

James

diff --git a/drivers/scsi/sas/sas_expander.c b/drivers/scsi/sas/sas_expander.c
index 10e0879..0dbeca5 100644
--- a/drivers/scsi/sas/sas_expander.c
+++ b/drivers/scsi/sas/sas_expander.c
@@ -33,6 +33,8 @@ #include "../scsi_sas_internal.h"
 
 static int sas_discover_expander(struct domain_device *dev);
 static int sas_configure_routing(struct domain_device *dev, u8 *sas_addr);
+static int sas_configure_phy(struct domain_device *dev, int phy_id,
+			     u8 *sas_addr, int include);
 static int sas_disable_routing(struct domain_device *dev,  u8 *sas_addr);
 
 #if 0
@@ -723,6 +725,8 @@ static int sas_ex_discover_dev(struct do
 	if (dev->parent && (SAS_ADDR(ex_phy->attached_sas_addr) ==
 			    SAS_ADDR(dev->parent->sas_addr))) {
 		sas_add_parent_port(dev, phy_id);
+		if (ex_phy->routing_attr == TABLE_ROUTING)
+			sas_configure_phy(dev, phy_id, dev->port->sas_addr, 1);
 		return 0;
 	}
 



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

end of thread, other threads:[~2006-07-11 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 15:49 [PATCH] aic94xx: fix routing algorithms Robert Tarte
2006-07-11 16:18 ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2006-07-11  8:30 Robert Tarte
2006-07-11 12:54 ` James Bottomley
2006-07-09 20:41 James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox