public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] libsas: Allow expander T-T attachments
@ 2011-07-28  4:19 Luben Tuikov
  2011-07-28  6:46 ` Jack Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Luben Tuikov @ 2011-07-28  4:19 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	JBottomley@Parallels.com

Allow expander table-to-table attachments for
expanders that support it.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
 include/scsi/libsas.h              |    3 +++
 include/scsi/sas.h                 |   14 ++++++++++++--
 3 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index f84084b..e8d0115 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
     dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
     dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
     dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
+    dev->ex_dev.t2t_supp = rg->t2t_supp;
     dev->ex_dev.conf_route_table = rg->conf_route_table;
     dev->ex_dev.configuring = rg->configuring;
     memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
@@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
     };
     struct domain_device *parent = child->parent;
 
-    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
-           "has %c:%c routing link!\n",
+    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
+           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
 
            ex_type[parent->dev_type],
            SAS_ADDR(parent->sas_addr),
+           parent->ex_dev.t2t_supp,
            parent_phy->phy_id,
 
            ex_type[child->dev_type],
            SAS_ADDR(child->sas_addr),
+           child->ex_dev.t2t_supp,
            child_phy->phy_id,
 
            ra_char[parent_phy->routing_attr],
@@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct domain_device *child)
                     sas_print_parent_topology_bug(child, parent_phy, child_phy);
                     res = -ENODEV;
                 }
-            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
-                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
-                sas_print_parent_topology_bug(child, parent_phy, child_phy);
-                res = -ENODEV;
+            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
+                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
+                    (child_phy->routing_attr == TABLE_ROUTING &&
+                     child_ex->t2t_supp && parent_ex->t2t_supp)) {
+                    /* All good */;
+                } else {
+                    sas_print_parent_topology_bug(child, parent_phy, child_phy);
+                    res = -ENODEV;
+                }
             }
             break;
         case FANOUT_DEV:
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index ee86606..793f80b 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -142,8 +142,11 @@ struct expander_device {
     u16    ex_change_count;
     u16    max_route_indexes;
     u8     num_phys;
+
+    u8     t2t_supp:1;
     u8     configuring:1;
     u8     conf_route_table:1;
+
     u8     enclosure_logical_id[8];
 
     struct ex_phy *ex_phy;
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index e9fd022..f59f182 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -341,7 +341,12 @@ struct report_general_resp {
 
     u8      conf_route_table:1;
     u8      configuring:1;
-    u8      _r_b:6;
+    u8    config_others:1;
+    u8    orej_retry_supp:1;
+    u8    stp_cont_awt:1;
+    u8    self_config:1;
+    u8    zone_config:1;
+    u8    t2t_supp:1;
 
     u8      _r_c;
 
@@ -528,7 +533,12 @@ struct report_general_resp {
     u8      _r_a;
     u8      num_phys;
 
-    u8      _r_b:6;
+    u8    t2t_supp:1;
+    u8    zone_config:1;
+    u8    self_config:1;
+    u8    stp_cont_awt:1;
+    u8    orej_retry_supp:1;
+    u8    config_others:1;
     u8      configuring:1;
     u8      conf_route_table:1;
 
-- 
1.7.2.2.165.gbc382

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

* RE: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-07-28  4:19 [PATCH] [SCSI] libsas: Allow expander T-T attachments Luben Tuikov
@ 2011-07-28  6:46 ` Jack Wang
  2011-07-28  7:52 ` James Bottomley
  2011-09-22 11:30 ` James Bottomley
  2 siblings, 0 replies; 22+ messages in thread
From: Jack Wang @ 2011-07-28  6:46 UTC (permalink / raw)
  To: 'Luben Tuikov', linux-scsi, linux-kernel, JBottomley

