diff options
Diffstat (limited to 'drivers/net/vxge/vxge-config.h')
-rw-r--r-- | drivers/net/vxge/vxge-config.h | 227 |
1 files changed, 1 insertions, 226 deletions
diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h index 1a94343023cb..5c00861b6c2c 100644 --- a/drivers/net/vxge/vxge-config.h +++ b/drivers/net/vxge/vxge-config.h | |||
@@ -183,11 +183,6 @@ struct vxge_hw_device_version { | |||
183 | char version[VXGE_HW_FW_STRLEN]; | 183 | char version[VXGE_HW_FW_STRLEN]; |
184 | }; | 184 | }; |
185 | 185 | ||
186 | u64 | ||
187 | __vxge_hw_vpath_pci_func_mode_get( | ||
188 | u32 vp_id, | ||
189 | struct vxge_hw_vpath_reg __iomem *vpath_reg); | ||
190 | |||
191 | /** | 186 | /** |
192 | * struct vxge_hw_fifo_config - Configuration of fifo. | 187 | * struct vxge_hw_fifo_config - Configuration of fifo. |
193 | * @enable: Is this fifo to be commissioned | 188 | * @enable: Is this fifo to be commissioned |
@@ -1426,9 +1421,6 @@ struct vxge_hw_rth_hash_types { | |||
1426 | u8 hash_type_ipv6ex_en; | 1421 | u8 hash_type_ipv6ex_en; |
1427 | }; | 1422 | }; |
1428 | 1423 | ||
1429 | u32 | ||
1430 | vxge_hw_device_debug_mask_get(struct __vxge_hw_device *devh); | ||
1431 | |||
1432 | void vxge_hw_device_debug_set( | 1424 | void vxge_hw_device_debug_set( |
1433 | struct __vxge_hw_device *devh, | 1425 | struct __vxge_hw_device *devh, |
1434 | enum vxge_debug_level level, | 1426 | enum vxge_debug_level level, |
@@ -1440,9 +1432,6 @@ vxge_hw_device_error_level_get(struct __vxge_hw_device *devh); | |||
1440 | u32 | 1432 | u32 |
1441 | vxge_hw_device_trace_level_get(struct __vxge_hw_device *devh); | 1433 | vxge_hw_device_trace_level_get(struct __vxge_hw_device *devh); |
1442 | 1434 | ||
1443 | u32 | ||
1444 | vxge_hw_device_debug_mask_get(struct __vxge_hw_device *devh); | ||
1445 | |||
1446 | /** | 1435 | /** |
1447 | * vxge_hw_ring_rxd_size_get - Get the size of ring descriptor. | 1436 | * vxge_hw_ring_rxd_size_get - Get the size of ring descriptor. |
1448 | * @buf_mode: Buffer mode (1, 3 or 5) | 1437 | * @buf_mode: Buffer mode (1, 3 or 5) |
@@ -1817,60 +1806,10 @@ struct vxge_hw_vpath_attr { | |||
1817 | struct vxge_hw_fifo_attr fifo_attr; | 1806 | struct vxge_hw_fifo_attr fifo_attr; |
1818 | }; | 1807 | }; |
1819 | 1808 | ||
1820 | enum vxge_hw_status | ||
1821 | __vxge_hw_blockpool_create(struct __vxge_hw_device *hldev, | ||
1822 | struct __vxge_hw_blockpool *blockpool, | ||
1823 | u32 pool_size, | ||
1824 | u32 pool_max); | ||
1825 | |||
1826 | void | ||
1827 | __vxge_hw_blockpool_destroy(struct __vxge_hw_blockpool *blockpool); | ||
1828 | |||
1829 | struct __vxge_hw_blockpool_entry * | ||
1830 | __vxge_hw_blockpool_block_allocate(struct __vxge_hw_device *hldev, | ||
1831 | u32 size); | ||
1832 | |||
1833 | void | ||
1834 | __vxge_hw_blockpool_block_free(struct __vxge_hw_device *hldev, | ||
1835 | struct __vxge_hw_blockpool_entry *entry); | ||
1836 | |||
1837 | void * | ||
1838 | __vxge_hw_blockpool_malloc(struct __vxge_hw_device *hldev, | ||
1839 | u32 size, | ||
1840 | struct vxge_hw_mempool_dma *dma_object); | ||
1841 | |||
1842 | void | ||
1843 | __vxge_hw_blockpool_free(struct __vxge_hw_device *hldev, | ||
1844 | void *memblock, | ||
1845 | u32 size, | ||
1846 | struct vxge_hw_mempool_dma *dma_object); | ||
1847 | |||
1848 | enum vxge_hw_status | ||
1849 | __vxge_hw_device_fifo_config_check(struct vxge_hw_fifo_config *fifo_config); | ||
1850 | |||
1851 | enum vxge_hw_status | ||
1852 | __vxge_hw_device_config_check(struct vxge_hw_device_config *new_config); | ||
1853 | |||
1854 | enum vxge_hw_status | ||
1855 | vxge_hw_mgmt_device_config(struct __vxge_hw_device *devh, | ||
1856 | struct vxge_hw_device_config *dev_config, int size); | ||
1857 | |||
1858 | enum vxge_hw_status __devinit vxge_hw_device_hw_info_get( | 1809 | enum vxge_hw_status __devinit vxge_hw_device_hw_info_get( |
1859 | void __iomem *bar0, | 1810 | void __iomem *bar0, |
1860 | struct vxge_hw_device_hw_info *hw_info); | 1811 | struct vxge_hw_device_hw_info *hw_info); |
1861 | 1812 | ||
1862 | enum vxge_hw_status | ||
1863 | __vxge_hw_vpath_fw_ver_get( | ||
1864 | u32 vp_id, | ||
1865 | struct vxge_hw_vpath_reg __iomem *vpath_reg, | ||
1866 | struct vxge_hw_device_hw_info *hw_info); | ||
1867 | |||
1868 | enum vxge_hw_status | ||
1869 | __vxge_hw_vpath_card_info_get( | ||
1870 | u32 vp_id, | ||
1871 | struct vxge_hw_vpath_reg __iomem *vpath_reg, | ||
1872 | struct vxge_hw_device_hw_info *hw_info); | ||
1873 | |||
1874 | enum vxge_hw_status __devinit vxge_hw_device_config_default_get( | 1813 | enum vxge_hw_status __devinit vxge_hw_device_config_default_get( |
1875 | struct vxge_hw_device_config *device_config); | 1814 | struct vxge_hw_device_config *device_config); |
1876 | 1815 | ||
@@ -1954,38 +1893,6 @@ out: | |||
1954 | return vaddr; | 1893 | return vaddr; |
1955 | } | 1894 | } |
1956 | 1895 | ||
1957 | extern void vxge_hw_blockpool_block_add( | ||
1958 | struct __vxge_hw_device *devh, | ||
1959 | void *block_addr, | ||
1960 | u32 length, | ||
1961 | struct pci_dev *dma_h, | ||
1962 | struct pci_dev *acc_handle); | ||
1963 | |||
1964 | static inline void vxge_os_dma_malloc_async(struct pci_dev *pdev, void *devh, | ||
1965 | unsigned long size) | ||
1966 | { | ||
1967 | gfp_t flags; | ||
1968 | void *vaddr; | ||
1969 | |||
1970 | if (in_interrupt()) | ||
1971 | flags = GFP_ATOMIC | GFP_DMA; | ||
1972 | else | ||
1973 | flags = GFP_KERNEL | GFP_DMA; | ||
1974 | |||
1975 | vaddr = kmalloc((size), flags); | ||
1976 | |||
1977 | vxge_hw_blockpool_block_add(devh, vaddr, size, pdev, pdev); | ||
1978 | } | ||
1979 | |||
1980 | static inline void vxge_os_dma_free(struct pci_dev *pdev, const void *vaddr, | ||
1981 | struct pci_dev **p_dma_acch) | ||
1982 | { | ||
1983 | unsigned long misaligned = *(unsigned long *)p_dma_acch; | ||
1984 | u8 *tmp = (u8 *)vaddr; | ||
1985 | tmp -= misaligned; | ||
1986 | kfree((void *)tmp); | ||
1987 | } | ||
1988 | |||
1989 | /* | 1896 | /* |
1990 | * __vxge_hw_mempool_item_priv - will return pointer on per item private space | 1897 | * __vxge_hw_mempool_item_priv - will return pointer on per item private space |
1991 | */ | 1898 | */ |
@@ -2010,40 +1917,6 @@ __vxge_hw_mempool_item_priv( | |||
2010 | (*memblock_item_idx) * mempool->items_priv_size; | 1917 | (*memblock_item_idx) * mempool->items_priv_size; |
2011 | } | 1918 | } |
2012 | 1919 | ||
2013 | enum vxge_hw_status | ||
2014 | __vxge_hw_mempool_grow( | ||
2015 | struct vxge_hw_mempool *mempool, | ||
2016 | u32 num_allocate, | ||
2017 | u32 *num_allocated); | ||
2018 | |||
2019 | struct vxge_hw_mempool* | ||
2020 | __vxge_hw_mempool_create( | ||
2021 | struct __vxge_hw_device *devh, | ||
2022 | u32 memblock_size, | ||
2023 | u32 item_size, | ||
2024 | u32 private_size, | ||
2025 | u32 items_initial, | ||
2026 | u32 items_max, | ||
2027 | struct vxge_hw_mempool_cbs *mp_callback, | ||
2028 | void *userdata); | ||
2029 | |||
2030 | struct __vxge_hw_channel* | ||
2031 | __vxge_hw_channel_allocate(struct __vxge_hw_vpath_handle *vph, | ||
2032 | enum __vxge_hw_channel_type type, u32 length, | ||
2033 | u32 per_dtr_space, void *userdata); | ||
2034 | |||
2035 | void | ||
2036 | __vxge_hw_channel_free( | ||
2037 | struct __vxge_hw_channel *channel); | ||
2038 | |||
2039 | enum vxge_hw_status | ||
2040 | __vxge_hw_channel_initialize( | ||
2041 | struct __vxge_hw_channel *channel); | ||
2042 | |||
2043 | enum vxge_hw_status | ||
2044 | __vxge_hw_channel_reset( | ||
2045 | struct __vxge_hw_channel *channel); | ||
2046 | |||
2047 | /* | 1920 | /* |
2048 | * __vxge_hw_fifo_txdl_priv - Return the max fragments allocated | 1921 | * __vxge_hw_fifo_txdl_priv - Return the max fragments allocated |
2049 | * for the fifo. | 1922 | * for the fifo. |
@@ -2065,9 +1938,6 @@ enum vxge_hw_status vxge_hw_vpath_open( | |||
2065 | struct vxge_hw_vpath_attr *attr, | 1938 | struct vxge_hw_vpath_attr *attr, |
2066 | struct __vxge_hw_vpath_handle **vpath_handle); | 1939 | struct __vxge_hw_vpath_handle **vpath_handle); |
2067 | 1940 | ||
2068 | enum vxge_hw_status | ||
2069 | __vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog); | ||
2070 | |||
2071 | enum vxge_hw_status vxge_hw_vpath_close( | 1941 | enum vxge_hw_status vxge_hw_vpath_close( |
2072 | struct __vxge_hw_vpath_handle *vpath_handle); | 1942 | struct __vxge_hw_vpath_handle *vpath_handle); |
2073 | 1943 | ||
@@ -2089,54 +1959,9 @@ enum vxge_hw_status vxge_hw_vpath_mtu_set( | |||
2089 | struct __vxge_hw_vpath_handle *vpath_handle, | 1959 | struct __vxge_hw_vpath_handle *vpath_handle, |
2090 | u32 new_mtu); | 1960 | u32 new_mtu); |
2091 | 1961 | ||
2092 | enum vxge_hw_status vxge_hw_vpath_stats_enable( | ||
2093 | struct __vxge_hw_vpath_handle *vpath_handle); | ||
2094 | |||
2095 | enum vxge_hw_status | ||
2096 | __vxge_hw_vpath_stats_access( | ||
2097 | struct __vxge_hw_virtualpath *vpath, | ||
2098 | u32 operation, | ||
2099 | u32 offset, | ||
2100 | u64 *stat); | ||
2101 | |||
2102 | enum vxge_hw_status | ||
2103 | __vxge_hw_vpath_xmac_tx_stats_get( | ||
2104 | struct __vxge_hw_virtualpath *vpath, | ||
2105 | struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats); | ||
2106 | |||
2107 | enum vxge_hw_status | ||
2108 | __vxge_hw_vpath_xmac_rx_stats_get( | ||
2109 | struct __vxge_hw_virtualpath *vpath, | ||
2110 | struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats); | ||
2111 | |||
2112 | enum vxge_hw_status | ||
2113 | __vxge_hw_vpath_stats_get( | ||
2114 | struct __vxge_hw_virtualpath *vpath, | ||
2115 | struct vxge_hw_vpath_stats_hw_info *hw_stats); | ||
2116 | |||
2117 | void | 1962 | void |
2118 | vxge_hw_vpath_rx_doorbell_init(struct __vxge_hw_vpath_handle *vp); | 1963 | vxge_hw_vpath_rx_doorbell_init(struct __vxge_hw_vpath_handle *vp); |
2119 | 1964 | ||
2120 | enum vxge_hw_status | ||
2121 | __vxge_hw_device_vpath_config_check(struct vxge_hw_vp_config *vp_config); | ||
2122 | |||
2123 | void | ||
2124 | __vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev); | ||
2125 | |||
2126 | enum vxge_hw_status | ||
2127 | __vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg); | ||
2128 | |||
2129 | enum vxge_hw_status | ||
2130 | __vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg); | ||
2131 | |||
2132 | enum vxge_hw_status | ||
2133 | __vxge_hw_kdfc_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg, | ||
2134 | struct vxge_hw_vpath_reg __iomem *vpath_reg); | ||
2135 | |||
2136 | enum vxge_hw_status | ||
2137 | __vxge_hw_device_register_poll( | ||
2138 | void __iomem *reg, | ||
2139 | u64 mask, u32 max_millis); | ||
2140 | 1965 | ||
2141 | #ifndef readq | 1966 | #ifndef readq |
2142 | static inline u64 readq(void __iomem *addr) | 1967 | static inline u64 readq(void __iomem *addr) |
@@ -2168,62 +1993,12 @@ static inline void __vxge_hw_pio_mem_write32_lower(u32 val, void __iomem *addr) | |||
2168 | writel(val, addr); | 1993 | writel(val, addr); |
2169 | } | 1994 | } |
2170 | 1995 | ||
2171 | static inline enum vxge_hw_status | ||
2172 | __vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr, | ||
2173 | u64 mask, u32 max_millis) | ||
2174 | { | ||
2175 | enum vxge_hw_status status = VXGE_HW_OK; | ||
2176 | |||
2177 | __vxge_hw_pio_mem_write32_lower((u32)vxge_bVALn(val64, 32, 32), addr); | ||
2178 | wmb(); | ||
2179 | __vxge_hw_pio_mem_write32_upper((u32)vxge_bVALn(val64, 0, 32), addr); | ||
2180 | wmb(); | ||
2181 | |||
2182 | status = __vxge_hw_device_register_poll(addr, mask, max_millis); | ||
2183 | return status; | ||
2184 | } | ||
2185 | |||
2186 | struct vxge_hw_toc_reg __iomem * | ||
2187 | __vxge_hw_device_toc_get(void __iomem *bar0); | ||
2188 | |||
2189 | enum vxge_hw_status | ||
2190 | __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev); | ||
2191 | |||
2192 | void | ||
2193 | __vxge_hw_device_id_get(struct __vxge_hw_device *hldev); | ||
2194 | |||
2195 | void | ||
2196 | __vxge_hw_device_host_info_get(struct __vxge_hw_device *hldev); | ||
2197 | |||
2198 | enum vxge_hw_status | 1996 | enum vxge_hw_status |
2199 | vxge_hw_device_flick_link_led(struct __vxge_hw_device *devh, u64 on_off); | 1997 | vxge_hw_device_flick_link_led(struct __vxge_hw_device *devh, u64 on_off); |
2200 | 1998 | ||
2201 | enum vxge_hw_status | 1999 | enum vxge_hw_status |
2202 | __vxge_hw_device_initialize(struct __vxge_hw_device *hldev); | ||
2203 | |||
2204 | enum vxge_hw_status | ||
2205 | __vxge_hw_vpath_pci_read( | ||
2206 | struct __vxge_hw_virtualpath *vpath, | ||
2207 | u32 phy_func_0, | ||
2208 | u32 offset, | ||
2209 | u32 *val); | ||
2210 | |||
2211 | enum vxge_hw_status | ||
2212 | __vxge_hw_vpath_addr_get( | ||
2213 | u32 vp_id, | ||
2214 | struct vxge_hw_vpath_reg __iomem *vpath_reg, | ||
2215 | u8 (macaddr)[ETH_ALEN], | ||
2216 | u8 (macaddr_mask)[ETH_ALEN]); | ||
2217 | |||
2218 | u32 | ||
2219 | __vxge_hw_vpath_func_id_get( | ||
2220 | u32 vp_id, struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg); | ||
2221 | |||
2222 | enum vxge_hw_status | ||
2223 | __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath); | ||
2224 | |||
2225 | enum vxge_hw_status | ||
2226 | vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask); | 2000 | vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask); |
2001 | |||
2227 | /** | 2002 | /** |
2228 | * vxge_debug | 2003 | * vxge_debug |
2229 | * @level: level of debug verbosity. | 2004 | * @level: level of debug verbosity. |