VirtualBox

Changeset 928 in vbox


Ignore:
Timestamp:
Feb 15, 2007 4:22:32 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18661
Message:

Removed dead code. I'm pretty sure that we slightly misinterpreted the zero length buffers phrase. It makes more sense if the manual is talking about empty buffers not 4096 byte buffers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r927 r928  
    19221922}
    19231923
    1924 /**
    1925  * Fails a TMD with a generic error.
    1926  */
    1927 static void pcnetXmitFailTMDGeneric(PCNetState *pData, TMD *pTmd)
    1928 {
    1929     /* make carrier error - hope this is correct. */
    1930     pTmd->tmd2.lcar = pTmd->tmd1.err = 1;
    1931     pData->aCSR[0] |= BIT(15) | BIT(13); /* ERR | CERR */
    1932     pData->Led.Asserted.s.fError = pData->Led.Actual.s.fError = 1;
    1933     Log(("#%d pcnetTransmit: Signaling send error. swstyle=%#x\n",
    1934          PCNETSTATE_2_DEVINS(pData)->iInstance, pData->aBCR[BCR_SWS]));
    1935 }
    1936 
    19371924
    19381925/**
     
    20632050                RTR3PTR pv;
    20642051
     2052                /* From the manual: ``A zero length buffers is acceptable as
     2053                 * long as it is not the last buffer in a chain (STP = 0 and
     2054                 * ENP = 1).'' That means that the first buffer might have a
     2055                 * zero length if it is not the last one in the chain. */
    20652056                if (RT_LIKELY(cb < 4096))
    20662057                {
     
    20902081                     * which causes transmit to stall for about 10 seconds).
    20912082                     * This is just a workaround, not a final solution. */
     2083                    /* r=frank: IMHO this is the correct implementation. The
     2084                     * manual says: ``If the OWN bit is set and the buffer
     2085                     * length is 0, the OWN bit will be cleared. In the C-LANCE
     2086                     * the buffer length of 0 is interpreted as a 4096-byte
     2087                     * buffer.'' */
    20922088                    LogRel(("PCNET: pcnetAsyncTransmit: illegal 4kb frame -> ignoring\n"));
    20932089                    pcnetTmdStorePassHost(pData, &tmd, PHYSADDR(pData, CSR_CXDA(pData)));
    20942090                    break;
    2095                 }
    2096                 else
    2097                 {
    2098                     /* This is only acceptable if it's not the last buffer in the chain (stp=1, enp=0) */
    2099                     LogRel(("PCNET: pcnetAsyncTransmit: illegal 4kb frame -> signalling error\n"));
    2100 
    2101                     pcnetXmitFailTMDGeneric(pData, &tmd);
    21022091                }
    21032092            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette