Deleted Added
full compact
2d1
< * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
3a3
> * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
28c28
< * $FreeBSD: head/sys/dev/fxp/if_fxp.c 74180 2001-03-12 21:42:45Z jlemon $
---
> * $FreeBSD: head/sys/dev/fxp/if_fxp.c 74259 2001-03-14 19:50:35Z jlemon $
435c435
< * Determine in whether we must use the 503 serial interface.
---
> * Determine whether we must use the 503 serial interface.
442a443,465
> * Find out the basic controller type; we currently only
> * differentiate between a 82557 and greater.
> */
> fxp_read_eeprom(sc, &data, 5, 1);
> if ((data >> 8) == 1)
> sc->chip = FXP_CHIP_82557;
>
> /*
> * If we are not a 82557 chip, we can enable extended features.
> */
> if (sc->chip != FXP_CHIP_82557) {
> /*
> * If there is a valid cacheline size (8 or 16 dwords),
> * then turn on MWI.
> */
> if (pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0)
> sc->flags |= FXP_FLAG_MWI_ENABLE;
>
> /* turn on the extended TxCB feature */
> sc->flags |= FXP_FLAG_EXT_TXCB;
> }
>
> /*
520,521c543,544
< if (sc->miibus) {
< bus_generic_detach(sc->dev);
---
> bus_generic_detach(sc->dev);
> if (sc->miibus)
523d545
< }
841,842c863,865
< * We ran out of segments. We have to recopy this mbuf
< * chain first. Bail out if we can't get the new buffers.
---
> * We ran out of segments. We have to recopy this
> * mbuf chain first. Bail out if we can't get the
> * new buffers.
870c893,894
< FXP_CB_COMMAND_XMIT | FXP_CB_COMMAND_SF | FXP_CB_COMMAND_S;
---
> FXP_CB_COMMAND_XMIT | FXP_CB_COMMAND_SF |
> FXP_CB_COMMAND_S;
873c897,898
< FXP_CB_COMMAND_XMIT | FXP_CB_COMMAND_SF | FXP_CB_COMMAND_S | FXP_CB_COMMAND_I;
---
> FXP_CB_COMMAND_XMIT | FXP_CB_COMMAND_SF |
> FXP_CB_COMMAND_S | FXP_CB_COMMAND_I;
875,876c900,901
< * Set a 5 second timer just in case we don't hear from the
< * card again.
---
> * Set a 5 second timer just in case we don't hear
> * from the card again.
1331,1343d1355
< /*
< * we may want to move all FC stuff to a separate section.
< * the values here are 82557 compatible.
< */
< cbp->fc_delay_lsb = 0;
< cbp->fc_delay_msb = 0x40;
< cbp->pri_fc_thresh = 0x03;
< cbp->tx_fc_dis = 0; /* (don't) disable transmit FC */
< cbp->rx_fc_restop = 0; /* (don't) enable FC stop frame */
< cbp->rx_fc_restart = 0; /* (don't) enable FC start frame */
< cbp->fc_filter = 0; /* (do) pass FC frames to host */
< cbp->pri_fc_loc = 1; /* location of priority in FC frame */
<
1355a1368,1391
> if (sc->chip == FXP_CHIP_82557) {
> /*
> * The 82557 has no hardware flow control, the values
> * below are the defaults for the chip.
> */
> cbp->fc_delay_lsb = 0;
> cbp->fc_delay_msb = 0x40;
> cbp->pri_fc_thresh = 3;
> cbp->tx_fc_dis = 0;
> cbp->rx_fc_restop = 0;
> cbp->rx_fc_restart = 0;
> cbp->fc_filter = 0;
> cbp->pri_fc_loc = 1;
> } else {
> cbp->fc_delay_lsb = 0x1f;
> cbp->fc_delay_msb = 0x01;
> cbp->pri_fc_thresh = 3;
> cbp->tx_fc_dis = 0; /* enable transmit FC */
> cbp->rx_fc_restop = 1; /* enable FC restop frames */
> cbp->rx_fc_restart = 1; /* enable FC restart frames */
> cbp->fc_filter = !prm; /* drop FC frames to host */
> cbp->pri_fc_loc = 1; /* FC pri location (byte31) */
> }
>
1394,1395c1430,1435
< txp[i].link_addr = vtophys(&txp[(i + 1) & FXP_TXCB_MASK].cb_status);
< txp[i].tbd_array_addr = vtophys(&txp[i].tbd[0]);
---
> txp[i].link_addr =
> vtophys(&txp[(i + 1) & FXP_TXCB_MASK].cb_status);
> if (sc->flags & FXP_FLAG_EXT_TXCB)
> txp[i].tbd_array_addr = vtophys(&txp[i].tbd[2]);
> else
> txp[i].tbd_array_addr = vtophys(&txp[i].tbd[0]);