Skip to content

Commit f205ce8

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits) be2net: fix some cmds to use mccq instead of mbox atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA pkt_sched: Fix qstats.qlen updating in dump_stats ipv6: Log the affected address when DAD failure occurs wl12xx: Fix print_mac() conversion. af_iucv: fix race when queueing skbs on the backlog queue af_iucv: do not call iucv_sock_kill() twice af_iucv: handle non-accepted sockets after resuming from suspend af_iucv: fix race in __iucv_sock_wait() iucv: use correct output register in iucv_query_maxconn() iucv: fix iucv_buffer_cpumask check when calling IUCV functions iucv: suspend/resume error msg for left over pathes wl12xx: switch to %pM to print the mac address b44: the poll handler b44_poll must not enable IRQ unconditionally ipv6: Ignore route option with ROUTER_PREF_INVALID bonding: make ab_arp select active slaves as other modes cfg80211: fix SME connect rc80211_minstrel: fix contention window calculation ssb/sdio: fix printk format warnings p54usb: add Zcomax XG-705A usbid ...
2 parents 3dc9566 + b31c50a commit f205ce8

File tree

132 files changed

+2009
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+2009
-805
lines changed

drivers/net/atl1e/atl1e.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,19 @@ struct atl1e_hw {
377377
*/
378378
struct atl1e_tx_buffer {
379379
struct sk_buff *skb;
380+
u16 flags;
381+
#define ATL1E_TX_PCIMAP_SINGLE 0x0001
382+
#define ATL1E_TX_PCIMAP_PAGE 0x0002
383+
#define ATL1E_TX_PCIMAP_TYPE_MASK 0x0003
380384
u16 length;
381385
dma_addr_t dma;
382386
};
383387

388+
#define ATL1E_SET_PCIMAP_TYPE(tx_buff, type) do { \
389+
((tx_buff)->flags) &= ~ATL1E_TX_PCIMAP_TYPE_MASK; \
390+
((tx_buff)->flags) |= (type); \
391+
} while (0)
392+
384393
struct atl1e_rx_page {
385394
dma_addr_t dma; /* receive rage DMA address */
386395
u8 *addr; /* receive rage virtual address */

drivers/net/atl1e/atl1e_main.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,11 @@ static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter)
635635
for (index = 0; index < ring_count; index++) {
636636
tx_buffer = &tx_ring->tx_buffer[index];
637637
if (tx_buffer->dma) {
638-
pci_unmap_page(pdev, tx_buffer->dma,
638+
if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE)
639+
pci_unmap_single(pdev, tx_buffer->dma,
640+
tx_buffer->length, PCI_DMA_TODEVICE);
641+
else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE)
642+
pci_unmap_page(pdev, tx_buffer->dma,
639643
tx_buffer->length, PCI_DMA_TODEVICE);
640644
tx_buffer->dma = 0;
641645
}
@@ -1220,7 +1224,11 @@ static bool atl1e_clean_tx_irq(struct atl1e_adapter *adapter)
12201224
while (next_to_clean != hw_next_to_clean) {
12211225
tx_buffer = &tx_ring->tx_buffer[next_to_clean];
12221226
if (tx_buffer->dma) {
1223-
pci_unmap_page(adapter->pdev, tx_buffer->dma,
1227+
if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE)
1228+
pci_unmap_single(adapter->pdev, tx_buffer->dma,
1229+
tx_buffer->length, PCI_DMA_TODEVICE);
1230+
else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE)
1231+
pci_unmap_page(adapter->pdev, tx_buffer->dma,
12241232
tx_buffer->length, PCI_DMA_TODEVICE);
12251233
tx_buffer->dma = 0;
12261234
}
@@ -1741,6 +1749,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
17411749
tx_buffer->length = map_len;
17421750
tx_buffer->dma = pci_map_single(adapter->pdev,
17431751
skb->data, hdr_len, PCI_DMA_TODEVICE);
1752+
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
17441753
mapped_len += map_len;
17451754
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
17461755
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
@@ -1766,6 +1775,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
17661775
tx_buffer->dma =
17671776
pci_map_single(adapter->pdev, skb->data + mapped_len,
17681777
map_len, PCI_DMA_TODEVICE);
1778+
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
17691779
mapped_len += map_len;
17701780
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
17711781
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
@@ -1801,6 +1811,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
18011811
(i * MAX_TX_BUF_LEN),
18021812
tx_buffer->length,
18031813
PCI_DMA_TODEVICE);
1814+
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE);
18041815
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
18051816
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
18061817
((cpu_to_le32(tx_buffer->length) &

drivers/net/b44.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,23 +847,22 @@ static int b44_poll(struct napi_struct *napi, int budget)
847847
{
848848
struct b44 *bp = container_of(napi, struct b44, napi);
849849
int work_done;
850+
unsigned long flags;
850851

851-
spin_lock_irq(&bp->lock);
852+
spin_lock_irqsave(&bp->lock, flags);
852853

853854
if (bp->istat & (ISTAT_TX | ISTAT_TO)) {
854855
/* spin_lock(&bp->tx_lock); */
855856
b44_tx(bp);
856857
/* spin_unlock(&bp->tx_lock); */
857858
}
858-
spin_unlock_irq(&bp->lock);
859+
spin_unlock_irqrestore(&bp->lock, flags);
859860

860861
work_done = 0;
861862
if (bp->istat & ISTAT_RX)
862863
work_done += b44_rx(bp, budget);
863864

864865
if (bp->istat & ISTAT_ERRORS) {
865-
unsigned long flags;
866-
867866
spin_lock_irqsave(&bp->lock, flags);
868867
b44_halt(bp);
869868
b44_init_rings(bp);

drivers/net/benet/be.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,5 +362,6 @@ static inline u8 is_udp_pkt(struct sk_buff *skb)
362362
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
363363
u16 num_popped);
364364
extern void be_link_status_update(struct be_adapter *adapter, bool link_up);
365+
extern void netdev_stats_update(struct be_adapter *adapter);
365366
extern int be_load_fw(struct be_adapter *adapter, u8 *func);
366367
#endif /* BE_H */

0 commit comments

Comments
 (0)