@@ -121,7 +121,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
121
121
if (tx_buf == NULL )
122
122
goto free_rx_urb ;
123
123
124
- rx_buf = usb_alloc_coherent (iphone -> udev , IPHETH_BUF_SIZE ,
124
+ rx_buf = usb_alloc_coherent (iphone -> udev , IPHETH_BUF_SIZE + IPHETH_IP_ALIGN ,
125
125
GFP_KERNEL , & rx_urb -> transfer_dma );
126
126
if (rx_buf == NULL )
127
127
goto free_tx_buf ;
@@ -146,7 +146,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
146
146
147
147
static void ipheth_free_urbs (struct ipheth_device * iphone )
148
148
{
149
- usb_free_coherent (iphone -> udev , IPHETH_BUF_SIZE , iphone -> rx_buf ,
149
+ usb_free_coherent (iphone -> udev , IPHETH_BUF_SIZE + IPHETH_IP_ALIGN , iphone -> rx_buf ,
150
150
iphone -> rx_urb -> transfer_dma );
151
151
usb_free_coherent (iphone -> udev , IPHETH_BUF_SIZE , iphone -> tx_buf ,
152
152
iphone -> tx_urb -> transfer_dma );
@@ -317,7 +317,7 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
317
317
318
318
usb_fill_bulk_urb (dev -> rx_urb , udev ,
319
319
usb_rcvbulkpipe (udev , dev -> bulk_in ),
320
- dev -> rx_buf , IPHETH_BUF_SIZE ,
320
+ dev -> rx_buf , IPHETH_BUF_SIZE + IPHETH_IP_ALIGN ,
321
321
ipheth_rcvbulk_callback ,
322
322
dev );
323
323
dev -> rx_urb -> transfer_flags |= URB_NO_TRANSFER_DMA_MAP ;
0 commit comments