Skip to content

Commit 14eb5d9

Browse files
Hiral PatelJames Bottomley
authored andcommitted
[SCSI] fnic: New debug flags and debug log messages
Added new fnic debug flags for identifying IO state at every stage of IO while debugging and also added more log messages for better debugging capability. Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Hiral Patel <hiralpat@cisco.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent a0bf1ca commit 14eb5d9

File tree

3 files changed

+132
-21
lines changed

3 files changed

+132
-21
lines changed

drivers/scsi/fnic/fnic.h

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,29 @@
5959
* Command flags to identify the type of command and for other future
6060
* use.
6161
*/
62-
#define FNIC_NO_FLAGS 0
63-
#define FNIC_CDB_REQ BIT(1) /* All IOs with a valid CDB */
64-
#define FNIC_BLOCKING_REQ BIT(2) /* All blocking Requests */
65-
#define FNIC_DEVICE_RESET BIT(3) /* Device reset request */
66-
#define FNIC_DEV_RST_PENDING BIT(4) /* Device reset pending */
67-
#define FNIC_DEV_RST_TIMED_OUT BIT(5) /* Device reset timed out */
68-
#define FNIC_DEV_RST_TERM_ISSUED BIT(6) /* Device reset terminate */
69-
#define FNIC_DEV_RST_DONE BIT(7) /* Device reset done */
62+
#define FNIC_NO_FLAGS 0
63+
#define FNIC_IO_INITIALIZED BIT(0)
64+
#define FNIC_IO_ISSUED BIT(1)
65+
#define FNIC_IO_DONE BIT(2)
66+
#define FNIC_IO_REQ_NULL BIT(3)
67+
#define FNIC_IO_ABTS_PENDING BIT(4)
68+
#define FNIC_IO_ABORTED BIT(5)
69+
#define FNIC_IO_ABTS_ISSUED BIT(6)
70+
#define FNIC_IO_TERM_ISSUED BIT(7)
71+
#define FNIC_IO_INTERNAL_TERM_ISSUED BIT(8)
72+
#define FNIC_IO_ABT_TERM_DONE BIT(9)
73+
#define FNIC_IO_ABT_TERM_REQ_NULL BIT(10)
74+
#define FNIC_IO_ABT_TERM_TIMED_OUT BIT(11)
75+
#define FNIC_DEVICE_RESET BIT(12) /* Device reset request */
76+
#define FNIC_DEV_RST_ISSUED BIT(13)
77+
#define FNIC_DEV_RST_TIMED_OUT BIT(14)
78+
#define FNIC_DEV_RST_ABTS_ISSUED BIT(15)
79+
#define FNIC_DEV_RST_TERM_ISSUED BIT(16)
80+
#define FNIC_DEV_RST_DONE BIT(17)
81+
#define FNIC_DEV_RST_REQ_NULL BIT(18)
82+
#define FNIC_DEV_RST_ABTS_DONE BIT(19)
83+
#define FNIC_DEV_RST_TERM_DONE BIT(20)
84+
#define FNIC_DEV_RST_ABTS_PENDING BIT(21)
7085

7186
/*
7287
* Usage of the scsi_cmnd scratchpad.

drivers/scsi/fnic/fnic_io.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ enum fnic_sgl_list_type {
4545
};
4646

4747
enum fnic_ioreq_state {
48-
FNIC_IOREQ_CMD_PENDING = 0,
48+
FNIC_IOREQ_NOT_INITED = 0,
49+
FNIC_IOREQ_CMD_PENDING,
4950
FNIC_IOREQ_ABTS_PENDING,
5051
FNIC_IOREQ_ABTS_COMPLETE,
5152
FNIC_IOREQ_CMD_COMPLETE,
@@ -60,6 +61,7 @@ struct fnic_io_req {
6061
u8 sgl_type; /* device DMA descriptor list type */
6162
u8 io_completed:1; /* set to 1 when fw completes IO */
6263
u32 port_id; /* remote port DID */
64+
unsigned long start_time; /* in jiffies */
6365
struct completion *abts_done; /* completion for abts */
6466
struct completion *dr_done; /* completion for device reset */
6567
};

0 commit comments

Comments
 (0)