aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_aux.c
diff options
context:
space:
mode:
authorRalph Wuerthner <rwuerthn@de.ibm.com>2006-05-22 12:24:33 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-05-28 12:45:15 -0400
commit75bfc2837bbcc329193d51e8b7115184b78beae0 (patch)
tree6d1511fce28948bd134f7148a996c04dc04e9d32 /drivers/s390/scsi/zfcp_aux.c
parentb7a52fa7fff2309031a2f849bc489206afd2fa4a (diff)
[SCSI] zfcp: evaluate plogi payload to set maxframe_size, supported_classes of rports
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index bdaad5535e22..9cd789b8acd4 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1748,4 +1748,25 @@ zfcp_handle_els_rjt(u32 sq, struct zfcp_ls_rjt_par *rjt_par)
1748 return ret; 1748 return ret;
1749} 1749}
1750 1750
1751/**
1752 * zfcp_plogi_evaluate - evaluate PLOGI playload and copy important fields
1753 * into zfcp_port structure
1754 * @port: zfcp_port structure
1755 * @plogi: plogi payload
1756 */
1757void
1758zfcp_plogi_evaluate(struct zfcp_port *port, struct fsf_plogi *plogi)
1759{
1760 port->maxframe_size = plogi->serv_param.common_serv_param[7] |
1761 ((plogi->serv_param.common_serv_param[6] & 0x0F) << 8);
1762 if (plogi->serv_param.class1_serv_param[0] & 0x80)
1763 port->supported_classes |= FC_COS_CLASS1;
1764 if (plogi->serv_param.class2_serv_param[0] & 0x80)
1765 port->supported_classes |= FC_COS_CLASS2;
1766 if (plogi->serv_param.class3_serv_param[0] & 0x80)
1767 port->supported_classes |= FC_COS_CLASS3;
1768 if (plogi->serv_param.class4_serv_param[0] & 0x80)
1769 port->supported_classes |= FC_COS_CLASS4;
1770}
1771
1751#undef ZFCP_LOG_AREA 1772#undef ZFCP_LOG_AREA