hi,
arduino mega may wrong w5100.h file:
private:
#if defined(AVR_ATmega1280)
inline static void initSS() { DDRB |= _BV(0); }; //not _BV(4) !
inline static void setSS() { PORTB &= ~_BV(0); }; //not _BV(4) !
inline static void resetSS() { PORTB |= _BV(0); }; //not _BV(4) !
#else
inline static void initSS() { DDRB |= _BV(2); };
inline static void setSS() { PORTB &= ~_BV(2); };
inline static void resetSS() { PORTB |= _BV(2); };
#endif