struct {
Uint32 Phys;
void *Virt;
- } RXBuffers[N_RX_PAGES];
+ } RXBuffers[N_RX_BUF_PAGES];
Uint32 DescTablePhys;
void *DescTable;
tCard *card;
giRhine2_CardCount = PCI_CountDevices(VENDOR_ID, DEVICE_ID);
+ Log_Debug("Rhine2", "giRhine2_CardCount = %i", giRhine2_CardCount);
if( giRhine2_CardCount == 0 ) return MODULE_ERR_NOTNEEDED;
gaRhine2_Cards = calloc( giRhine2_CardCount, sizeof(tCard) );
LOG("Allocaating RX buffers");
// Allocate memory for things
- for( int i = 0; i < N_RX_PAGES; i ++ )
+ for( int i = 0; i < N_RX_BUF_PAGES; i ++ )
{
Card->RXBuffers[i].Virt = (void*)MM_AllocDMA(1, 32, &phys);
Card->RXBuffers[i].Phys = phys;
card->NextTX = (card->NextTX + nDescs) % N_TX_DESCS;
desc = card->TXDescs + first_desc_id;
- desc->TXBufferStart = MM_GetPhysAddr( (tVAddr)data );
+ desc->TXBufferStart = MM_GetPhysAddr( data );
desc->BufferSize = len | (1 << 15);
desc->TSR = 0;
desc->TCR = 0;
void *Rhine2_int_GetBufferFromPhys(tCard *Card, Uint32 Addr)
{
- for( int i = 0; i < N_RX_PAGES; i ++ )
+ for( int i = 0; i < N_RX_BUF_PAGES; i ++ )
{
if( Card->RXBuffers[i].Phys > Addr ) continue;
if( Card->RXBuffers[i].Phys + PAGE_SIZE <= Addr ) continue;