Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58397
b: refs/heads/master
c: 8640223
h: refs/heads/master
i:
  58395: 20a4a26
v: v3
  • Loading branch information
Francois Romieu authored and Jeff Garzik committed Jul 9, 2007
1 parent 1d52804 commit 033b82c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e4851502f846b13b29b7f88f1250c980d57e944
refs/heads/master: 864022344caf43dab7fa5219152280d056c6e051
12 changes: 5 additions & 7 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ static const struct rtl_cfg_info {
[RTL_CFG_0] = {
.hw_start = rtl_hw_start_8169,
.region = 1,
.align = NET_IP_ALIGN,
.align = 2,
.intr_event = SYSErr | LinkChg | RxOverflow |
RxFIFOOver | TxErr | TxOK | RxOK | RxErr,
.napi_event = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow
Expand Down Expand Up @@ -2649,21 +2649,20 @@ static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
}

static inline bool rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size,
struct pci_dev *pdev, dma_addr_t addr,
unsigned int align)
struct pci_dev *pdev, dma_addr_t addr)
{
struct sk_buff *skb;
bool done = false;

if (pkt_size >= rx_copybreak)
goto out;

skb = dev_alloc_skb(pkt_size + align);
skb = dev_alloc_skb(pkt_size + NET_IP_ALIGN);
if (!skb)
goto out;

pci_dma_sync_single_for_cpu(pdev, addr, pkt_size, PCI_DMA_FROMDEVICE);
skb_reserve(skb, (align - 1) & (unsigned long)skb->data);
skb_reserve(skb, NET_IP_ALIGN);
skb_copy_from_linear_data(*sk_buff, skb->data, pkt_size);
*sk_buff = skb;
done = true;
Expand Down Expand Up @@ -2732,8 +2731,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,

rtl8169_rx_csum(skb, desc);

if (rtl8169_try_rx_copy(&skb, pkt_size, pdev, addr,
tp->align)) {
if (rtl8169_try_rx_copy(&skb, pkt_size, pdev, addr)) {
pci_dma_sync_single_for_device(pdev, addr,
pkt_size, PCI_DMA_FROMDEVICE);
rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
Expand Down

0 comments on commit 033b82c

Please sign in to comment.