Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask address to prevent rollover issues during socket.read() and socket.write() #40

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

AdamCummick
Copy link
Contributor

When testing I would occasionally get errors originating from the socket.recv() method traced down through _write_snrx_rd to _write_socket() where the address written was greater then 0xFFFF.

I added masks for the two calls that could rollover per the W5500 datasheet, specifically point 3:
image

@tannewt tannewt requested a review from brentru July 22, 2021 23:39
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addresses the issue and follows the DS, lgtm

@brentru brentru merged commit f00a3f7 into adafruit:main Jul 23, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 28, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1106 to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SH1106#4 from lesamouraipourpre/max-size

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol to 0.5.6 from 0.5.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#40 from CytronTechnologies/increase-socket-connect-timeout
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#39 from CytronTechnologies/fix-compatibility-issue
  > Moved default branch to main
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90640 to 1.2.4 from 1.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90640#25 from lesamouraipourpre/remove-max-glyphs
  > Moved default branch to main
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.11.0 from 1.10.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#40 from AdamCummick/snrx_rd-rollover-bug
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#39 from obaltzer/open-udp-server-socket

Updating https://github.com/adafruit/Adafruit_CircuitPython_CursorControl to 2.4.0 from 2.3.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CursorControl#25 from lesamouraipourpre/remove-max-glyphs

Updating https://github.com/adafruit/Adafruit_CircuitPython_Debug_I2C to 1.2.4 from 1.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Debug_I2C#9 from adafruit/fix_nonerror
  > Moved CI to Python 3.7
  > Changed readme link
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes to 2.3.0 from 2.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#39 from lesamouraipourpre/remove-max-glyphs

Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 5.1.0 from 5.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#74 from andreblue/main
  > Moved default branch to main

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.5.0 from 3.4.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#47 from lesamouraipourpre/remove-max-glyphs

Updating https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Simple_Text_Display#4 from lesamouraipourpre/remove-max-glyphs
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