You may find the some reset actions will cause either the w5100 or the sd card to fail the begin() function unless you disable one while setting up the other. I use something like this:
void setup() {
Serial.begin(9600);
// disable w5100 SPI while setting up SD
pinMode(10,OUTPUT);
digitalWrite(10,HIGH);
Serial.print("Starting SD...");
if(!SD.begin(4)) Serial.println("failed");
else Serial.println("ok");
// SD.begin() returns with its SPI disabled. Good SD library!
Serial.print("Starting w5100...");
if(!Ethernet.begin(mac)) Serial.println("failed");
else Serial.println("ok");
// Ethernet.begin() returns with the SPI enabled (bug?), so disable it. Bad Ethernet library!
digitalWrite(10,HIGH);
// rest of your setup
}