forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/scsi/qla2xxx/qla_target.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2004 - 2010 Vladislav Bolkhovitin <vst@vlnb.net>
34 * Copyright (C) 2004 - 2005 Leonid Stoljar
....@@ -9,16 +10,6 @@
910 * Copyright (C) 2010-2011 Nicholas A. Bellinger <nab@kernel.org>
1011 *
1112 * Additional file for the target driver support.
12
- *
13
- * This program is free software; you can redistribute it and/or
14
- * modify it under the terms of the GNU General Public License
15
- * as published by the Free Software Foundation; either version 2
16
- * of the License, or (at your option) any later version.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
2213 */
2314 /*
2415 * This is the global def file that is useful for including from the
....@@ -29,6 +20,7 @@
2920 #define __QLA_TARGET_H
3021
3122 #include "qla_def.h"
23
+#include "qla_dsd.h"
3224
3325 /*
3426 * Must be changed on any change in any initiator visible interfaces or
....@@ -142,37 +134,37 @@
142134 uint8_t entry_status; /* Entry Status. */
143135 union {
144136 struct {
145
- uint32_t sys_define_2; /* System defined. */
137
+ __le32 sys_define_2; /* System defined. */
146138 target_id_t target;
147139 uint8_t target_id;
148140 uint8_t reserved_1;
149
- uint16_t flags;
150
- uint16_t resp_code;
151
- uint16_t status;
152
- uint16_t task_flags;
153
- uint16_t seq_id;
154
- uint16_t srr_rx_id;
155
- uint32_t srr_rel_offs;
156
- uint16_t srr_ui;
157
- uint16_t srr_flags;
158
- uint16_t srr_reject_code;
141
+ __le16 flags;
142
+ __le16 resp_code;
143
+ __le16 status;
144
+ __le16 task_flags;
145
+ __le16 seq_id;
146
+ __le16 srr_rx_id;
147
+ __le32 srr_rel_offs;
148
+ __le16 srr_ui;
149
+ __le16 srr_flags;
150
+ __le16 srr_reject_code;
159151 uint8_t srr_reject_vendor_uniq;
160152 uint8_t srr_reject_code_expl;
161153 uint8_t reserved_2[24];
162154 } isp2x;
163155 struct {
164156 uint32_t handle;
165
- uint16_t nport_handle;
157
+ __le16 nport_handle;
166158 uint16_t reserved_1;
167
- uint16_t flags;
168
- uint16_t srr_rx_id;
169
- uint16_t status;
159
+ __le16 flags;
160
+ __le16 srr_rx_id;
161
+ __le16 status;
170162 uint8_t status_subcode;
171163 uint8_t fw_handle;
172
- uint32_t exchange_address;
173
- uint32_t srr_rel_offs;
174
- uint16_t srr_ui;
175
- uint16_t srr_flags;
164
+ __le32 exchange_address;
165
+ __le32 srr_rel_offs;
166
+ __le16 srr_ui;
167
+ __le16 srr_flags;
176168 uint8_t reserved_4[19];
177169 uint8_t vp_index;
178170 uint8_t srr_reject_vendor_uniq;
....@@ -182,7 +174,7 @@
182174 } isp24;
183175 } u;
184176 uint8_t reserved[2];
185
- uint16_t ox_id;
177
+ __le16 ox_id;
186178 } __packed;
187179 #define NOTIFY_ACK_FLAGS_TERMINATE BIT_3
188180 #define NOTIFY_ACK_SRR_FLAGS_ACCEPT 0
....@@ -213,22 +205,17 @@
213205 uint8_t entry_status; /* Entry Status. */
214206 uint32_t handle; /* System defined handle */
215207 target_id_t target;
216
- uint16_t rx_id;
217
- uint16_t flags;
218
- uint16_t status;
219
- uint16_t timeout; /* 0 = 30 seconds, 0xFFFF = disable */
220
- uint16_t dseg_count; /* Data segment count. */
221
- uint32_t relative_offset;
222
- uint32_t residual;
223
- uint16_t reserved_1[3];
224
- uint16_t scsi_status;
225
- uint32_t transfer_length;
226
- uint32_t dseg_0_address; /* Data segment 0 address. */
227
- uint32_t dseg_0_length; /* Data segment 0 length. */
228
- uint32_t dseg_1_address; /* Data segment 1 address. */
229
- uint32_t dseg_1_length; /* Data segment 1 length. */
230
- uint32_t dseg_2_address; /* Data segment 2 address. */
231
- uint32_t dseg_2_length; /* Data segment 2 length. */
208
+ __le16 rx_id;
209
+ __le16 flags;
210
+ __le16 status;
211
+ __le16 timeout; /* 0 = 30 seconds, 0xFFFF = disable */
212
+ __le16 dseg_count; /* Data segment count. */
213
+ __le32 relative_offset;
214
+ __le32 residual;
215
+ __le16 reserved_1[3];
216
+ __le16 scsi_status;
217
+ __le32 transfer_length;
218
+ struct dsd32 dsd[3];
232219 } __packed;
233220 #define ATIO_PATH_INVALID 0x07
234221 #define ATIO_CANT_PROV_CAP 0x16
....@@ -260,9 +247,9 @@
260247
261248 struct fcp_hdr {
262249 uint8_t r_ctl;
263
- uint8_t d_id[3];
250
+ be_id_t d_id;
264251 uint8_t cs_ctl;
265
- uint8_t s_id[3];
252
+ be_id_t s_id;
266253 uint8_t type;
267254 uint8_t f_ctl[3];
268255 uint8_t seq_id;
....@@ -270,23 +257,23 @@
270257 uint16_t seq_cnt;
271258 __be16 ox_id;
272259 uint16_t rx_id;
273
- uint32_t parameter;
274
-} __packed;
260
+ __le32 parameter;
261
+};
275262
276263 struct fcp_hdr_le {
277
- uint8_t d_id[3];
264
+ le_id_t d_id;
278265 uint8_t r_ctl;
279
- uint8_t s_id[3];
266
+ le_id_t s_id;
280267 uint8_t cs_ctl;
281268 uint8_t f_ctl[3];
282269 uint8_t type;
283
- uint16_t seq_cnt;
270
+ __le16 seq_cnt;
284271 uint8_t df_ctl;
285272 uint8_t seq_id;
286
- uint16_t rx_id;
287
- uint16_t ox_id;
288
- uint32_t parameter;
289
-} __packed;
273
+ __le16 rx_id;
274
+ __le16 ox_id;
275
+ __le32 parameter;
276
+};
290277
291278 #define F_CTL_EXCH_CONTEXT_RESP BIT_23
292279 #define F_CTL_SEQ_CONTEXT_RESIP BIT_22
....@@ -319,7 +306,7 @@
319306 * BUILD_BUG_ON in qlt_init().
320307 */
321308 uint8_t add_cdb[4];
322
- /* uint32_t data_length; */
309
+ /* __le32 data_length; */
323310 } __packed;
324311
325312 /*
....@@ -329,31 +316,31 @@
329316 struct atio_from_isp {
330317 union {
331318 struct {
332
- uint16_t entry_hdr;
319
+ __le16 entry_hdr;
333320 uint8_t sys_define; /* System defined. */
334321 uint8_t entry_status; /* Entry Status. */
335
- uint32_t sys_define_2; /* System defined. */
322
+ __le32 sys_define_2; /* System defined. */
336323 target_id_t target;
337
- uint16_t rx_id;
338
- uint16_t flags;
339
- uint16_t status;
324
+ __le16 rx_id;
325
+ __le16 flags;
326
+ __le16 status;
340327 uint8_t command_ref;
341328 uint8_t task_codes;
342329 uint8_t task_flags;
343330 uint8_t execution_codes;
344331 uint8_t cdb[MAX_CMDSZ];
345
- uint32_t data_length;
346
- uint16_t lun;
332
+ __le32 data_length;
333
+ __le16 lun;
347334 uint8_t initiator_port_name[WWN_SIZE]; /* on qla23xx */
348
- uint16_t reserved_32[6];
349
- uint16_t ox_id;
335
+ __le16 reserved_32[6];
336
+ __le16 ox_id;
350337 } isp2x;
351338 struct {
352
- uint16_t entry_hdr;
339
+ __le16 entry_hdr;
353340 uint8_t fcp_cmnd_len_low;
354341 uint8_t fcp_cmnd_len_high:4;
355342 uint8_t attr:4;
356
- uint32_t exchange_addr;
343
+ __le32 exchange_addr;
357344 #define ATIO_EXCHANGE_ADDRESS_UNKNOWN 0xFFFFFFFF
358345 struct fcp_hdr fcp_hdr;
359346 struct atio7_fcp_cmnd fcp_cmnd;
....@@ -365,7 +352,7 @@
365352 #define FCP_CMD_LENGTH_MASK 0x0fff
366353 #define FCP_CMD_LENGTH_MIN 0x38
367354 uint8_t data[56];
368
- uint32_t signature;
355
+ __le32 signature;
369356 #define ATIO_PROCESSED 0xDEADDEAD /* Signature */
370357 } raw;
371358 } u;
....@@ -392,8 +379,7 @@
392379 {
393380 int len = atio->u.isp24.fcp_cmnd.add_cdb_len;
394381
395
- return (be32_to_cpu(get_unaligned((uint32_t *)
396
- &atio->u.isp24.fcp_cmnd.add_cdb[len * 4])));
382
+ return get_unaligned_be32(&atio->u.isp24.fcp_cmnd.add_cdb[len * 4]);
397383 }
398384
399385 #define CTIO_TYPE7 0x12 /* Continue target I/O entry (for 24xx) */
....@@ -409,39 +395,36 @@
409395 uint8_t sys_define; /* System defined. */
410396 uint8_t entry_status; /* Entry Status. */
411397 uint32_t handle; /* System defined handle */
412
- uint16_t nport_handle;
398
+ __le16 nport_handle;
413399 #define CTIO7_NHANDLE_UNRECOGNIZED 0xFFFF
414
- uint16_t timeout;
415
- uint16_t dseg_count; /* Data segment count. */
400
+ __le16 timeout;
401
+ __le16 dseg_count; /* Data segment count. */
416402 uint8_t vp_index;
417403 uint8_t add_flags;
418
- uint8_t initiator_id[3];
404
+ le_id_t initiator_id;
419405 uint8_t reserved;
420
- uint32_t exchange_addr;
406
+ __le32 exchange_addr;
421407 union {
422408 struct {
423
- uint16_t reserved1;
409
+ __le16 reserved1;
424410 __le16 flags;
425
- uint32_t residual;
411
+ __le32 residual;
426412 __le16 ox_id;
427
- uint16_t scsi_status;
428
- uint32_t relative_offset;
429
- uint32_t reserved2;
430
- uint32_t transfer_length;
431
- uint32_t reserved3;
432
- /* Data segment 0 address. */
433
- uint32_t dseg_0_address[2];
434
- /* Data segment 0 length. */
435
- uint32_t dseg_0_length;
413
+ __le16 scsi_status;
414
+ __le32 relative_offset;
415
+ __le32 reserved2;
416
+ __le32 transfer_length;
417
+ __le32 reserved3;
418
+ struct dsd64 dsd;
436419 } status0;
437420 struct {
438
- uint16_t sense_length;
421
+ __le16 sense_length;
439422 __le16 flags;
440
- uint32_t residual;
423
+ __le32 residual;
441424 __le16 ox_id;
442
- uint16_t scsi_status;
443
- uint16_t response_len;
444
- uint16_t reserved;
425
+ __le16 scsi_status;
426
+ __le16 response_len;
427
+ __le16 reserved;
445428 uint8_t sense_data[24];
446429 } status1;
447430 } u;
....@@ -457,18 +440,18 @@
457440 uint8_t sys_define; /* System defined. */
458441 uint8_t entry_status; /* Entry Status. */
459442 uint32_t handle; /* System defined handle */
460
- uint16_t status;
461
- uint16_t timeout;
462
- uint16_t dseg_count; /* Data segment count. */
443
+ __le16 status;
444
+ __le16 timeout;
445
+ __le16 dseg_count; /* Data segment count. */
463446 uint8_t vp_index;
464447 uint8_t reserved1[5];
465
- uint32_t exchange_address;
466
- uint16_t reserved2;
467
- uint16_t flags;
468
- uint32_t residual;
469
- uint16_t ox_id;
470
- uint16_t reserved3;
471
- uint32_t relative_offset;
448
+ __le32 exchange_address;
449
+ __le16 reserved2;
450
+ __le16 flags;
451
+ __le32 residual;
452
+ __le16 ox_id;
453
+ __le16 reserved3;
454
+ __le32 relative_offset;
472455 uint8_t reserved4[24];
473456 } __packed;
474457
....@@ -506,30 +489,30 @@
506489 uint8_t entry_status; /* Entry Status. */
507490
508491 uint32_t handle; /* System handle. */
509
- uint16_t nport_handle; /* N_PORT handle. */
492
+ __le16 nport_handle; /* N_PORT handle. */
510493 __le16 timeout; /* Command timeout. */
511494
512
- uint16_t dseg_count; /* Data segment count. */
495
+ __le16 dseg_count; /* Data segment count. */
513496 uint8_t vp_index;
514497 uint8_t add_flags; /* additional flags */
515498 #define CTIO_CRC2_AF_DIF_DSD_ENA BIT_3
516499
517
- uint8_t initiator_id[3]; /* initiator ID */
500
+ le_id_t initiator_id; /* initiator ID */
518501 uint8_t reserved1;
519
- uint32_t exchange_addr; /* rcv exchange address */
520
- uint16_t reserved2;
502
+ __le32 exchange_addr; /* rcv exchange address */
503
+ __le16 reserved2;
521504 __le16 flags; /* refer to CTIO7 flags values */
522
- uint32_t residual;
505
+ __le32 residual;
523506 __le16 ox_id;
524
- uint16_t scsi_status;
507
+ __le16 scsi_status;
525508 __le32 relative_offset;
526
- uint32_t reserved5;
509
+ __le32 reserved5;
527510 __le32 transfer_length; /* total fc transfer length */
528
- uint32_t reserved6;
529
- __le32 crc_context_address[2];/* Data segment address. */
530
- uint16_t crc_context_len; /* Data segment length. */
531
- uint16_t reserved_1; /* MUST be set to 0. */
532
-} __packed;
511
+ __le32 reserved6;
512
+ __le64 crc_context_address __packed; /* Data segment address. */
513
+ __le16 crc_context_len; /* Data segment length. */
514
+ __le16 reserved_1; /* MUST be set to 0. */
515
+};
533516
534517 /* CTIO Type CRC_x Status IOCB */
535518 struct ctio_crc_from_fw {
....@@ -539,20 +522,20 @@
539522 uint8_t entry_status; /* Entry Status. */
540523
541524 uint32_t handle; /* System handle. */
542
- uint16_t status;
543
- uint16_t timeout; /* Command timeout. */
544
- uint16_t dseg_count; /* Data segment count. */
545
- uint32_t reserved1;
546
- uint16_t state_flags;
525
+ __le16 status;
526
+ __le16 timeout; /* Command timeout. */
527
+ __le16 dseg_count; /* Data segment count. */
528
+ __le32 reserved1;
529
+ __le16 state_flags;
547530 #define CTIO_CRC_SF_DIF_CHOPPED BIT_4
548531
549
- uint32_t exchange_address; /* rcv exchange address */
550
- uint16_t reserved2;
551
- uint16_t flags;
552
- uint32_t resid_xfer_length;
553
- uint16_t ox_id;
532
+ __le32 exchange_address; /* rcv exchange address */
533
+ __le16 reserved2;
534
+ __le16 flags;
535
+ __le32 resid_xfer_length;
536
+ __le16 ox_id;
554537 uint8_t reserved3[12];
555
- uint16_t runt_guard; /* reported runt blk guard */
538
+ __le16 runt_guard; /* reported runt blk guard */
556539 uint8_t actual_dif[8];
557540 uint8_t expected_dif[8];
558541 } __packed;
....@@ -575,29 +558,29 @@
575558 uint8_t sys_define; /* System defined. */
576559 uint8_t entry_status; /* Entry Status. */
577560 uint8_t reserved_1[6];
578
- uint16_t nport_handle;
561
+ __le16 nport_handle;
579562 uint8_t reserved_2[2];
580563 uint8_t vp_index;
581564 uint8_t reserved_3:4;
582565 uint8_t sof_type:4;
583
- uint32_t exchange_address;
566
+ __le32 exchange_address;
584567 struct fcp_hdr_le fcp_hdr_le;
585568 uint8_t reserved_4[16];
586
- uint32_t exchange_addr_to_abort;
569
+ __le32 exchange_addr_to_abort;
587570 } __packed;
588571
589572 #define ABTS_PARAM_ABORT_SEQ BIT_0
590573
591574 struct ba_acc_le {
592
- uint16_t reserved;
575
+ __le16 reserved;
593576 uint8_t seq_id_last;
594577 uint8_t seq_id_valid;
595578 #define SEQ_ID_VALID 0x80
596579 #define SEQ_ID_INVALID 0x00
597
- uint16_t rx_id;
598
- uint16_t ox_id;
599
- uint16_t high_seq_cnt;
600
- uint16_t low_seq_cnt;
580
+ __le16 rx_id;
581
+ __le16 ox_id;
582
+ __le16 high_seq_cnt;
583
+ __le16 low_seq_cnt;
601584 } __packed;
602585
603586 struct ba_rjt_le {
....@@ -621,21 +604,21 @@
621604 uint8_t sys_define; /* System defined. */
622605 uint8_t entry_status; /* Entry Status. */
623606 uint32_t handle;
624
- uint16_t reserved_1;
625
- uint16_t nport_handle;
626
- uint16_t control_flags;
607
+ __le16 reserved_1;
608
+ __le16 nport_handle;
609
+ __le16 control_flags;
627610 #define ABTS_CONTR_FLG_TERM_EXCHG BIT_0
628611 uint8_t vp_index;
629612 uint8_t reserved_3:4;
630613 uint8_t sof_type:4;
631
- uint32_t exchange_address;
614
+ __le32 exchange_address;
632615 struct fcp_hdr_le fcp_hdr_le;
633616 union {
634617 struct ba_acc_le ba_acct;
635618 struct ba_rjt_le ba_rjt;
636619 } __packed payload;
637
- uint32_t reserved_4;
638
- uint32_t exchange_addr_to_abort;
620
+ __le32 reserved_4;
621
+ __le32 exchange_addr_to_abort;
639622 } __packed;
640623
641624 /*
....@@ -651,21 +634,21 @@
651634 uint8_t sys_define; /* System defined. */
652635 uint8_t entry_status; /* Entry Status. */
653636 uint32_t handle;
654
- uint16_t compl_status;
637
+ __le16 compl_status;
655638 #define ABTS_RESP_COMPL_SUCCESS 0
656639 #define ABTS_RESP_COMPL_SUBCODE_ERROR 0x31
657
- uint16_t nport_handle;
658
- uint16_t reserved_1;
640
+ __le16 nport_handle;
641
+ __le16 reserved_1;
659642 uint8_t reserved_2;
660643 uint8_t reserved_3:4;
661644 uint8_t sof_type:4;
662
- uint32_t exchange_address;
645
+ __le32 exchange_address;
663646 struct fcp_hdr_le fcp_hdr_le;
664647 uint8_t reserved_4[8];
665
- uint32_t error_subcode1;
648
+ __le32 error_subcode1;
666649 #define ABTS_RESP_SUBCODE_ERR_ABORTED_EXCH_NOT_TERM 0x1E
667
- uint32_t error_subcode2;
668
- uint32_t exchange_addr_to_abort;
650
+ __le32 error_subcode2;
651
+ __le32 exchange_addr_to_abort;
669652 } __packed;
670653
671654 /********************************************************************\
....@@ -688,6 +671,8 @@
688671 void (*handle_data)(struct qla_tgt_cmd *);
689672 int (*handle_tmr)(struct qla_tgt_mgmt_cmd *, u64, uint16_t,
690673 uint32_t);
674
+ struct qla_tgt_cmd *(*get_cmd)(struct fc_port *);
675
+ void (*rel_cmd)(struct qla_tgt_cmd *);
691676 void (*free_cmd)(struct qla_tgt_cmd *);
692677 void (*free_mcmd)(struct qla_tgt_mgmt_cmd *);
693678 void (*free_session)(struct fc_port *);
....@@ -698,7 +683,7 @@
698683 struct fc_port *(*find_sess_by_loop_id)(struct scsi_qla_host *,
699684 const uint16_t);
700685 struct fc_port *(*find_sess_by_s_id)(struct scsi_qla_host *,
701
- const uint8_t *);
686
+ const be_id_t);
702687 void (*clear_nacl_from_fcport_map)(struct fc_port *);
703688 void (*put_sess)(struct fc_port *);
704689 void (*shutdown_sess)(struct fc_port *);
....@@ -770,14 +755,6 @@
770755 #define FC_TM_FCP_DATA_MISMATCH 3
771756 #define FC_TM_REJECT 4
772757 #define FC_TM_FAILED 5
773
-
774
-#if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
775
-#define pci_dma_lo32(a) (a & 0xffffffff)
776
-#define pci_dma_hi32(a) ((((a) >> 16)>>16) & 0xffffffff)
777
-#else
778
-#define pci_dma_lo32(a) (a & 0xffffffff)
779
-#define pci_dma_hi32(a) 0
780
-#endif
781758
782759 #define QLA_TGT_SENSE_VALID(sense) ((sense != NULL) && \
783760 (((const uint8_t *)(sense))[0] & 0x70) == 0x70)
....@@ -863,7 +840,7 @@
863840 TRC_CTIO_ERR = BIT_11,
864841 TRC_CTIO_DONE = BIT_12,
865842 TRC_CTIO_ABORTED = BIT_13,
866
- TRC_CTIO_STRANGE= BIT_14,
843
+ TRC_CTIO_STRANGE = BIT_14,
867844 TRC_CMD_DONE = BIT_15,
868845 TRC_CMD_CHK_STOP = BIT_16,
869846 TRC_CMD_FREE = BIT_17,
....@@ -897,9 +874,14 @@
897874 unsigned int term_exchg:1;
898875 unsigned int cmd_sent_to_fw:1;
899876 unsigned int cmd_in_wq:1;
900
- unsigned int aborted:1;
901
- unsigned int data_work:1;
902
- unsigned int data_work_free:1;
877
+
878
+ /*
879
+ * This variable may be set from outside the LIO and I/O completion
880
+ * callback functions. Do not declare this member variable as a
881
+ * bitfield to avoid a read-modify-write operation when this variable
882
+ * is set.
883
+ */
884
+ unsigned int aborted;
903885
904886 struct scatterlist *sg; /* cmd data buffer SG vector */
905887 int sg_cnt; /* SG segments count */
....@@ -908,6 +890,7 @@
908890 u64 unpacked_lun;
909891 enum dma_data_direction dma_data_direction;
910892
893
+ uint16_t ctio_flags;
911894 uint16_t vp_idx;
912895 uint16_t loop_id; /* to save extra sess dereferences */
913896 struct qla_tgt *tgt; /* to save extra sess dereferences */
....@@ -930,10 +913,12 @@
930913 uint8_t scsi_status, sense_key, asc, ascq;
931914
932915 struct crc_context *ctx;
933
- uint8_t *cdb;
916
+ const uint8_t *cdb;
934917 uint64_t lba;
935918 uint16_t a_guard, e_guard, a_app_tag, e_app_tag;
936919 uint32_t a_ref_tag, e_ref_tag;
920
+#define DIF_BUNDL_DMA_VALID 1
921
+ uint16_t prot_flags;
937922
938923 uint64_t jiffies_at_alloc;
939924 uint64_t jiffies_at_free;
....@@ -956,16 +941,20 @@
956941 };
957942
958943 struct qla_tgt_mgmt_cmd {
944
+ uint8_t cmd_type;
945
+ uint8_t pad[3];
959946 uint16_t tmr_func;
960947 uint8_t fc_tm_rsp;
948
+ uint8_t abort_io_attr;
961949 struct fc_port *sess;
962950 struct qla_qpair *qpair;
963951 struct scsi_qla_host *vha;
964952 struct se_cmd se_cmd;
965953 struct work_struct free_work;
966954 unsigned int flags;
955
+#define QLA24XX_MGMT_SEND_NACK BIT_0
956
+#define QLA24XX_MGMT_ABORT_IO_ATTR_VALID BIT_1
967957 uint32_t reset_count;
968
-#define QLA24XX_MGMT_SEND_NACK 1
969958 struct work_struct work;
970959 uint64_t unpacked_lun;
971960 union {
....@@ -1042,22 +1031,11 @@
10421031 return (ha->host->active_mode == MODE_DUAL);
10431032 }
10441033
1045
-static inline uint32_t sid_to_key(const uint8_t *s_id)
1034
+static inline uint32_t sid_to_key(const be_id_t s_id)
10461035 {
1047
- uint32_t key;
1048
-
1049
- key = (((unsigned long)s_id[0] << 16) |
1050
- ((unsigned long)s_id[1] << 8) |
1051
- (unsigned long)s_id[2]);
1052
- return key;
1053
-}
1054
-
1055
-static inline void sid_to_portid(const uint8_t *s_id, port_id_t *p)
1056
-{
1057
- memset(p, 0, sizeof(*p));
1058
- p->b.domain = s_id[0];
1059
- p->b.area = s_id[1];
1060
- p->b.al_pa = s_id[2];
1036
+ return s_id.domain << 16 |
1037
+ s_id.area << 8 |
1038
+ s_id.al_pa;
10611039 }
10621040
10631041 /*
....@@ -1103,7 +1081,5 @@
11031081
11041082 void qlt_send_resp_ctio(struct qla_qpair *, struct qla_tgt_cmd *, uint8_t,
11051083 uint8_t, uint8_t, uint8_t);
1106
-extern void qlt_abort_cmd_on_host_reset(struct scsi_qla_host *,
1107
- struct qla_tgt_cmd *);
11081084
11091085 #endif /* __QLA_TARGET_H */