Skip to content

Commit

Permalink
Changed the buffer's IO size to match with the OOB area's data IO
Browse files Browse the repository at this point in the history
  • Loading branch information
yunekorea committed Jul 20, 2023
1 parent 8bf9001 commit 0629d08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions device/chip2chip/chip2chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,10 @@ int chip2chip_device_init(struct device *dev, uint64_t flags)
//set R/W upper/lower buffers for chip2chip RW interface.
//size of the buffer shall be changed with "page_size/2".
//buffer allocation may need to be moved to "chip2chip_open()" function.
c2c->readData_upper_arr = (u64*)malloc(8192/2);
c2c->readData_lower_arr = (u64*)malloc(8192/2);
c2c->writeData_upper_arr = (u64*)malloc(8192/2);
c2c->writeData_lower_arr = (u64*)malloc(8192/2);
c2c->readData_upper_arr = (u64*)malloc(8224/2);
c2c->readData_lower_arr = (u64*)malloc(8224/2);
c2c->writeData_upper_arr = (u64*)malloc(8224/2);
c2c->writeData_lower_arr = (u64*)malloc(8224/2);

pthread_mutex_init(&(c2c->iomutex), NULL);

Expand Down
2 changes: 1 addition & 1 deletion include/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
struct device_request;
struct device_operations;

#define DEVICE_PAGE_SIZE (8192)
#define DEVICE_PAGE_SIZE (8224)

/**
* @brief request allocation flags
Expand Down

0 comments on commit 0629d08

Please sign in to comment.