Browse Source

3A2H: Add the intel 82574 and 82576 net card support.

Now the net card only the ping command is normally.

Change-Id: I7fa6c3729921226d39336f7ac41c87a3b7d290bb
master
zhangbaoqi 10 years ago
parent
commit
2caf5ebee2
  1. 5
      Targets/Bonito3a2h/conf/Bonito.3a2h
  2. 8
      sys/dev/bus_dma.c

5
Targets/Bonito3a2h/conf/Bonito.3a2h

@ -175,8 +175,8 @@ pcibr2 at mainbus0 #For the port1 device register
pcibr4 at mainbus0 #For the port2 device register pcibr4 at mainbus0 #For the port2 device register
pcibr6 at mainbus0 #For the port3 device register pcibr6 at mainbus0 #For the port3 device register
pci* at pcibr? pci* at pcibr?
#ppb* at pci? dev ? function ? # PCI-PCI bridges ppb* at pci? dev ? function ? # PCI-PCI bridges
#pci* at ppb? bus ? pci* at ppb? bus ?
#### SCSI support #### SCSI support
@ -192,6 +192,7 @@ pci* at pcibr?
# fxp normally only used for debugging (enable/disable both) # fxp normally only used for debugging (enable/disable both)
#fxp0 at pci? dev ? function ? # Intel 82559 Device #fxp0 at pci? dev ? function ? # Intel 82559 Device
#inphy* at mii? phy ? # Intel 82555 PHYs #inphy* at mii? phy ? # Intel 82555 PHYs
igb* at pci? dev ? function ? # Intel 82576
# rtl* at pci? dev ? function ? # rtl* at pci? dev ? function ?
#rte* at pci? dev ? function ? #rte* at pci? dev ? function ?
#rtk* at pci? dev ? function ? #rtk* at pci? dev ? function ?

8
sys/dev/bus_dma.c

@ -294,6 +294,7 @@ _dmamap_load_mbuf(t, map, m0, flags)
paddr_t lastaddr; paddr_t lastaddr;
int seg, error, first; int seg, error, first;
struct mbuf *m; struct mbuf *m;
char *tmp;
/* /*
* Make sure that on error condition we return "no valid mappings." * Make sure that on error condition we return "no valid mappings."
@ -312,6 +313,13 @@ _dmamap_load_mbuf(t, map, m0, flags)
seg = 0; seg = 0;
error = 0; error = 0;
for (m = m0; m != NULL && error == 0; m = m->m_next) { for (m = m0; m != NULL && error == 0; m = m->m_next) {
#ifdef LOONGSON_3A2H
if ((unsigned int )m->m_data & 0xf) {
tmp = (char *)(m->m_data - (((unsigned int )m->m_data) & 0xf));
memcpy(tmp,m->m_data,m->m_len);
m->m_data = tmp;
}
#endif
error = _dmamap_load_buffer(t, map, m->m_data, m->m_len, error = _dmamap_load_buffer(t, map, m->m_data, m->m_len,
NULL, flags, &lastaddr, &seg, first); NULL, flags, &lastaddr, &seg, first);
first = 0; first = 0;

Loading…
Cancel
Save