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

Kernel Panic w/ microchip enc28j60 ethernet driver w/ Patch #1385

Closed
davarus opened this issue Mar 31, 2016 · 12 comments
Closed

Kernel Panic w/ microchip enc28j60 ethernet driver w/ Patch #1385

davarus opened this issue Mar 31, 2016 · 12 comments

Comments

@davarus
Copy link

davarus commented Mar 31, 2016

There is a NULL pointer dereference kernel panic in the enc28j60 ethernet driver. I made a quick patch that prevents the kernel panic, but I'm not sure if there's something else that's off. To reproduce the kernel panic is pretty easy: Connect the pi ethernet adapter directly to another system. (The one we used was a toughbook.) If it's connected to a switch of any kind it works happy, happy. Otherwise after enough traffic it will panic. This patch solves that, but as I said, I'm not sure if it's the correct fix as I'm not familiar with the linux kernel really.
enc28j60-panic.patch.txt

@popcornmix
Copy link
Collaborator

This is upstream code. Ideally if you could submit it here:
https://www.kernel.org/doc/Documentation/SubmittingPatches

the developers who really know this code can comment on the fix.
Once they have agreed on the correct fix, we can cherry-pick it.

@davarus
Copy link
Author

davarus commented Apr 1, 2016

Thanks for getting back so quick, submitted patch upstream yesterday and will keep you informed.

@popcornmix
Copy link
Collaborator

Thanks.

@SimInnovations
Copy link

Any updates on the submitting process? I've got the same kernel panic error here. It's kinda driving me insane :-) But it's a relief to see that it's not only me who has this.

@hecko
Copy link

hecko commented Apr 24, 2016

@davarus can you please link any info on the patch you have submitted to the mainstream kernel so we can track it independently? thanks!

@davarus
Copy link
Author

davarus commented Apr 26, 2016

Sorry, I submitted the patch, but checking the list it didn't go through. I'm assuming I have to subscribe to the list and resubmit. I'll be doing that tomorrow and will post the info here.

@davarus
Copy link
Author

davarus commented May 4, 2016

Sorry, got busy with some other stuff. Here is a link to what made it to the list as of a few minutes ago... http://marc.info/?l=linux-netdev&m=146238430627231&w=2

@rdicroce
Copy link

I think I just ran into this. I followed the mailing list thread, and it looks like a good patch was created, but AFAICT it was never applied. Am I missing something here?

@hecko
Copy link

hecko commented Jun 16, 2016

Yes, is was never applied as its really not a proper kernel patch - it
apparently fixes the issue, but was neve accepted do streamline kernel as
the real problem is somewhere else in the code.

