aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h76
1 files changed, 33 insertions, 43 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 7d96829b0c00..5d1a758e0595 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -281,9 +281,6 @@ struct fc_seq_els_data {
281 * @timer: The command timer 281 * @timer: The command timer
282 * @tm_done: Completion indicator 282 * @tm_done: Completion indicator
283 * @wait_for_comp: Indicator to wait for completion of the I/O (in jiffies) 283 * @wait_for_comp: Indicator to wait for completion of the I/O (in jiffies)
284 * @start_time: Timestamp indicating the start of the I/O (in jiffies)
285 * @end_time: Timestamp indicating the end of the I/O (in jiffies)
286 * @last_pkt_time: Timestamp of the last frame received (in jiffies)
287 * @data_len: The length of the data 284 * @data_len: The length of the data
288 * @cdb_cmd: The CDB command 285 * @cdb_cmd: The CDB command
289 * @xfer_len: The transfer length 286 * @xfer_len: The transfer length
@@ -304,50 +301,46 @@ struct fc_seq_els_data {
304 * @recov_seq: The sequence for REC or SRR 301 * @recov_seq: The sequence for REC or SRR
305 */ 302 */
306struct fc_fcp_pkt { 303struct fc_fcp_pkt {
307 /* Housekeeping information */
308 struct fc_lport *lp;
309 u16 state;
310 atomic_t ref_cnt;
311 spinlock_t scsi_pkt_lock; 304 spinlock_t scsi_pkt_lock;
305 atomic_t ref_cnt;
306
307 /* SCSI command and data transfer information */
308 u32 data_len;
312 309
313 /* SCSI I/O related information */ 310 /* SCSI I/O related information */
314 struct scsi_cmnd *cmd; 311 struct scsi_cmnd *cmd;
315 struct list_head list; 312 struct list_head list;
316 313
317 /* Timeout related information */ 314 /* Housekeeping information */
318 struct timer_list timer; 315 struct fc_lport *lp;
319 struct completion tm_done; 316 u8 state;
320 int wait_for_comp;
321 unsigned long start_time;
322 unsigned long end_time;
323 unsigned long last_pkt_time;
324
325 /* SCSI command and data transfer information */
326 u32 data_len;
327
328 /* Transport related veriables */
329 struct fcp_cmnd cdb_cmd;
330 size_t xfer_len;
331 u16 xfer_ddp;
332 u32 xfer_contig_end;
333 u16 max_payload;
334 317
335 /* SCSI/FCP return status */ 318 /* SCSI/FCP return status */
336 u32 io_status;
337 u8 cdb_status; 319 u8 cdb_status;
338 u8 status_code; 320 u8 status_code;
339 u8 scsi_comp_flags; 321 u8 scsi_comp_flags;
322 u32 io_status;
340 u32 req_flags; 323 u32 req_flags;
341 u32 scsi_resid; 324 u32 scsi_resid;
342 325
326 /* Transport related veriables */
327 size_t xfer_len;
328 struct fcp_cmnd cdb_cmd;
329 u32 xfer_contig_end;
330 u16 max_payload;
331 u16 xfer_ddp;
332
343 /* Associated structures */ 333 /* Associated structures */
344 struct fc_rport *rport; 334 struct fc_rport *rport;
345 struct fc_seq *seq_ptr; 335 struct fc_seq *seq_ptr;
346 336
347 /* Error Processing information */ 337 /* Timeout/error related information */
348 u8 recov_retry; 338 struct timer_list timer;
339 int wait_for_comp;
340 u32 recov_retry;
349 struct fc_seq *recov_seq; 341 struct fc_seq *recov_seq;
350}; 342 struct completion tm_done;
343} ____cacheline_aligned_in_smp;
351 344
352/* 345/*
353 * Structure and function definitions for managing Fibre Channel Exchanges 346 * Structure and function definitions for managing Fibre Channel Exchanges
@@ -413,35 +406,32 @@ struct fc_seq {
413 * sequence allocation 406 * sequence allocation
414 */ 407 */
415struct fc_exch { 408struct fc_exch {
409 spinlock_t ex_lock;
410 atomic_t ex_refcnt;
411 enum fc_class class;
416 struct fc_exch_mgr *em; 412 struct fc_exch_mgr *em;
417 struct fc_exch_pool *pool; 413 struct fc_exch_pool *pool;
418 u32 state;
419 u16 xid;
420 struct list_head ex_list; 414 struct list_head ex_list;
421 spinlock_t ex_lock;
422 atomic_t ex_refcnt;
423 struct delayed_work timeout_work;
424 struct fc_lport *lp; 415 struct fc_lport *lp;
416 u32 esb_stat;
417 u8 state;
418 u8 fh_type;
419 u8 seq_id;
420 u8 encaps;
421 u16 xid;
425 u16 oxid; 422 u16 oxid;
426 u16 rxid; 423 u16 rxid;
427 u32 oid; 424 u32 oid;
428 u32 sid; 425 u32 sid;
429 u32 did; 426 u32 did;
430 u32 esb_stat;
431 u32 r_a_tov; 427 u32 r_a_tov;
432 u8 seq_id;
433 u8 encaps;
434 u32 f_ctl; 428 u32 f_ctl;
435 u8 fh_type; 429 struct fc_seq seq;
436 enum fc_class class;
437 struct fc_seq seq;
438
439 void (*resp)(struct fc_seq *, struct fc_frame *, void *); 430 void (*resp)(struct fc_seq *, struct fc_frame *, void *);
440 void *arg; 431 void *arg;
441
442 void (*destructor)(struct fc_seq *, void *); 432 void (*destructor)(struct fc_seq *, void *);
443 433 struct delayed_work timeout_work;
444}; 434} ____cacheline_aligned_in_smp;
445#define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq) 435#define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
446 436
447 437