Skip to content

Commit 7e6886b

Browse files
Karan Tilak Kumarmartinkpetersen
authored andcommitted
scsi: fnic: Code cleanup
Replace existing host structure with fnic host. Add headers from scsi to support new functionality. Remove unused code and declarations. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://lore.kernel.org/r/20241212020312.4786-14-kartilak@cisco.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a8650a5 commit 7e6886b

File tree

9 files changed

+611
-623
lines changed

9 files changed

+611
-623
lines changed

drivers/scsi/fnic/fdls_disc.c

Lines changed: 332 additions & 332 deletions
Large diffs are not rendered by default.

drivers/scsi/fnic/fip.c

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

drivers/scsi/fnic/fip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth,
140140
u16 op = be16_to_cpu(fiph->fip_op);
141141
u8 sub = fiph->fip_subcode;
142142

143-
FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
143+
FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
144144
"FIP %s packet contents: op: 0x%x sub: 0x%x (len = %d)",
145145
pfx, op, sub, len);
146146

drivers/scsi/fnic/fnic.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include <linux/netdevice.h>
1111
#include <linux/workqueue.h>
1212
#include <linux/bitops.h>
13-
#include <scsi/libfc.h>
14-
#include <scsi/libfcoe.h>
1513
#include <scsi/scsi_cmnd.h>
1614
#include <scsi/scsi_transport.h>
1715
#include <scsi/scsi_transport_fc.h>
@@ -346,8 +344,6 @@ struct fnic {
346344
enum fnic_role_e role;
347345
struct fnic_iport_s iport;
348346
struct Scsi_Host *host;
349-
struct fc_lport *lport;
350-
struct fcoe_ctlr ctlr; /* FIP FCoE controller structure */
351347
struct vnic_dev_bar bar0;
352348

353349
struct fnic_msix_entry msix[FNIC_MSIX_INTR_MAX];
@@ -380,9 +376,6 @@ struct fnic {
380376
u32 vlan_hw_insert:1; /* let hw insert the tag */
381377
u32 in_remove:1; /* fnic device in removal */
382378
u32 stop_rx_link_events:1; /* stop proc. rx frames, link events */
383-
u32 link_events:1; /* set when we get any link event*/
384-
385-
struct completion *remove_wait; /* device remove thread blocks */
386379

387380
struct completion *fw_reset_done;
388381
u32 reset_in_progress;
@@ -572,7 +565,7 @@ fnic_scsi_io_iter(struct fnic *fnic,
572565
.data1 = data1,
573566
.data2 = data2,
574567
};
575-
scsi_host_busy_iter(fnic->lport->host, fnic_io_iter_handler, &iter_data);
568+
scsi_host_busy_iter(fnic->host, fnic_io_iter_handler, &iter_data);
576569
}
577570

578571
#ifdef FNIC_DEBUG
@@ -582,7 +575,7 @@ fnic_debug_dump(struct fnic *fnic, uint8_t *u8arr, int len)
582575
int i;
583576

584577
for (i = 0; i < len; i = i+8) {
585-
FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
578+
FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
586579
"%d: %02x %02x %02x %02x %02x %02x %02x %02x", i / 8,
587580
u8arr[i + 0], u8arr[i + 1], u8arr[i + 2], u8arr[i + 3],
588581
u8arr[i + 4], u8arr[i + 5], u8arr[i + 6], u8arr[i + 7]);
@@ -597,7 +590,7 @@ fnic_debug_dump_fc_frame(struct fnic *fnic, struct fc_frame_header *fchdr,
597590

598591
s_id = ntoh24(fchdr->fh_s_id);
599592
d_id = ntoh24(fchdr->fh_d_id);
600-
FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, fnic->fnic_num,
593+
FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
601594
"%s packet contents: sid/did/type/oxid = 0x%x/0x%x/0x%x/0x%x (len = %d)\n",
602595
pfx, s_id, d_id, fchdr->fh_type,
603596
FNIC_STD_GET_OX_ID(fchdr), len);

drivers/scsi/fnic/fnic_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ int fnic_stats_debugfs_init(struct fnic *fnic)
682682
int rc = -1;
683683
char name[16];
684684

685-
snprintf(name, sizeof(name), "host%d", fnic->lport->host->host_no);
685+
snprintf(name, sizeof(name), "host%d", fnic->host->host_no);
686686

687687
if (!fnic_stats_debugfs_root) {
688688
pr_debug("fnic_stats root doesn't exist\n");

0 commit comments

Comments
 (0)