Changeset 122b753 in mainline for uspace/srv/hw/netif/dp8390/dp8390.c
- Timestamp:
- 2011-01-06T17:23:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 40559a96
- Parents:
- d3a0af7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.c
rd3a0af7 r122b753 674 674 675 675 // if (!(dep->de_flags & DEF_READING)) 676 // return E GENERIC;676 // return EINVAL; 677 677 678 678 packet = netif_packet_get_1(length); … … 771 771 void *vir_user; 772 772 size_t ecount; 773 int i , r;773 int i; 774 774 size_t bytes; 775 775 //uint8_t two_bytes[2]; … … 810 810 811 811 if (odd_byte) { 812 r = sys_vircopy(user_proc, D, vir_user, 813 // SELF, D, (vir_bytes) &two_bytes[1], 1); 814 SELF, D, &(((uint8_t *) &two_bytes)[1]), 1); 815 816 if (r != EOK) 817 fprintf(stderr, "DP8390: dp_pio16_user2nic: sys_vircopy failed\n"); 812 memcpy(&(((uint8_t *) &two_bytes)[1]), vir_user, 1); 818 813 819 814 //outw(dep->de_data_port, *(uint16_t *) two_bytes); … … 841 836 assert(bytes == 1); 842 837 843 r = sys_vircopy(user_proc, D, vir_user, 844 // SELF, D, (vir_bytes) &two_bytes[0], 1); 845 SELF, D, &(((uint8_t *) &two_bytes)[0]), 1); 846 847 if (r != EOK) 848 fprintf(stderr, "DP8390: dp_pio16_user2nic: sys_vircopy failed\n"); 838 memcpy(&(((uint8_t *) &two_bytes)[0]), vir_user, 1); 849 839 850 840 count--; … … 915 905 void *vir_user; 916 906 size_t ecount; 917 int i , r;907 int i; 918 908 size_t bytes; 919 909 //uint8_t two_bytes[2]; … … 953 943 954 944 if (odd_byte) { 955 //r= sys_vircopy(SELF, D, (vir_bytes)&two_bytes[1], 956 r= sys_vircopy(SELF, D, &(((uint8_t *) &two_bytes)[1]), 957 user_proc, D, vir_user, 1); 958 if (r != EOK) 959 fprintf(stderr, "DP8390: dp_pio16_nic2user: sys_vircopy failed\n"); 945 memcpy(vir_user, &(((uint8_t *) &two_bytes)[1]), 1); 960 946 961 947 count--; … … 983 969 //*(uint16_t *) two_bytes= inw(dep->de_data_port); 984 970 two_bytes = inw(dep->de_data_port); 985 //r= sys_vircopy(SELF, D, (vir_bytes) &two_bytes[0], 986 r = sys_vircopy(SELF, D, &(((uint8_t *) &two_bytes)[0]), 987 user_proc, D, vir_user, 1); 988 if (r != EOK) 989 fprintf(stderr, "DP8390: dp_pio16_nic2user: sys_vircopy failed\n"); 971 memcpy(vir_user, &(((uint8_t *) &two_bytes)[0]), 1); 990 972 991 973 count--;
Note:
See TracChangeset
for help on using the changeset viewer.