Deleted Added
full compact
31c31
< __FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_t3_hw.c 176472 2008-02-23 01:06:17Z kmacy $");
---
> __FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_t3_hw.c 180583 2008-07-18 06:12:31Z kmacy $");
463a464,490
> int t3_phy_lasi_intr_enable(struct cphy *phy)
> {
> return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
> }
>
> int t3_phy_lasi_intr_disable(struct cphy *phy)
> {
> return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
> }
>
> int t3_phy_lasi_intr_clear(struct cphy *phy)
> {
> u32 val;
>
> return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
> }
>
> int t3_phy_lasi_intr_handler(struct cphy *phy)
> {
> unsigned int status;
> int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
>
> if (err)
> return err;
> return (status & 1) ? cphy_cause_link_change : 0;
> }
>
467,468c494
< F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, F_GPIO3 | F_GPIO5,
< 0,
---
> F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, { S_GPIO3, S_GPIO5 }, 0,
472,473c498
< F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, F_GPIO3 | F_GPIO5,
< 0,
---
> F_GPIO2_OUT_VAL | F_GPIO4_OUT_VAL, { S_GPIO3, S_GPIO5 }, 0,
478c503
< 0, SUPPORTED_10000baseT_Full | SUPPORTED_AUI,
---
> { 0 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI,
483,484c508,509
< F_GPIO5_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, 0,
< SUPPORTED_10000baseT_Full | SUPPORTED_AUI,
---
> F_GPIO5_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL,
> { S_GPIO9, S_GPIO3 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI,
489c514
< F_GPIO1 | F_GPIO2 | F_GPIO3 | F_GPIO4, SUPPORTED_AUI,
---
> { S_GPIO1, S_GPIO2, S_GPIO3, S_GPIO4 }, SUPPORTED_AUI,
508c533
< { NULL },
---
> { t3_ael2005_phy_prep },
511c536
< { NULL },
---
> { t3_tn1010_phy_prep },
1234a1260,1268
> if (lc->requested_fc & PAUSE_AUTONEG)
> fc &= lc->requested_fc;
> else
> fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX);
>
> if (link_ok == lc->link_ok && speed == lc->speed &&
> duplex == lc->duplex && fc == lc->fc)
> return; /* nothing changed */
>
1245,1248d1278
< if (lc->requested_fc & PAUSE_AUTONEG)
< fc &= lc->requested_fc;
< else
< fc = lc->requested_fc & (PAUSE_RX | PAUSE_TX);
1786d1815
< u32 mask, gpi = adapter_info(adapter)->gpio_intr;
1792,1794d1820
< mask = gpi - (gpi & (gpi - 1));
< gpi -= mask;
<
1798c1824
< if (cause & mask) {
---
> if (cause & (1 << adapter_info(adapter)->gpio_intr[i])) {
1871a1898,1908
> static unsigned int calc_gpio_intr(adapter_t *adap)
> {
> unsigned int i, gpi_intr = 0;
>
> for_each_port(adap, i)
> if ((adap2pinfo(adap, i)->phy.caps & SUPPORTED_IRQ) &&
> adapter_info(adap)->gpio_intr[i])
> gpi_intr |= 1 << adapter_info(adap)->gpio_intr[i];
> return gpi_intr;
> }
>
1914,1917c1951,1952
< t3_write_reg(adapter, A_T3DBG_GPIO_ACT_LOW,
< adapter_info(adapter)->gpio_intr);
< t3_write_reg(adapter, A_T3DBG_INT_ENABLE,
< adapter_info(adapter)->gpio_intr);
---
> t3_write_reg(adapter, A_T3DBG_INT_ENABLE, calc_gpio_intr(adapter));
>
2562a2598,2611
> * t3_enable_filters - enable the HW filters
> * @adap: the adapter
> *
> * Enables the HW filters for NIC traffic.
> */
> void t3_enable_filters(adapter_t *adap)
> {
> t3_set_reg_field(adap, A_TP_IN_CONFIG, F_NICMODE, 0);
> t3_set_reg_field(adap, A_MC5_DB_CONFIG, 0, F_FILTEREN);
> t3_set_reg_field(adap, A_TP_GLOBAL_CONFIG, 0, V_FIVETUPLELOOKUP(3));
> tp_wr_bits_indirect(adap, A_TP_INGRESS_CONFIG, 0, F_LOOKUPEVERYPKT);
> }
>
> /**
2662c2711
< V_TIMESTAMPSMODE(0) | V_SACKMODE(1) | V_SACKRX(1));
---
> V_TIMESTAMPSMODE(1) | V_SACKMODE(1) | V_SACKRX(1));
2665c2714
< V_BYTETHRESHOLD(16384) | V_MSSTHRESHOLD(2) |
---
> V_BYTETHRESHOLD(26880) | V_MSSTHRESHOLD(2) |
2707c2756,2757
< F_ENABLETXPORTFROMDA | F_ENABLERXPORTFROMADDR);
---
> F_ENABLETXPORTFROMDA2 | F_ENABLETXPORTFROMDA |
> F_ENABLERXPORTFROMADDR);
3621a3672,3673
> t3_write_reg(adapter, A_T3DBG_GPIO_ACT_LOW, calc_gpio_intr(adapter));
>