|
@@ -813,8 +813,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
|
|
|
first_txd->flags = TYPHOON_TX_DESC | TYPHOON_DESC_VALID;
|
|
|
first_txd->numDesc = 0;
|
|
|
first_txd->len = 0;
|
|
|
- first_txd->addr = (u64)((unsigned long) skb) & 0xffffffff;
|
|
|
- first_txd->addrHi = (u64)((unsigned long) skb) >> 32;
|
|
|
+ first_txd->tx_addr = (u64)((unsigned long) skb);
|
|
|
first_txd->processFlags = 0;
|
|
|
|
|
|
if(skb->ip_summed == CHECKSUM_PARTIAL) {
|
|
@@ -850,8 +849,8 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
|
|
|
PCI_DMA_TODEVICE);
|
|
|
txd->flags = TYPHOON_FRAG_DESC | TYPHOON_DESC_VALID;
|
|
|
txd->len = cpu_to_le16(skb->len);
|
|
|
- txd->addr = cpu_to_le32(skb_dma);
|
|
|
- txd->addrHi = 0;
|
|
|
+ txd->frag.addr = cpu_to_le32(skb_dma);
|
|
|
+ txd->frag.addrHi = 0;
|
|
|
first_txd->numDesc++;
|
|
|
} else {
|
|
|
int i, len;
|
|
@@ -861,8 +860,8 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
|
|
|
PCI_DMA_TODEVICE);
|
|
|
txd->flags = TYPHOON_FRAG_DESC | TYPHOON_DESC_VALID;
|
|
|
txd->len = cpu_to_le16(len);
|
|
|
- txd->addr = cpu_to_le32(skb_dma);
|
|
|
- txd->addrHi = 0;
|
|
|
+ txd->frag.addr = cpu_to_le32(skb_dma);
|
|
|
+ txd->frag.addrHi = 0;
|
|
|
first_txd->numDesc++;
|
|
|
|
|
|
for(i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
|
|
@@ -880,8 +879,8 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
|
|
|
PCI_DMA_TODEVICE);
|
|
|
txd->flags = TYPHOON_FRAG_DESC | TYPHOON_DESC_VALID;
|
|
|
txd->len = cpu_to_le16(len);
|
|
|
- txd->addr = cpu_to_le32(skb_dma);
|
|
|
- txd->addrHi = 0;
|
|
|
+ txd->frag.addr = cpu_to_le32(skb_dma);
|
|
|
+ txd->frag.addrHi = 0;
|
|
|
first_txd->numDesc++;
|
|
|
}
|
|
|
}
|
|
@@ -1358,7 +1357,7 @@ typhoon_download_firmware(struct typhoon *tp)
|
|
|
u8 *image_data;
|
|
|
void *dpage;
|
|
|
dma_addr_t dpage_dma;
|
|
|
- unsigned int csum;
|
|
|
+ __sum16 csum;
|
|
|
u32 irqEnabled;
|
|
|
u32 irqMasked;
|
|
|
u32 numSections;
|
|
@@ -1450,13 +1449,13 @@ typhoon_download_firmware(struct typhoon *tp)
|
|
|
* summing. Fortunately, due to the properties of
|
|
|
* the checksum, we can do this once, at the end.
|
|
|
*/
|
|
|
- csum = csum_partial_copy_nocheck(image_data, dpage,
|
|
|
- len, 0);
|
|
|
- csum = csum_fold(csum);
|
|
|
- csum = le16_to_cpu(csum);
|
|
|
+ csum = csum_fold(csum_partial_copy_nocheck(image_data,
|
|
|
+ dpage, len,
|
|
|
+ 0));
|
|
|
|
|
|
iowrite32(len, ioaddr + TYPHOON_REG_BOOT_LENGTH);
|
|
|
- iowrite32(csum, ioaddr + TYPHOON_REG_BOOT_CHECKSUM);
|
|
|
+ iowrite32(le16_to_cpu((__force __le16)csum),
|
|
|
+ ioaddr + TYPHOON_REG_BOOT_CHECKSUM);
|
|
|
iowrite32(load_addr,
|
|
|
ioaddr + TYPHOON_REG_BOOT_DEST_ADDR);
|
|
|
iowrite32(0, ioaddr + TYPHOON_REG_BOOT_DATA_HI);
|
|
@@ -1551,13 +1550,13 @@ typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing,
|
|
|
if(type == TYPHOON_TX_DESC) {
|
|
|
/* This tx_desc describes a packet.
|
|
|
*/
|
|
|
- unsigned long ptr = tx->addr | ((u64)tx->addrHi << 32);
|
|
|
+ unsigned long ptr = tx->tx_addr;
|
|
|
struct sk_buff *skb = (struct sk_buff *) ptr;
|
|
|
dev_kfree_skb_irq(skb);
|
|
|
} else if(type == TYPHOON_FRAG_DESC) {
|
|
|
/* This tx_desc describes a memory mapping. Free it.
|
|
|
*/
|
|
|
- skb_dma = (dma_addr_t) le32_to_cpu(tx->addr);
|
|
|
+ skb_dma = (dma_addr_t) le32_to_cpu(tx->frag.addr);
|
|
|
dma_len = le16_to_cpu(tx->len);
|
|
|
pci_unmap_single(tp->pdev, skb_dma, dma_len,
|
|
|
PCI_DMA_TODEVICE);
|