diff options
Diffstat (limited to 'drivers/net/tokenring/olympic.c')
-rw-r--r-- | drivers/net/tokenring/olympic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index 74c1f0f189f5..e7b4adc5c4e7 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -357,7 +357,7 @@ static int __devinit olympic_init(struct net_device *dev) | |||
357 | 357 | ||
358 | if(!(readl(olympic_mmio+BCTL) & BCTL_MODE_INDICATOR)) { | 358 | if(!(readl(olympic_mmio+BCTL) & BCTL_MODE_INDICATOR)) { |
359 | t=jiffies; | 359 | t=jiffies; |
360 | while (!readl(olympic_mmio+CLKCTL) & CLKCTL_PAUSE) { | 360 | while (!(readl(olympic_mmio+CLKCTL) & CLKCTL_PAUSE)) { |
361 | schedule() ; | 361 | schedule() ; |
362 | if(time_after(jiffies, t + 2*HZ)) { | 362 | if(time_after(jiffies, t + 2*HZ)) { |
363 | printk(KERN_ERR "IBM Cardbus tokenring adapter not responsing.\n") ; | 363 | printk(KERN_ERR "IBM Cardbus tokenring adapter not responsing.\n") ; |
@@ -671,7 +671,7 @@ static int olympic_open(struct net_device *dev) | |||
671 | 671 | ||
672 | writel(BMCTL_TX1_DIS,olympic_mmio+BMCTL_RWM); /* Yes, this enables TX channel 1 */ | 672 | writel(BMCTL_TX1_DIS,olympic_mmio+BMCTL_RWM); /* Yes, this enables TX channel 1 */ |
673 | for(i=0;i<OLYMPIC_TX_RING_SIZE;i++) | 673 | for(i=0;i<OLYMPIC_TX_RING_SIZE;i++) |
674 | olympic_priv->olympic_tx_ring[i].buffer=0xdeadbeef; | 674 | olympic_priv->olympic_tx_ring[i].buffer=cpu_to_le32(0xdeadbeef); |
675 | 675 | ||
676 | olympic_priv->free_tx_ring_entries=OLYMPIC_TX_RING_SIZE; | 676 | olympic_priv->free_tx_ring_entries=OLYMPIC_TX_RING_SIZE; |
677 | olympic_priv->tx_ring_dma_addr = pci_map_single(olympic_priv->pdev,olympic_priv->olympic_tx_ring, | 677 | olympic_priv->tx_ring_dma_addr = pci_map_single(olympic_priv->pdev,olympic_priv->olympic_tx_ring, |
@@ -897,7 +897,7 @@ static void olympic_freemem(struct net_device *dev) | |||
897 | dev_kfree_skb_irq(olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received]); | 897 | dev_kfree_skb_irq(olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received]); |
898 | olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received] = NULL; | 898 | olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received] = NULL; |
899 | } | 899 | } |
900 | if (olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer != 0xdeadbeef) { | 900 | if (olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer != cpu_to_le32(0xdeadbeef)) { |
901 | pci_unmap_single(olympic_priv->pdev, | 901 | pci_unmap_single(olympic_priv->pdev, |
902 | le32_to_cpu(olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer), | 902 | le32_to_cpu(olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer), |
903 | olympic_priv->pkt_buf_sz, PCI_DMA_FROMDEVICE); | 903 | olympic_priv->pkt_buf_sz, PCI_DMA_FROMDEVICE); |
@@ -983,7 +983,7 @@ static irqreturn_t olympic_interrupt(int irq, void *dev_id) | |||
983 | le32_to_cpu(olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer), | 983 | le32_to_cpu(olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer), |
984 | olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len,PCI_DMA_TODEVICE); | 984 | olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len,PCI_DMA_TODEVICE); |
985 | dev_kfree_skb_irq(olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]); | 985 | dev_kfree_skb_irq(olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]); |
986 | olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer=0xdeadbeef; | 986 | olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer=cpu_to_le32(0xdeadbeef); |
987 | olympic_priv->olympic_tx_status_ring[olympic_priv->tx_ring_last_status].status=0; | 987 | olympic_priv->olympic_tx_status_ring[olympic_priv->tx_ring_last_status].status=0; |
988 | } | 988 | } |
989 | netif_wake_queue(dev); | 989 | netif_wake_queue(dev); |
@@ -1432,7 +1432,7 @@ static void olympic_arb_cmd(struct net_device *dev) | |||
1432 | buffer_len = swab16(readw(buf_ptr+offsetof(struct mac_receive_buffer,buffer_length))); | 1432 | buffer_len = swab16(readw(buf_ptr+offsetof(struct mac_receive_buffer,buffer_length))); |
1433 | memcpy_fromio(skb_put(mac_frame, buffer_len), frame_data , buffer_len ) ; | 1433 | memcpy_fromio(skb_put(mac_frame, buffer_len), frame_data , buffer_len ) ; |
1434 | next_ptr=readw(buf_ptr+offsetof(struct mac_receive_buffer,next)); | 1434 | next_ptr=readw(buf_ptr+offsetof(struct mac_receive_buffer,next)); |
1435 | } while (next_ptr && (buf_ptr=olympic_priv->olympic_lap + ntohs(next_ptr))); | 1435 | } while (next_ptr && (buf_ptr=olympic_priv->olympic_lap + swab16(next_ptr))); |
1436 | 1436 | ||
1437 | mac_frame->protocol = tr_type_trans(mac_frame, dev); | 1437 | mac_frame->protocol = tr_type_trans(mac_frame, dev); |
1438 | 1438 | ||