]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/hisi_sas/hisi_sas.h
hisi_sas: rename some fields in hisi_sas_itct
[karo-tx-linux.git] / drivers / scsi / hisi_sas / hisi_sas.h
index 5af2e4187f01ee9dccb6995ab169bd5d75fffd99..b2e4b26fd6c78517eb584b2ca6b34d2773d4925f 100644 (file)
@@ -25,9 +25,8 @@
 #define HISI_SAS_MAX_PHYS      9
 #define HISI_SAS_MAX_QUEUES    32
 #define HISI_SAS_QUEUE_SLOTS 512
-#define HISI_SAS_MAX_ITCT_ENTRIES 4096
+#define HISI_SAS_MAX_ITCT_ENTRIES 2048
 #define HISI_SAS_MAX_DEVICES HISI_SAS_MAX_ITCT_ENTRIES
-#define HISI_SAS_COMMAND_ENTRIES 8192
 
 #define HISI_SAS_STATUS_BUF_SZ \
                (sizeof(struct hisi_sas_err_record) + 1024)
 #define HISI_SAS_MAX_SSP_RESP_SZ (sizeof(struct ssp_frame_hdr) + 1024)
 #define HISI_SAS_MAX_SMP_RESP_SZ 1028
 
+#define DEV_IS_EXPANDER(type) \
+       ((type == SAS_EDGE_EXPANDER_DEVICE) || \
+       (type == SAS_FANOUT_EXPANDER_DEVICE))
+
 struct hisi_hba;
 
 enum {
@@ -140,6 +143,7 @@ struct hisi_sas_hw {
        void (*free_device)(struct hisi_hba *hisi_hba,
                            struct hisi_sas_device *dev);
        int (*get_wideport_bitmap)(struct hisi_hba *hisi_hba, int port_id);
+       int max_command_entries;
        int complete_hdr_size;
 };
 
@@ -244,18 +248,7 @@ struct hisi_sas_itct {
        __le64 sas_addr;
        __le64 qw2;
        __le64 qw3;
-       __le64 qw4;
-       __le64 qw_sata_ncq0_3;
-       __le64 qw_sata_ncq7_4;
-       __le64 qw_sata_ncq11_8;
-       __le64 qw_sata_ncq15_12;
-       __le64 qw_sata_ncq19_16;
-       __le64 qw_sata_ncq23_20;
-       __le64 qw_sata_ncq27_24;
-       __le64 qw_sata_ncq31_28;
-       __le64 qw_non_ncq_iptt;
-       __le64 qw_rsvd0;
-       __le64 qw_rsvd1;
+       __le64 qw4_15[12];
 };
 
 struct hisi_sas_iost {
@@ -266,17 +259,7 @@ struct hisi_sas_iost {
 };
 
 struct hisi_sas_err_record {
-       /* dw0 */
-       __le32 dma_err_type;
-
-       /* dw1 */
-       __le32 trans_tx_fail_type;
-
-       /* dw2 */
-       __le32 trans_rx_fail_type;
-
-       /* dw3 */
-       u32 rsvd;
+       u32     data[4];
 };
 
 struct hisi_sas_initial_fis {