Subject: Re: BCM5715 not supported
To: None <jonathan@dsg.stanford.edu>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 01/27/2007 10:11:10
jonathan@dsg.stanford.edu wrote:

> I truly don't understand why other developers, who haven't bothered to
> do that research, continue to merge these other-BSD changes back into
> our bge(4) driver without at least asking on tech-net, if not asking
> me directly.

I'm not sure you have received my (private) mail
but I'd ask you again if any my changes broke anything.

---
if_bge.c rev 1.113:
> Log Message:
> M_TRALINGSPACE(m) returns 0 if M_READONLY(m) is true,
> so no need to call both.  Pointed out by Pavel Cahyna.

According to mbuf.s defines, I don't think this breaks any structures.

if_bge.c rev 1.114:
> Log Message:
> - use continue for an empty statement in for() loop
> - remove an empty statement in if() clause by inverting logic
> - use KDASSERT(9) rather than #ifdef DEBUG + KASSERT(9)
> - replace commented out M_WRITABLE() with !M_READONLY(9)

I think these are also something cosmetics.

if_bge.c rev 1.115:
> Log Message:
> - bcopy -> strcpy (in debug message)
> - bcopy -> memcpy

Ditto.

if_bge.c rev 1.117:
> Log Message:
> BCM5701 B2 requires BGE_QUIRK_ONLY_PHY_1 quirk. From Brian Baird
> in PR kern/23778.

I think this was one of quirks I added, but this was based on the PR.
If you don't like this change, I'll backout this one.

if_bgereg.h rev 1.35:
> make DMA descriptor members volatile.

I believe this is required for current agressive gcc compiler.

if_bge.c rev 1.118:
> Log Message:
> Pull some bge_encap() fixes from OpenBSD:
> > - Move TX ring full sanity check further up and check the number of DMA
> > segments from the DMA map, instead of counting the DMA segments in the
> > for loop and breaking out later.
> > - Unload the DMA map if encountering an error condition.

I checked OpenBSD changes before committing and it seemed reasonable.
We can check dm_nsegs right after bus_dmamap_load_mbuf so we don't
have to count a number of fragments in a for() loop.
We should also free bus_dma(9) resources on any failures.

if_bge.c rev 1.119 and if_bgereg.h rev 1.36:
> Log Message:
> Add support for BCM5752M. from Matt Kolb on tech-kern and OpenBSD.

This was another quirk I added.
If you think this BGE_QUIRK_5705_CORE usage is completely wrong,
I'll ask the submitter if this quirk is really required.

if_bgereg.h rev 1.37:
> Log Message:
> TAB/space cleanup.

Only cosmetics.

if_bge.c rev 1.120 and if_bgereg.h 1.38:
> Log Message:
> Add and fix some BGE_CHIPIDs. From FreeBSD and OpenBSD.

if_bgereg.h rev 1.39:
> Log Message:
> Revert a CHIPID entry in the previous:
> In OpenBSD's if_bgereg.h, CHIPID 0x4101000 is defined as BCM5750_B1
> but our PR kern/31028 says it's BCM5751_A1 on BCM5751M on IBM T43p,
> and the value seems reasonable.

In these changes, I only added CHIPID, and didn't add
any devices in struct bge_revision.

if_bge.c rev 1.121:
> Log Message:
> Fix a typo.

This was not my typo.

if_bge.c rev 1.122:
> Log Message:
> Sync two alternative IDs with pcidevs.

Some PCI IDs were changed, but no quirk was changed.
---
Izumi Tsutsui