Brad,

Please also paste us your code... ? Has it been tested?


Also.. I thought this was already supported by the 4.4 kernel as per the
man page for bge, it says "Support for BCM57xx" ??

Thank you.

Jose

On Wed, 22 Apr 2009 17:45:46 -0400, Brad <[email protected]> wrote:
> On Tuesday 21 April 2009 18:46:58 Brad wrote:
>> Hi,
>>
>> with regard to your post this chipset is not supported yet.
>>
>> I've had a diff sitting around for awhile to start on support for
>> this but it is really new hardware and I don't have anything to
>> test with. If you could build a kernel and try it out on the
>> system in question and provide me with the resulting dmesg that
>> would be great. It won't actually fully attach yet but just try
>> to and print out some additional debug info for myself.
> 
> I can also provide you with a pre-built kernel if you would like that.
> 
>>
>> Index: if_bge.c
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/pci/if_bge.c,v
>> retrieving revision 1.261
>> diff -u -p -r1.261 if_bge.c
>> --- if_bge.c 27 Jan 2009 09:17:51 -0000      1.261
>> +++ if_bge.c 21 Apr 2009 22:39:30 -0000
>> @@ -242,6 +242,7 @@ const struct pci_matchid bge_devices[] =
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5720 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5721 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5722 },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5723 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5750 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5750M },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5751 },
>> @@ -257,10 +258,15 @@ const struct pci_matchid bge_devices[] =
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5755 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5755M },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5756 },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5761 },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5761E },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5764 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5780 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5780S },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5781 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5782 },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5784 },
>> +    { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5785 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5786 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5787 },
>>      { PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM5787F },
>> @@ -290,6 +296,9 @@ const struct pci_matchid bge_devices[] =
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5752    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5755    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5787    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906)
>>
>> @@ -300,6 +309,9 @@ const struct pci_matchid bge_devices[] =
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5714    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5752    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5755    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784    || \
>> +     BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5787    || \
>>       BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906)
>>
>> @@ -1751,8 +1763,13 @@ bge_blockinit(struct bge_softc *sc)
>>      /* Turn on send BD completion state machine */
>>      CSR_WRITE_4(sc, BGE_SBDC_MODE, BGE_SBDCMODE_ENABLE);
>>
>> +    val = BGE_SDCMODE_ENABLE;
>> +
>> +    if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761)
>> +            val |= BGE_SDCMODE_CDELAY;
>> +
>>      /* Turn on send data completion state machine */
>> -    CSR_WRITE_4(sc, BGE_SDC_MODE, BGE_SDCMODE_ENABLE);
>> +    CSR_WRITE_4(sc, BGE_SDC_MODE, val);
>>
>>      /* Turn on send data initiator state machine */
>>      CSR_WRITE_4(sc, BGE_SDI_MODE, BGE_SDIMODE_ENABLE);
>> @@ -1896,10 +1913,22 @@ bge_attach(struct device *parent, struct
>>      /*
>>       * Save ASIC rev.
>>       */
>> -
>>      sc->bge_chipid =
>> -            pci_conf_read(pc, pa->pa_tag, BGE_PCI_MISC_CTL) &
>> -            BGE_PCIMISCCTL_ASICREV;
>> +        pci_conf_read(pc, pa->pa_tag, BGE_PCI_MISC_CTL) &
>> +        BGE_PCIMISCCTL_ASICREV;
>> +
>> +    printf(", chipid 0x%x asicrev 0x%x", sc->bge_chipid,
>> BGE_ASICREV(sc->bge_chipid)); +
>> +    if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_USE_PRODID_REG) {
>> +            u_int32_t prodid_asic_rev;
>> +
>> +            prodid_asic_rev = pci_conf_read(pc, pa->pa_tag,
>> +                BGE_PCI_PRODID_ASICREV);
>> +            sc->bge_chipid = prodid_asic_rev & BGE_PRODID_ASICREV_MASK;
>> +
>> +            printf(" prodid 0x%x chipid 0x%x", prodid_asic_rev, 
>> sc->bge_chipid);
>> +            return;
>> +    }
>>
>>      printf(", ");
>>      br = bge_lookup_rev(sc->bge_chipid);
>> @@ -1999,16 +2028,24 @@ bge_attach(struct device *parent, struct
>>
>>      if (BGE_IS_5705_OR_BEYOND(sc)) {
>>              if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5755 ||
>> +                BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761 ||
>> +                BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784 ||
>>                  BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5787) {
>>                      if (PCI_PRODUCT(pa->pa_id) != 
>> PCI_PRODUCT_BROADCOM_BCM5722 &&
>>                          PCI_PRODUCT(pa->pa_id) != 
>> PCI_PRODUCT_BROADCOM_BCM5756)
>>                              sc->bge_flags |= BGE_PHY_JITTER_BUG;
>>                      if (PCI_PRODUCT(pa->pa_id) == 
>> PCI_PRODUCT_BROADCOM_BCM5755M)
>>                              sc->bge_flags |= BGE_PHY_ADJUST_TRIM;
>> -            } else if (BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5906)
>> +            } else if (BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5785 &&
>> +                       BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5906)
>>                      sc->bge_flags |= BGE_PHY_BER_BUG;
>>      }
>>
>> +    if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761 ||
>> +        BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784 ||
>> +        BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785)
>> +            sc->bge_flags |= BGE_CPMU_PRESENT;
>> +
>>      /* Try to reset the chip. */
>>      DPRINTFN(5, ("bge_reset\n"));
>>      bge_reset(sc);
>> @@ -2291,6 +2328,9 @@ bge_reset(struct bge_softc *sc)
>>      /* Disable fastboot on controllers that support it. */
>>      if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5752 ||
>>          BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5755 ||
>> +        BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761 ||
>> +        BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5784 ||
>> +        BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785 ||
>>          BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5787)
>>              CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0);
>>
>> Index: if_bgereg.h
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/pci/if_bgereg.h,v
>> retrieving revision 1.90
>> diff -u -p -r1.90 if_bgereg.h
>> --- if_bgereg.h      23 Dec 2008 00:12:22 -0000      1.90
>> +++ if_bgereg.h      21 Apr 2009 22:39:30 -0000
>> @@ -199,6 +199,7 @@
>>  #define BGE_PCI_UNDI_TX_BD_PRODIDX_LO       0xAC
>>  #define BGE_PCI_ISR_MBX_HI          0xB0
>>  #define BGE_PCI_ISR_MBX_LO          0xB4
>> +#define BGE_PCI_PRODID_ASICREV              0xBC
>>
>>  /* XXX:
>>   * Used in PCI-Express code for 575x chips.
>> @@ -269,6 +270,10 @@
>>  #define BGE_CHIPID_BCM5750_C1               0x42010000
>>  #define BGE_CHIPID_BCM5750_C2               0x42020000
>>  #define BGE_CHIPID_BCM5714_A0               0x50000000
>> +#define BGE_CHIPID_BCM5761_A0               0x57610000
>> +#define BGE_CHIPID_BCM5761_A1               0x57610010
>> +#define BGE_CHIPID_BCM5784_A0               0x57840000
>> +#define BGE_CHIPID_BCM5784_A1               0x57840010
>>  #define BGE_CHIPID_BCM5752_A0               0x60000000
>>  #define BGE_CHIPID_BCM5752_A1               0x60010000
>>  #define BGE_CHIPID_BCM5752_A2               0x60020000
>> @@ -302,6 +307,10 @@
>>  #define BGE_ASICREV_BCM5755         0x0a
>>  #define BGE_ASICREV_BCM5787         0x0b
>>  #define BGE_ASICREV_BCM5906         0x0c
>> +#define BGE_ASICREV_USE_PRODID_REG  0x0f
>> +#define BGE_ASICREV_BCM5761         0x5761
>> +#define BGE_ASICREV_BCM5784         0x5784
>> +#define BGE_ASICREV_BCM5785         0x5785
>>
>>  /* chip revisions */
>>  #define BGE_CHIPREV(x)                      ((x) >> 24)
>> @@ -784,8 +793,9 @@
>>
>>  #define BGE_MIMODE_SHORTPREAMBLE    0x00000002
>>  #define BGE_MIMODE_AUTOPOLL         0x00000010
>> +#define BGE_MIMODE_500KHZ_CONST             0x00008000
>>  #define BGE_MIMODE_CLKCNT           0x001F0000
>> -
>> +#define BGE_MIMODE_BASE                     0x000C0000
>>
>>  /*
>>   * Send data initiator control registers.
>> @@ -845,6 +855,7 @@
>>  #define BGE_SDCMODE_RESET           0x00000001
>>  #define BGE_SDCMODE_ENABLE          0x00000002
>>  #define BGE_SDCMODE_ATTN            0x00000004
>> +#define BGE_SDCMODE_CDELAY          0x00000010
>>
>>  /* Send Data completion status register */
>>  #define BGE_SDCSTAT_ATTN            0x00000004
>> @@ -1362,6 +1373,9 @@
>>  #define BGE_RDMAMODE_PCI_FIFOOREAD_ATTN     0x00000100
>>  #define BGE_RDMAMODE_LOCWRITE_TOOBIG        0x00000200
>>  #define BGE_RDMAMODE_ALL_ATTNS              0x000003FC
>> +#define BGE_RDMAMODE_BD_SBD_CRPT_ATTN       0x00000800
>> +#define BGE_RDMAMODE_MBUF_RBD_CRPT_ATTN     0x00001000
>> +#define BGE_RDMAMODE_MBUF_SBD_CRPT_ATTN     0x00002000
>>  #define BGE_RDMAMODE_FIFO_SIZE_128  0x00020000
>>  #define BGE_RDMAMODE_FIFO_LONG_BURST        0x00030000
>>
>> @@ -1831,6 +1845,8 @@
>>  #define BGE_MLC_SSRAM_CYC_DESEL             0x00800000
>>  #define BGE_MLC_AUTO_EEPROM         0x01000000
>>
>> +#define BGE_PRODID_ASICREV_MASK             0x0fffffff
>> +
>>  #define BGE_SSRAMSIZE_256KB         0x00000000
>>  #define BGE_SSRAMSIZE_512KB         0x00040000
>>  #define BGE_SSRAMSIZE_1MB           0x00080000
>> @@ -2444,6 +2460,7 @@ struct bge_softc {
>>  #define BGE_PHY_ADJUST_TRIM 0x00040000
>>  #define BGE_NO_ETH_WIRE_SPEED       0x00080000
>>  #define BGE_IS_5788         0x00100000
>> +#define BGE_CPMU_PRESENT    0x00200000
>>
>>      bus_dma_tag_t           bge_dmatag;
>>      u_int32_t               bge_chipid;

Reply via email to