w5100 fails to setup Ethernet with certain SD card inserted

Got a strange problem. w5100 is unable to be initialized with a few SD cards inserted, while the other SD cards doesn’t cause problem. All SD cards are 256mb. The content in SD card can be read even in abnormal case.

Arduino IDE 1.8.9 macOS, Ethernet lib 2.0.0

Atmega2560 + Ethernet Shield w5100

The issue can be reproduced with simple sketch:

#include <SPI.h>
#include <SD.h>
#include <Ethernet.h> 

#define PIN_SD 4

void setup() {
  
  Serial.begin(115200);

  if (!SD.begin(PIN_SD)) {
    Serial.println("SD fail");
  }

  pinMode(PIN_SD, OUTPUT);
  digitalWrite(PIN_SD, HIGH);

  byte mac[6] = {0x52, 0xa0, 0xe9, 0x90, 0x47, 0x28};
  if (Ethernet.begin(mac)) {
    Serial.println(Ethernet.localIP());
  }
  else
  {
    Serial.println("Net Fail");
  }
  
}

void loop() {
  // put your main code here, to run repeatedly:

}

I tried to drill down the issue, and found out W5100Class::softReset() is failing to get correct code from MR(Mode Register) after softreset.

// Soft reset the Wiznet chip, by writing to its MR register reset bit
uint8_t W5100Class::softReset(void)
{
 uint16_t count=0;

 Serial.println("Wiznet soft reset");
 Serial.println(readMR(), HEX);
 // write to reset bit
 writeMR(0x80);
 // then wait for soft reset to complete
 do {
 uint8_t mr = readMR();
 Serial.print("mr=");
 Serial.println(mr, HEX);
 if (mr == 0) return 1;
 delay(1);
 } while (++count < 20);
 return 0;
}

Here is the output with above function modified.

SD card without problem:

w5100 init
Wiznet soft reset
0
mr=0
Wiznet soft reset
0
mr=0
w5100.cpp: detect W5100 chip
Wiznet soft reset
0
mr=0
chip is W5100
w5100 found
172.10.0.70

SD card with problem:

w5100 init
Wiznet soft reset
FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
Wiznet soft reset
FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
w5100.cpp: detect W5100 chip
Wiznet soft reset
FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
mr=FF
Net Fail

In normal case, MR is expected to be 0x00 before reset. After set bit7 in MR, MR returns to 0x00 after reset. In abnormal case, MR stays 0xff.

Any idea on this?