Skip to content

drivers/misc/eeprom: optoe patch - improve EOF handling for access beyond end of device#43

Closed
donboll wants to merge 7 commits intosonic-net:masterfrom
donboll:master
Closed

drivers/misc/eeprom: optoe patch - improve EOF handling for access beyond end of device#43
donboll wants to merge 7 commits intosonic-net:masterfrom
donboll:master

Conversation

@donboll
Copy link
Copy Markdown
Contributor

@donboll donboll commented Mar 6, 2018

No description provided.

@donboll
Copy link
Copy Markdown
Contributor Author

donboll commented Mar 6, 2018

Roy Lee at Accton discovered in his testing that attempts to read beyond the end of devices that do not page results in unexpected error messages. With this patch optoe returns '0' for accesses that start beyond the end of the device (256 bytes for a DAC or a QSFP without pages, 512 bytes for an SFP without pages, 32K+ for paged devices). According to the Linux Device Driver book (LDD3, ch3, page 66), "The return value for read is interpreted by the calling application program... If the value is 0, end-of-file was reached (and no data was read)." This patch implements this policy. Roy has confirmed the unexpected error messages are now gone.

@donboll
Copy link
Copy Markdown
Contributor Author

donboll commented Mar 6, 2018

I seem to have done something wrong in the pull request. The only change I am requesting is the last commit, f88d7ab, the patch to improve optoe handling of EOF. Please advise if I need to change this PR.

Don

@donboll donboll closed this Mar 6, 2018
@donboll donboll reopened this Mar 6, 2018
@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Mar 7, 2018

@donboll, you do not need all those kernel packages, and you need to put the patch into series

@donboll donboll closed this Mar 11, 2018
@donboll
Copy link
Copy Markdown
Contributor Author

donboll commented Mar 11, 2018

Please disregard this pull request. I will send a cleaner PR with the same changes momentarily.

dgsudharsan pushed a commit to dgsudharsan/sonic-linux-kernel that referenced this pull request May 12, 2025
[202412] Code sync sonic-net/sonic-linux-kernel:202411 => 202412

```          
*   b865879 (HEAD -> code-sync-202412, origin/code-sync-202412) r12f 250417:0526 - Merge remote-tracking branch 'base/202411' into code-sync-202412
|\  
| * a89afbc (base/202411) Saikrishna Arcot 250409:1858 - [202411] Update to Linux 6.1.123 (sonic-net#459)
```
dal00 pushed a commit to kamelnetworks/sonic-linux-kernel that referenced this pull request Jul 20, 2025
Why I did it
SONiC related packages shouldn't be intalled from Pypi.
It is security compliance requirement.

How I did it
Check SONiC related packages when using setup.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants