* [PATCH] small MV643xx fixes
@ 2004-08-24 21:40 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-08-24 21:40 UTC (permalink / raw)
To: Manish_Lachwani; +Cc: netdev
- kill an unused variable in mv64340_eth_remove
- kill pointer arithmetics on integers sillyness
- don't include <asm/addrspace.h> - it's unessecary and mips-specific
--- 1.6/drivers/net/mv643xx_eth.c 2004-07-14 20:59:24 +02:00
+++ edited/drivers/net/mv643xx_eth.c 2004-08-24 14:00:58 +02:00
@@ -1403,8 +1403,6 @@
static void mv64340_eth_remove(struct net_device *dev)
{
- struct mv64340_private *mp = netdev_priv(dev);
-
unregister_netdev(dev);
flush_scheduled_work();
free_netdev(dev);
@@ -1739,12 +1737,12 @@
/* Assignment of Tx CTRP of given queue */
tx_curr_desc = mp->tx_curr_desc_q;
MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
- (struct eth_tx_desc *) mp->tx_desc_dma + tx_curr_desc);
+ mp->tx_desc_dma + tx_curr_desc * sizeof(struct eth_tx_desc));
/* Assignment of Rx CRDP of given queue */
rx_curr_desc = mp->rx_curr_desc_q;
MV_WRITE(MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_0(eth_port_num),
- (struct eth_rx_desc *) mp->rx_desc_dma + rx_curr_desc);
+ mp->rx_desc_dma + rx_curr_desc * sizeof(struct eth_rx_desc));
/* Add the assigned Ethernet address to the port's address table */
eth_port_uc_addr_set(mp->port_num, mp->port_mac_addr);
@@ -2355,8 +2353,10 @@
first_chip_ptr = MV_READ(MV64340_ETH_CURRENT_SERVED_TX_DESC_PTR(mp->port_num));
/* Apply send command */
- if (first_chip_ptr == 0x00000000)
- MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num), (struct eth_tx_desc *) mp->tx_desc_dma + tx_first_desc);
+ if (first_chip_ptr == 0x00000000) {
+ MV_WRITE(MV64340_ETH_TX_CURRENT_QUEUE_DESC_PTR_0(mp->port_num),
+ mp->tx_desc_dma + tx_first_desc * sizeof(struct eth_tx_desc));
+ }
ETH_ENABLE_TX_QUEUE(mp->port_num);
--- 1.6/include/linux/mv643xx.h 2004-07-27 19:45:06 +02:00
+++ edited/include/linux/mv643xx.h 2004-08-24 13:42:29 +02:00
@@ -13,7 +13,6 @@
#ifndef __ASM_MV64340_H
#define __ASM_MV64340_H
-#include <asm/addrspace.h>
#include <asm/marvell.h>
/****************************************/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-24 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-24 21:40 [PATCH] small MV643xx fixes Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).