Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
torvalds committed Sep 18, 2009
2 parents 3dc9566 + b31c50a commit f205ce8
Show file tree
Hide file tree
Showing 132 changed files with 2,009 additions and 805 deletions.
9 changes: 9 additions & 0 deletions drivers/net/atl1e/atl1e.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,19 @@ struct atl1e_hw {
*/
struct atl1e_tx_buffer {
struct sk_buff *skb;
u16 flags;
#define ATL1E_TX_PCIMAP_SINGLE 0x0001
#define ATL1E_TX_PCIMAP_PAGE 0x0002
#define ATL1E_TX_PCIMAP_TYPE_MASK 0x0003
u16 length;
dma_addr_t dma;
};

#define ATL1E_SET_PCIMAP_TYPE(tx_buff, type) do { \
((tx_buff)->flags) &= ~ATL1E_TX_PCIMAP_TYPE_MASK; \
((tx_buff)->flags) |= (type); \
} while (0)

struct atl1e_rx_page {
dma_addr_t dma; /* receive rage DMA address */
u8 *addr; /* receive rage virtual address */
Expand Down
15 changes: 13 additions & 2 deletions drivers/net/atl1e/atl1e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,11 @@ static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter)
for (index = 0; index < ring_count; index++) {
tx_buffer = &tx_ring->tx_buffer[index];
if (tx_buffer->dma) {
pci_unmap_page(pdev, tx_buffer->dma,
if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE)
pci_unmap_single(pdev, tx_buffer->dma,
tx_buffer->length, PCI_DMA_TODEVICE);
else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE)
pci_unmap_page(pdev, tx_buffer->dma,
tx_buffer->length, PCI_DMA_TODEVICE);
tx_buffer->dma = 0;
}
Expand Down Expand Up @@ -1220,7 +1224,11 @@ static bool atl1e_clean_tx_irq(struct atl1e_adapter *adapter)
while (next_to_clean != hw_next_to_clean) {
tx_buffer = &tx_ring->tx_buffer[next_to_clean];
if (tx_buffer->dma) {
pci_unmap_page(adapter->pdev, tx_buffer->dma,
if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE)
pci_unmap_single(adapter->pdev, tx_buffer->dma,
tx_buffer->length, PCI_DMA_TODEVICE);
else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE)
pci_unmap_page(adapter->pdev, tx_buffer->dma,
tx_buffer->length, PCI_DMA_TODEVICE);
tx_buffer->dma = 0;
}
Expand Down Expand Up @@ -1741,6 +1749,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
tx_buffer->length = map_len;
tx_buffer->dma = pci_map_single(adapter->pdev,
skb->data, hdr_len, PCI_DMA_TODEVICE);
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
mapped_len += map_len;
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
Expand All @@ -1766,6 +1775,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
tx_buffer->dma =
pci_map_single(adapter->pdev, skb->data + mapped_len,
map_len, PCI_DMA_TODEVICE);
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
mapped_len += map_len;
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
Expand Down Expand Up @@ -1801,6 +1811,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
(i * MAX_TX_BUF_LEN),
tx_buffer->length,
PCI_DMA_TODEVICE);
ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE);
use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
((cpu_to_le32(tx_buffer->length) &
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,23 +847,22 @@ static int b44_poll(struct napi_struct *napi, int budget)
{
struct b44 *bp = container_of(napi, struct b44, napi);
int work_done;
unsigned long flags;

spin_lock_irq(&bp->lock);
spin_lock_irqsave(&bp->lock, flags);

if (bp->istat & (ISTAT_TX | ISTAT_TO)) {
/* spin_lock(&bp->tx_lock); */
b44_tx(bp);
/* spin_unlock(&bp->tx_lock); */
}
spin_unlock_irq(&bp->lock);
spin_unlock_irqrestore(&bp->lock, flags);

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

if (bp->istat & ISTAT_ERRORS) {
unsigned long flags;

spin_lock_irqsave(&bp->lock, flags);
b44_halt(bp);
b44_init_rings(bp);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,6 @@ static inline u8 is_udp_pkt(struct sk_buff *skb)
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
u16 num_popped);
extern void be_link_status_update(struct be_adapter *adapter, bool link_up);
extern void netdev_stats_update(struct be_adapter *adapter);
extern int be_load_fw(struct be_adapter *adapter, u8 *func);
#endif /* BE_H */
Loading

0 comments on commit f205ce8

Please sign in to comment.