This commit is contained in:
Andrew Pamment 2021-11-27 13:32:49 +10:00
parent 9140a6d691
commit e77e993696

View File

@ -351,7 +351,6 @@ struct ether_t *init_i825xx(int count) {
//enable all interrupts (and clear existing pending ones)
mmio_write(i825xx_dev, REG_IMS, 0x1F6DC); //this could be 0xFFFFF but that sets some reserved bits
mmio_write(i825xx_dev, REG_IMS, 0xff & ~4);
mmio_read(i825xx_dev, REG_ICR);
char *pagesrx = mem_alloc_pages((round_up_to_page(NUM_RX_DESCRIPTORS * sizeof(struct i825xx_rx_desc_t))) / PAGE_SIZE);
@ -379,7 +378,7 @@ struct ether_t *init_i825xx(int count) {
i825xx_dev->rx_front = 0;
mmio_write(i825xx_dev, REG_RCTL, RCTL_EN | RCTL_SBP| RCTL_UPE | RCTL_MPE | RCTL_LBM_OFF | RCTL_RDMTS_HALF | RCTL_BAM | RCTL_SECRC | RCTL_BSIZE_8192);
mmio_write(i825xx_dev, REG_RCTL, RCTL_SBP| RCTL_UPE | RCTL_MPE | RCTL_LBM_OFF | RCTL_RDMTS_HALF | RCTL_BAM | RCTL_SECRC | RCTL_BSIZE_8192);
pagesrx = mem_alloc_pages((round_up_to_page(NUM_TX_DESCRIPTORS * sizeof(struct i825xx_tx_desc_t) + 16)) / PAGE_SIZE);
ptr = mem_pci_sbrk(round_up_to_page(NUM_TX_DESCRIPTORS * sizeof(struct i825xx_tx_desc_t) + 16));