> 
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
>  drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
>  include/scsi/libsas.h              |    3 +++
>  include/scsi/sas.h                 |   14 ++++++++++++--
>  3 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c
> b/drivers/scsi/libsas/sas_expander.c
> index f84084b..e8d0115 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct
domain_device
> *dev,
>      dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
>      dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
>      dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
> +    dev->ex_dev.t2t_supp = rg->t2t_supp;
>      dev->ex_dev.conf_route_table = rg->conf_route_table;
>      dev->ex_dev.configuring = rg->configuring;
>      memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id,
> 8);
> @@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct
> domain_device *child,
>      };
>      struct domain_device *parent = child->parent;
> 
> -    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
> -           "has %c:%c routing link!\n",
> +    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
> +           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
> 
>             ex_type[parent->dev_type],
>             SAS_ADDR(parent->sas_addr),
> +           parent->ex_dev.t2t_supp,
>             parent_phy->phy_id,
> 
>             ex_type[child->dev_type],
>             SAS_ADDR(child->sas_addr),
> +           child->ex_dev.t2t_supp,
>             child_phy->phy_id,
> 
>             ra_char[parent_phy->routing_attr],
> @@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct
> domain_device *child)
>                      sas_print_parent_topology_bug(child, parent_phy,
> child_phy);
>                      res = -ENODEV;
>                  }
> -            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
> -                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
> -                sas_print_parent_topology_bug(child, parent_phy,
> child_phy);
> -                res = -ENODEV;
> +            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
> +                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
> +                    (child_phy->routing_attr == TABLE_ROUTING &&
> +                     child_ex->t2t_supp && parent_ex->t2t_supp)) {
> +                    /* All good */;
> +                } else {
> +                    sas_print_parent_topology_bug(child, parent_phy,
> child_phy);
> +                    res = -ENODEV;
> +                }
>              }
>              break;
>          case FANOUT_DEV:
> diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
> index ee86606..793f80b 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -142,8 +142,11 @@ struct expander_device {
>      u16    ex_change_count;
>      u16    max_route_indexes;
>      u8     num_phys;
> +
> +    u8     t2t_supp:1;
>      u8     configuring:1;
>      u8     conf_route_table:1;
> +
>      u8     enclosure_logical_id[8];
> 
>      struct ex_phy *ex_phy;
> diff --git a/include/scsi/sas.h b/include/scsi/sas.h
> index e9fd022..f59f182 100644
> --- a/include/scsi/sas.h
> +++ b/include/scsi/sas.h
> @@ -341,7 +341,12 @@ struct report_general_resp {
> 
>      u8      conf_route_table:1;
>      u8      configuring:1;
> -    u8      _r_b:6;
> +    u8    config_others:1;
> +    u8    orej_retry_supp:1;
> +    u8    stp_cont_awt:1;
> +    u8    self_config:1;
> +    u8    zone_config:1;
> +    u8    t2t_supp:1;
> 
>      u8      _r_c;
> 
> @@ -528,7 +533,12 @@ struct report_general_resp {
>      u8      _r_a;
>      u8      num_phys;
> 
> -    u8      _r_b:6;
> +    u8    t2t_supp:1;
> +    u8    zone_config:1;
> +    u8    self_config:1;
> +    u8    stp_cont_awt:1;
> +    u8    orej_retry_supp:1;
> +    u8    config_others:1;
>      u8      configuring:1;
>      u8      conf_route_table:1;
> 

[Jack Wang] Looks nice to me ,thanks for doing this.
Reviewed-by: Jack Wang <jack_wang@usish.com>


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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-07-28  4:19 [PATCH] [SCSI] libsas: Allow expander T-T attachments Luben Tuikov
  2011-07-28  6:46 ` Jack Wang
@ 2011-07-28  7:52 ` James Bottomley
  2011-09-21  0:50   ` Dan Williams
  2011-09-22 11:30 ` James Bottomley
  2 siblings, 1 reply; 22+ messages in thread
From: James Bottomley @ 2011-07-28  7:52 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 4779 bytes --]

On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
> Allow expander table-to-table attachments for
> expanders that support it.

This is half the code to do SAS 2.0 expanders.  You seem to have
additions from the other half (self configuring expanders) see below;
does this mean you have a patch for self configuring expanders in the
works?

> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
>  drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
>  include/scsi/libsas.h              |    3 +++
>  include/scsi/sas.h                 |   14 ++++++++++++--
>  3 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index f84084b..e8d0115 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
>      dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
>      dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
>      dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
> +    dev->ex_dev.t2t_supp = rg->t2t_supp;
>      dev->ex_dev.conf_route_table = rg->conf_route_table;
>      dev->ex_dev.configuring = rg->configuring;
>      memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
> @@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
>      };
>      struct domain_device *parent = child->parent;
>  
> -    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
> -           "has %c:%c routing link!\n",
> +    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
> +           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
>  
>             ex_type[parent->dev_type],
>             SAS_ADDR(parent->sas_addr),
> +           parent->ex_dev.t2t_supp,
>             parent_phy->phy_id,
>  
>             ex_type[child->dev_type],
>             SAS_ADDR(child->sas_addr),
> +           child->ex_dev.t2t_supp,
>             child_phy->phy_id,
>  
>             ra_char[parent_phy->routing_attr],
> @@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct domain_device *child)
>                      sas_print_parent_topology_bug(child, parent_phy, child_phy);
>                      res = -ENODEV;
>                  }
> -            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
> -                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
> -                sas_print_parent_topology_bug(child, parent_phy, child_phy);
> -                res = -ENODEV;
> +            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
> +                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
> +                    (child_phy->routing_attr == TABLE_ROUTING &&
> +                     child_ex->t2t_supp && parent_ex->t2t_supp)) {
> +                    /* All good */;
> +                } else {
> +                    sas_print_parent_topology_bug(child, parent_phy, child_phy);
> +                    res = -ENODEV;
> +                }
>              }
>              break;
>          case FANOUT_DEV:
> diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
> index ee86606..793f80b 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -142,8 +142,11 @@ struct expander_device {
>      u16    ex_change_count;
>      u16    max_route_indexes;
>      u8     num_phys;
> +
> +    u8     t2t_supp:1;
>      u8     configuring:1;
>      u8     conf_route_table:1;
> +
>      u8     enclosure_logical_id[8];
>  
>      struct ex_phy *ex_phy;
> diff --git a/include/scsi/sas.h b/include/scsi/sas.h
> index e9fd022..f59f182 100644
> --- a/include/scsi/sas.h
> +++ b/include/scsi/sas.h
> @@ -341,7 +341,12 @@ struct report_general_resp {
>  
>      u8      conf_route_table:1;
>      u8      configuring:1;
> -    u8      _r_b:6;
> +    u8    config_others:1;
> +    u8    orej_retry_supp:1;
> +    u8    stp_cont_awt:1;
> +    u8    self_config:1;
> +    u8    zone_config:1;
> +    u8    t2t_supp:1;

>      u8      _r_c;
>  
> @@ -528,7 +533,12 @@ struct report_general_resp {
>      u8      _r_a;
>      u8      num_phys;
>  
> -    u8      _r_b:6;
> +    u8    t2t_supp:1;
> +    u8    zone_config:1;
> +    u8    self_config:1;
> +    u8    stp_cont_awt:1;
> +    u8    orej_retry_supp:1;
> +    u8    config_others:1;
>      u8      configuring:1;
>      u8      conf_route_table:1;
>  

These are all SAS2.0 additions to the reserved fields, but you only make
use of one of them.

James

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-07-28  7:52 ` James Bottomley
@ 2011-09-21  0:50   ` Dan Williams
  0 siblings, 0 replies; 22+ messages in thread
From: Dan Williams @ 2011-09-21  0:50 UTC (permalink / raw)
  To: James Bottomley
  Cc: Luben Tuikov, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Mark Salyzyn

On Thu, Jul 28, 2011 at 12:52 AM, James Bottomley
<jbottomley@parallels.com> wrote:
> On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
>> Allow expander table-to-table attachments for
>> expanders that support it.
>
> This is half the code to do SAS 2.0 expanders.  You seem to have
> additions from the other half (self configuring expanders) see below;
> does this mean you have a patch for self configuring expanders in the
> works?

I'd like to see that as well, but in the meantime support for the
other SAS-2 fields does not block basic operation like the lack of
table-to-table support does.

Can we also tag this for -stable?  It's akin to a pci device id update
in terms of impact.

Acked-by: Dan Williams <dan.j.williams@intel.com>

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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-07-28  4:19 [PATCH] [SCSI] libsas: Allow expander T-T attachments Luben Tuikov
  2011-07-28  6:46 ` Jack Wang
  2011-07-28  7:52 ` James Bottomley
@ 2011-09-22 11:30 ` James Bottomley
  2011-09-22 15:04   ` Mark Salyzyn
  2011-09-22 16:41   ` [RESEND] " Luben Tuikov
  2 siblings, 2 replies; 22+ messages in thread
From: James Bottomley @ 2011-09-22 11:30 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 541 bytes --]

On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>

OK, so now I need an applyable patch, please.  It looks like the mail
server has mapped all tabs to spaces.  If you can't fix the mailer, just
sending the patch as an attachment is fine.

James

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* RE: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 11:30 ` James Bottomley
@ 2011-09-22 15:04   ` Mark Salyzyn
  2011-09-22 16:30     ` Luben Tuikov
  2011-09-22 16:35     ` Luben Tuikov
  2011-09-22 16:41   ` [RESEND] " Luben Tuikov
  1 sibling, 2 replies; 22+ messages in thread
From: Mark Salyzyn @ 2011-09-22 15:04 UTC (permalink / raw)
  To: James Bottomley, Luben Tuikov
  Cc: linux-scsi, linux-kernel, Darrick Wong, Xiangliang Yu, Jack Wang

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

Enclosed is an updated patch that passes checkpatch.pl (a few 80-character line errors in the original), maintain existing indent mechanics and contains my 'Ack' and the recommended Cc list.

Wait for Luben's Ack or Override (despite the fact I took the liberty of adding his Signed-off-by on the checkpatch required adjustments).

Sincerely -- Mark Salyzyn 

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of James Bottomley
Sent: Thursday, September 22, 2011 7:30 AM
To: Luben Tuikov
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments

On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>

OK, so now I need an applyable patch, please.  It looks like the mail
server has mapped all tabs to spaces.  If you can't fix the mailer, just
sending the patch as an attachment is fine.

James

NrybXǧv^)޺{.n+{"{ay\x1dʇڙ,j fhz\x1ew\fj:+vwjm zZ+ݢj"!

______________________________________________________________________
This email may contain privileged or confidential information, which should only be used for the purpose for which it was sent by Xyratex. No further rights or licenses are granted to use such information. If you are not the intended recipient of this message, please notify the sender by return and delete it. You may not use, copy, disclose or rely on the information contained in it.
 
Internet email is susceptible to data corruption, interception and unauthorised amendment for which Xyratex does not accept liability. While we have taken reasonable precautions to ensure that this email is free of viruses, Xyratex does not accept liability for the presence of any computer viruses in this email, nor for any losses caused as a result of viruses.
 
Xyratex Technology Limited (03134912), Registered in England & Wales, Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
 
The Xyratex group of companies also includes, Xyratex Ltd, registered in Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in The People's Republic of China and Xyratex Japan Limited registered in Japan.
______________________________________________________________________
 


[-- Attachment #2: libsas_t2t.patch --]
[-- Type: application/octet-stream, Size: 4154 bytes --]

Allow expander table-to-table attachments for expanders that support it. [LT]
Adjusted to pass checkpatch.pl. [MS]

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Cc: Darrick J Wong <djwong@us.ibm.com>
Cc: James Bottomley <jbottomley@parallels.com>
Cc: Xiangliang Yu <yuxiangl@marvell.com>
Cc: Jack Wang <jack_wang@usish.com>
Acked-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>

 drivers/scsi/libsas/sas_expander.c |   24 ++++++++++++++++++------
 include/scsi/libsas.h              |    3 +++
 include/scsi/sas.h                 |   14 ++++++++++++--
 3 files changed, 33 insertions(+), 8 deletions(-)

diff -rup scsi-misc-2.6/drivers/scsi/libsas/sas_expander.c scsi-misc-2.6.new/drivers/scsi/libsas/sas_expander.c
--- scsi-misc-2.6/drivers/scsi/libsas/sas_expander.c	2011-08-31 08:32:21.000000000 -0400
+++ scsi-misc-2.6.new/drivers/scsi/libsas/sas_expander.c	2011-09-22 10:49:08.000000000 -0400
@@ -329,6 +329,7 @@ static void ex_assign_report_general(str
 	dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
 	dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
 	dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
+	dev->ex_dev.t2t_supp = rg->t2t_supp;
 	dev->ex_dev.conf_route_table = rg->conf_route_table;
 	dev->ex_dev.configuring = rg->configuring;
 	memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
@@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bu
 	};
 	struct domain_device *parent = child->parent;
 
-	sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
-		   "has %c:%c routing link!\n",
+	sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
+		   "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
 
 		   ex_type[parent->dev_type],
 		   SAS_ADDR(parent->sas_addr),
+		   parent->ex_dev.t2t_supp,
 		   parent_phy->phy_id,
 
 		   ex_type[child->dev_type],
 		   SAS_ADDR(child->sas_addr),
+		   child->ex_dev.t2t_supp,
 		   child_phy->phy_id,
 
 		   ra_char[parent_phy->routing_attr],
@@ -1238,10 +1241,19 @@ static int sas_check_parent_topology(str
 					sas_print_parent_topology_bug(child, parent_phy, child_phy);
 					res = -ENODEV;
 				}
-			} else if (parent_phy->routing_attr == TABLE_ROUTING &&
-				   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
-				sas_print_parent_topology_bug(child, parent_phy, child_phy);
-				res = -ENODEV;
+			} else if (parent_phy->routing_attr == TABLE_ROUTING) {
+				if (child_phy->routing_attr ==
+							SUBTRACTIVE_ROUTING ||
+				    (child_phy->routing_attr ==
+							TABLE_ROUTING &&
+				     child_ex->t2t_supp &&
+				     parent_ex->t2t_supp)) {
+					/* All good */;
+				} else {
+					sas_print_parent_topology_bug(child,
+						parent_phy, child_phy);
+					res = -ENODEV;
+				}
 			}
 			break;
 		case FANOUT_DEV:
diff -rup scsi-misc-2.6/include/scsi/libsas.h scsi-misc-2.6.new/include/scsi/libsas.h
--- scsi-misc-2.6/include/scsi/libsas.h	2011-08-31 08:32:22.000000000 -0400
+++ scsi-misc-2.6.new/include/scsi/libsas.h	2011-09-22 10:38:08.000000000 -0400
@@ -142,8 +142,11 @@ struct expander_device {
 	u16    ex_change_count;
 	u16    max_route_indexes;
 	u8     num_phys;
+
+	u8     t2t_supp:1;
 	u8     configuring:1;
 	u8     conf_route_table:1;
+
 	u8     enclosure_logical_id[8];
 
 	struct ex_phy *ex_phy;
diff -rup scsi-misc-2.6/include/scsi/sas.h scsi-misc-2.6.new/include/scsi/sas.h
--- scsi-misc-2.6/include/scsi/sas.h	2011-08-31 08:32:22.000000000 -0400
+++ scsi-misc-2.6.new/include/scsi/sas.h	2011-09-22 10:36:54.000000000 -0400
@@ -341,7 +341,12 @@ struct report_general_resp {
 
 	u8      conf_route_table:1;
 	u8      configuring:1;
-	u8      _r_b:6;
+	u8      config_others:1;
+	u8      orej_retry_supp:1;
+	u8      stp_count_awt:1;
+	u8      self_config:1;
+	u8      zone_config:1;
+	u8      t2t_supp:1;
 
 	u8      _r_c;
 
@@ -528,7 +533,12 @@ struct report_general_resp {
 	u8      _r_a;
 	u8      num_phys;
 
-	u8      _r_b:6;
+	u8      t2t_supp:1;
+	u8      zone_config:1;
+	u8      self_config:1;
+	u8      stp_count_awt:1;
+	u8      orej_retry_supp:1;
+	u8      config_others:1;
 	u8      configuring:1;
 	u8      conf_route_table:1;
 

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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 15:04   ` Mark Salyzyn
@ 2011-09-22 16:30     ` Luben Tuikov
  2011-09-22 16:35     ` Luben Tuikov
  1 sibling, 0 replies; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 16:30 UTC (permalink / raw)
  To: Mark Salyzyn
  Cc: James Bottomley, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Darrick Wong, Xiangliang Yu,
	Jack Wang

Isn't this my own patch? Shouldn't have I regenerated it and sent of off? Is it common here to have other people generate other people's patches? I think that not very professional. 

James, you should apply the patch I'm about to send. Same one, tabs fixed. 

        Luben


On Sep 22, 2011, at 8:04, "Mark Salyzyn" <mark_salyzyn@us.xyratex.com> wrote:

> Enclosed is an updated patch that passes checkpatch.pl (a few 80-character line errors in the original), maintain existing indent mechanics and contains my 'Ack' and the recommended Cc list.
> 
> Wait for Luben's Ack or Override (despite the fact I took the liberty of adding his Signed-off-by on the checkpatch required adjustments).
> 
> Sincerely -- Mark Salyzyn 
> 
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of James Bottomley
> Sent: Thursday, September 22, 2011 7:30 AM
> To: Luben Tuikov
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
>> Allow expander table-to-table attachments for
>> expanders that support it.
>> 
>> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> 
> OK, so now I need an applyable patch, please.  It looks like the mail
> server has mapped all tabs to spaces.  If you can't fix the mailer, just
> sending the patch as an attachment is fine.
> 
> James
> 
> NrybXǧv^)޺{.n+{"{ay\x1dʇڙ,j fhz\x1ew\fj:+vwjm zZ+ݢj"!
> 
> ______________________________________________________________________
> This email may contain privileged or confidential information, which should only be used for the purpose for which it was sent by Xyratex. No further rights or licenses are granted to use such information. If you are not the intended recipient of this message, please notify the sender by return and delete it. You may not use, copy, disclose or rely on the information contained in it.
> 
> Internet email is susceptible to data corruption, interception and unauthorised amendment for which Xyratex does not accept liability. While we have taken reasonable precautions to ensure that this email is free of viruses, Xyratex does not accept liability for the presence of any computer viruses in this email, nor for any losses caused as a result of viruses.
> 
> Xyratex Technology Limited (03134912), Registered in England & Wales, Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
> 
> The Xyratex group of companies also includes, Xyratex Ltd, registered in Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in The People's Republic of China and Xyratex Japan Limited registered in Japan.
> ______________________________________________________________________
> 
> 
> <libsas_t2t.patch>

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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 15:04   ` Mark Salyzyn
  2011-09-22 16:30     ` Luben Tuikov
@ 2011-09-22 16:35     ` Luben Tuikov
  2011-09-22 17:03       ` Christoph Hellwig
  1 sibling, 1 reply; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 16:35 UTC (permalink / raw)
  To: Mark Salyzyn, James Bottomley
  Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Darrick Wong, Xiangliang Yu, Jack Wang

Salyzyn, DON'T do this any more with mine or anybody else's patches. OKAY?



----- Original Message -----
> From: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
> To: James Bottomley <jbottomley@parallels.com>; Luben Tuikov <ltuikov@yahoo.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Darrick Wong <djwong@us.ibm.com>; Xiangliang Yu <yuxiangl@marvell.com>; Jack Wang <jack_wang@usish.com>
> Sent: Thursday, September 22, 2011 8:04 AM
> Subject: RE: [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> Enclosed is an updated patch that passes checkpatch.pl (a few 80-character line 
> errors in the original), maintain existing indent mechanics and contains my 
> 'Ack' and the recommended Cc list.
> 
> Wait for Luben's Ack or Override (despite the fact I took the liberty of 
> adding his Signed-off-by on the checkpatch required adjustments).
> 
> Sincerely -- Mark Salyzyn 
> 
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] 
> On Behalf Of James Bottomley
> Sent: Thursday, September 22, 2011 7:30 AM
> To: Luben Tuikov
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> On Wed, 2011-07-27 at 21:19 -0700, Luben Tuikov wrote:
>>  Allow expander table-to-table attachments for
>>  expanders that support it.
>> 
>>  Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> 
> OK, so now I need an applyable patch, please.  It looks like the mail
> server has mapped all tabs to spaces.  If you can't fix the mailer, just
> sending the patch as an attachment is fine.
> 
> James
> 
> NrybXǧv^)޺{.n+{"{ayʇڙ,j fhzwj:+vwjm zZ+ݢj"!
> 
> ______________________________________________________________________
> This email may contain privileged or confidential information, which should only 
> be used for the purpose for which it was sent by Xyratex. No further rights or 
> licenses are granted to use such information. If you are not the intended 
> recipient of this message, please notify the sender by return and delete it. You 
> may not use, copy, disclose or rely on the information contained in it.
> 
> Internet email is susceptible to data corruption, interception and unauthorised 
> amendment for which Xyratex does not accept liability. While we have taken 
> reasonable precautions to ensure that this email is free of viruses, Xyratex 
> does not accept liability for the presence of any computer viruses in this 
> email, nor for any losses caused as a result of viruses.
> 
> Xyratex Technology Limited (03134912), Registered in England & Wales, 
> Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
> 
> The Xyratex group of companies also includes, Xyratex Ltd, registered in 
> Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) 
> Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in 
> The People's Republic of China and Xyratex Japan Limited registered in 
> Japan.
> ______________________________________________________________________
>

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

* [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 11:30 ` James Bottomley
  2011-09-22 15:04   ` Mark Salyzyn
@ 2011-09-22 16:41   ` Luben Tuikov
  2011-09-22 16:50     ` Christoph Hellwig
                       ` (2 more replies)
  1 sibling, 3 replies; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 16:41 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org

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

Allow expander table-to-table attachments for
expanders that support it.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
 include/scsi/libsas.h              |    3 +++
 include/scsi/sas.h                 |   14 ++++++++++++--
 3 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index f84084b..e8d0115 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
     dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
     dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
     dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
+    dev->ex_dev.t2t_supp = rg->t2t_supp;
     dev->ex_dev.conf_route_table = rg->conf_route_table;
     dev->ex_dev.configuring = rg->configuring;
     memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
@@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
     };
     struct domain_device *parent = child->parent;
 
-    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
-           "has %c:%c routing link!\n",
+    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
+           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
 
            ex_type[parent->dev_type],
            SAS_ADDR(parent->sas_addr),
+           parent->ex_dev.t2t_supp,
            parent_phy->phy_id,
 
            ex_type[child->dev_type],
            SAS_ADDR(child->sas_addr),
+           child->ex_dev.t2t_supp,
            child_phy->phy_id,
 
            ra_char[parent_phy->routing_attr],
@@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct domain_device *child)
                     sas_print_parent_topology_bug(child, parent_phy, child_phy);
                     res = -ENODEV;
                 }
-            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
-                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
-                sas_print_parent_topology_bug(child, parent_phy, child_phy);
-                res = -ENODEV;
+            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
+                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
+                    (child_phy->routing_attr == TABLE_ROUTING &&
+                     child_ex->t2t_supp && parent_ex->t2t_supp)) {
+                    /* All good */;
+                } else {
+                    sas_print_parent_topology_bug(child, parent_phy, child_phy);
+                    res = -ENODEV;
+                }
             }
             break;
         case FANOUT_DEV:
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index ee86606..793f80b 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -142,8 +142,11 @@ struct expander_device {
     u16    ex_change_count;
     u16    max_route_indexes;
     u8     num_phys;
+
+    u8     t2t_supp:1;
     u8     configuring:1;
     u8     conf_route_table:1;
+
     u8     enclosure_logical_id[8];
 
     struct ex_phy *ex_phy;
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index e9fd022..f59f182 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -341,7 +341,12 @@ struct report_general_resp {
 
     u8      conf_route_table:1;
     u8      configuring:1;
-    u8      _r_b:6;
+    u8    config_others:1;
+    u8    orej_retry_supp:1;
+    u8    stp_cont_awt:1;
+    u8    self_config:1;
+    u8    zone_config:1;
+    u8    t2t_supp:1;
 
     u8      _r_c;
 
@@ -528,7 +533,12 @@ struct report_general_resp {
     u8      _r_a;
     u8      num_phys;
 
-    u8      _r_b:6;
+    u8    t2t_supp:1;
+    u8    zone_config:1;
+    u8    self_config:1;
+    u8    stp_cont_awt:1;
+    u8    orej_retry_supp:1;
+    u8    config_others:1;
     u8      configuring:1;
     u8      conf_route_table:1;
 
-- 
1.7.2.2.165.gbc382

[-- Attachment #2: 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch --]
[-- Type: application/octet-stream, Size: 3823 bytes --]

From 7cd733043176127d58911165369f4a8914ac4edd Mon Sep 17 00:00:00 2001
From: Luben Tuikov <ltuikov@yahoo.com>
Date: Wed, 27 Jul 2011 21:02:12 -0700
Subject: [PATCH] [SCSI] libsas: Allow expander T-T attachments

Allow expander table-to-table attachments for
expanders that support it.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
 include/scsi/libsas.h              |    3 +++
 include/scsi/sas.h                 |   14 ++++++++++++--
 3 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index f84084b..e8d0115 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
 	dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
 	dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
 	dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
+	dev->ex_dev.t2t_supp = rg->t2t_supp;
 	dev->ex_dev.conf_route_table = rg->conf_route_table;
 	dev->ex_dev.configuring = rg->configuring;
 	memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
@@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
 	};
 	struct domain_device *parent = child->parent;
 
-	sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
-		   "has %c:%c routing link!\n",
+	sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
+		   "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
 
 		   ex_type[parent->dev_type],
 		   SAS_ADDR(parent->sas_addr),
+		   parent->ex_dev.t2t_supp,
 		   parent_phy->phy_id,
 
 		   ex_type[child->dev_type],
 		   SAS_ADDR(child->sas_addr),
+		   child->ex_dev.t2t_supp,
 		   child_phy->phy_id,
 
 		   ra_char[parent_phy->routing_attr],
@@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct domain_device *child)
 					sas_print_parent_topology_bug(child, parent_phy, child_phy);
 					res = -ENODEV;
 				}
-			} else if (parent_phy->routing_attr == TABLE_ROUTING &&
-				   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
-				sas_print_parent_topology_bug(child, parent_phy, child_phy);
-				res = -ENODEV;
+			} else if (parent_phy->routing_attr == TABLE_ROUTING) {
+				if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
+				    (child_phy->routing_attr == TABLE_ROUTING &&
+				     child_ex->t2t_supp && parent_ex->t2t_supp)) {
+					/* All good */;
+				} else {
+					sas_print_parent_topology_bug(child, parent_phy, child_phy);
+					res = -ENODEV;
+				}
 			}
 			break;
 		case FANOUT_DEV:
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index ee86606..793f80b 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -142,8 +142,11 @@ struct expander_device {
 	u16    ex_change_count;
 	u16    max_route_indexes;
 	u8     num_phys;
+
+	u8     t2t_supp:1;
 	u8     configuring:1;
 	u8     conf_route_table:1;
+
 	u8     enclosure_logical_id[8];
 
 	struct ex_phy *ex_phy;
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index e9fd022..f59f182 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -341,7 +341,12 @@ struct report_general_resp {
 
 	u8      conf_route_table:1;
 	u8      configuring:1;
-	u8      _r_b:6;
+	u8	config_others:1;
+	u8	orej_retry_supp:1;
+	u8	stp_cont_awt:1;
+	u8	self_config:1;
+	u8	zone_config:1;
+	u8	t2t_supp:1;
 
 	u8      _r_c;
 
@@ -528,7 +533,12 @@ struct report_general_resp {
 	u8      _r_a;
 	u8      num_phys;
 
-	u8      _r_b:6;
+	u8	t2t_supp:1;
+	u8	zone_config:1;
+	u8	self_config:1;
+	u8	stp_cont_awt:1;
+	u8	orej_retry_supp:1;
+	u8	config_others:1;
 	u8      configuring:1;
 	u8      conf_route_table:1;
 
-- 
1.7.2.2.165.gbc382


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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:41   ` [RESEND] " Luben Tuikov
@ 2011-09-22 16:50     ` Christoph Hellwig
  2011-09-22 17:24       ` Luben Tuikov
  2011-09-22 16:55     ` Mark Salyzyn
  2011-09-22 17:41     ` Dan Williams
  2 siblings, 1 reply; 22+ messages in thread
From: Christoph Hellwig @ 2011-09-22 16:50 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Thu, Sep 22, 2011 at 09:41:36AM -0700, Luben Tuikov wrote:
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
> ?drivers/scsi/libsas/sas_expander.c |?? 20 ++++++++++++++------
> ?include/scsi/libsas.h????????????? |??? 3 +++
> ?include/scsi/sas.h???????????????? |?? 14 ++++++++++++--
> ?3 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index f84084b..e8d0115 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
> ???? dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
> ???? dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
> ???? dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);

This looks completely garbled to me.


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

* RE: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:41   ` [RESEND] " Luben Tuikov
  2011-09-22 16:50     ` Christoph Hellwig
@ 2011-09-22 16:55     ` Mark Salyzyn
  2011-09-22 17:19       ` Luben Tuikov
  2011-09-22 17:48       ` Dan Williams
  2011-09-22 17:41     ` Dan Williams
  2 siblings, 2 replies; 22+ messages in thread
From: Mark Salyzyn @ 2011-09-22 16:55 UTC (permalink / raw)
  To: Luben Tuikov, James Bottomley; +Cc: linux-scsi, linux-kernel

Except for the fact the patch as located in the attachment is still not in compliance, the patch works for me.

Sincerely -- Mark Salyzyn
 
> scsi-misc-2.6/scripts/checkpatch.pl 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch
WARNING: line over 80 characters
#57: FILE: drivers/scsi/libsas/sas_expander.c:1245:
+                               if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||

WARNING: line over 80 characters
#59: FILE: drivers/scsi/libsas/sas_expander.c:1247:
+                                    child_ex->t2t_supp && parent_ex->t2t_supp)) {

WARNING: line over 80 characters
#62: FILE: drivers/scsi/libsas/sas_expander.c:1250:
+                                       sas_print_parent_topology_bug(child, parent_phy, child_phy);

total: 0 errors, 3 warnings, 82 lines checked

0001-SCSI-libsas-Allow-expander-T-T-attachments.patch has style problems, please
 review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Luben Tuikov
Sent: Thursday, September 22, 2011 12:42 PM
To: James Bottomley
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments

Allow expander table-to-table attachments for
expanders that support it.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
 include/scsi/libsas.h              |    3 +++
 include/scsi/sas.h                 |   14 ++++++++++++--
 3 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index f84084b..e8d0115 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device *dev,
     dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
     dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
     dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
+    dev->ex_dev.t2t_supp = rg->t2t_supp;
     dev->ex_dev.conf_route_table = rg->conf_route_table;
     dev->ex_dev.configuring = rg->configuring;
     memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 8);
@@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct domain_device *child,
     };
     struct domain_device *parent = child->parent;
 
-    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x "
-           "has %c:%c routing link!\n",
+    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex %016llx "
+           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
 
            ex_type[parent->dev_type],
            SAS_ADDR(parent->sas_addr),
+           parent->ex_dev.t2t_supp,
            parent_phy->phy_id,
 
            ex_type[child->dev_type],
            SAS_ADDR(child->sas_addr),
+           child->ex_dev.t2t_supp,
            child_phy->phy_id,
 
            ra_char[parent_phy->routing_attr],
@@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct domain_device *child)
                     sas_print_parent_topology_bug(child, parent_phy, child_phy);
                     res = -ENODEV;
                 }
-            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
-                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
-                sas_print_parent_topology_bug(child, parent_phy, child_phy);
-                res = -ENODEV;
+            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
+                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
+                    (child_phy->routing_attr == TABLE_ROUTING &&
+                     child_ex->t2t_supp && parent_ex->t2t_supp)) {
+                    /* All good */;
+                } else {
+                    sas_print_parent_topology_bug(child, parent_phy, child_phy);
+                    res = -ENODEV;
+                }
             }
             break;
         case FANOUT_DEV:
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index ee86606..793f80b 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -142,8 +142,11 @@ struct expander_device {
     u16    ex_change_count;
     u16    max_route_indexes;
     u8     num_phys;
+
+    u8     t2t_supp:1;
     u8     configuring:1;
     u8     conf_route_table:1;
+
     u8     enclosure_logical_id[8];
 
     struct ex_phy *ex_phy;
diff --git a/include/scsi/sas.h b/include/scsi/sas.h
index e9fd022..f59f182 100644
--- a/include/scsi/sas.h
+++ b/include/scsi/sas.h
@@ -341,7 +341,12 @@ struct report_general_resp {
 
     u8      conf_route_table:1;
     u8      configuring:1;
-    u8      _r_b:6;
+    u8    config_others:1;
+    u8    orej_retry_supp:1;
+    u8    stp_cont_awt:1;
+    u8    self_config:1;
+    u8    zone_config:1;
+    u8    t2t_supp:1;
 
     u8      _r_c;
 
@@ -528,7 +533,12 @@ struct report_general_resp {
     u8      _r_a;
     u8      num_phys;
 
-    u8      _r_b:6;
+    u8    t2t_supp:1;
+    u8    zone_config:1;
+    u8    self_config:1;
+    u8    stp_cont_awt:1;
+    u8    orej_retry_supp:1;
+    u8    config_others:1;
     u8      configuring:1;
     u8      conf_route_table:1;
 
-- 
1.7.2.2.165.gbc382
______________________________________________________________________
This email may contain privileged or confidential information, which should only be used for the purpose for which it was sent by Xyratex. No further rights or licenses are granted to use such information. If you are not the intended recipient of this message, please notify the sender by return and delete it. You may not use, copy, disclose or rely on the information contained in it.
 
Internet email is susceptible to data corruption, interception and unauthorised amendment for which Xyratex does not accept liability. While we have taken reasonable precautions to ensure that this email is free of viruses, Xyratex does not accept liability for the presence of any computer viruses in this email, nor for any losses caused as a result of viruses.
 
Xyratex Technology Limited (03134912), Registered in England & Wales, Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
 
The Xyratex group of companies also includes, Xyratex Ltd, registered in Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in The People's Republic of China and Xyratex Japan Limited registered in Japan.
______________________________________________________________________
 


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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:35     ` Luben Tuikov
@ 2011-09-22 17:03       ` Christoph Hellwig
  2011-09-22 17:11         ` Luben Tuikov
  0 siblings, 1 reply; 22+ messages in thread
From: Christoph Hellwig @ 2011-09-22 17:03 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Mark Salyzyn, James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Darrick Wong, Xiangliang Yu,
	Jack Wang

On Thu, Sep 22, 2011 at 09:35:19AM -0700, Luben Tuikov wrote:
> Salyzyn, DON'T do this any more with mine or anybody else's patches. OKAY?

Respinning patches to fix whitespace issues is perfectly fine.  What
Marc missed, and what is very important is to preserve the proper
attribution of the original author.  That is usually done by keeping a
copy of the original From: line as the first line in the mail body.


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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 17:03       ` Christoph Hellwig
@ 2011-09-22 17:11         ` Luben Tuikov
  2011-09-23 18:42           ` Christoph Hellwig
  0 siblings, 1 reply; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 17:11 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Mark Salyzyn, James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Darrick Wong, Xiangliang Yu,
	Jack Wang

>From the original author yes, (unless he's dead or something like that). Not from someone else, when the original author is available.


When have your had a patch of yours being re-spun and submitted from someone else? Please point to a marc.info thread.



----- Original Message -----
> From: Christoph Hellwig <hch@infradead.org>
> To: Luben Tuikov <ltuikov@yahoo.com>
> Cc: Mark Salyzyn <mark_salyzyn@us.xyratex.com>; James Bottomley <jbottomley@parallels.com>; "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>; "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>; Darrick Wong <djwong@us.ibm.com>; Xiangliang Yu <yuxiangl@marvell.com>; Jack Wang <jack_wang@usish.com>
> Sent: Thursday, September 22, 2011 10:03 AM
> Subject: Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> On Thu, Sep 22, 2011 at 09:35:19AM -0700, Luben Tuikov wrote:
>>  Salyzyn, DON'T do this any more with mine or anybody else's 
> patches. OKAY?
> 
> Respinning patches to fix whitespace issues is perfectly fine.  What
> Marc missed, and what is very important is to preserve the proper
> attribution of the original author.  That is usually done by keeping a
> copy of the original From: line as the first line in the mail body.
>

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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:55     ` Mark Salyzyn
@ 2011-09-22 17:19       ` Luben Tuikov
  2011-09-22 17:44         ` Mark Salyzyn
  2011-09-22 17:48       ` Dan Williams
  1 sibling, 1 reply; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 17:19 UTC (permalink / raw)
  To: Mark Salyzyn, James Bottomley
  Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org

LOOK AT THE SOURCE CODE: drivers/scsi/libsas/sas_expander.c:

/* Here we spill over 80 columns.  It is intentional.
 */
static int sas_check_parent_topology(struct domain_device *child)
{
    struct expander_device *child_ex = &child->ex_dev;
    struct expander_device *parent_ex;
    int i;
    int res = 0;

    if (!child->parent)
        return 0;

    if (child->parent->dev_type != EDGE_DEV &&
        child->parent->dev_type != FANOUT_DEV)
        return 0;
...

ARE WE DONE?

----- Original Message -----

> From: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
> To: Luben Tuikov <ltuikov@yahoo.com>; James Bottomley <jbottomley@parallels.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Sent: Thursday, September 22, 2011 9:55 AM
> Subject: RE: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> Except for the fact the patch as located in the attachment is still not in 
> compliance, the patch works for me.
> 
> Sincerely -- Mark Salyzyn
> 
>>  scsi-misc-2.6/scripts/checkpatch.pl 
> 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch
> WARNING: line over 80 characters
> #57: FILE: drivers/scsi/libsas/sas_expander.c:1245:
> +                               if (child_phy->routing_attr == 
> SUBTRACTIVE_ROUTING ||
> 
> WARNING: line over 80 characters
> #59: FILE: drivers/scsi/libsas/sas_expander.c:1247:
> +                                    child_ex->t2t_supp && 
> parent_ex->t2t_supp)) {
> 
> WARNING: line over 80 characters
> #62: FILE: drivers/scsi/libsas/sas_expander.c:1250:
> +                                       sas_print_parent_topology_bug(child, 
> parent_phy, child_phy);
> 
> total: 0 errors, 3 warnings, 82 lines checked
> 
> 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch has style problems, please
> review.
> 
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] 
> On Behalf Of Luben Tuikov
> Sent: Thursday, September 22, 2011 12:42 PM
> To: James Bottomley
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
>  drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
>  include/scsi/libsas.h              |    3 +++
>  include/scsi/sas.h                 |   14 ++++++++++++--
>  3 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c 
> b/drivers/scsi/libsas/sas_expander.c
> index f84084b..e8d0115 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device 
> *dev,
>      dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
>      dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
>      dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
> +    dev->ex_dev.t2t_supp = rg->t2t_supp;
>      dev->ex_dev.conf_route_table = rg->conf_route_table;
>      dev->ex_dev.configuring = rg->configuring;
>      memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 
> 8);
> @@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct 
> domain_device *child,
>      };
>      struct domain_device *parent = child->parent;
>  
> -    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x 
> "
> -           "has %c:%c routing link!\n",
> +    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex 
> %016llx "
> +           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
>  
>             ex_type[parent->dev_type],
>             SAS_ADDR(parent->sas_addr),
> +           parent->ex_dev.t2t_supp,
>             parent_phy->phy_id,
>  
>             ex_type[child->dev_type],
>             SAS_ADDR(child->sas_addr),
> +           child->ex_dev.t2t_supp,
>             child_phy->phy_id,
>  
>             ra_char[parent_phy->routing_attr],
> @@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct 
> domain_device *child)
>                      sas_print_parent_topology_bug(child, parent_phy, 
> child_phy);
>                      res = -ENODEV;
>                  }
> -            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
> -                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
> -                sas_print_parent_topology_bug(child, parent_phy, child_phy);
> -                res = -ENODEV;
> +            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
> +                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
> +                    (child_phy->routing_attr == TABLE_ROUTING &&
> +                     child_ex->t2t_supp && parent_ex->t2t_supp)) 
> {
> +                    /* All good */;
> +                } else {
> +                    sas_print_parent_topology_bug(child, parent_phy, 
> child_phy);
> +                    res = -ENODEV;
> +                }
>              }
>              break;
>          case FANOUT_DEV:
> diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
> index ee86606..793f80b 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -142,8 +142,11 @@ struct expander_device {
>      u16    ex_change_count;
>      u16    max_route_indexes;
>      u8     num_phys;
> +
> +    u8     t2t_supp:1;
>      u8     configuring:1;
>      u8     conf_route_table:1;
> +
>      u8     enclosure_logical_id[8];
>  
>      struct ex_phy *ex_phy;
> diff --git a/include/scsi/sas.h b/include/scsi/sas.h
> index e9fd022..f59f182 100644
> --- a/include/scsi/sas.h
> +++ b/include/scsi/sas.h
> @@ -341,7 +341,12 @@ struct report_general_resp {
>  
>      u8      conf_route_table:1;
>      u8      configuring:1;
> -    u8      _r_b:6;
> +    u8    config_others:1;
> +    u8    orej_retry_supp:1;
> +    u8    stp_cont_awt:1;
> +    u8    self_config:1;
> +    u8    zone_config:1;
> +    u8    t2t_supp:1;
>  
>      u8      _r_c;
>  
> @@ -528,7 +533,12 @@ struct report_general_resp {
>      u8      _r_a;
>      u8      num_phys;
>  
> -    u8      _r_b:6;
> +    u8    t2t_supp:1;
> +    u8    zone_config:1;
> +    u8    self_config:1;
> +    u8    stp_cont_awt:1;
> +    u8    orej_retry_supp:1;
> +    u8    config_others:1;
>      u8      configuring:1;
>      u8      conf_route_table:1;
>  
> -- 
> 1.7.2.2.165.gbc382
> ______________________________________________________________________
> This email may contain privileged or confidential information, which should only 
> be used for the purpose for which it was sent by Xyratex. No further rights or 
> licenses are granted to use such information. If you are not the intended 
> recipient of this message, please notify the sender by return and delete it. You 
> may not use, copy, disclose or rely on the information contained in it.
> 
> Internet email is susceptible to data corruption, interception and unauthorised 
> amendment for which Xyratex does not accept liability. While we have taken 
> reasonable precautions to ensure that this email is free of viruses, Xyratex 
> does not accept liability for the presence of any computer viruses in this 
> email, nor for any losses caused as a result of viruses.
> 
> Xyratex Technology Limited (03134912), Registered in England & Wales, 
> Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
> 
> The Xyratex group of companies also includes, Xyratex Ltd, registered in 
> Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) 
> Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in 
> The People's Republic of China and Xyratex Japan Limited registered in 
> Japan.
> ______________________________________________________________________
>

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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:50     ` Christoph Hellwig
@ 2011-09-22 17:24       ` Luben Tuikov
  2011-09-22 17:32         ` Bart Van Assche
  0 siblings, 1 reply; 22+ messages in thread
From: Luben Tuikov @ 2011-09-22 17:24 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org

I've noticed this recently as well. I'm not sure if it is Yahoo or Firefox, or my cutting and pasting from Emacs as opposed to Xterm.



----- Original Message -----
> From: Christoph Hellwig <hch@infradead.org>
> To: Luben Tuikov <ltuikov@yahoo.com>
> Cc: James Bottomley <jbottomley@parallels.com>; "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>; "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
> Sent: Thursday, September 22, 2011 9:50 AM
> Subject: Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> On Thu, Sep 22, 2011 at 09:41:36AM -0700, Luben Tuikov wrote:
>>  Allow expander table-to-table attachments for
>>  expanders that support it.
>> 
>>  Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
>>  ---
>>  ?drivers/scsi/libsas/sas_expander.c |?? 20 ++++++++++++++------
>>  ?include/scsi/libsas.h????????????? |??? 3 +++
>>  ?include/scsi/sas.h???????????????? |?? 14 ++++++++++++--
>>  ?3 files changed, 29 insertions(+), 8 deletions(-)
>> 
>>  diff --git a/drivers/scsi/libsas/sas_expander.c 
> b/drivers/scsi/libsas/sas_expander.c
>>  index f84084b..e8d0115 100644
>>  --- a/drivers/scsi/libsas/sas_expander.c
>>  +++ b/drivers/scsi/libsas/sas_expander.c
>>  @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct 
> domain_device *dev,
>>  ???? dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
>>  ???? dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
>>  ???? dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
> 
> This looks completely garbled to me.
>

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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 17:24       ` Luben Tuikov
@ 2011-09-22 17:32         ` Bart Van Assche
  0 siblings, 0 replies; 22+ messages in thread
From: Bart Van Assche @ 2011-09-22 17:32 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Christoph Hellwig, James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Thu, Sep 22, 2011 at 7:24 PM, Luben Tuikov <ltuikov@yahoo.com> wrote:
> I've noticed this recently as well. I'm not sure if it is Yahoo or Firefox, or my cutting and pasting from Emacs as opposed to Xterm.

A quote from commit 5ce9f07bf1bed9a1f9886373ad0b149294f84c25 (March 10, 2010):

<quote>
Gmail web gui does not work for sending patches now even with firefox
"view source with" extension.  It will use windows style line breaks to
wrap lines automatically when sening email.
[ ... ]
-The last problem is that Gmail will base64-encode any message that has a
-non-ASCII character.  That includes things like European names.  Be aware.
</quote>

It's not impossible that the same comments apply to Yahoo mail too.

Bart.

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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:41   ` [RESEND] " Luben Tuikov
  2011-09-22 16:50     ` Christoph Hellwig
  2011-09-22 16:55     ` Mark Salyzyn
@ 2011-09-22 17:41     ` Dan Williams
  2011-09-23  1:47       ` Jack Wang
  2 siblings, 1 reply; 22+ messages in thread
From: Dan Williams @ 2011-09-22 17:41 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: James Bottomley, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Thu, Sep 22, 2011 at 9:41 AM, Luben Tuikov <ltuikov@yahoo.com> wrote:
> Allow expander table-to-table attachments for
> expanders that support it.
>
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>

Acked-by: Dan Williams <dan.j.williams@intel.com>

...and can we tag this for -stable.  It meets the 100 line count and
"New device IDs and quirks are also accepted." constraints.

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

* RE: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 17:19       ` Luben Tuikov
@ 2011-09-22 17:44         ` Mark Salyzyn
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Salyzyn @ 2011-09-22 17:44 UTC (permalink / raw)
  To: Luben Tuikov, James Bottomley; +Cc: linux-scsi, linux-kernel

Yes, we are Done. I thought I made it clear I am willing to Ack your patch as attached as-is.

Acked-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>

-----Original Message-----
From: Luben Tuikov [mailto:ltuikov@yahoo.com] 
Sent: Thursday, September 22, 2011 1:20 PM
To: Mark Salyzyn; James Bottomley
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments

LOOK AT THE SOURCE CODE: drivers/scsi/libsas/sas_expander.c:

/* Here we spill over 80 columns.  It is intentional.
 */
static int sas_check_parent_topology(struct domain_device *child)
{
    struct expander_device *child_ex = &child->ex_dev;
    struct expander_device *parent_ex;
    int i;
    int res = 0;

    if (!child->parent)
        return 0;

    if (child->parent->dev_type != EDGE_DEV &&
        child->parent->dev_type != FANOUT_DEV)
        return 0;
...

ARE WE DONE?

----- Original Message -----

> From: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
> To: Luben Tuikov <ltuikov@yahoo.com>; James Bottomley <jbottomley@parallels.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Sent: Thursday, September 22, 2011 9:55 AM
> Subject: RE: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> Except for the fact the patch as located in the attachment is still not in 
> compliance, the patch works for me.
> 
> Sincerely -- Mark Salyzyn
> 
>>  scsi-misc-2.6/scripts/checkpatch.pl 
> 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch
> WARNING: line over 80 characters
> #57: FILE: drivers/scsi/libsas/sas_expander.c:1245:
> +                               if (child_phy->routing_attr == 
> SUBTRACTIVE_ROUTING ||
> 
> WARNING: line over 80 characters
> #59: FILE: drivers/scsi/libsas/sas_expander.c:1247:
> +                                    child_ex->t2t_supp && 
> parent_ex->t2t_supp)) {
> 
> WARNING: line over 80 characters
> #62: FILE: drivers/scsi/libsas/sas_expander.c:1250:
> +                                       sas_print_parent_topology_bug(child, 
> parent_phy, child_phy);
> 
> total: 0 errors, 3 warnings, 82 lines checked
> 
> 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch has style problems, please
> review.
> 
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] 
> On Behalf Of Luben Tuikov
> Sent: Thursday, September 22, 2011 12:42 PM
> To: James Bottomley
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> Allow expander table-to-table attachments for
> expanders that support it.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> ---
>  drivers/scsi/libsas/sas_expander.c |   20 ++++++++++++++------
>  include/scsi/libsas.h              |    3 +++
>  include/scsi/sas.h                 |   14 ++++++++++++--
>  3 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_expander.c 
> b/drivers/scsi/libsas/sas_expander.c
> index f84084b..e8d0115 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -329,6 +329,7 @@ static void ex_assign_report_general(struct domain_device 
> *dev,
>      dev->ex_dev.ex_change_count = be16_to_cpu(rg->change_count);
>      dev->ex_dev.max_route_indexes = be16_to_cpu(rg->route_indexes);
>      dev->ex_dev.num_phys = min(rg->num_phys, (u8)MAX_EXPANDER_PHYS);
> +    dev->ex_dev.t2t_supp = rg->t2t_supp;
>      dev->ex_dev.conf_route_table = rg->conf_route_table;
>      dev->ex_dev.configuring = rg->configuring;
>      memcpy(dev->ex_dev.enclosure_logical_id, rg->enclosure_logical_id, 
> 8);
> @@ -1133,15 +1134,17 @@ static void sas_print_parent_topology_bug(struct 
> domain_device *child,
>      };
>      struct domain_device *parent = child->parent;
>  
> -    sas_printk("%s ex %016llx phy 0x%x <--> %s ex %016llx phy 0x%x 
> "
> -           "has %c:%c routing link!\n",
> +    sas_printk("%s ex %016llx (T2T supp:%d) phy 0x%x <--> %s ex 
> %016llx "
> +           "(T2T supp:%d) phy 0x%x has %c:%c routing link!\n",
>  
>             ex_type[parent->dev_type],
>             SAS_ADDR(parent->sas_addr),
> +           parent->ex_dev.t2t_supp,
>             parent_phy->phy_id,
>  
>             ex_type[child->dev_type],
>             SAS_ADDR(child->sas_addr),
> +           child->ex_dev.t2t_supp,
>             child_phy->phy_id,
>  
>             ra_char[parent_phy->routing_attr],
> @@ -1238,10 +1241,15 @@ static int sas_check_parent_topology(struct 
> domain_device *child)
>                      sas_print_parent_topology_bug(child, parent_phy, 
> child_phy);
>                      res = -ENODEV;
>                  }
> -            } else if (parent_phy->routing_attr == TABLE_ROUTING &&
> -                   child_phy->routing_attr != SUBTRACTIVE_ROUTING) {
> -                sas_print_parent_topology_bug(child, parent_phy, child_phy);
> -                res = -ENODEV;
> +            } else if (parent_phy->routing_attr == TABLE_ROUTING) {
> +                if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
> +                    (child_phy->routing_attr == TABLE_ROUTING &&
> +                     child_ex->t2t_supp && parent_ex->t2t_supp)) 
> {
> +                    /* All good */;
> +                } else {
> +                    sas_print_parent_topology_bug(child, parent_phy, 
> child_phy);
> +                    res = -ENODEV;
> +                }
>              }
>              break;
>          case FANOUT_DEV:
> diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
> index ee86606..793f80b 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -142,8 +142,11 @@ struct expander_device {
>      u16    ex_change_count;
>      u16    max_route_indexes;
>      u8     num_phys;
> +
> +    u8     t2t_supp:1;
>      u8     configuring:1;
>      u8     conf_route_table:1;
> +
>      u8     enclosure_logical_id[8];
>  
>      struct ex_phy *ex_phy;
> diff --git a/include/scsi/sas.h b/include/scsi/sas.h
> index e9fd022..f59f182 100644
> --- a/include/scsi/sas.h
> +++ b/include/scsi/sas.h
> @@ -341,7 +341,12 @@ struct report_general_resp {
>  
>      u8      conf_route_table:1;
>      u8      configuring:1;
> -    u8      _r_b:6;
> +    u8    config_others:1;
> +    u8    orej_retry_supp:1;
> +    u8    stp_cont_awt:1;
> +    u8    self_config:1;
> +    u8    zone_config:1;
> +    u8    t2t_supp:1;
>  
>      u8      _r_c;
>  
> @@ -528,7 +533,12 @@ struct report_general_resp {
>      u8      _r_a;
>      u8      num_phys;
>  
> -    u8      _r_b:6;
> +    u8    t2t_supp:1;
> +    u8    zone_config:1;
> +    u8    self_config:1;
> +    u8    stp_cont_awt:1;
> +    u8    orej_retry_supp:1;
> +    u8    config_others:1;
>      u8      configuring:1;
>      u8      conf_route_table:1;
>  
> -- 
> 1.7.2.2.165.gbc382
> ______________________________________________________________________
> This email may contain privileged or confidential information, which should only 
> be used for the purpose for which it was sent by Xyratex. No further rights or 
> licenses are granted to use such information. If you are not the intended 
> recipient of this message, please notify the sender by return and delete it. You 
> may not use, copy, disclose or rely on the information contained in it.
> 
> Internet email is susceptible to data corruption, interception and unauthorised 
> amendment for which Xyratex does not accept liability. While we have taken 
> reasonable precautions to ensure that this email is free of viruses, Xyratex 
> does not accept liability for the presence of any computer viruses in this 
> email, nor for any losses caused as a result of viruses.
> 
> Xyratex Technology Limited (03134912), Registered in England & Wales, 
> Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
> 
> The Xyratex group of companies also includes, Xyratex Ltd, registered in 
> Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) 
> Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in 
> The People's Republic of China and Xyratex Japan Limited registered in 
> Japan.
> ______________________________________________________________________
>
______________________________________________________________________
This email may contain privileged or confidential information, which should only be used for the purpose for which it was sent by Xyratex. No further rights or licenses are granted to use such information. If you are not the intended recipient of this message, please notify the sender by return and delete it. You may not use, copy, disclose or rely on the information contained in it.
 
Internet email is susceptible to data corruption, interception and unauthorised amendment for which Xyratex does not accept liability. While we have taken reasonable precautions to ensure that this email is free of viruses, Xyratex does not accept liability for the presence of any computer viruses in this email, nor for any losses caused as a result of viruses.
 
Xyratex Technology Limited (03134912), Registered in England & Wales, Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.
 
The Xyratex group of companies also includes, Xyratex Ltd, registered in Bermuda, Xyratex International Inc, registered in California, Xyratex (Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd registered in The People's Republic of China and Xyratex Japan Limited registered in Japan.
______________________________________________________________________
 


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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 16:55     ` Mark Salyzyn
  2011-09-22 17:19       ` Luben Tuikov
@ 2011-09-22 17:48       ` Dan Williams
  1 sibling, 0 replies; 22+ messages in thread
From: Dan Williams @ 2011-09-22 17:48 UTC (permalink / raw)
  To: Mark Salyzyn; +Cc: Luben Tuikov, James Bottomley, linux-scsi, linux-kernel

On Thu, Sep 22, 2011 at 9:55 AM, Mark Salyzyn
<mark_salyzyn@us.xyratex.com> wrote:
> Except for the fact the patch as located in the attachment is still not in compliance, the patch works for me.
>
> Sincerely -- Mark Salyzyn
>
>> scsi-misc-2.6/scripts/checkpatch.pl 0001-SCSI-libsas-Allow-expander-T-T-attachments.patch
> WARNING: line over 80 characters
> #57: FILE: drivers/scsi/libsas/sas_expander.c:1245:
> +                               if (child_phy->routing_attr == SUBTRACTIVE_ROUTING ||
>
> WARNING: line over 80 characters
> #59: FILE: drivers/scsi/libsas/sas_expander.c:1247:
> +                                    child_ex->t2t_supp && parent_ex->t2t_supp)) {
>
> WARNING: line over 80 characters
> #62: FILE: drivers/scsi/libsas/sas_expander.c:1250:
> +                                       sas_print_parent_topology_bug(child, parent_phy, child_phy);
>
> total: 0 errors, 3 warnings, 82 lines checked
>

Minor infractions of 80 columns are acceptable when they improve readability.

checkpactch clean to me is no errors.

--
Dan

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

* Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 17:41     ` Dan Williams
@ 2011-09-23  1:47       ` Jack Wang
  0 siblings, 0 replies; 22+ messages in thread
From: Jack Wang @ 2011-09-23  1:47 UTC (permalink / raw)
  To: 'Dan Williams', 'Luben Tuikov'
  Cc: 'James Bottomley', linux-scsi, linux-kernel

Re: [RESEND] [PATCH] [SCSI] libsas: Allow expander T-T attachments
> 
> On Thu, Sep 22, 2011 at 9:41 AM, Luben Tuikov <ltuikov@yahoo.com> wrote:
> > Allow expander table-to-table attachments for
> > expanders that support it.
> >
> > Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> 
> Acked-by: Dan Williams <dan.j.williams@intel.com>

[Jack Wang] Acked-by: Jack Wang <jack_wang@usish.com>
> 
> ...and can we tag this for -stable.  It meets the 100 line count and
> "New device IDs and quirks are also accepted." constraints.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-22 17:11         ` Luben Tuikov
@ 2011-09-23 18:42           ` Christoph Hellwig
  2011-09-23 18:46             ` Alan Cox
  0 siblings, 1 reply; 22+ messages in thread
From: Christoph Hellwig @ 2011-09-23 18:42 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Christoph Hellwig, Mark Salyzyn, James Bottomley,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Darrick Wong, Xiangliang Yu, Jack Wang

On Thu, Sep 22, 2011 at 10:11:09AM -0700, Luben Tuikov wrote:
> >From the original author yes, (unless he's dead or something like that). Not from someone else, when the original author is available.
> 
> 
> When have your had a patch of yours being re-spun and submitted from someone else? Please point to a marc.info thread.

I'm not going to look them up for you, but if you care enough you'll
find plenty of XFS commits from me that got edited and resent or sent on
by Alex or Dave (or others earlier). 


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

* Re: [PATCH] [SCSI] libsas: Allow expander T-T attachments
  2011-09-23 18:42           ` Christoph Hellwig
@ 2011-09-23 18:46             ` Alan Cox
  0 siblings, 0 replies; 22+ messages in thread
From: Alan Cox @ 2011-09-23 18:46 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Luben Tuikov, Mark Salyzyn, James Bottomley,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Darrick Wong, Xiangliang Yu, Jack Wang

On Fri, 23 Sep 2011 14:42:13 -0400
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Sep 22, 2011 at 10:11:09AM -0700, Luben Tuikov wrote:
> > >From the original author yes, (unless he's dead or something like that). Not from someone else, when the original author is available.
> > 
> > 
> > When have your had a patch of yours being re-spun and submitted from someone else? Please point to a marc.info thread.
> 
> I'm not going to look them up for you, but if you care enough you'll
> find plenty of XFS commits from me that got edited and resent or sent on
> by Alex or Dave (or others earlier). 

Likewise I've done it for various things passing through me in the past.
Generally the reply I get is "thanks".

Alan

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

end of thread, other threads:[~2011-09-23 18:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28  4:19 [PATCH] [SCSI] libsas: Allow expander T-T attachments Luben Tuikov
2011-07-28  6:46 ` Jack Wang
2011-07-28  7:52 ` James Bottomley
2011-09-21  0:50   ` Dan Williams
2011-09-22 11:30 ` James Bottomley
2011-09-22 15:04   ` Mark Salyzyn
2011-09-22 16:30     ` Luben Tuikov
2011-09-22 16:35     ` Luben Tuikov
2011-09-22 17:03       ` Christoph Hellwig
2011-09-22 17:11         ` Luben Tuikov
2011-09-23 18:42           ` Christoph Hellwig
2011-09-23 18:46             ` Alan Cox
2011-09-22 16:41   ` [RESEND] " Luben Tuikov
2011-09-22 16:50     ` Christoph Hellwig
2011-09-22 17:24       ` Luben Tuikov
2011-09-22 17:32         ` Bart Van Assche
2011-09-22 16:55     ` Mark Salyzyn
2011-09-22 17:19       ` Luben Tuikov
2011-09-22 17:44         ` Mark Salyzyn
2011-09-22 17:48       ` Dan Williams
2011-09-22 17:41     ` Dan Williams
2011-09-23  1:47       ` Jack Wang

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