File tree Expand file tree Collapse file tree 3 files changed +163
-154
lines changed Expand file tree Collapse file tree 3 files changed +163
-154
lines changed Original file line number Diff line number Diff line change 8989#define FNIC_DEV_RST_ABTS_PENDING BIT(21)
9090
9191/*
92- * Usage of the scsi_cmnd scratchpad .
92+ * fnic private data per SCSI command .
9393 * These fields are locked by the hashed io_req_lock.
9494 */
95- #define CMD_SP (Cmnd ) ((Cmnd)->SCp.ptr)
96- #define CMD_STATE (Cmnd ) ((Cmnd)->SCp.phase)
97- #define CMD_ABTS_STATUS (Cmnd ) ((Cmnd)->SCp.Message)
98- #define CMD_LR_STATUS (Cmnd ) ((Cmnd)->SCp.have_data_in)
99- #define CMD_TAG (Cmnd ) ((Cmnd)->SCp.sent_command)
100- #define CMD_FLAGS (Cmnd ) ((Cmnd)->SCp.Status)
95+ struct fnic_cmd_priv {
96+ struct fnic_io_req * io_req ;
97+ enum fnic_ioreq_state state ;
98+ u32 flags ;
99+ u16 abts_status ;
100+ u16 lr_status ;
101+ };
102+
103+ static inline struct fnic_cmd_priv * fnic_priv (struct scsi_cmnd * cmd )
104+ {
105+ return scsi_cmd_priv (cmd );
106+ }
107+
108+ static inline u64 fnic_flags_and_state (struct scsi_cmnd * cmd )
109+ {
110+ struct fnic_cmd_priv * fcmd = fnic_priv (cmd );
111+
112+ return ((u64 )fcmd -> flags << 32 ) | fcmd -> state ;
113+ }
101114
102115#define FCPIO_INVALID_CODE 0x100 /* hdr_status value unused by firmware */
103116
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ static struct scsi_host_template fnic_host_template = {
124124 .max_sectors = 0xffff ,
125125 .shost_groups = fnic_host_groups ,
126126 .track_queue_depth = 1 ,
127+ .cmd_size = sizeof (struct fnic_cmd_priv ),
127128};
128129
129130static void
You can’t perform that action at this time.
0 commit comments