Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68804
b: refs/heads/master
c: bfb7437
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Oct 12, 2007
1 parent f04e77d commit 4be89da
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 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: 17b0bcfad795913b1f2a3926cd238fa2ad5522a2
refs/heads/master: bfb743740e1598d3030c4972a8808f2bb5b95b6b
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/scsi_tgt_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ int scsi_tgt_kspace_tsk_mgmt(int host_no, u64 itn_id, u64 mid, int result)
goto done;
}

err = shost->hostt->tsk_mgmt_response(shost, itn_id, mid, result);
err = shost->transportt->tsk_mgmt_response(shost, itn_id, mid, result);
done:
scsi_host_put(shost);
return err;
Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/scsi/scsi_transport_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,17 @@ void srp_remove_host(struct Scsi_Host *shost)
}
EXPORT_SYMBOL_GPL(srp_remove_host);

static int srp_it_nexus_response(struct Scsi_Host *shost, u64 id, int result)
static int srp_tsk_mgmt_response(struct Scsi_Host *shost, u64 nexus, u64 tm_id,
int result)
{
struct srp_internal *i = to_srp_internal(shost->transportt);
return i->f->it_nexus_response(shost, id, result);
return i->f->tsk_mgmt_response(shost, nexus, tm_id, result);
}

static int srp_it_nexus_response(struct Scsi_Host *shost, u64 nexus, int result)
{
struct srp_internal *i = to_srp_internal(shost->transportt);
return i->f->it_nexus_response(shost, nexus, result);
}

/**
Expand All @@ -300,6 +307,7 @@ srp_attach_transport(struct srp_function_template *ft)
if (!i)
return NULL;

i->t.tsk_mgmt_response = srp_tsk_mgmt_response;
i->t.it_nexus_response = srp_it_nexus_response;

i->t.host_size = sizeof(struct srp_host_attrs);
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/scsi/scsi_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ struct scsi_host_template {
int (* transfer_response)(struct scsi_cmnd *,
void (*done)(struct scsi_cmnd *));

/* Used as callback for the completion of task management request. */
int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64 mid, int result);

/*
* This is an error handling strategy routine. You don't need to
* define one of these if you don't want to - there is a default
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/scsi/scsi_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ struct scsi_transport_template {
* for target drivers.
*/
int (* it_nexus_response)(struct Scsi_Host *, u64, int);

/*
* Used as callback for the completion of task management
* request for target drivers.
*/
int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
};

#define transport_class_to_shost(tc) \
Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/scsi_transport_srp.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct srp_rport {

struct srp_function_template {
/* for target drivers */
int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
int (* it_nexus_response)(struct Scsi_Host *, u64, int);
};

Expand Down

0 comments on commit 4be89da

Please sign in to comment.