|
@@ -356,7 +356,7 @@ static void velocity_get_options(struct velocity_opt *opts, int index,
|
356
|
356
|
velocity_set_bool_opt(&opts->flags, ValPktLen[index],
|
357
|
357
|
VAL_PKT_LEN_DEF, VELOCITY_FLAGS_VAL_PKT_LEN,
|
358
|
358
|
"ValPktLen", devname);
|
359
|
|
- velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index],
|
|
359
|
+ velocity_set_int_opt((void *) &opts->spd_dpx, speed_duplex[index],
|
360
|
360
|
MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF,
|
361
|
361
|
"Media link mode", devname);
|
362
|
362
|
velocity_set_int_opt((int *) &opts->wol_opts, wol_opts[index],
|
|
@@ -472,8 +472,7 @@ extern void hex_dump(const char *data, const unsigned int len);
|
472
|
472
|
/**************************************************************************
|
473
|
473
|
POLL - Wait for a frame
|
474
|
474
|
***************************************************************************/
|
475
|
|
-//EB53 static int velocity_poll(struct nic *nic, int retrieve)
|
476
|
|
-static int velocity_poll(struct nic *nic __unused)
|
|
475
|
+static int velocity_poll(struct nic *nic, int retrieve)
|
477
|
476
|
{
|
478
|
477
|
/* Work out whether or not there's an ethernet packet ready to
|
479
|
478
|
* read. Return 0 if not.
|
|
@@ -486,6 +485,8 @@ static int velocity_poll(struct nic *nic __unused)
|
486
|
485
|
return 0;
|
487
|
486
|
rmb();
|
488
|
487
|
|
|
488
|
+ if ( ! retrieve ) return 1;
|
|
489
|
+
|
489
|
490
|
/*
|
490
|
491
|
* Don't drop CE or RL error frame although RXOK is off
|
491
|
492
|
*/
|
|
@@ -666,9 +667,8 @@ static struct nic_operations velocity_operations = {
|
666
|
667
|
/**************************************************************************
|
667
|
668
|
PROBE - Look for an adapter, this routine's visible to the outside
|
668
|
669
|
***************************************************************************/
|
669
|
|
-static int velocity_probe(struct pci_device *dev, struct pci_device *pci)
|
|
670
|
+static int velocity_probe( struct nic *nic, struct pci_device *pci)
|
670
|
671
|
{
|
671
|
|
- struct nic *nic = (struct nic *) dev;
|
672
|
672
|
int ret, i;
|
673
|
673
|
struct mac_regs *regs;
|
674
|
674
|
|
|
@@ -705,9 +705,10 @@ static int velocity_probe(struct pci_device *dev, struct pci_device *pci)
|
705
|
705
|
for (i = 0; i < 6; i++)
|
706
|
706
|
nic->node_addr[i] = readb(®s->PAR[i]);
|
707
|
707
|
|
708
|
|
- DBG ( "%s: %s at ioaddr %#hX\n", pci->driver_name, eth_ntoa ( nic->node_addr ), BASE );
|
|
708
|
+ DBG ( "%s: %s at ioaddr %#hX\n", pci->driver_name, eth_ntoa ( nic->node_addr ),
|
|
709
|
+ (unsigned int) BASE );
|
709
|
710
|
|
710
|
|
- velocity_get_options(&vptr->options, 0, pci->driver_name);
|
|
711
|
+ velocity_get_options(&vptr->options, 0, (char *) pci->driver_name);
|
711
|
712
|
|
712
|
713
|
/*
|
713
|
714
|
* Mask out the options cannot be set to the chip
|
|
@@ -768,7 +769,7 @@ static void velocity_init_info(struct pci_device *pdev,
|
768
|
769
|
|
769
|
770
|
printf
|
770
|
771
|
("chip_id: 0x%hX, io_size: %d, num_txq %d, multicast_limit: %d\n",
|
771
|
|
- vptr->chip_id, vptr->io_size, vptr->num_txq,
|
|
772
|
+ vptr->chip_id, (unsigned int) vptr->io_size, vptr->num_txq,
|
772
|
773
|
vptr->multicast_limit);
|
773
|
774
|
printf("Name: %s\n", info->name);
|
774
|
775
|
|
|
@@ -1148,14 +1149,16 @@ static int velocity_init_rings(struct velocity_info *vptr)
|
1148
|
1149
|
|
1149
|
1150
|
|
1150
|
1151
|
for (idx = 0; idx < RX_DESC_DEF; idx++) {
|
1151
|
|
- *((u32 *) & (vptr->rd_ring[idx].rdesc0)) = 0;
|
|
1152
|
+ vptr->rd_ring[idx].rdesc0.RSR = 0;
|
|
1153
|
+ vptr->rd_ring[idx].rdesc0.len = 0;
|
|
1154
|
+ vptr->rd_ring[idx].rdesc0.reserved = 0;
|
|
1155
|
+ vptr->rd_ring[idx].rdesc0.owner = 0;
|
1152
|
1156
|
vptr->rd_ring[idx].len = cpu_to_le32(vptr->rx_buf_sz);
|
1153
|
1157
|
vptr->rd_ring[idx].inten = 1;
|
1154
|
1158
|
vptr->rd_ring[idx].pa_low =
|
1155
|
1159
|
virt_to_bus(vptr->rxb + (RX_DESC_DEF * idx));
|
1156
|
1160
|
vptr->rd_ring[idx].pa_high = 0;
|
1157
|
1161
|
vptr->rd_ring[idx].rdesc0.owner = OWNED_BY_NIC;
|
1158
|
|
-
|
1159
|
1162
|
}
|
1160
|
1163
|
|
1161
|
1164
|
/* for (i = 0; idx < TX_DESC_DEF; idx++ ) {
|