Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2087
b: refs/heads/master
c: 64b29a1
h: refs/heads/master
i:
  2085: ea41032
  2083: fdf3284
  2079: dc128a7
v: v3
  • Loading branch information
Andreas Herrmann authored and James Bottomley committed Jun 14, 2005
1 parent d51a96a commit 46687ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 516a4201bacfd61ea957039d6f47276ee9c32a0d
refs/heads/master: 64b29a130901d5b8578e9f602cf2dae56aaff224
2 changes: 2 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long);
/**
* struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els
* @adapter: adapter where request is sent from
* @port: port where ELS is destinated (port reference count has to be increased)
* @d_id: destiniation id of port where request is sent to
* @req: scatter-gather list for request
* @resp: scatter-gather list for response
Expand All @@ -765,6 +766,7 @@ typedef void (*zfcp_send_els_handler_t)(unsigned long);
*/
struct zfcp_send_els {
struct zfcp_adapter *adapter;
struct zfcp_port *port;
fc_id_t d_id;
struct scatterlist *req;
struct scatterlist *resp;
Expand Down
24 changes: 10 additions & 14 deletions trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#include "zfcp_ext.h"

static int zfcp_erp_adisc(struct zfcp_adapter *, fc_id_t);
static int zfcp_erp_adisc(struct zfcp_port *);
static void zfcp_erp_adisc_handler(unsigned long);

static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int);
Expand Down Expand Up @@ -295,12 +295,12 @@ zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear_mask)

/**
* zfcp_erp_adisc - send ADISC ELS command
* @adapter: adapter structure
* @d_id: d_id of port where ADISC is sent to
* @port: port structure
*/
int
zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id)
zfcp_erp_adisc(struct zfcp_port *port)
{
struct zfcp_adapter *adapter = port->adapter;
struct zfcp_send_els *send_els;
struct zfcp_ls_adisc *adisc;
void *address = NULL;
Expand Down Expand Up @@ -332,7 +332,8 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id)
send_els->req_count = send_els->resp_count = 1;

send_els->adapter = adapter;
send_els->d_id = d_id;
send_els->port = port;
send_els->d_id = port->d_id;
send_els->handler = zfcp_erp_adisc_handler;
send_els->handler_data = (unsigned long) send_els;

Expand All @@ -350,7 +351,7 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id)
ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x "
"(wwpn=0x%016Lx, wwnn=0x%016Lx, "
"hard_nport_id=0x%08x, nport_id=0x%08x)\n",
adapter->s_id, d_id, (wwn_t) adisc->wwpn,
adapter->s_id, send_els->d_id, (wwn_t) adisc->wwpn,
(wwn_t) adisc->wwnn, adisc->hard_nport_id,
adisc->nport_id);

Expand All @@ -367,7 +368,7 @@ zfcp_erp_adisc(struct zfcp_adapter *adapter, fc_id_t d_id)
retval = zfcp_fsf_send_els(send_els);
if (retval != 0) {
ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port "
"0x%08x on adapter %s\n", d_id,
"0x%08x on adapter %s\n", send_els->d_id,
zfcp_get_busid_by_adapter(adapter));
del_timer(send_els->timer);
goto freemem;
Expand Down Expand Up @@ -411,14 +412,9 @@ zfcp_erp_adisc_handler(unsigned long data)
del_timer(send_els->timer);

adapter = send_els->adapter;
port = send_els->port;
d_id = send_els->d_id;

read_lock(&zfcp_data.config_lock);
port = zfcp_get_port_by_did(send_els->adapter, send_els->d_id);
read_unlock(&zfcp_data.config_lock);

BUG_ON(port == NULL);

/* request rejected or timed out */
if (send_els->status != 0) {
ZFCP_LOG_NORMAL("ELS request rejected/timed out, "
Expand Down Expand Up @@ -482,7 +478,7 @@ zfcp_test_link(struct zfcp_port *port)
int retval;

zfcp_port_get(port);
retval = zfcp_erp_adisc(port->adapter, port->d_id);
retval = zfcp_erp_adisc(port);
if (retval != 0) {
zfcp_port_put(port);
ZFCP_LOG_NORMAL("reopen needed for port 0x%016Lx "
Expand Down
15 changes: 4 additions & 11 deletions trunk/drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,8 +1771,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
{
struct zfcp_adapter *adapter;
fc_id_t d_id;
struct zfcp_port *port;
fc_id_t d_id;
struct fsf_qtcb_header *header;
struct fsf_qtcb_bottom_support *bottom;
struct zfcp_send_els *send_els;
Expand All @@ -1781,6 +1781,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)

send_els = fsf_req->data.send_els;
adapter = send_els->adapter;
port = send_els->port;
d_id = send_els->d_id;
header = &fsf_req->qtcb->header;
bottom = &fsf_req->qtcb->bottom.support;
Expand Down Expand Up @@ -1817,13 +1818,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
switch (header->fsf_status_qual.word[0]){
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");
if (send_els->ls_code != ZFCP_LS_ADISC) {
read_lock(&zfcp_data.config_lock);
port = zfcp_get_port_by_did(adapter, d_id);
if (port)
zfcp_test_link(port);
read_unlock(&zfcp_data.config_lock);
}
if (port && (send_els->ls_code != ZFCP_LS_ADISC))
zfcp_test_link(port);
fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
Expand Down Expand Up @@ -1913,11 +1909,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
}
}
debug_text_event(adapter->erp_dbf, 1, "fsf_s_access");
read_lock(&zfcp_data.config_lock);
port = zfcp_get_port_by_did(adapter, d_id);
if (port != NULL)
zfcp_erp_port_access_denied(port);
read_unlock(&zfcp_data.config_lock);
fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
break;

Expand Down

0 comments on commit 46687ae

Please sign in to comment.