This pulls the w5100 CS low three times also.
//pull low clatch three times
digitalWrite(ETHCS, LOW);
digitalWrite(ETHCS, HIGH);
digitalWrite(ETHCS, LOW);
digitalWrite(ETHCS, HIGH);
digitalWrite(ETHCS, LOW);
digitalWrite(ETHCS, HIGH);
//end pull low clatch three times
If you are using D10 for anything, don't. It is the w5100 CS.
edit: This is from the Arduino Ethernet page:
NB: Pins 10, 11, 12 and 13 are reserved for interfacing with the Ethernet module and should not be used otherwise. This reduces the number of available pins to 9, with 4 available as PWM outputs.