Skip to content

Commit

Permalink
scsi: Get rid of struct fc_bsg_buffer
Browse files Browse the repository at this point in the history
struct fc_bsg_buffer is just a clone of struct bsg_buffer from bsg-lib,
so use this one instead.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Johannes Thumshirn authored and Martin K. Petersen committed Nov 18, 2016
1 parent af15769 commit eb34094
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 2 additions & 1 deletion drivers/scsi/lpfc/lpfc_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/bsg-lib.h>

#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
Expand Down Expand Up @@ -211,7 +212,7 @@ lpfc_alloc_bsg_buffers(struct lpfc_hba *phba, unsigned int size,

static unsigned int
lpfc_bsg_copy_data(struct lpfc_dmabuf *dma_buffers,
struct fc_bsg_buffer *bsg_buffers,
struct bsg_buffer *bsg_buffers,
unsigned int bytes_to_transfer, int to_buffers)
{

Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3671,7 +3671,7 @@ fc_bsg_job_timeout(struct request *req)
}

static int
fc_bsg_map_buffer(struct fc_bsg_buffer *buf, struct request *req)
fc_bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
{
size_t sz = (sizeof(struct scatterlist) * req->nr_phys_segments);

Expand Down
12 changes: 3 additions & 9 deletions include/scsi/scsi_transport_fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define SCSI_TRANSPORT_FC_H

#include <linux/sched.h>
#include <linux/bsg-lib.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_netlink.h>
Expand Down Expand Up @@ -624,13 +625,6 @@ struct fc_host_attrs {
#define fc_host_dev_loss_tmo(x) \
(((struct fc_host_attrs *)(x)->shost_data)->dev_loss_tmo)


struct fc_bsg_buffer {
unsigned int payload_len;
int sg_cnt;
struct scatterlist *sg_list;
};

/* Values for fc_bsg_job->state_flags (bitflags) */
#define FC_RQST_STATE_INPROGRESS 0
#define FC_RQST_STATE_DONE 1
Expand Down Expand Up @@ -659,8 +653,8 @@ struct fc_bsg_job {
*/

/* DMA payloads for the request/response */
struct fc_bsg_buffer request_payload;
struct fc_bsg_buffer reply_payload;
struct bsg_buffer request_payload;
struct bsg_buffer reply_payload;

void *dd_data; /* Used for driver-specific storage */
};
Expand Down

0 comments on commit eb34094

Please sign in to comment.