Revision e74818f3

b/hw/eepro100.c
237 237
    /* Statistical counters. Also used for wake-up packet (i82559). */
238 238
    eepro100_stats_t statistics;
239 239

  
240
#if 0
241
    uint16_t status;
242
#endif
243

  
244 240
    /* Configuration bytes. */
245 241
    uint8_t configuration[22];
246 242

  
......
693 689
}
694 690
#endif                          /* DEBUG_EEPRO100 */
695 691

  
696
#if 0
697
static uint16_t eepro100_read_status(EEPRO100State * s)
698
{
699
    uint16_t val = s->status;
700
    TRACE(OTHER, logout("val=0x%04x\n", val));
701
    return val;
702
}
703

  
704
static void eepro100_write_status(EEPRO100State * s, uint16_t val)
705
{
706
    TRACE(OTHER, logout("val=0x%04x\n", val));
707
    s->status = val;
708
}
709
#endif
710

  
711 692
/*****************************************************************************
712 693
 *
713 694
 * Command emulation.
......
1364 1345

  
1365 1346
    switch (addr) {
1366 1347
    case SCBStatus:
1367
#if 0
1368
        val = eepro100_read_status(s);
1369
#endif
1370
        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
1371
        break;
1372 1348
    case SCBAck:
1373
#if 0
1374
        val = eepro100_read_status(s);
1375
#endif
1376 1349
        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
1377 1350
        break;
1378 1351
    case SCBCmd:
......
1415 1388

  
1416 1389
    switch (addr) {
1417 1390
    case SCBStatus:
1418
#if 0
1419
        val = eepro100_read_status(s);
1420
#endif
1421 1391
    case SCBCmd:
1422 1392
        TRACE(OTHER, logout("addr=%s val=0x%04x\n", regname(addr), val));
1423 1393
        break;
......
1441 1411

  
1442 1412
    switch (addr) {
1443 1413
    case SCBStatus:
1444
#if 0
1445
        val = eepro100_read_status(s);
1446
#endif
1447 1414
        TRACE(OTHER, logout("addr=%s val=0x%08x\n", regname(addr), val));
1448 1415
        break;
1449 1416
    case SCBPointer:
......
1468 1435

  
1469 1436
static void eepro100_write1(EEPRO100State * s, uint32_t addr, uint8_t val)
1470 1437
{
1471
    if (addr <= sizeof(s->mem) - sizeof(val)) {
1438
    /* SCBStatus is readonly. */
1439
    if (addr > SCBStatus && addr <= sizeof(s->mem) - sizeof(val)) {
1472 1440
        memcpy(&s->mem[addr], &val, sizeof(val));
1473 1441
    }
1474 1442

  
......
1476 1444

  
1477 1445
    switch (addr) {
1478 1446
    case SCBStatus:
1479
#if 0
1480
        eepro100_write_status(s, val);
1481
#endif
1482 1447
        break;
1483 1448
    case SCBAck:
1484 1449
        eepro100_acknowledge(s);
......
1510 1475

  
1511 1476
static void eepro100_write2(EEPRO100State * s, uint32_t addr, uint16_t val)
1512 1477
{
1513
    if (addr <= sizeof(s->mem) - sizeof(val)) {
1478
    /* SCBStatus is readonly. */
1479
    if (addr > SCBStatus && addr <= sizeof(s->mem) - sizeof(val)) {
1514 1480
        memcpy(&s->mem[addr], &val, sizeof(val));
1515 1481
    }
1516 1482

  
......
1518 1484

  
1519 1485
    switch (addr) {
1520 1486
    case SCBStatus:
1521
#if 0
1522
        eepro100_write_status(s, val);
1523
#endif
1487
        s->mem[SCBAck] = (val >> 8);
1524 1488
        eepro100_acknowledge(s);
1525 1489
        break;
1526 1490
    case SCBCmd:
......
1908 1872
        VMSTATE_UINT32(statistics.fc_rcv_unsupported, EEPRO100State),
1909 1873
        VMSTATE_UINT16(statistics.xmt_tco_frames, EEPRO100State),
1910 1874
        VMSTATE_UINT16(statistics.rcv_tco_frames, EEPRO100State),
1911
#if 0
1912
        VMSTATE_UINT16(status, EEPRO100State),
1913
#endif
1914 1875
        /* Configuration bytes. */
1915 1876
        VMSTATE_BUFFER(configuration, EEPRO100State),
1916 1877
        VMSTATE_END_OF_LIST()

Also available in: Unified diff