aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-24 05:20:47 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-24 05:20:47 -0400
commit642f149031d70415d9318b919d50b71e4724adbd (patch)
treee792ad29dedffc6756d55e9d63e18ada35515b4b /drivers/s390/scsi/zfcp_erp.c
parentbd6dee6f30a0f6943df190b387b5f8fe98a848f3 (diff)
SG: Change sg_set_page() to take length and offset argument
Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 9438d0b28799..5552b755c08a 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -322,9 +322,9 @@ zfcp_erp_adisc(struct zfcp_port *port)
322 if (address == NULL) 322 if (address == NULL)
323 goto nomem; 323 goto nomem;
324 324
325 zfcp_address_to_sg(address, send_els->req); 325 zfcp_address_to_sg(address, send_els->req, sizeof(struct zfcp_ls_adisc));
326 address += PAGE_SIZE >> 1; 326 address += PAGE_SIZE >> 1;
327 zfcp_address_to_sg(address, send_els->resp); 327 zfcp_address_to_sg(address, send_els->resp, sizeof(struct zfcp_ls_adisc_acc));
328 send_els->req_count = send_els->resp_count = 1; 328 send_els->req_count = send_els->resp_count = 1;
329 329
330 send_els->adapter = adapter; 330 send_els->adapter = adapter;
@@ -336,9 +336,6 @@ zfcp_erp_adisc(struct zfcp_port *port)
336 adisc = zfcp_sg_to_address(send_els->req); 336 adisc = zfcp_sg_to_address(send_els->req);
337 send_els->ls_code = adisc->code = ZFCP_LS_ADISC; 337 send_els->ls_code = adisc->code = ZFCP_LS_ADISC;
338 338
339 send_els->req->length = sizeof(struct zfcp_ls_adisc);
340 send_els->resp->length = sizeof(struct zfcp_ls_adisc_acc);
341
342 /* acc. to FC-FS, hard_nport_id in ADISC should not be set for ports 339 /* acc. to FC-FS, hard_nport_id in ADISC should not be set for ports
343 without FC-AL-2 capability, so we don't set it */ 340 without FC-AL-2 capability, so we don't set it */
344 adisc->wwpn = fc_host_port_name(adapter->scsi_host); 341 adisc->wwpn = fc_host_port_name(adapter->scsi_host);