Changeset 04729b1e in mainline
- Timestamp:
- 2010-02-12T13:46:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1848d6
- Parents:
- d510c0fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/netif/dp8390/dp8390.c
rd510c0fe r04729b1e 820 820 { 821 821 dp_rcvhdr_t header; 822 unsigned pageno, curr, next; 822 //unsigned pageno, curr, next; 823 int pageno, curr, next; 823 824 vir_bytes length; 824 825 int packet_processed, r; … … 1066 1067 { 1067 1068 vir_bytes vir_hw;//, vir_user; 1068 int bytes, i, r; 1069 //int bytes, i, r; 1070 int i, r; 1071 vir_bytes bytes; 1069 1072 1070 1073 vir_hw = (vir_bytes)dep->de_locmem + nic_addr; … … 1114 1117 { 1115 1118 // phys_bytes phys_user; 1116 int bytes, i; 1119 int i; 1120 vir_bytes bytes; 1117 1121 1118 1122 outb_reg0(dep, DP_ISR, ISR_RDC); … … 1174 1178 vir_bytes vir_user; 1175 1179 vir_bytes ecount; 1176 int i, r, bytes, user_proc; 1177 u8_t two_bytes[2]; 1180 int i, r, user_proc; 1181 vir_bytes bytes; 1182 //u8_t two_bytes[2]; 1183 u16_t two_bytes; 1178 1184 int odd_byte; 1179 1185 … … 1213 1219 { 1214 1220 r= sys_vircopy(user_proc, D, vir_user, 1215 SELF, D, (vir_bytes)&two_bytes[1], 1); 1221 // SELF, D, (vir_bytes)&two_bytes[1], 1); 1222 SELF, D, (vir_bytes)&(((u8_t *)&two_bytes)[1]), 1); 1216 1223 if (r != OK) 1217 1224 { … … 1220 1227 r); 1221 1228 } 1222 outw(dep->de_data_port, *(u16_t *)two_bytes); 1229 //outw(dep->de_data_port, *(u16_t *)two_bytes); 1230 outw(dep->de_data_port, two_bytes); 1223 1231 count--; 1224 1232 offset++; … … 1243 1251 assert(bytes == 1); 1244 1252 r= sys_vircopy(user_proc, D, vir_user, 1245 SELF, D, (vir_bytes)&two_bytes[0], 1); 1253 // SELF, D, (vir_bytes)&two_bytes[0], 1); 1254 SELF, D, (vir_bytes)&(((u8_t *)&two_bytes)[0]), 1); 1246 1255 if (r != OK) 1247 1256 { … … 1260 1269 1261 1270 if (odd_byte) 1262 outw(dep->de_data_port, *(u16_t *)two_bytes); 1271 //outw(dep->de_data_port, *(u16_t *)two_bytes); 1272 outw(dep->de_data_port, two_bytes); 1263 1273 1264 1274 for (i= 0; i<100; i++) … … 1284 1294 { 1285 1295 vir_bytes vir_hw;//, vir_user; 1286 int bytes, i, r; 1296 vir_bytes bytes; 1297 int i, r; 1287 1298 1288 1299 vir_hw = (vir_bytes)dep->de_locmem + nic_addr; … … 1332 1343 { 1333 1344 // phys_bytes phys_user; 1334 int bytes, i; 1345 int i; 1346 vir_bytes bytes; 1335 1347 1336 1348 outb_reg0(dep, DP_RBCR0, count & 0xFF); … … 1380 1392 vir_bytes vir_user; 1381 1393 vir_bytes ecount; 1382 int i, r, bytes, user_proc; 1383 u8_t two_bytes[2]; 1394 int i, r, user_proc; 1395 vir_bytes bytes; 1396 //u8_t two_bytes[2]; 1397 u16_t two_bytes; 1384 1398 int odd_byte; 1385 1399 … … 1417 1431 if (odd_byte) 1418 1432 { 1419 r= sys_vircopy(SELF, D, (vir_bytes)&two_bytes[1], 1433 //r= sys_vircopy(SELF, D, (vir_bytes)&two_bytes[1], 1434 r= sys_vircopy(SELF, D, (vir_bytes)&(((u8_t *)&two_bytes)[1]), 1420 1435 user_proc, D, vir_user, 1); 1421 1436 if (r != OK) … … 1446 1461 { 1447 1462 assert(bytes == 1); 1448 *(u16_t *)two_bytes= inw(dep->de_data_port); 1449 r= sys_vircopy(SELF, D, (vir_bytes)&two_bytes[0], 1463 //*(u16_t *)two_bytes= inw(dep->de_data_port); 1464 two_bytes= inw(dep->de_data_port); 1465 //r= sys_vircopy(SELF, D, (vir_bytes)&two_bytes[0], 1466 r= sys_vircopy(SELF, D, (vir_bytes)&(((u8_t *)&two_bytes)[0]), 1450 1467 user_proc, D, vir_user, 1); 1451 1468 if (r != OK)
Note:
See TracChangeset
for help on using the changeset viewer.