if_fxp.c (141950) | if_fxp.c (142655) |
---|---|
1/*- 2 * Copyright (c) 1995, David Greenman 3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1995, David Greenman 3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 141950 2005-02-15 17:47:57Z ru $"); | 31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 142655 2005-02-27 15:12:50Z mux $"); |
32 33/* 34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/endian.h> --- 404 unchanged lines hidden (view full) --- 444 DELAY(10); 445 446 /* 447 * Find out how large of an SEEPROM we have. 448 */ 449 fxp_autosize_eeprom(sc); 450 451 /* | 32 33/* 34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/endian.h> --- 404 unchanged lines hidden (view full) --- 444 DELAY(10); 445 446 /* 447 * Find out how large of an SEEPROM we have. 448 */ 449 fxp_autosize_eeprom(sc); 450 451 /* |
452 * Find out the chip revision; lump all 82557 revs together. 453 */ 454 fxp_read_eeprom(sc, &data, 5, 1); 455 if ((data >> 8) == 1) 456 sc->revision = FXP_REV_82557; 457 else 458 sc->revision = pci_get_revid(dev); 459 460 /* |
|
452 * Determine whether we must use the 503 serial interface. 453 */ 454 fxp_read_eeprom(sc, &data, 6, 1); | 461 * Determine whether we must use the 503 serial interface. 462 */ 463 fxp_read_eeprom(sc, &data, 6, 1); |
455 if (sc->revision <= FXP_REV_82557 && (data & FXP_PHY_DEVICE_MASK) != 0 | 464 if (sc->revision == FXP_REV_82557 && (data & FXP_PHY_DEVICE_MASK) != 0 |
456 && (data & FXP_PHY_SERIAL_ONLY)) 457 sc->flags |= FXP_FLAG_SERIAL_MEDIA; 458 459 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), 460 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), 461 OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, 462 &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", 463 "FXP driver receive interrupt microcode bundling delay"); --- 21 unchanged lines hidden (view full) --- 485 "int_delay", &sc->tunable_int_delay); 486 (void) resource_int_value(device_get_name(dev), device_get_unit(dev), 487 "bundle_max", &sc->tunable_bundle_max); 488 (void) resource_int_value(device_get_name(dev), device_get_unit(dev), 489 "noflow", &sc->tunable_noflow); 490 sc->rnr = 0; 491 492 /* | 465 && (data & FXP_PHY_SERIAL_ONLY)) 466 sc->flags |= FXP_FLAG_SERIAL_MEDIA; 467 468 SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), 469 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), 470 OID_AUTO, "int_delay", CTLTYPE_INT | CTLFLAG_RW, 471 &sc->tunable_int_delay, 0, sysctl_hw_fxp_int_delay, "I", 472 "FXP driver receive interrupt microcode bundling delay"); --- 21 unchanged lines hidden (view full) --- 494 "int_delay", &sc->tunable_int_delay); 495 (void) resource_int_value(device_get_name(dev), device_get_unit(dev), 496 "bundle_max", &sc->tunable_bundle_max); 497 (void) resource_int_value(device_get_name(dev), device_get_unit(dev), 498 "noflow", &sc->tunable_noflow); 499 sc->rnr = 0; 500 501 /* |
493 * Find out the chip revision; lump all 82557 revs together. 494 */ 495 fxp_read_eeprom(sc, &data, 5, 1); 496 if ((data >> 8) == 1) 497 sc->revision = FXP_REV_82557; 498 else 499 sc->revision = pci_get_revid(dev); 500 501 /* | |
502 * Enable workarounds for certain chip revision deficiencies. 503 * 504 * Systems based on the ICH2/ICH2-M chip from Intel, and possibly 505 * some systems based a normal 82559 design, have a defect where 506 * the chip can cause a PCI protocol violation if it receives 507 * a CU_RESUME command when it is entering the IDLE state. The 508 * workaround is to disable Dynamic Standby Mode, so the chip never 509 * deasserts CLKRUN#, and always remains in an active state. --- 2207 unchanged lines hidden --- | 502 * Enable workarounds for certain chip revision deficiencies. 503 * 504 * Systems based on the ICH2/ICH2-M chip from Intel, and possibly 505 * some systems based a normal 82559 design, have a defect where 506 * the chip can cause a PCI protocol violation if it receives 507 * a CU_RESUME command when it is entering the IDLE state. The 508 * workaround is to disable Dynamic Standby Mode, so the chip never 509 * deasserts CLKRUN#, and always remains in an active state. --- 2207 unchanged lines hidden --- |