diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
commit | cf9b59e9d3e008591d1f54830f570982bb307a0d (patch) | |
tree | 113478ce8fd8c832ba726ffdf59b82cb46356476 /drivers/net/vxge/vxge-config.h | |
parent | 44504b2bebf8b5823c59484e73096a7d6574471d (diff) | |
parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) |
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/net/vxge/vxge-config.h')
-rw-r--r-- | drivers/net/vxge/vxge-config.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h index 13f5416307f8..4ae2625d4d8f 100644 --- a/drivers/net/vxge/vxge-config.h +++ b/drivers/net/vxge/vxge-config.h | |||
@@ -765,10 +765,18 @@ struct vxge_hw_device_hw_info { | |||
765 | #define VXGE_HW_SR_VH_VIRTUAL_FUNCTION 6 | 765 | #define VXGE_HW_SR_VH_VIRTUAL_FUNCTION 6 |
766 | #define VXGE_HW_VH_NORMAL_FUNCTION 7 | 766 | #define VXGE_HW_VH_NORMAL_FUNCTION 7 |
767 | u64 function_mode; | 767 | u64 function_mode; |
768 | #define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION 0 | 768 | #define VXGE_HW_FUNCTION_MODE_SINGLE_FUNCTION 0 |
769 | #define VXGE_HW_FUNCTION_MODE_SINGLE_FUNCTION 1 | 769 | #define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION 1 |
770 | #define VXGE_HW_FUNCTION_MODE_SRIOV 2 | 770 | #define VXGE_HW_FUNCTION_MODE_SRIOV 2 |
771 | #define VXGE_HW_FUNCTION_MODE_MRIOV 3 | 771 | #define VXGE_HW_FUNCTION_MODE_MRIOV 3 |
772 | #define VXGE_HW_FUNCTION_MODE_MRIOV_8 4 | ||
773 | #define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_17 5 | ||
774 | #define VXGE_HW_FUNCTION_MODE_SRIOV_8 6 | ||
775 | #define VXGE_HW_FUNCTION_MODE_SRIOV_4 7 | ||
776 | #define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_2 8 | ||
777 | #define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_4 9 | ||
778 | #define VXGE_HW_FUNCTION_MODE_MRIOV_4 10 | ||
779 | |||
772 | u32 func_id; | 780 | u32 func_id; |
773 | u64 vpath_mask; | 781 | u64 vpath_mask; |
774 | struct vxge_hw_device_version fw_version; | 782 | struct vxge_hw_device_version fw_version; |
@@ -1915,20 +1923,32 @@ static inline void *vxge_os_dma_malloc(struct pci_dev *pdev, | |||
1915 | gfp_t flags; | 1923 | gfp_t flags; |
1916 | void *vaddr; | 1924 | void *vaddr; |
1917 | unsigned long misaligned = 0; | 1925 | unsigned long misaligned = 0; |
1926 | int realloc_flag = 0; | ||
1918 | *p_dma_acch = *p_dmah = NULL; | 1927 | *p_dma_acch = *p_dmah = NULL; |
1919 | 1928 | ||
1920 | if (in_interrupt()) | 1929 | if (in_interrupt()) |
1921 | flags = GFP_ATOMIC | GFP_DMA; | 1930 | flags = GFP_ATOMIC | GFP_DMA; |
1922 | else | 1931 | else |
1923 | flags = GFP_KERNEL | GFP_DMA; | 1932 | flags = GFP_KERNEL | GFP_DMA; |
1924 | 1933 | realloc: | |
1925 | size += VXGE_CACHE_LINE_SIZE; | ||
1926 | |||
1927 | vaddr = kmalloc((size), flags); | 1934 | vaddr = kmalloc((size), flags); |
1928 | if (vaddr == NULL) | 1935 | if (vaddr == NULL) |
1929 | return vaddr; | 1936 | return vaddr; |
1930 | misaligned = (unsigned long)VXGE_ALIGN(*((u64 *)&vaddr), | 1937 | misaligned = (unsigned long)VXGE_ALIGN((unsigned long)vaddr, |
1931 | VXGE_CACHE_LINE_SIZE); | 1938 | VXGE_CACHE_LINE_SIZE); |
1939 | if (realloc_flag) | ||
1940 | goto out; | ||
1941 | |||
1942 | if (misaligned) { | ||
1943 | /* misaligned, free current one and try allocating | ||
1944 | * size + VXGE_CACHE_LINE_SIZE memory | ||
1945 | */ | ||
1946 | kfree((void *) vaddr); | ||
1947 | size += VXGE_CACHE_LINE_SIZE; | ||
1948 | realloc_flag = 1; | ||
1949 | goto realloc; | ||
1950 | } | ||
1951 | out: | ||
1932 | *(unsigned long *)p_dma_acch = misaligned; | 1952 | *(unsigned long *)p_dma_acch = misaligned; |
1933 | vaddr = (void *)((u8 *)vaddr + misaligned); | 1953 | vaddr = (void *)((u8 *)vaddr + misaligned); |
1934 | return vaddr; | 1954 | return vaddr; |
@@ -2254,4 +2274,6 @@ enum vxge_hw_status vxge_hw_vpath_rts_rth_set( | |||
2254 | struct vxge_hw_rth_hash_types *hash_type, | 2274 | struct vxge_hw_rth_hash_types *hash_type, |
2255 | u16 bucket_size); | 2275 | u16 bucket_size); |
2256 | 2276 | ||
2277 | enum vxge_hw_status | ||
2278 | __vxge_hw_device_is_privilaged(u32 host_type, u32 func_id); | ||
2257 | #endif | 2279 | #endif |