Commit f76af7d7 authored by Martin Petermann's avatar Martin Petermann Committed by James Bottomley

[SCSI] zfcp: Cleanup of code in zfcp_scsi.c

Cleanup code in zfcp_scsi.c, fix coding style issues and simplify the
code.
Signed-off-by: default avatarMartin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent feac6a07
...@@ -1065,8 +1065,7 @@ static void zfcp_scsi_dbf_event(const char *tag, const char *tag2, int level, ...@@ -1065,8 +1065,7 @@ static void zfcp_scsi_dbf_event(const char *tag, const char *tag2, int level,
if (fsf_req != NULL) { if (fsf_req != NULL) {
fcp_rsp = (struct fcp_rsp_iu *) fcp_rsp = (struct fcp_rsp_iu *)
&(fsf_req->qtcb->bottom.io.fcp_rsp); &(fsf_req->qtcb->bottom.io.fcp_rsp);
fcp_rsp_info = fcp_rsp_info = (unsigned char *) &fcp_rsp[1];
zfcp_get_fcp_rsp_info_ptr(fcp_rsp);
fcp_sns_info = fcp_sns_info =
zfcp_get_fcp_sns_info_ptr(fcp_rsp); zfcp_get_fcp_sns_info_ptr(fcp_rsp);
......
...@@ -126,12 +126,6 @@ typedef unsigned int fcp_dl_t; ...@@ -126,12 +126,6 @@ typedef unsigned int fcp_dl_t;
/* timeout for name-server lookup (in seconds) */ /* timeout for name-server lookup (in seconds) */
#define ZFCP_NS_GID_PN_TIMEOUT 10 #define ZFCP_NS_GID_PN_TIMEOUT 10
/* largest SCSI command we can process */
/* FCP-2 (FCP_CMND IU) allows up to (255-3+16) */
#define ZFCP_MAX_SCSI_CMND_LENGTH 255
/* maximum number of commands in LUN queue (tagged queueing) */
#define ZFCP_CMND_PER_LUN 32
/* task attribute values in FCP-2 FCP_CMND IU */ /* task attribute values in FCP-2 FCP_CMND IU */
#define SIMPLE_Q 0 #define SIMPLE_Q 0
#define HEAD_OF_Q 1 #define HEAD_OF_Q 1
......
...@@ -102,13 +102,8 @@ extern void zfcp_test_link(struct zfcp_port *); ...@@ -102,13 +102,8 @@ extern void zfcp_test_link(struct zfcp_port *);
extern int zfcp_adapter_scsi_register(struct zfcp_adapter *); extern int zfcp_adapter_scsi_register(struct zfcp_adapter *);
extern void zfcp_adapter_scsi_unregister(struct zfcp_adapter *); extern void zfcp_adapter_scsi_unregister(struct zfcp_adapter *);
extern void zfcp_set_fcp_dl(struct fcp_cmnd_iu *, fcp_dl_t); extern void zfcp_set_fcp_dl(struct fcp_cmnd_iu *, fcp_dl_t);
extern char *zfcp_get_fcp_rsp_info_ptr(struct fcp_rsp_iu *);
extern char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *); extern char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *);
extern fcp_dl_t zfcp_get_fcp_dl(struct fcp_cmnd_iu *);
extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *,
struct scsi_cmnd *, int);
extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, int);
extern struct fc_function_template zfcp_transport_functions; extern struct fc_function_template zfcp_transport_functions;
/******************************** ERP ****************************************/ /******************************** ERP ****************************************/
......
...@@ -3027,7 +3027,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3027,7 +3027,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *) struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *)
&(fsf_req->qtcb->bottom.io.fcp_rsp); &(fsf_req->qtcb->bottom.io.fcp_rsp);
u32 sns_len; u32 sns_len;
char *fcp_rsp_info = zfcp_get_fcp_rsp_info_ptr(fcp_rsp_iu); char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1];
unsigned long flags; unsigned long flags;
read_lock_irqsave(&fsf_req->adapter->abort_lock, flags); read_lock_irqsave(&fsf_req->adapter->abort_lock, flags);
...@@ -3145,7 +3145,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3145,7 +3145,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
int retval = 0; int retval = 0;
struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *) struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *)
&(fsf_req->qtcb->bottom.io.fcp_rsp); &(fsf_req->qtcb->bottom.io.fcp_rsp);
char *fcp_rsp_info = zfcp_get_fcp_rsp_info_ptr(fcp_rsp_iu); char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1];
if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) { if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) {
fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCFAILED; fsf_req->status |= ZFCP_STATUS_FSFREQ_TMFUNCFAILED;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment