Thanks for your quick reply guys.
looks like netif_set_link_down() and netif_set_link_up() are being called in interrupt context
I noticed this as well, I did adjust it where the interrupt asserted a flag which is then processed by the main loop and was still having the issue.
Late last night I believe I found the issue since I have not had problems since I implemented the fix. It had nothing to do with LWIP but maybe
you guys might be able to give a clearer explanation of what was happening.
I am using an ATSAME54P20A microcontroller connected to a two port ethernet switch, KSZ8863. What I ended up finding was after some time
my callback function which tells me my MAC has something to process would stop being called. This callback function just sets a flag and I process
everything in the main loop. I have no idea why this caused the issue but it ended up being an Atmel function which reads the pin state (high/low),
it is a static inline function which I was calling every main loop. As soon as I started calling this function once every millisecond instead everything started working
fine.
This function does enable/disable interrupts when it is called so I am guessing that because I was calling it in my main loop every time (and running at 120MHz)
my MAC callback function wasn't being called because the interrupts were being enabled/disabled so often?
Either way, everything seems to be working well now. I appreciate the help.
Matt