Commit 86b86a7d authored by Karan Tilak Kumar's avatar Karan Tilak Kumar Committed by Martin K. Petersen

scsi: fnic: Rename wq_copy to hw_copy_wq

Rename wq_copy to hw_copy_wq to accurately describe the copy
workqueue. This will also help distinguish this data structure from
software data structures that can be introduced.
Reviewed-by: default avatarSesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: default avatarArulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarKaran Tilak Kumar <kartilak@cisco.com>
Link: https://lore.kernel.org/r/20231211173617.932990-5-kartilak@cisco.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3df9dd0d
...@@ -307,7 +307,7 @@ struct fnic { ...@@ -307,7 +307,7 @@ struct fnic {
/*** FIP related data members -- end ***/ /*** FIP related data members -- end ***/
/* copy work queue cache line section */ /* copy work queue cache line section */
____cacheline_aligned struct vnic_wq_copy wq_copy[FNIC_WQ_COPY_MAX]; ____cacheline_aligned struct vnic_wq_copy hw_copy_wq[FNIC_WQ_COPY_MAX];
/* completion queue cache line section */ /* completion queue cache line section */
____cacheline_aligned struct vnic_cq cq[FNIC_CQ_MAX]; ____cacheline_aligned struct vnic_cq cq[FNIC_CQ_MAX];
......
...@@ -224,7 +224,7 @@ int fnic_set_intr_mode(struct fnic *fnic) ...@@ -224,7 +224,7 @@ int fnic_set_intr_mode(struct fnic *fnic)
{ {
unsigned int n = ARRAY_SIZE(fnic->rq); unsigned int n = ARRAY_SIZE(fnic->rq);
unsigned int m = ARRAY_SIZE(fnic->wq); unsigned int m = ARRAY_SIZE(fnic->wq);
unsigned int o = ARRAY_SIZE(fnic->wq_copy); unsigned int o = ARRAY_SIZE(fnic->hw_copy_wq);
/* /*
* Set interrupt mode (INTx, MSI, MSI-X) depending * Set interrupt mode (INTx, MSI, MSI-X) depending
......
...@@ -355,7 +355,7 @@ void fnic_log_q_error(struct fnic *fnic) ...@@ -355,7 +355,7 @@ void fnic_log_q_error(struct fnic *fnic)
} }
for (i = 0; i < fnic->wq_copy_count; i++) { for (i = 0; i < fnic->wq_copy_count; i++) {
error_status = ioread32(&fnic->wq_copy[i].ctrl->error_status); error_status = ioread32(&fnic->hw_copy_wq[i].ctrl->error_status);
if (error_status) if (error_status)
shost_printk(KERN_ERR, fnic->lport->host, shost_printk(KERN_ERR, fnic->lport->host,
"CWQ[%d] error_status" "CWQ[%d] error_status"
...@@ -492,7 +492,7 @@ static int fnic_cleanup(struct fnic *fnic) ...@@ -492,7 +492,7 @@ static int fnic_cleanup(struct fnic *fnic)
return err; return err;
} }
for (i = 0; i < fnic->wq_copy_count; i++) { for (i = 0; i < fnic->wq_copy_count; i++) {
err = vnic_wq_copy_disable(&fnic->wq_copy[i]); err = vnic_wq_copy_disable(&fnic->hw_copy_wq[i]);
if (err) if (err)
return err; return err;
} }
...@@ -508,7 +508,7 @@ static int fnic_cleanup(struct fnic *fnic) ...@@ -508,7 +508,7 @@ static int fnic_cleanup(struct fnic *fnic)
for (i = 0; i < fnic->rq_count; i++) for (i = 0; i < fnic->rq_count; i++)
vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf); vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf);
for (i = 0; i < fnic->wq_copy_count; i++) for (i = 0; i < fnic->wq_copy_count; i++)
vnic_wq_copy_clean(&fnic->wq_copy[i], vnic_wq_copy_clean(&fnic->hw_copy_wq[i],
fnic_wq_copy_cleanup_handler); fnic_wq_copy_cleanup_handler);
for (i = 0; i < fnic->cq_count; i++) for (i = 0; i < fnic->cq_count; i++)
...@@ -909,7 +909,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -909,7 +909,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
for (i = 0; i < fnic->raw_wq_count; i++) for (i = 0; i < fnic->raw_wq_count; i++)
vnic_wq_enable(&fnic->wq[i]); vnic_wq_enable(&fnic->wq[i]);
for (i = 0; i < fnic->wq_copy_count; i++) for (i = 0; i < fnic->wq_copy_count; i++)
vnic_wq_copy_enable(&fnic->wq_copy[i]); vnic_wq_copy_enable(&fnic->hw_copy_wq[i]);
fc_fabric_login(lp); fc_fabric_login(lp);
......
...@@ -203,7 +203,7 @@ void fnic_free_vnic_resources(struct fnic *fnic) ...@@ -203,7 +203,7 @@ void fnic_free_vnic_resources(struct fnic *fnic)
vnic_wq_free(&fnic->wq[i]); vnic_wq_free(&fnic->wq[i]);
for (i = 0; i < fnic->wq_copy_count; i++) for (i = 0; i < fnic->wq_copy_count; i++)
vnic_wq_copy_free(&fnic->wq_copy[i]); vnic_wq_copy_free(&fnic->hw_copy_wq[i]);
for (i = 0; i < fnic->rq_count; i++) for (i = 0; i < fnic->rq_count; i++)
vnic_rq_free(&fnic->rq[i]); vnic_rq_free(&fnic->rq[i]);
...@@ -250,7 +250,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic) ...@@ -250,7 +250,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic)
/* Allocate Copy WQs used for SCSI IOs */ /* Allocate Copy WQs used for SCSI IOs */
for (i = 0; i < fnic->wq_copy_count; i++) { for (i = 0; i < fnic->wq_copy_count; i++) {
err = vnic_wq_copy_alloc(fnic->vdev, &fnic->wq_copy[i], err = vnic_wq_copy_alloc(fnic->vdev, &fnic->hw_copy_wq[i],
(fnic->raw_wq_count + i), (fnic->raw_wq_count + i),
fnic->config.wq_copy_desc_count, fnic->config.wq_copy_desc_count,
sizeof(struct fcpio_host_req)); sizeof(struct fcpio_host_req));
...@@ -357,7 +357,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic) ...@@ -357,7 +357,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic)
} }
for (i = 0; i < fnic->wq_copy_count; i++) { for (i = 0; i < fnic->wq_copy_count; i++) {
vnic_wq_copy_init(&fnic->wq_copy[i], vnic_wq_copy_init(&fnic->hw_copy_wq[i],
0 /* cq_index 0 - always */, 0 /* cq_index 0 - always */,
error_interrupt_enable, error_interrupt_enable,
error_interrupt_offset); error_interrupt_offset);
......
...@@ -193,7 +193,7 @@ __fnic_set_state_flags(struct fnic *fnic, unsigned long st_flags, ...@@ -193,7 +193,7 @@ __fnic_set_state_flags(struct fnic *fnic, unsigned long st_flags,
*/ */
int fnic_fw_reset_handler(struct fnic *fnic) int fnic_fw_reset_handler(struct fnic *fnic)
{ {
struct vnic_wq_copy *wq = &fnic->wq_copy[0]; struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
int ret = 0; int ret = 0;
unsigned long flags; unsigned long flags;
...@@ -246,7 +246,7 @@ int fnic_fw_reset_handler(struct fnic *fnic) ...@@ -246,7 +246,7 @@ int fnic_fw_reset_handler(struct fnic *fnic)
*/ */
int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id) int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id)
{ {
struct vnic_wq_copy *wq = &fnic->wq_copy[0]; struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
enum fcpio_flogi_reg_format_type format; enum fcpio_flogi_reg_format_type format;
struct fc_lport *lp = fnic->lport; struct fc_lport *lp = fnic->lport;
u8 gw_mac[ETH_ALEN]; u8 gw_mac[ETH_ALEN];
...@@ -551,7 +551,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc) ...@@ -551,7 +551,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
fnic_priv(sc)->flags |= FNIC_IO_INITIALIZED; fnic_priv(sc)->flags |= FNIC_IO_INITIALIZED;
/* create copy wq desc and enqueue it */ /* create copy wq desc and enqueue it */
wq = &fnic->wq_copy[0]; wq = &fnic->hw_copy_wq[0];
ret = fnic_queue_wq_copy_desc(fnic, wq, io_req, sc, sg_count); ret = fnic_queue_wq_copy_desc(fnic, wq, io_req, sc, sg_count);
if (ret) { if (ret) {
/* /*
...@@ -782,7 +782,7 @@ static inline void fnic_fcpio_ack_handler(struct fnic *fnic, ...@@ -782,7 +782,7 @@ static inline void fnic_fcpio_ack_handler(struct fnic *fnic,
u64 *ox_id_tag = (u64 *)(void *)desc; u64 *ox_id_tag = (u64 *)(void *)desc;
/* mark the ack state */ /* mark the ack state */
wq = &fnic->wq_copy[cq_index - fnic->raw_wq_count - fnic->rq_count]; wq = &fnic->hw_copy_wq[cq_index - fnic->raw_wq_count - fnic->rq_count];
spin_lock_irqsave(&fnic->wq_copy_lock[0], flags); spin_lock_irqsave(&fnic->wq_copy_lock[0], flags);
fnic->fnic_stats.misc_stats.last_ack_time = jiffies; fnic->fnic_stats.misc_stats.last_ack_time = jiffies;
...@@ -1502,7 +1502,7 @@ static inline int fnic_queue_abort_io_req(struct fnic *fnic, int tag, ...@@ -1502,7 +1502,7 @@ static inline int fnic_queue_abort_io_req(struct fnic *fnic, int tag,
u32 task_req, u8 *fc_lun, u32 task_req, u8 *fc_lun,
struct fnic_io_req *io_req) struct fnic_io_req *io_req)
{ {
struct vnic_wq_copy *wq = &fnic->wq_copy[0]; struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
struct Scsi_Host *host = fnic->lport->host; struct Scsi_Host *host = fnic->lport->host;
struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats;
unsigned long flags; unsigned long flags;
...@@ -1948,7 +1948,7 @@ static inline int fnic_queue_dr_io_req(struct fnic *fnic, ...@@ -1948,7 +1948,7 @@ static inline int fnic_queue_dr_io_req(struct fnic *fnic,
struct scsi_cmnd *sc, struct scsi_cmnd *sc,
struct fnic_io_req *io_req) struct fnic_io_req *io_req)
{ {
struct vnic_wq_copy *wq = &fnic->wq_copy[0]; struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
struct Scsi_Host *host = fnic->lport->host; struct Scsi_Host *host = fnic->lport->host;
struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats; struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats;
struct scsi_lun fc_lun; struct scsi_lun fc_lun;
......
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