.. | .. |
---|
49 | 49 | #define ARCMSR_MAX_OUTSTANDING_CMD 1024 |
---|
50 | 50 | #define ARCMSR_DEFAULT_OUTSTANDING_CMD 128 |
---|
51 | 51 | #define ARCMSR_MIN_OUTSTANDING_CMD 32 |
---|
52 | | -#define ARCMSR_DRIVER_VERSION "v1.40.00.09-20180709" |
---|
| 52 | +#define ARCMSR_DRIVER_VERSION "v1.50.00.02-20200819" |
---|
53 | 53 | #define ARCMSR_SCSI_INITIATOR_ID 255 |
---|
54 | 54 | #define ARCMSR_MAX_XFER_SECTORS 512 |
---|
55 | 55 | #define ARCMSR_MAX_XFER_SECTORS_B 4096 |
---|
.. | .. |
---|
80 | 80 | #ifndef PCI_DEVICE_ID_ARECA_1884 |
---|
81 | 81 | #define PCI_DEVICE_ID_ARECA_1884 0x1884 |
---|
82 | 82 | #endif |
---|
| 83 | +#define PCI_DEVICE_ID_ARECA_1886 0x188A |
---|
83 | 84 | #define ARCMSR_HOURS (1000 * 60 * 60 * 4) |
---|
84 | 85 | #define ARCMSR_MINUTES (1000 * 60 * 60) |
---|
85 | 86 | /* |
---|
.. | .. |
---|
436 | 437 | #define ARCMSR_HBEMU_DOORBELL_SYNC 0x100 |
---|
437 | 438 | #define ARCMSR_ARC188X_RESET_ADAPTER 0x00000004 |
---|
438 | 439 | #define ARCMSR_ARC1884_DiagWrite_ENABLE 0x00000080 |
---|
| 440 | + |
---|
| 441 | +/* |
---|
| 442 | +******************************************************************************* |
---|
| 443 | +** SPEC. for Areca Type F adapter |
---|
| 444 | +******************************************************************************* |
---|
| 445 | +*/ |
---|
| 446 | +#define ARCMSR_SIGNATURE_1886 0x188617D3 |
---|
| 447 | +// Doorbell and interrupt definition are same as Type E adapter |
---|
| 448 | +/* ARC-1886 doorbell sync */ |
---|
| 449 | +#define ARCMSR_HBFMU_DOORBELL_SYNC 0x100 |
---|
| 450 | +//set host rw buffer physical address at inbound message 0, 1 (low,high) |
---|
| 451 | +#define ARCMSR_HBFMU_DOORBELL_SYNC1 0x300 |
---|
| 452 | +#define ARCMSR_HBFMU_MESSAGE_FIRMWARE_OK 0x80000000 |
---|
| 453 | +#define ARCMSR_HBFMU_MESSAGE_NO_VOLUME_CHANGE 0x20000000 |
---|
| 454 | + |
---|
439 | 455 | /* |
---|
440 | 456 | ******************************************************************************* |
---|
441 | 457 | ** ARECA SCSI COMMAND DESCRIPTOR BLOCK size 0x1F8 (504) |
---|
.. | .. |
---|
720 | 736 | uint32_t msgcode_rwbuffer[256]; /*2200 23FF*/ |
---|
721 | 737 | }; |
---|
722 | 738 | |
---|
| 739 | +/* |
---|
| 740 | +********************************************************************* |
---|
| 741 | +** Messaging Unit (MU) of Type F processor(LSI) |
---|
| 742 | +********************************************************************* |
---|
| 743 | +*/ |
---|
| 744 | +struct MessageUnit_F { |
---|
| 745 | + uint32_t iobound_doorbell; /*0000 0003*/ |
---|
| 746 | + uint32_t write_sequence_3xxx; /*0004 0007*/ |
---|
| 747 | + uint32_t host_diagnostic_3xxx; /*0008 000B*/ |
---|
| 748 | + uint32_t posted_outbound_doorbell; /*000C 000F*/ |
---|
| 749 | + uint32_t master_error_attribute; /*0010 0013*/ |
---|
| 750 | + uint32_t master_error_address_low; /*0014 0017*/ |
---|
| 751 | + uint32_t master_error_address_high; /*0018 001B*/ |
---|
| 752 | + uint32_t hcb_size; /*001C 001F*/ |
---|
| 753 | + uint32_t inbound_doorbell; /*0020 0023*/ |
---|
| 754 | + uint32_t diagnostic_rw_data; /*0024 0027*/ |
---|
| 755 | + uint32_t diagnostic_rw_address_low; /*0028 002B*/ |
---|
| 756 | + uint32_t diagnostic_rw_address_high; /*002C 002F*/ |
---|
| 757 | + uint32_t host_int_status; /*0030 0033*/ |
---|
| 758 | + uint32_t host_int_mask; /*0034 0037*/ |
---|
| 759 | + uint32_t dcr_data; /*0038 003B*/ |
---|
| 760 | + uint32_t dcr_address; /*003C 003F*/ |
---|
| 761 | + uint32_t inbound_queueport; /*0040 0043*/ |
---|
| 762 | + uint32_t outbound_queueport; /*0044 0047*/ |
---|
| 763 | + uint32_t hcb_pci_address_low; /*0048 004B*/ |
---|
| 764 | + uint32_t hcb_pci_address_high; /*004C 004F*/ |
---|
| 765 | + uint32_t iop_int_status; /*0050 0053*/ |
---|
| 766 | + uint32_t iop_int_mask; /*0054 0057*/ |
---|
| 767 | + uint32_t iop_inbound_queue_port; /*0058 005B*/ |
---|
| 768 | + uint32_t iop_outbound_queue_port; /*005C 005F*/ |
---|
| 769 | + uint32_t inbound_free_list_index; /*0060 0063*/ |
---|
| 770 | + uint32_t inbound_post_list_index; /*0064 0067*/ |
---|
| 771 | + uint32_t reply_post_producer_index; /*0068 006B*/ |
---|
| 772 | + uint32_t reply_post_consumer_index; /*006C 006F*/ |
---|
| 773 | + uint32_t inbound_doorbell_clear; /*0070 0073*/ |
---|
| 774 | + uint32_t i2o_message_unit_control; /*0074 0077*/ |
---|
| 775 | + uint32_t last_used_message_source_address_low; /*0078 007B*/ |
---|
| 776 | + uint32_t last_used_message_source_address_high; /*007C 007F*/ |
---|
| 777 | + uint32_t pull_mode_data_byte_count[4]; /*0080 008F*/ |
---|
| 778 | + uint32_t message_dest_address_index; /*0090 0093*/ |
---|
| 779 | + uint32_t done_queue_not_empty_int_counter_timer; /*0094 0097*/ |
---|
| 780 | + uint32_t utility_A_int_counter_timer; /*0098 009B*/ |
---|
| 781 | + uint32_t outbound_doorbell; /*009C 009F*/ |
---|
| 782 | + uint32_t outbound_doorbell_clear; /*00A0 00A3*/ |
---|
| 783 | + uint32_t message_source_address_index; /*00A4 00A7*/ |
---|
| 784 | + uint32_t message_done_queue_index; /*00A8 00AB*/ |
---|
| 785 | + uint32_t reserved0; /*00AC 00AF*/ |
---|
| 786 | + uint32_t inbound_msgaddr0; /*00B0 00B3*/ |
---|
| 787 | + uint32_t inbound_msgaddr1; /*00B4 00B7*/ |
---|
| 788 | + uint32_t outbound_msgaddr0; /*00B8 00BB*/ |
---|
| 789 | + uint32_t outbound_msgaddr1; /*00BC 00BF*/ |
---|
| 790 | + uint32_t inbound_queueport_low; /*00C0 00C3*/ |
---|
| 791 | + uint32_t inbound_queueport_high; /*00C4 00C7*/ |
---|
| 792 | + uint32_t outbound_queueport_low; /*00C8 00CB*/ |
---|
| 793 | + uint32_t outbound_queueport_high; /*00CC 00CF*/ |
---|
| 794 | + uint32_t iop_inbound_queue_port_low; /*00D0 00D3*/ |
---|
| 795 | + uint32_t iop_inbound_queue_port_high; /*00D4 00D7*/ |
---|
| 796 | + uint32_t iop_outbound_queue_port_low; /*00D8 00DB*/ |
---|
| 797 | + uint32_t iop_outbound_queue_port_high; /*00DC 00DF*/ |
---|
| 798 | + uint32_t message_dest_queue_port_low; /*00E0 00E3*/ |
---|
| 799 | + uint32_t message_dest_queue_port_high; /*00E4 00E7*/ |
---|
| 800 | + uint32_t last_used_message_dest_address_low; /*00E8 00EB*/ |
---|
| 801 | + uint32_t last_used_message_dest_address_high; /*00EC 00EF*/ |
---|
| 802 | + uint32_t message_done_queue_base_address_low; /*00F0 00F3*/ |
---|
| 803 | + uint32_t message_done_queue_base_address_high; /*00F4 00F7*/ |
---|
| 804 | + uint32_t host_diagnostic; /*00F8 00FB*/ |
---|
| 805 | + uint32_t write_sequence; /*00FC 00FF*/ |
---|
| 806 | + uint32_t reserved1[46]; /*0100 01B7*/ |
---|
| 807 | + uint32_t reply_post_producer_index1; /*01B8 01BB*/ |
---|
| 808 | + uint32_t reply_post_consumer_index1; /*01BC 01BF*/ |
---|
| 809 | +}; |
---|
| 810 | + |
---|
| 811 | +#define MESG_RW_BUFFER_SIZE (256 * 3) |
---|
| 812 | + |
---|
723 | 813 | typedef struct deliver_completeQ { |
---|
724 | 814 | uint16_t cmdFlag; |
---|
725 | 815 | uint16_t cmdSMID; |
---|
.. | .. |
---|
739 | 829 | #define ACB_ADAPTER_TYPE_C 0x00000002 /* hbc L IOP */ |
---|
740 | 830 | #define ACB_ADAPTER_TYPE_D 0x00000003 /* hbd M IOP */ |
---|
741 | 831 | #define ACB_ADAPTER_TYPE_E 0x00000004 /* hba L IOP */ |
---|
742 | | - u32 roundup_ccbsize; |
---|
| 832 | +#define ACB_ADAPTER_TYPE_F 0x00000005 /* hba L IOP */ |
---|
| 833 | + u32 ioqueue_size; |
---|
743 | 834 | struct pci_dev * pdev; |
---|
744 | 835 | struct Scsi_Host * host; |
---|
745 | 836 | unsigned long vir2phy_offset; |
---|
.. | .. |
---|
747 | 838 | uint32_t outbound_int_enable; |
---|
748 | 839 | uint32_t cdb_phyaddr_hi32; |
---|
749 | 840 | uint32_t reg_mu_acc_handle0; |
---|
| 841 | + uint64_t cdb_phyadd_hipart; |
---|
750 | 842 | spinlock_t eh_lock; |
---|
751 | 843 | spinlock_t ccblist_lock; |
---|
752 | 844 | spinlock_t postq_lock; |
---|
.. | .. |
---|
759 | 851 | struct MessageUnit_C __iomem *pmuC; |
---|
760 | 852 | struct MessageUnit_D *pmuD; |
---|
761 | 853 | struct MessageUnit_E __iomem *pmuE; |
---|
| 854 | + struct MessageUnit_F __iomem *pmuF; |
---|
762 | 855 | }; |
---|
763 | 856 | /* message unit ATU inbound base address0 */ |
---|
764 | 857 | void __iomem *mem_base0; |
---|
765 | 858 | void __iomem *mem_base1; |
---|
| 859 | + //0x000 - COMPORT_IN (Host sent to ROC) |
---|
| 860 | + uint32_t *message_wbuffer; |
---|
| 861 | + //0x100 - COMPORT_OUT (ROC sent to Host) |
---|
| 862 | + uint32_t *message_rbuffer; |
---|
| 863 | + uint32_t *msgcode_rwbuffer; //0x200 - BIOS_AREA |
---|
766 | 864 | uint32_t acb_flags; |
---|
767 | 865 | u16 dev_id; |
---|
768 | 866 | uint8_t adapter_index; |
---|
.. | .. |
---|
835 | 933 | #define FW_NORMAL 0x0000 |
---|
836 | 934 | #define FW_BOG 0x0001 |
---|
837 | 935 | #define FW_DEADLOCK 0x0010 |
---|
838 | | - atomic_t rq_map_token; |
---|
839 | | - atomic_t ante_token_value; |
---|
840 | 936 | uint32_t maxOutstanding; |
---|
841 | 937 | int vector_count; |
---|
842 | 938 | uint32_t maxFreeCCB; |
---|
.. | .. |
---|
847 | 943 | uint32_t out_doorbell; |
---|
848 | 944 | uint32_t completionQ_entry; |
---|
849 | 945 | pCompletion_Q pCompletionQ; |
---|
| 946 | + uint32_t completeQ_size; |
---|
850 | 947 | };/* HW_DEVICE_EXTENSION */ |
---|
851 | 948 | /* |
---|
852 | 949 | ******************************************************************************* |
---|
.. | .. |
---|
855 | 952 | ******************************************************************************* |
---|
856 | 953 | */ |
---|
857 | 954 | struct CommandControlBlock{ |
---|
858 | | - /*x32:sizeof struct_CCB=(32+60)byte, x64:sizeof struct_CCB=(64+60)byte*/ |
---|
| 955 | + /*x32:sizeof struct_CCB=(64+60)byte, x64:sizeof struct_CCB=(64+60)byte*/ |
---|
859 | 956 | struct list_head list; /*x32: 8byte, x64: 16byte*/ |
---|
860 | 957 | struct scsi_cmnd *pcmd; /*8 bytes pointer of linux scsi command */ |
---|
861 | 958 | struct AdapterControlBlock *acb; /*x32: 4byte, x64: 8byte*/ |
---|
862 | | - uint32_t cdb_phyaddr; /*x32: 4byte, x64: 4byte*/ |
---|
| 959 | + unsigned long cdb_phyaddr; /*x32: 4byte, x64: 8byte*/ |
---|
863 | 960 | uint32_t arc_cdb_size; /*x32:4byte,x64:4byte*/ |
---|
864 | 961 | uint16_t ccb_flags; /*x32: 2byte, x64: 2byte*/ |
---|
865 | 962 | #define CCB_FLAG_READ 0x0000 |
---|
.. | .. |
---|
875 | 972 | uint32_t smid; |
---|
876 | 973 | #if BITS_PER_LONG == 64 |
---|
877 | 974 | /* ======================512+64 bytes======================== */ |
---|
878 | | - uint32_t reserved[4]; /*16 byte*/ |
---|
| 975 | + uint32_t reserved[3]; /*12 byte*/ |
---|
879 | 976 | #else |
---|
880 | 977 | /* ======================512+32 bytes======================== */ |
---|
881 | | - // uint32_t reserved; /*4 byte*/ |
---|
| 978 | + uint32_t reserved[8]; /*32 byte*/ |
---|
882 | 979 | #endif |
---|
883 | 980 | /* ======================================================= */ |
---|
884 | 981 | struct ARCMSR_CDB arcmsr_cdb; |
---|