Changeset 1d758fc in mainline for uspace/lib/drv/generic/remote_usbhc.c
- Timestamp:
- 2018-02-12T10:11:47Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fe3f954
- Parents:
- 2f762a7
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
r2f762a7 r1d758fc 210 210 ? AS_AREA_WRITE : AS_AREA_READ; 211 211 212 const errno_t ret = async_share_out_start(exch, req->b ase, flags);212 const errno_t ret = async_share_out_start(exch, req->buffer.virt, flags); 213 213 if (ret != EOK) { 214 214 async_forget(opening_request); … … 374 374 return; 375 375 } 376 if (trans->request.b ase!= NULL) {377 as_area_destroy(trans->request.b ase);376 if (trans->request.buffer.virt != NULL) { 377 as_area_destroy(trans->request.buffer.virt); 378 378 } 379 379 … … 422 422 } 423 423 424 if ((err = async_share_out_finalize(data_callid, &trans->request.b ase)))424 if ((err = async_share_out_finalize(data_callid, &trans->request.buffer.virt))) 425 425 return err; 426 426 427 427 /* 428 * As we're going to check the mapping, we must make sure the memory is 429 * actually mapped. We must do it right now, because the area might be 430 * read-only or write-only, and we may be unsure later. 428 * As we're going to get physical addresses of the mapping, we must make 429 * sure the memory is actually mapped. We must do it right now, because 430 * the area might be read-only or write-only, and we may be unsure 431 * later. 431 432 */ 432 433 if (flags & AS_AREA_READ) { 433 434 char foo = 0; 434 volatile const char *buf = trans->request.b ase+ trans->request.offset;435 volatile const char *buf = trans->request.buffer.virt + trans->request.offset; 435 436 for (size_t i = 0; i < size; i += PAGE_SIZE) 436 437 foo += buf[i]; 437 438 } else { 438 volatile char *buf = trans->request.b ase+ trans->request.offset;439 volatile char *buf = trans->request.buffer.virt + trans->request.offset; 439 440 for (size_t i = 0; i < size; i += PAGE_SIZE) 440 441 buf[i] = 0xff; … … 482 483 } else { 483 484 /* The value was valid on the other side, for us, its garbage. */ 484 trans->request.b ase= NULL;485 trans->request.buffer.virt = NULL; 485 486 } 486 487
Note:
See TracChangeset
for help on using the changeset viewer.