Revision a8170e5e hw/pcnet.c

b/hw/pcnet.c
293 293
        GET_FIELD((R)->msg_length, RMDM, ZEROS))
294 294

  
295 295
static inline void pcnet_tmd_load(PCNetState *s, struct pcnet_TMD *tmd,
296
                                  target_phys_addr_t addr)
296
                                  hwaddr addr)
297 297
{
298 298
    if (!BCR_SSIZE32(s)) {
299 299
        struct {
......
323 323
}
324 324

  
325 325
static inline void pcnet_tmd_store(PCNetState *s, const struct pcnet_TMD *tmd,
326
                                   target_phys_addr_t addr)
326
                                   hwaddr addr)
327 327
{
328 328
    if (!BCR_SSIZE32(s)) {
329 329
        struct {
......
359 359
}
360 360

  
361 361
static inline void pcnet_rmd_load(PCNetState *s, struct pcnet_RMD *rmd,
362
                                  target_phys_addr_t addr)
362
                                  hwaddr addr)
363 363
{
364 364
    if (!BCR_SSIZE32(s)) {
365 365
        struct {
......
389 389
}
390 390

  
391 391
static inline void pcnet_rmd_store(PCNetState *s, struct pcnet_RMD *rmd,
392
                                   target_phys_addr_t addr)
392
                                   hwaddr addr)
393 393
{
394 394
    if (!BCR_SSIZE32(s)) {
395 395
        struct {
......
660 660
    return 0;
661 661
}
662 662

  
663
static inline target_phys_addr_t pcnet_rdra_addr(PCNetState *s, int idx)
663
static inline hwaddr pcnet_rdra_addr(PCNetState *s, int idx)
664 664
{
665 665
    while (idx < 1) idx += CSR_RCVRL(s);
666 666
    return s->rdra + ((CSR_RCVRL(s) - idx) * (BCR_SWSTYLE(s) ? 16 : 8));
......
898 898
    if (s->rdra) {
899 899
        int bad = 0;
900 900
#if 1
901
        target_phys_addr_t crda = pcnet_rdra_addr(s, CSR_RCVRC(s));
902
        target_phys_addr_t nrda = pcnet_rdra_addr(s, -1 + CSR_RCVRC(s));
903
        target_phys_addr_t nnrd = pcnet_rdra_addr(s, -2 + CSR_RCVRC(s));
901
        hwaddr crda = pcnet_rdra_addr(s, CSR_RCVRC(s));
902
        hwaddr nrda = pcnet_rdra_addr(s, -1 + CSR_RCVRC(s));
903
        hwaddr nnrd = pcnet_rdra_addr(s, -2 + CSR_RCVRC(s));
904 904
#else
905
        target_phys_addr_t crda = s->rdra +
905
        hwaddr crda = s->rdra +
906 906
            (CSR_RCVRL(s) - CSR_RCVRC(s)) *
907 907
            (BCR_SWSTYLE(s) ? 16 : 8 );
908 908
        int nrdc = CSR_RCVRC(s)<=1 ? CSR_RCVRL(s) : CSR_RCVRC(s)-1;
909
        target_phys_addr_t nrda = s->rdra +
909
        hwaddr nrda = s->rdra +
910 910
            (CSR_RCVRL(s) - nrdc) *
911 911
            (BCR_SWSTYLE(s) ? 16 : 8 );
912 912
        int nnrc = nrdc<=1 ? CSR_RCVRL(s) : nrdc-1;
913
        target_phys_addr_t nnrd = s->rdra +
913
        hwaddr nnrd = s->rdra +
914 914
            (CSR_RCVRL(s) - nnrc) *
915 915
            (BCR_SWSTYLE(s) ? 16 : 8 );
916 916
#endif
......
970 970
{
971 971
    s->csr[34] = s->csr[35] = 0;
972 972
    if (s->tdra) {
973
        target_phys_addr_t cxda = s->tdra +
973
        hwaddr cxda = s->tdra +
974 974
            (CSR_XMTRL(s) - CSR_XMTRC(s)) *
975 975
            (BCR_SWSTYLE(s) ? 16 : 8);
976 976
        int bad = 0;
......
1050 1050
        if (!(CSR_CRST(s) & 0x8000) && s->rdra) {
1051 1051
            struct pcnet_RMD rmd;
1052 1052
            int rcvrc = CSR_RCVRC(s)-1,i;
1053
            target_phys_addr_t nrda;
1053
            hwaddr nrda;
1054 1054
            for (i = CSR_RCVRL(s)-1; i > 0; i--, rcvrc--) {
1055 1055
                if (rcvrc <= 1)
1056 1056
                    rcvrc = CSR_RCVRL(s);
......
1078 1078
            CSR_MISSC(s)++;
1079 1079
        } else {
1080 1080
            uint8_t *src = s->buffer;
1081
            target_phys_addr_t crda = CSR_CRDA(s);
1081
            hwaddr crda = CSR_CRDA(s);
1082 1082
            struct pcnet_RMD rmd;
1083 1083
            int pktcount = 0;
1084 1084

  
......
1118 1118

  
1119 1119
#define PCNET_RECV_STORE() do {                                 \
1120 1120
    int count = MIN(4096 - GET_FIELD(rmd.buf_length, RMDL, BCNT),remaining); \
1121
    target_phys_addr_t rbadr = PHYSADDR(s, rmd.rbadr);          \
1121
    hwaddr rbadr = PHYSADDR(s, rmd.rbadr);          \
1122 1122
    s->phys_mem_write(s->dma_opaque, rbadr, src, count, CSR_BSWP(s)); \
1123 1123
    src += count; remaining -= count;                           \
1124 1124
    SET_FIELD(&rmd.status, RMDS, OWN, 0);                       \
......
1129 1129
            remaining = size;
1130 1130
            PCNET_RECV_STORE();
1131 1131
            if ((remaining > 0) && CSR_NRDA(s)) {
1132
                target_phys_addr_t nrda = CSR_NRDA(s);
1132
                hwaddr nrda = CSR_NRDA(s);
1133 1133
#ifdef PCNET_DEBUG_RMD
1134 1134
                PRINT_RMD(&rmd);
1135 1135
#endif
......
1206 1206

  
1207 1207
static void pcnet_transmit(PCNetState *s)
1208 1208
{
1209
    target_phys_addr_t xmit_cxda = 0;
1209
    hwaddr xmit_cxda = 0;
1210 1210
    int count = CSR_XMTRL(s)-1;
1211 1211
    int add_crc = 0;
1212 1212

  

Also available in: Unified diff