patch-2.4.3 linux/drivers/net/sk_g16.c
Next file: linux/drivers/net/skfp/drvfbi.c
Previous file: linux/drivers/net/sk98lin/skxmac2.c
Back to the patch index
Back to the overall index
- Lines: 169
- Date:
Tue Mar 20 12:05:00 2001
- Orig file:
v2.4.2/linux/drivers/net/sk_g16.c
- Orig date:
Wed Feb 21 18:20:28 2001
diff -u --recursive --new-file v2.4.2/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
@@ -218,9 +218,9 @@
*
*/
-#define SK_IOREG (board->ioreg) /* LANCE data registers. */
-#define SK_PORT (board->port) /* Control, Status register */
-#define SK_IOCOM (board->iocom) /* I/O Command */
+#define SK_IOREG (&board->ioreg) /* LANCE data registers. */
+#define SK_PORT (&board->port) /* Control, Status register */
+#define SK_IOCOM (&board->iocom) /* I/O Command */
/*
* SK_G16 Status/Control Register bits
@@ -1102,7 +1102,7 @@
writel((unsigned long) p->tmdbufs[i], tmdp->u.buffer); /* assign buffer */
/* Mark TMD as start and end of packet */
- writeb(TX_STP | TX_ENP, tmdp->u.s.status);
+ writeb(TX_STP | TX_ENP, &tmdp->u.s.status);
}
@@ -1122,32 +1122,32 @@
* receiving packets, set status and release RMD
*/
- writeb(RX_OWN, rmdp->u.s.status);
+ writeb(RX_OWN, &rmdp->u.s.status);
- writew(-PKT_BUF_SZ, rmdp->blen); /* Buffer Size (two's complement) */
+ writew(-PKT_BUF_SZ, &rmdp->blen); /* Buffer Size (two's complement) */
- writeb(0, rmdp->mlen); /* init message length */
+ writeb(0, &rmdp->mlen); /* init message length */
}
/* Fill LANCE Initialize Block */
- writew(mode, (p->ram)->ib.mode); /* Set operation mode */
+ writew(mode, (&((p->ram)->ib.mode))); /* Set operation mode */
for (i = 0; i < ETH_ALEN; i++) /* Set physical address */
{
- writeb(dev->dev_addr[i], (p->ram)->ib.paddr[i]);
+ writeb(dev->dev_addr[i], (&((p->ram)->ib.paddr[i])));
}
for (i = 0; i < 8; i++) /* Set multicast, logical address */
{
- writeb(0, (p->ram)->ib.laddr[i]); /* We do not use logical addressing */
+ writeb(0, (&((p->ram)->ib.laddr[i]))); /* We do not use logical addressing */
}
/* Set ring descriptor pointers and set number of descriptors */
- writel((int)p->rmdhead | RMDNUMMASK, (p->ram)->ib.rdrp);
- writel((int)p->tmdhead | TMDNUMMASK, (p->ram)->ib.tdrp);
+ writel((int)p->rmdhead | RMDNUMMASK, (&((p->ram)->ib.rdrp)));
+ writel((int)p->tmdhead | TMDNUMMASK, (&((p->ram)->ib.tdrp)));
/* Prepare LANCE Control and Status Registers */
@@ -1281,7 +1281,7 @@
memcpy_toio((tmdp->u.buffer & 0x00ffffff), skb->data, skb->len);
- writew(-len, tmdp->blen); /* set length to transmit */
+ writew(-len, &tmdp->blen); /* set length to transmit */
/*
* Packet start and end is always set because we use the maximum
@@ -1289,7 +1289,7 @@
* Relinquish ownership to LANCE
*/
- writeb(TX_OWN | TX_STP | TX_ENP, tmdp->u.s.status);
+ writeb(TX_OWN | TX_STP | TX_ENP, &tmdp->u.s.status);
/* Start Demand Transmission */
SK_write_reg(CSR0, CSR0_TDMD | CSR0_INEA);
@@ -1301,7 +1301,7 @@
p->tmdnum &= TMDNUM-1;
/* Do we own the next transmit buffer ? */
- if (! (readb((p->tmdhead + p->tmdnum)->u.s.status) & TX_OWN) )
+ if (! (readb(&((p->tmdhead + p->tmdnum)->u.s.status)) & TX_OWN) )
{
/*
* We own next buffer and are ready to transmit, so
@@ -1421,7 +1421,7 @@
p->tmdlast++;
p->tmdlast &= TMDNUM-1;
- tmdstat = readb(tmdp->u.s.status);
+ tmdstat = readb(&tmdp->u.s.status);
/*
* We check status of transmitted packet.
@@ -1429,7 +1429,7 @@
*/
if (tmdstat & TX_ERR) /* Error occurred */
{
- int stat2 = readw(tmdp->status2);
+ int stat2 = readw(&tmdp->status2);
printk("%s: TX error: %04x %04x\n", dev->name, tmdstat, stat2);
@@ -1458,7 +1458,7 @@
p->stats.tx_errors++;
- writew(0, tmdp->status2); /* Clear error flags */
+ writew(0, &tmdp->status2); /* Clear error flags */
}
else if (tmdstat & TX_MORE) /* Collisions occurred ? */
{
@@ -1534,7 +1534,7 @@
* it up to higher layer
*/
- while (!( (rmdstat = readb(rmdp->u.s.status)) & RX_OWN))
+ while (!( (rmdstat = readb(&rmdp->u.s.status)) & RX_OWN))
{
/*
* Start and end of packet must be set, because we use
@@ -1564,7 +1564,7 @@
* packets.
*/
- writeb(RX_OWN, rmdp->u.s.status); /* Relinquish ownership to LANCE */
+ writeb(RX_OWN, &rmdp->u.s.status); /* Relinquish ownership to LANCE */
}
else if (rmdstat & RX_ERR) /* Receive Error ? */
@@ -1576,13 +1576,13 @@
if (rmdstat & RX_FRAM) p->stats.rx_frame_errors++;
if (rmdstat & RX_CRC) p->stats.rx_crc_errors++;
- writeb(RX_OWN, rmdp->u.s.status); /* Relinquish ownership to LANCE */
+ writeb(RX_OWN, &rmdp->u.s.status); /* Relinquish ownership to LANCE */
}
else /* We have a packet which can be queued for the upper layers */
{
- int len = readw(rmdp->mlen) & 0x0fff; /* extract message length from receive buffer */
+ int len = readw(&rmdp->mlen) & 0x0fff; /* extract message length from receive buffer */
struct sk_buff *skb;
skb = dev_alloc_skb(len+2); /* allocate socket buffer */
@@ -1595,7 +1595,7 @@
* to Lance, update statistics and go ahead.
*/
- writeb(RX_OWN, rmdp->u.s.status); /* Relinquish ownership to LANCE */
+ writeb(RX_OWN, &rmdp->u.s.status); /* Relinquish ownership to LANCE */
printk("%s: Couldn't allocate sk_buff, deferring packet.\n",
dev->name);
p->stats.rx_dropped++;
@@ -1633,7 +1633,7 @@
* free our descriptor and update statistics
*/
- writeb(RX_OWN, rmdp->u.s.status);
+ writeb(RX_OWN, &rmdp->u.s.status);
dev->last_rx = jiffies;
p->stats.rx_packets++;
p->stats.rx_bytes += len;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)