Try to search net-dev korg mailing list for ENC28J60 - there were multiple
recent patches applied to the driver so some of the MIGHT fix the issue. I
would love to test this, however Im not able to replicate the panic :(

On Thu, Jun 16, 2016 at 5:20 PM, Rich DiCroce notifications@github.com
wrote:

I think I just ran into this. I followed the mailing list thread, and it
looks like a good patch was created, but AFAICT it was never applied. Am I
missing something here?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1385 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA0O_8Yw4fXWm-DRGu2173zuwEMIrE8Hks5qMWnJgaJpZM4H9Bwc
.


This message is not intended to have

contractual effect

@nlubello
Copy link

I've found somewhere a post explaining that the cause might be due to an
hardware bug
I solved it just changing the SPI clock to an higher one (I don't have the
config.txt file available now to check the correct value) an tested the
raspberry with a load simulator of a web page served with nginx.

Hope this can help!
Yes, is was never applied as its really not a proper kernel patch - it
apparently fixes the issue, but was neve accepted do streamline kernel as
the real problem is somewhere else in the code.

Try to search net-dev korg mailing list for ENC28J60 - there were multiple
recent patches applied to the driver so some of the MIGHT fix the issue. I
would love to test this, however Im not able to replicate the panic :(

On Thu, Jun 16, 2016 at 5:20 PM, Rich DiCroce notifications@github.com
wrote:

I think I just ran into this. I followed the mailing list thread, and it
looks like a good patch was created, but AFAICT it was never applied. Am I
missing something here?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1385 (comment),
or mute the thread
<
https://github.com/notifications/unsubscribe/AA0O_8Yw4fXWm-DRGu2173zuwEMIrE8Hks5qMWnJgaJpZM4H9Bwc

.


This message is not intended to have

contractual effect


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1385 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHxyQpiFiOHb0NhbXEHn105fLmZ3vJUhks5qMYnYgaJpZM4H9Bwc
.

@rdicroce
Copy link

FYI for anyone still interested in this issue: I think a recent commit on the 4.4.y branch (also applied upstream) fixes this issue. See 7547e72

Unfortunately I don't have any way of reliably reproducing the problem, so I can't say for sure if this fixes it.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Aug 16, 2016
See: raspberrypi/linux#1596

kernel: drm/vc4: vc4 loops support
See: raspberrypi/linux#1597

kernel: Add cm3 dts file
See: raspberrypi/linux#1595

kernel: net: ethernet: enc28j60: add device tree support

kernel: enc28j60: Fix race condition in enc28j60 driver
See: raspberrypi/linux#1385

firmware: platform: Don't swap audio L&R if using GPIOs 12&13
See: http://github.com/raspberrypi/linux/issues/1473

firmware: hdmi: Increase muting before resolution change

firmware: board_info: Add cm3-specific dtb file

firmware: Ensure extended part of vg_spath is zeroed
See: raspberrypi/linux#943
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Aug 16, 2016
See: raspberrypi/linux#1596

kernel: drm/vc4: vc4 loops support
See: raspberrypi/linux#1597

kernel: Add cm3 dts file
See: raspberrypi/linux#1595

kernel: net: ethernet: enc28j60: add device tree support

kernel: enc28j60: Fix race condition in enc28j60 driver
See: raspberrypi/linux#1385

firmware: platform: Don't swap audio L&R if using GPIOs 12&13
See: http://github.com/raspberrypi/linux/issues/1473

firmware: hdmi: Increase muting before resolution change

firmware: board_info: Add cm3-specific dtb file

firmware: Ensure extended part of vg_spath is zeroed
See: raspberrypi/linux#943
@lurch
Copy link
Contributor

lurch commented Aug 30, 2016

http://raspi.tv/2015/ethernet-on-pi-zero-how-to-put-an-ethernet-port-on-your-pi#comment-62101 confirms that the rpi-update kernel removes the kernel-panic from the enc28j60 driver, so this issue can probably be closed.

mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Sep 16, 2016
- kernel: config: Enable SENSORS_LM75
  See: #508

- kernel: config: Enable SERIAL_SC16IS7XX
  See: raspberrypi/linux#1594

- kernel: snd-bcm2835: Don't allow responses from VC to be interrupted by user signals
  See: raspberrypi/linux#1560

- kernel: Merge many vc4 changes from drm-vc4-next-2016-07-15
  See: raspberrypi/linux#1596

- kernel: drm/vc4: vc4 loops support
  See: raspberrypi/linux#1597

- kernel: Add cm3 dts file
  See: raspberrypi/linux#1595

- kernel: net: ethernet: enc28j60: add device tree support

- kernel: enc28j60: Fix race condition in enc28j60 driver
  See: raspberrypi/linux#1385

- firmware: platform: Don't swap audio L&R if using GPIOs 12&13
  See: http://github.com/raspberrypi/linux/issues/1473

- firmware: hdmi: Increase muting before resolution change

- firmware: board_info: Add cm3-specific dtb file

- firmware: Ensure extended part of vg_spath is zeroed
  See: raspberrypi/linux#943

- kernel: config: Enable SERIAL_SC16IS7XX_SPI
  See: raspberrypi/linux#1594

- kernel: Added Overlay for Microchip MCP23S08/17 SPI gpio expanders
  See: raspberrypi/linux#1566

- kernel: BCM270X_DT: Add audio_pins to CM dtb
- kernel: BCM270X_DT: Don't enable UART0 in CM3 dtb

- kernel: overlays: Add audremap overlay
- kernel: overlays: Add swap_lr and enable_jack to audremap
  See: raspberrypi/linux#1473

- firmware: Raspi[Still|Vid]Yuv: Add option for just saving luma
  See: raspberrypi/userland#170

- firmware: RaspiVidYuv: Add option of saving RGB data

- firmware: Only change I2C/GPIO pin functions when needed

- firmware: platform: Redo the audio remapping logic
  See: raspberrypi/linux#1473

- kernel: overlays: added sc16is750 UART over I2C
  See: raspberrypi/linux#1617

- kernel: config: Add CONFIG_IPVLAN module
  See: raspberrypi/linux#1612

- kernel: config: Add CONFIG_VXLAN module
  See: raspberrypi/linux#1614

- firmware: platform: Make the default UART0 clock 48MHz for all Pis
  See: raspberrypi/linux#1601
  See: #643

- firmware: cacheasm: Enable workaround for unwanted sdram write after flush/invalidate
  See: raspberrypi/linux#943

- firmware: vchiq_arm: Fix return value of vchiq_initialise
  See: raspberrypi/userland#331

- firmware: Revert temp: Ensure extended part of vg_spath is zeroed
  See: raspberrypi/linux#943

- firmware: MMAL: Support MMAL_ENCODING_xxx_SLICE formats

- firmware: arm_display: Add bitmapped icons for warning conditions
  See: #367

- firmware: deinterlace: Avoid frame doubling with progressive frames
  See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2412845#pid2412845

- kernel: config: Enable SENSORS_INA2XX module
  See: raspberrypi/linux#1632

- kernel: overlays: Add dpi18 overlay
  See: raspberrypi/linux#1634

- kernel: brcmfmac: do not use internal roaming engine by default
  See: http://projectable.me/optimize-my-pi-wi-fi/

- firmware: arm_display: Fix alpha of warning icons
  See: #367

- firmware: mmal: Advertise sliced formats in MMAL_PARAMETER_SUPPORTED_ENCODINGS
- firmware: IL Resize: Accept strides greater than the minimum

- firmware: vmcs_host: Poll for multiple dispmanx messages
- firmware: VCHI clients: Poll for messages until empty
  See: https://discourse.osmc.tv/t/april-update-causes-system-freezes/15361/183

- firmware: tvservice/cecservice: Make unexpected messages more fatal

- kernel: drm/vc4: Allow some more signals to be packed with uniform resets
  See: raspberrypi/linux#1636

- kernel: Rpi 4.4.y firmware kms
  See: raspberrypi/linux#1637

- firmware: tvservice/cecservice: We only care about unexpected message sizes

- firmware: khronos: Avoid starting khronos service when vc4-kms-v3d is active
- firmeare: arm_loader: Enable fake_vsync_isr when fkms overlay is used
  See: raspberrypi/linux#1637

- firmware: vcdbg: Add support for vchiq debugging
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi/linux#1596

kernel: drm/vc4: vc4 loops support
See: raspberrypi/linux#1597

kernel: Add cm3 dts file
See: raspberrypi/linux#1595

kernel: net: ethernet: enc28j60: add device tree support

kernel: enc28j60: Fix race condition in enc28j60 driver
See: raspberrypi/linux#1385

firmware: platform: Don't swap audio L&R if using GPIOs 12&13
See: http://github.com/raspberrypi/linux/issues/1473

firmware: hdmi: Increase muting before resolution change

firmware: board_info: Add cm3-specific dtb file

firmware: Ensure extended part of vg_spath is zeroed
See: raspberrypi/linux#943
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

No branches or pull requests

7 participants