Skip to content

Commit 86b86a7

Browse files
Karan Tilak Kumarmartinkpetersen
authored andcommitted
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: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20231211173617.932990-5-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 3df9dd0 commit 86b86a7

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

drivers/scsi/fnic/fnic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ struct fnic {
307307
/*** FIP related data members -- end ***/
308308

309309
/* copy work queue cache line section */
310-
____cacheline_aligned struct vnic_wq_copy wq_copy[FNIC_WQ_COPY_MAX];
310+
____cacheline_aligned struct vnic_wq_copy hw_copy_wq[FNIC_WQ_COPY_MAX];
311311
/* completion queue cache line section */
312312
____cacheline_aligned struct vnic_cq cq[FNIC_CQ_MAX];
313313

drivers/scsi/fnic/fnic_isr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int fnic_set_intr_mode(struct fnic *fnic)
224224
{
225225
unsigned int n = ARRAY_SIZE(fnic->rq);
226226
unsigned int m = ARRAY_SIZE(fnic->wq);
227-
unsigned int o = ARRAY_SIZE(fnic->wq_copy);
227+
unsigned int o = ARRAY_SIZE(fnic->hw_copy_wq);
228228

229229
/*
230230
* Set interrupt mode (INTx, MSI, MSI-X) depending

drivers/scsi/fnic/fnic_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void fnic_log_q_error(struct fnic *fnic)
355355
}
356356

357357
for (i = 0; i < fnic->wq_copy_count; i++) {
358-
error_status = ioread32(&fnic->wq_copy[i].ctrl->error_status);
358+
error_status = ioread32(&fnic->hw_copy_wq[i].ctrl->error_status);
359359
if (error_status)
360360
shost_printk(KERN_ERR, fnic->lport->host,
361361
"CWQ[%d] error_status"
@@ -492,7 +492,7 @@ static int fnic_cleanup(struct fnic *fnic)
492492
return err;
493493
}
494494
for (i = 0; i < fnic->wq_copy_count; i++) {
495-
err = vnic_wq_copy_disable(&fnic->wq_copy[i]);
495+
err = vnic_wq_copy_disable(&fnic->hw_copy_wq[i]);
496496
if (err)
497497
return err;
498498
}
@@ -508,7 +508,7 @@ static int fnic_cleanup(struct fnic *fnic)
508508
for (i = 0; i < fnic->rq_count; i++)
509509
vnic_rq_clean(&fnic->rq[i], fnic_free_rq_buf);
510510
for (i = 0; i < fnic->wq_copy_count; i++)
511-
vnic_wq_copy_clean(&fnic->wq_copy[i],
511+
vnic_wq_copy_clean(&fnic->hw_copy_wq[i],
512512
fnic_wq_copy_cleanup_handler);
513513

514514
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)
909909
for (i = 0; i < fnic->raw_wq_count; i++)
910910
vnic_wq_enable(&fnic->wq[i]);
911911
for (i = 0; i < fnic->wq_copy_count; i++)
912-
vnic_wq_copy_enable(&fnic->wq_copy[i]);
912+
vnic_wq_copy_enable(&fnic->hw_copy_wq[i]);
913913

914914
fc_fabric_login(lp);
915915

drivers/scsi/fnic/fnic_res.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void fnic_free_vnic_resources(struct fnic *fnic)
203203
vnic_wq_free(&fnic->wq[i]);
204204

205205
for (i = 0; i < fnic->wq_copy_count; i++)
206-
vnic_wq_copy_free(&fnic->wq_copy[i]);
206+
vnic_wq_copy_free(&fnic->hw_copy_wq[i]);
207207

208208
for (i = 0; i < fnic->rq_count; i++)
209209
vnic_rq_free(&fnic->rq[i]);
@@ -250,7 +250,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic)
250250

251251
/* Allocate Copy WQs used for SCSI IOs */
252252
for (i = 0; i < fnic->wq_copy_count; i++) {
253-
err = vnic_wq_copy_alloc(fnic->vdev, &fnic->wq_copy[i],
253+
err = vnic_wq_copy_alloc(fnic->vdev, &fnic->hw_copy_wq[i],
254254
(fnic->raw_wq_count + i),
255255
fnic->config.wq_copy_desc_count,
256256
sizeof(struct fcpio_host_req));
@@ -357,7 +357,7 @@ int fnic_alloc_vnic_resources(struct fnic *fnic)
357357
}
358358

359359
for (i = 0; i < fnic->wq_copy_count; i++) {
360-
vnic_wq_copy_init(&fnic->wq_copy[i],
360+
vnic_wq_copy_init(&fnic->hw_copy_wq[i],
361361
0 /* cq_index 0 - always */,
362362
error_interrupt_enable,
363363
error_interrupt_offset);

drivers/scsi/fnic/fnic_scsi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ __fnic_set_state_flags(struct fnic *fnic, unsigned long st_flags,
193193
*/
194194
int fnic_fw_reset_handler(struct fnic *fnic)
195195
{
196-
struct vnic_wq_copy *wq = &fnic->wq_copy[0];
196+
struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
197197
int ret = 0;
198198
unsigned long flags;
199199

@@ -246,7 +246,7 @@ int fnic_fw_reset_handler(struct fnic *fnic)
246246
*/
247247
int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id)
248248
{
249-
struct vnic_wq_copy *wq = &fnic->wq_copy[0];
249+
struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
250250
enum fcpio_flogi_reg_format_type format;
251251
struct fc_lport *lp = fnic->lport;
252252
u8 gw_mac[ETH_ALEN];
@@ -551,7 +551,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
551551
fnic_priv(sc)->flags |= FNIC_IO_INITIALIZED;
552552

553553
/* create copy wq desc and enqueue it */
554-
wq = &fnic->wq_copy[0];
554+
wq = &fnic->hw_copy_wq[0];
555555
ret = fnic_queue_wq_copy_desc(fnic, wq, io_req, sc, sg_count);
556556
if (ret) {
557557
/*
@@ -782,7 +782,7 @@ static inline void fnic_fcpio_ack_handler(struct fnic *fnic,
782782
u64 *ox_id_tag = (u64 *)(void *)desc;
783783

784784
/* mark the ack state */
785-
wq = &fnic->wq_copy[cq_index - fnic->raw_wq_count - fnic->rq_count];
785+
wq = &fnic->hw_copy_wq[cq_index - fnic->raw_wq_count - fnic->rq_count];
786786
spin_lock_irqsave(&fnic->wq_copy_lock[0], flags);
787787

788788
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,
15021502
u32 task_req, u8 *fc_lun,
15031503
struct fnic_io_req *io_req)
15041504
{
1505-
struct vnic_wq_copy *wq = &fnic->wq_copy[0];
1505+
struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
15061506
struct Scsi_Host *host = fnic->lport->host;
15071507
struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats;
15081508
unsigned long flags;
@@ -1948,7 +1948,7 @@ static inline int fnic_queue_dr_io_req(struct fnic *fnic,
19481948
struct scsi_cmnd *sc,
19491949
struct fnic_io_req *io_req)
19501950
{
1951-
struct vnic_wq_copy *wq = &fnic->wq_copy[0];
1951+
struct vnic_wq_copy *wq = &fnic->hw_copy_wq[0];
19521952
struct Scsi_Host *host = fnic->lport->host;
19531953
struct misc_stats *misc_stats = &fnic->fnic_stats.misc_stats;
19541954
struct scsi_lun fc_lun;

0 commit comments

Comments
 (0)