Well the device I am using is not an SD card, but an SMSC7500 (LAN7500) usb-ethernet adapter, but anyway here is what I did to speed transmission up to 300 MBit/sec:
The smsc75xx_tx_fixup procedure (in drivers/net/usb/smsc75xx.c) adds 2 dwords in front of the buffer to be transmitted, using skb_push.
Now I do an skb_copy_expand to presumably get a contiguous buffer before doing the skb_push:
static struct sk_buff *smsc75xx_tx_fixup(struct usbnet *dev,
struct sk_buff *skb, gfp_t flags)
{
u32 tx_cmd_a, tx_cmd_b;
// now the following 6 lines added by me:
struct sk_buff *skb2;
skb2 = skb_copy_expand(skb, 8, 0, GFP_ATOMIC);
if (skb2) {
dev_kfree_skb_any(skb);
skb = skb2;
}
This change, although bad due to massive "unnecessary" copying, increases transmission speed from 100 MBit/sec to 300 Mbit/sec , 300% !
It seems that the ehci-hcd driver has some problems transmitting non-contiguous buffers.