Add the driver for VIA Technology 6105/6106S Ethernet card

This commit is contained in:
Jia-Ju Bai 2016-10-19 10:11:26 +00:00 committed by rlfnb
parent 5c3ab75759
commit d888c29d7a
2 changed files with 0 additions and 28 deletions

BIN
minix/drivers/net/vt6105/vt6105 Executable file

Binary file not shown.

View File

@ -456,11 +456,7 @@ static void vt_check_link(vt_driver *pdev) {
} }
/* Stop the driver */ /* Stop the driver */
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
static void vt_stop(void) { static void vt_stop(void) {
=======
static void vt_stop(void) {
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
u16_t base = g_driver.vt_base_addr; u16_t base = g_driver.vt_base_addr;
/* Free Rx and Tx buffer*/ /* Free Rx and Tx buffer*/
@ -541,21 +537,13 @@ static ssize_t vt_recv(struct netdriver_data *data, size_t max) {
/* Other packet */ /* Other packet */
if (index == VT_RX_DESC_NUM - 1) { if (index == VT_RX_DESC_NUM - 1) {
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
desc->status = VT_DESC_OWN | desc->status = VT_DESC_OWN |
=======
desc->status = VT_DESC_OWN |
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
((VT_RX_BUF_SIZE << 16) & VT_DESC_RX_LENMASK); ((VT_RX_BUF_SIZE << 16) & VT_DESC_RX_LENMASK);
index = 0; index = 0;
desc = pdev->vt_rx_desc; desc = pdev->vt_rx_desc;
} }
else { else {
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
desc->status = VT_DESC_OWN | desc->status = VT_DESC_OWN |
=======
desc->status = VT_DESC_OWN |
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
((VT_RX_BUF_SIZE << 16) & VT_DESC_RX_LENMASK); ((VT_RX_BUF_SIZE << 16) & VT_DESC_RX_LENMASK);
index++; index++;
desc++; desc++;
@ -654,11 +642,7 @@ static void vt_intr(unsigned int mask) {
/* Real handler interrupt */ /* Real handler interrupt */
static void vt_handler(vt_driver *pdev) { static void vt_handler(vt_driver *pdev) {
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
u16_t base = pdev->vt_base_addr; u16_t base = pdev->vt_base_addr;
=======
u16_t base = pdev->vt_base_addr;
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
int intr_status; int intr_status;
u8_t db; u8_t db;
u16_t dw; u16_t dw;
@ -669,11 +653,7 @@ static void vt_handler(vt_driver *pdev) {
/* Get interrupt status */ /* Get interrupt status */
intr_status = vt_inw(base, VT_REG_ISR); intr_status = vt_inw(base, VT_REG_ISR);
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
/* Clear interrupt */ /* Clear interrupt */
=======
/* Clear interrupt */
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
dw = intr_status & ~(VT_INTR_PCI_ERR | VT_INTR_PORT_CHANGE); dw = intr_status & ~(VT_INTR_PCI_ERR | VT_INTR_PORT_CHANGE);
vt_outw(base, VT_REG_ISR, dw); vt_outw(base, VT_REG_ISR, dw);
@ -683,11 +663,7 @@ static void vt_handler(vt_driver *pdev) {
/* Check interrupt status */ /* Check interrupt status */
if (intr_status & VT_INTR_RX_DONE) { if (intr_status & VT_INTR_RX_DONE) {
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
pdev->vt_recv_flag = TRUE; pdev->vt_recv_flag = TRUE;
=======
pdev->vt_recv_flag = TRUE;
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
flag++; flag++;
if (intr_status & VT_INTR_RX_ERR) { if (intr_status & VT_INTR_RX_ERR) {
@ -764,11 +740,7 @@ static void vt_handler(vt_driver *pdev) {
pdev->vt_stat.ets_packetT++; pdev->vt_stat.ets_packetT++;
pdev->vt_tx[tx_tail].busy = FALSE; pdev->vt_tx[tx_tail].busy = FALSE;
pdev->vt_tx_busy_num--; pdev->vt_tx_busy_num--;
<<<<<<< fedd2b738632fec02d8e1e2fb8d51f2bd6e3d06d
=======
>>>>>>> Add the driver for VIA Technology 6105/6106S Ethernet card
if (++tx_tail >= VT_TX_DESC_NUM) if (++tx_tail >= VT_TX_DESC_NUM)
tx_tail = 0; tx_tail = 0;