Skip to content

Update to optoe driver to improve EOF handling#44

Merged
lguohan merged 1 commit intosonic-net:masterfrom
donboll:master
Mar 14, 2018
Merged

Update to optoe driver to improve EOF handling#44
lguohan merged 1 commit intosonic-net:masterfrom
donboll:master

Conversation

@donboll
Copy link
Copy Markdown
Contributor

@donboll donboll commented Mar 11, 2018

Added patch: 'driver-support-optoe-EOF_fix.patch' to patch directory
Added the patch to 'series'

Signed-off-by: Don Bollinger

	Added patch: 'driver-support-optoe-EOF_fix.patch' to patch directory
	Added the patch to 'series

Signed-off-by: Don Bollinger
@donboll
Copy link
Copy Markdown
Contributor Author

donboll commented Mar 11, 2018

Please accept this PR to replace PR #43.

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.

This PR is implemented as a new patch in the 'patch' directory, which will patch optoe.c. It also updates the 'series' file to apply this patch, after the patch that introduces optoe.c.

Don

@lguohan lguohan merged commit ed04b36 into sonic-net:master Mar 14, 2018
praveen-li pushed a commit to praveen-li/sonic-linux-kernel that referenced this pull request Dec 18, 2020
* msft_github/master:
  Update to optoe driver to improve EOF handling (sonic-net#44)
  drivers/misc/eeprom:  Add support for optoe driver (sonic-net#41)
  Add LED-GPIO support using for QUANTA IX1B switch (sonic-net#40)
DavidZagury pushed a commit to DavidZagury/sonic-linux-kernel that referenced this pull request May 19, 2025
## Patch List
* 0098-platform-mellanox-Downstream-Add-support-for-new-Nvi.patch :
* 0099-platform-mellanox-Downstream-Add-support-DGX-flavor-.patch :
* 0100-platform-mellanox-mlxreg-io-Extend-number-of-hwmon-a.patch :
* 0101-platform_data-mlxreg-Add-fields-for-interrupt-storm-.patch :
* 0102-platform-mellanox-mlxreg-hotplug-Add-support-for-han.patch :
* 0103-platform-mellanox-mlx-dpu-improve-interrupt-handling.patch :
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