Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset cd79391 in mainline


Ignore:
Timestamp:
2011-12-09T23:09:23Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
a52de0e
Parents:
74c99b5
Message:

Fix ne2k driver not transmitting last byte of even-sized frame properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/ne2000/dp8390.c

    r74c99b5 rcd79391  
    164164static void ne2k_upload(ne2k_t *ne2k, void *buf, size_t addr, size_t size)
    165165{
     166        size_t esize_ru = (size + 1) & ~1;
    166167        size_t esize = size & ~1;
    167168       
    168         pio_write_8(ne2k->port + DP_RBCR0, esize & 0xff);
    169         pio_write_8(ne2k->port + DP_RBCR1, (esize >> 8) & 0xff);
     169        pio_write_8(ne2k->port + DP_RBCR0, esize_ru & 0xff);
     170        pio_write_8(ne2k->port + DP_RBCR1, (esize_ru >> 8) & 0xff);
    170171        pio_write_8(ne2k->port + DP_RSAR0, addr & 0xff);
    171172        pio_write_8(ne2k->port + DP_RSAR1, (addr >> 8) & 0xff);
Note: See TracChangeset for help on using the changeset viewer.