Browse Source

update igb driver for ls2k.

Change-Id: I752cae1127946f315848e7467cb81fc087acfc23
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
Chong Qiao 4 years ago
parent
commit
0812e6273a
  1. 6
      sys/dev/pci/igb1/linux_net_head.h

6
sys/dev/pci/igb1/linux_net_head.h

@ -362,7 +362,7 @@ static void *dma_alloc_coherent(void *hwdev, size_t size,
{ {
void *buf; void *buf;
buf = malloc(size, M_DEVBUF, M_DONTWAIT); buf = malloc(size, M_DEVBUF, M_DONTWAIT);
#if defined(LS3_HT) #if defined(LS3_HT)||defined(LOONGSON_2K)
#else #else
CPU_IOFlushDCache(buf, size, SYNC_R); CPU_IOFlushDCache(buf, size, SYNC_R);
@ -478,7 +478,7 @@ static inline dma_addr_t dma_map_single(struct pci_dev *hwdev, void *ptr,
unsigned long addr = (unsigned long) ptr; unsigned long addr = (unsigned long) ptr;
#if defined(LS3_HT) #if defined(LS3_HT)||defined(LOONGSON_2K)
#else #else
printf("pci_map_single1\n"); printf("pci_map_single1\n");
@ -494,7 +494,7 @@ static inline dma_addr_t dma_map_single(struct pci_dev *hwdev, void *ptr,
static inline void dma_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, static inline void dma_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction) size_t size, int direction)
{ {
#if defined(LS3_HT) #if defined(LS3_HT) || defined(LOONGSON_2K)
#else #else
pci_sync_cache(hwdev, _pci_cpumap(dma_addr, size), size, SYNC_R); pci_sync_cache(hwdev, _pci_cpumap(dma_addr, size), size, SYNC_R);
#endif #endif

Loading…
Cancel
Save