diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-11-24 10:54:12 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:02:14 -0500 |
commit | 800c0cad962dcf630cabf3efdc5983619e73d4c9 (patch) | |
tree | 4d593b6ec683b524bb2e503483696218aa1eb167 /drivers/s390/scsi/zfcp_fsf.c | |
parent | bd0072ecc449fb2ea8f6a2c9f6ff308f3ae0b078 (diff) |
[SCSI] zfcp: Remove ZFCP_DID_MASK
Instead of assigning 4 bytes with the highest byte masked out, use a 3
byte array with the ntoh24 and h24ton helper functions, thus
eliminating the need for the ZFCP_DID_MASK.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 9ada555ca5a8..057c93777f92 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -128,7 +128,7 @@ static void zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *req) | |||
128 | struct fsf_status_read_buffer *sr_buf = req->data; | 128 | struct fsf_status_read_buffer *sr_buf = req->data; |
129 | struct zfcp_adapter *adapter = req->adapter; | 129 | struct zfcp_adapter *adapter = req->adapter; |
130 | struct zfcp_port *port; | 130 | struct zfcp_port *port; |
131 | int d_id = sr_buf->d_id & ZFCP_DID_MASK; | 131 | int d_id = ntoh24(sr_buf->d_id); |
132 | 132 | ||
133 | read_lock_irqsave(&adapter->port_list_lock, flags); | 133 | read_lock_irqsave(&adapter->port_list_lock, flags); |
134 | list_for_each_entry(port, &adapter->port_list, list) | 134 | list_for_each_entry(port, &adapter->port_list, list) |
@@ -494,7 +494,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req) | |||
494 | 494 | ||
495 | fc_host_port_name(shost) = nsp->fl_wwpn; | 495 | fc_host_port_name(shost) = nsp->fl_wwpn; |
496 | fc_host_node_name(shost) = nsp->fl_wwnn; | 496 | fc_host_node_name(shost) = nsp->fl_wwnn; |
497 | fc_host_port_id(shost) = bottom->s_id & ZFCP_DID_MASK; | 497 | fc_host_port_id(shost) = ntoh24(bottom->s_id); |
498 | fc_host_speed(shost) = bottom->fc_link_speed; | 498 | fc_host_speed(shost) = bottom->fc_link_speed; |
499 | fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; | 499 | fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; |
500 | 500 | ||
@@ -506,7 +506,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req) | |||
506 | 506 | ||
507 | switch (bottom->fc_topology) { | 507 | switch (bottom->fc_topology) { |
508 | case FSF_TOPO_P2P: | 508 | case FSF_TOPO_P2P: |
509 | adapter->peer_d_id = bottom->peer_d_id & ZFCP_DID_MASK; | 509 | adapter->peer_d_id = ntoh24(bottom->peer_d_id); |
510 | adapter->peer_wwpn = plogi->fl_wwpn; | 510 | adapter->peer_wwpn = plogi->fl_wwpn; |
511 | adapter->peer_wwnn = plogi->fl_wwnn; | 511 | adapter->peer_wwnn = plogi->fl_wwnn; |
512 | fc_host_port_type(shost) = FC_PORTTYPE_PTP; | 512 | fc_host_port_type(shost) = FC_PORTTYPE_PTP; |
@@ -1216,7 +1216,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1216 | if (ret) | 1216 | if (ret) |
1217 | goto failed_send; | 1217 | goto failed_send; |
1218 | 1218 | ||
1219 | req->qtcb->bottom.support.d_id = els->d_id; | 1219 | hton24(req->qtcb->bottom.support.d_id, els->d_id); |
1220 | req->handler = zfcp_fsf_send_els_handler; | 1220 | req->handler = zfcp_fsf_send_els_handler; |
1221 | req->data = els; | 1221 | req->data = els; |
1222 | 1222 | ||
@@ -1522,7 +1522,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) | |||
1522 | sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; | 1522 | sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; |
1523 | 1523 | ||
1524 | req->handler = zfcp_fsf_open_port_handler; | 1524 | req->handler = zfcp_fsf_open_port_handler; |
1525 | req->qtcb->bottom.support.d_id = port->d_id; | 1525 | hton24(req->qtcb->bottom.support.d_id, port->d_id); |
1526 | req->data = port; | 1526 | req->data = port; |
1527 | req->erp_action = erp_action; | 1527 | req->erp_action = erp_action; |
1528 | erp_action->fsf_req = req; | 1528 | erp_action->fsf_req = req; |
@@ -1669,7 +1669,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port) | |||
1669 | sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; | 1669 | sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; |
1670 | 1670 | ||
1671 | req->handler = zfcp_fsf_open_wka_port_handler; | 1671 | req->handler = zfcp_fsf_open_wka_port_handler; |
1672 | req->qtcb->bottom.support.d_id = wka_port->d_id; | 1672 | hton24(req->qtcb->bottom.support.d_id, wka_port->d_id); |
1673 | req->data = wka_port; | 1673 | req->data = wka_port; |
1674 | 1674 | ||
1675 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); | 1675 | zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT); |