diff options
Diffstat (limited to 'drivers/net/qlge/qlge.h')
-rw-r--r-- | drivers/net/qlge/qlge.h | 57 |
1 files changed, 17 insertions, 40 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index ba2e1c5b6bcf..459663a4023d 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -818,15 +818,6 @@ struct tx_doorbell_context { | |||
818 | }; | 818 | }; |
819 | 819 | ||
820 | /* DATA STRUCTURES SHARED WITH HARDWARE. */ | 820 | /* DATA STRUCTURES SHARED WITH HARDWARE. */ |
821 | |||
822 | struct bq_element { | ||
823 | u32 addr_lo; | ||
824 | #define BQ_END 0x00000001 | ||
825 | #define BQ_CONT 0x00000002 | ||
826 | #define BQ_MASK 0x00000003 | ||
827 | u32 addr_hi; | ||
828 | } __attribute((packed)); | ||
829 | |||
830 | struct tx_buf_desc { | 821 | struct tx_buf_desc { |
831 | __le64 addr; | 822 | __le64 addr; |
832 | __le32 len; | 823 | __le32 len; |
@@ -860,8 +851,8 @@ struct ob_mac_iocb_req { | |||
860 | __le16 frame_len; | 851 | __le16 frame_len; |
861 | #define OB_MAC_IOCB_LEN_MASK 0x3ffff | 852 | #define OB_MAC_IOCB_LEN_MASK 0x3ffff |
862 | __le16 reserved2; | 853 | __le16 reserved2; |
863 | __le32 tid; | 854 | u32 tid; |
864 | __le32 txq_idx; | 855 | u32 txq_idx; |
865 | __le32 reserved3; | 856 | __le32 reserved3; |
866 | __le16 vlan_tci; | 857 | __le16 vlan_tci; |
867 | __le16 reserved4; | 858 | __le16 reserved4; |
@@ -880,8 +871,8 @@ struct ob_mac_iocb_rsp { | |||
880 | u8 flags2; /* */ | 871 | u8 flags2; /* */ |
881 | u8 flags3; /* */ | 872 | u8 flags3; /* */ |
882 | #define OB_MAC_IOCB_RSP_B 0x80 /* */ | 873 | #define OB_MAC_IOCB_RSP_B 0x80 /* */ |
883 | __le32 tid; | 874 | u32 tid; |
884 | __le32 txq_idx; | 875 | u32 txq_idx; |
885 | __le32 reserved[13]; | 876 | __le32 reserved[13]; |
886 | } __attribute((packed)); | 877 | } __attribute((packed)); |
887 | 878 | ||
@@ -903,8 +894,8 @@ struct ob_mac_tso_iocb_req { | |||
903 | #define OB_MAC_TSO_IOCB_V 0x04 | 894 | #define OB_MAC_TSO_IOCB_V 0x04 |
904 | __le32 reserved1[2]; | 895 | __le32 reserved1[2]; |
905 | __le32 frame_len; | 896 | __le32 frame_len; |
906 | __le32 tid; | 897 | u32 tid; |
907 | __le32 txq_idx; | 898 | u32 txq_idx; |
908 | __le16 total_hdrs_len; | 899 | __le16 total_hdrs_len; |
909 | __le16 net_trans_offset; | 900 | __le16 net_trans_offset; |
910 | #define OB_MAC_TRANSPORT_HDR_SHIFT 6 | 901 | #define OB_MAC_TRANSPORT_HDR_SHIFT 6 |
@@ -925,8 +916,8 @@ struct ob_mac_tso_iocb_rsp { | |||
925 | u8 flags2; /* */ | 916 | u8 flags2; /* */ |
926 | u8 flags3; /* */ | 917 | u8 flags3; /* */ |
927 | #define OB_MAC_TSO_IOCB_RSP_B 0x8000 | 918 | #define OB_MAC_TSO_IOCB_RSP_B 0x8000 |
928 | __le32 tid; | 919 | u32 tid; |
929 | __le32 txq_idx; | 920 | u32 txq_idx; |
930 | __le32 reserved2[13]; | 921 | __le32 reserved2[13]; |
931 | } __attribute((packed)); | 922 | } __attribute((packed)); |
932 | 923 | ||
@@ -979,10 +970,11 @@ struct ib_mac_iocb_rsp { | |||
979 | 970 | ||
980 | __le16 reserved1; | 971 | __le16 reserved1; |
981 | __le32 reserved2[6]; | 972 | __le32 reserved2[6]; |
982 | __le32 flags4; | 973 | u8 reserved3[3]; |
983 | #define IB_MAC_IOCB_RSP_HV 0x20000000 /* */ | 974 | u8 flags4; |
984 | #define IB_MAC_IOCB_RSP_HS 0x40000000 /* */ | 975 | #define IB_MAC_IOCB_RSP_HV 0x20 |
985 | #define IB_MAC_IOCB_RSP_HL 0x80000000 /* */ | 976 | #define IB_MAC_IOCB_RSP_HS 0x40 |
977 | #define IB_MAC_IOCB_RSP_HL 0x80 | ||
986 | __le32 hdr_len; /* */ | 978 | __le32 hdr_len; /* */ |
987 | __le32 hdr_addr_lo; /* */ | 979 | __le32 hdr_addr_lo; /* */ |
988 | __le32 hdr_addr_hi; /* */ | 980 | __le32 hdr_addr_hi; /* */ |
@@ -1126,7 +1118,7 @@ struct map_list { | |||
1126 | struct tx_ring_desc { | 1118 | struct tx_ring_desc { |
1127 | struct sk_buff *skb; | 1119 | struct sk_buff *skb; |
1128 | struct ob_mac_iocb_req *queue_entry; | 1120 | struct ob_mac_iocb_req *queue_entry; |
1129 | int index; | 1121 | u32 index; |
1130 | struct oal oal; | 1122 | struct oal oal; |
1131 | struct map_list map[MAX_SKB_FRAGS + 1]; | 1123 | struct map_list map[MAX_SKB_FRAGS + 1]; |
1132 | int map_cnt; | 1124 | int map_cnt; |
@@ -1138,8 +1130,8 @@ struct bq_desc { | |||
1138 | struct page *lbq_page; | 1130 | struct page *lbq_page; |
1139 | struct sk_buff *skb; | 1131 | struct sk_buff *skb; |
1140 | } p; | 1132 | } p; |
1141 | struct bq_element *bq; | 1133 | __le64 *addr; |
1142 | int index; | 1134 | u32 index; |
1143 | DECLARE_PCI_UNMAP_ADDR(mapaddr); | 1135 | DECLARE_PCI_UNMAP_ADDR(mapaddr); |
1144 | DECLARE_PCI_UNMAP_LEN(maplen); | 1136 | DECLARE_PCI_UNMAP_LEN(maplen); |
1145 | }; | 1137 | }; |
@@ -1189,7 +1181,7 @@ struct rx_ring { | |||
1189 | u32 cq_size; | 1181 | u32 cq_size; |
1190 | u32 cq_len; | 1182 | u32 cq_len; |
1191 | u16 cq_id; | 1183 | u16 cq_id; |
1192 | u32 *prod_idx_sh_reg; /* Shadowed producer register. */ | 1184 | volatile __le32 *prod_idx_sh_reg; /* Shadowed producer register. */ |
1193 | dma_addr_t prod_idx_sh_reg_dma; | 1185 | dma_addr_t prod_idx_sh_reg_dma; |
1194 | void __iomem *cnsmr_idx_db_reg; /* PCI doorbell mem area + 0 */ | 1186 | void __iomem *cnsmr_idx_db_reg; /* PCI doorbell mem area + 0 */ |
1195 | u32 cnsmr_idx; /* current sw idx */ | 1187 | u32 cnsmr_idx; /* current sw idx */ |
@@ -1467,21 +1459,6 @@ static inline void ql_write_db_reg(u32 val, void __iomem *addr) | |||
1467 | mmiowb(); | 1459 | mmiowb(); |
1468 | } | 1460 | } |
1469 | 1461 | ||
1470 | /* | ||
1471 | * Shadow Registers: | ||
1472 | * Outbound queues have a consumer index that is maintained by the chip. | ||
1473 | * Inbound queues have a producer index that is maintained by the chip. | ||
1474 | * For lower overhead, these registers are "shadowed" to host memory | ||
1475 | * which allows the device driver to track the queue progress without | ||
1476 | * PCI reads. When an entry is placed on an inbound queue, the chip will | ||
1477 | * update the relevant index register and then copy the value to the | ||
1478 | * shadow register in host memory. | ||
1479 | */ | ||
1480 | static inline unsigned int ql_read_sh_reg(const volatile void *addr) | ||
1481 | { | ||
1482 | return *(volatile unsigned int __force *)addr; | ||
1483 | } | ||
1484 | |||
1485 | extern char qlge_driver_name[]; | 1462 | extern char qlge_driver_name[]; |
1486 | extern const char qlge_driver_version[]; | 1463 | extern const char qlge_driver_version[]; |
1487 | extern const struct ethtool_ops qlge_ethtool_ops; | 1464 | extern const struct ethtool_ops qlge_ethtool_ops; |