-/* $OpenBSD: fxp.c,v 1.2 2000/04/26 12:48:53 aaron Exp $ */
+/* $OpenBSD: fxp.c,v 1.3 2000/04/26 19:12:08 chris Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
cbp->stripping = !prm; /* truncate rx packet to byte count */
cbp->padding = 1; /* (do) pad short tx packets */
cbp->rcv_crc_xfer = 0; /* (don't) xfer CRC to host */
+ cbp->long_rx = sc->not_82557; /* (enable) long packets */
cbp->force_fdx = 0; /* (don't) force full duplex */
cbp->fdx_pin_en = 1; /* (enable) FDX# pin */
cbp->multi_ia = 0; /* (don't) accept multiple IAs */
-/* $OpenBSD: fxpreg.h,v 1.1 2000/04/18 18:44:27 jason Exp $ */
+/* $OpenBSD: fxpreg.h,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/*
* Copyright (c) 1995, David Greenman
volatile u_int stripping:1,
padding:1,
rcv_crc_xfer:1,
- :5;
+ long_rx:1, /* 82558/82559 */
+ :4;
volatile u_int :6,
force_fdx:1,
fdx_pin_en:1;
-/* $OpenBSD: fxpvar.h,v 1.1 2000/04/18 18:44:27 jason Exp $ */
+/* $OpenBSD: fxpvar.h,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */
/*
int phy_primary_device; /* device type of primary PHY */
int phy_10Mbps_only; /* PHY is 10Mbps-only device */
int eeprom_size; /* size of serial EEPROM */
+ int not_82557; /* yes if we are 82558/82559 */
};
/* Macros to ease CSR access. */
-/* $OpenBSD: if_fxp_pci.c,v 1.1 2000/04/18 18:44:31 jason Exp $ */
+/* $OpenBSD: if_fxp_pci.c,v 1.2 2000/04/26 19:12:08 chris Exp $ */
/*
* Copyright (c) 1995, David Greenman
bus_space_tag_t iot = pa->pa_iot;
bus_addr_t iobase;
bus_size_t iosize;
+ pcireg_t rev = PCI_REVISION(pa->pa_class);
if (pci_io_find(pc, pa->pa_tag, FXP_PCI_IOBA, &iobase, &iosize)) {
printf(": can't find i/o space\n");
return;
}
+ /*
+ * revisions
+ * 2 = 82557
+ * 4, 6 = 82558
+ * 8 = 82559
+ */
+ sc->not_82557 = (rev >= 4) ? 1 : 0;
+
/* Do generic parts of attach. */
if (fxp_attach_common(sc, enaddr, intrstr)) {
/* Failed! */