<6>[ 40.917524] DWC_OTG: dwc_otg_hcd_urb_enqueue urb->transfer_buffer address not align to 4-byte 0xde215bf6
在移植usb以太网的时候遇到上面字节对齐问题,导致网卡无法使用,
分析:
u16 buf __attribute__ ((aligned (16)));
buf = *((u16 *)data);
cpu_to_le16s(&buf);
ret = __ax88179_write_cmd(dev, cmd, value, index,
size, &buf, 1);
static int __ax88179_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
u16 size, void *data, int in_pm)
{
int ret;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)