diff options
author | Andy Grover <agrover@redhat.com> | 2012-01-19 16:39:11 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-25 17:37:46 -0500 |
commit | e35fa8c2d0feb977c2f7d14a973b4132483ffef3 (patch) | |
tree | 51e22df14dcef278c0eb6a3433b06e48a18a6d09 /drivers/scsi/libfc | |
parent | 8e94b8db6121570f5ceb1aede9b28db93461cb86 (diff) |
scsi: Use struct scsi_lun in fc/fcp.h
This allows us to use scsilun_to_int without an ugly cast.
Fix up places that use scsilun_to_int on fcp->fc_lun accordingly.
In fc target, this leaves ft_cmd.lun unused, so remove it.
Signed-off-by: Andy Grover <agrover@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Kiran Patil <kiran.patil@intel.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index f607314810ac..25de09f4ffcf 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -1074,8 +1074,7 @@ static int fc_fcp_pkt_send(struct fc_lport *lport, struct fc_fcp_pkt *fsp) | |||
1074 | fsp->cdb_cmd.fc_dl = htonl(fsp->data_len); | 1074 | fsp->cdb_cmd.fc_dl = htonl(fsp->data_len); |
1075 | fsp->cdb_cmd.fc_flags = fsp->req_flags & ~FCP_CFL_LEN_MASK; | 1075 | fsp->cdb_cmd.fc_flags = fsp->req_flags & ~FCP_CFL_LEN_MASK; |
1076 | 1076 | ||
1077 | int_to_scsilun(fsp->cmd->device->lun, | 1077 | int_to_scsilun(fsp->cmd->device->lun, &fsp->cdb_cmd.fc_lun); |
1078 | (struct scsi_lun *)fsp->cdb_cmd.fc_lun); | ||
1079 | memcpy(fsp->cdb_cmd.fc_cdb, fsp->cmd->cmnd, fsp->cmd->cmd_len); | 1078 | memcpy(fsp->cdb_cmd.fc_cdb, fsp->cmd->cmnd, fsp->cmd->cmd_len); |
1080 | 1079 | ||
1081 | spin_lock_irqsave(&si->scsi_queue_lock, flags); | 1080 | spin_lock_irqsave(&si->scsi_queue_lock, flags); |
@@ -1257,7 +1256,7 @@ static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp, | |||
1257 | 1256 | ||
1258 | fsp->cdb_cmd.fc_dl = htonl(fsp->data_len); | 1257 | fsp->cdb_cmd.fc_dl = htonl(fsp->data_len); |
1259 | fsp->cdb_cmd.fc_tm_flags = FCP_TMF_LUN_RESET; | 1258 | fsp->cdb_cmd.fc_tm_flags = FCP_TMF_LUN_RESET; |
1260 | int_to_scsilun(lun, (struct scsi_lun *)fsp->cdb_cmd.fc_lun); | 1259 | int_to_scsilun(lun, &fsp->cdb_cmd.fc_lun); |
1261 | 1260 | ||
1262 | fsp->wait_for_comp = 1; | 1261 | fsp->wait_for_comp = 1; |
1263 | init_completion(&fsp->tm_done); | 1262 | init_completion(&fsp->tm_done); |