diff options
-rw-r--r-- | drivers/scsi/bfa/bfad_bsg.c | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_bsg.h | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index f31acfa3f11..9863b1c2e56 100644 --- a/drivers/scsi/bfa/bfad_bsg.c +++ b/drivers/scsi/bfa/bfad_bsg.c @@ -3371,7 +3371,8 @@ bfad_im_bsg_els_ct_request(struct fc_bsg_job *job) goto out; } - if (copy_from_user((uint8_t *)bsg_fcpt, bsg_data->payload, + if (copy_from_user((uint8_t *)bsg_fcpt, + (void *)(unsigned long)bsg_data->payload, bsg_data->payload_len)) { kfree(bsg_fcpt); rc = -EIO; @@ -3525,8 +3526,8 @@ out_free_mem: kfree(rsp_kbuf); /* Need a copy to user op */ - if (copy_to_user(bsg_data->payload, (void *) bsg_fcpt, - bsg_data->payload_len)) + if (copy_to_user((void *)(unsigned long)bsg_data->payload, + (void *)bsg_fcpt, bsg_data->payload_len)) rc = -EIO; kfree(bsg_fcpt); diff --git a/drivers/scsi/bfa/bfad_bsg.h b/drivers/scsi/bfa/bfad_bsg.h index 3ef321cd7e2..b0b5ac7a75f 100644 --- a/drivers/scsi/bfa/bfad_bsg.h +++ b/drivers/scsi/bfa/bfad_bsg.h @@ -819,10 +819,12 @@ struct bfa_bsg_fcpt_s { }; #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s +#pragma pack(1) struct bfa_bsg_data { int payload_len; - void *payload; + u64 payload; }; +#pragma pack() #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ |