diff --git a/hw/net/i82596.c b/hw/net/i82596.c index 37dcc0387b..af1abd4996 100644 --- a/hw/net/i82596.c +++ b/hw/net/i82596.c @@ -992,7 +992,6 @@ static ssize_t i82596_receive_packet(I82596State *s, const uint8_t *buf, size_t payload_size = 0; size_t bytes_copied = 0; const uint8_t *packet_data = buf; - bool crc_valid = true; bool out_of_resources = false; size_t crc_size = i82596_get_crc_size(s); @@ -1093,6 +1092,7 @@ static ssize_t i82596_receive_packet(I82596State *s, const uint8_t *buf, rx_status |= RFD_STATUS_TRUNC | RFD_STATUS_NOBUFS; i82596_record_error(s, RFD_STATUS_NOBUFS, false); packet_completed = true; + break; } else { hwaddr remaining_rbd = I596_NULL; size_t rbd_bytes = i82596_rx_copy_to_rbds( @@ -1119,17 +1119,18 @@ static ssize_t i82596_receive_packet(I82596State *s, const uint8_t *buf, i82596_record_error(s, RFD_STATUS_NOBUFS, false); rx_status |= RFD_STATUS_TRUNC | RFD_STATUS_NOBUFS; packet_completed = true; + break; } if (bytes_copied < payload_size) { trace_i82596_rx_incomplete(bytes_copied, payload_size); rx_status |= RFD_STATUS_TRUNC; packet_completed = true; + break; } } } } - break; } while (bytes_copied < payload_size); @@ -1155,16 +1156,11 @@ rx_complete: } } - if (packet_completed && crc_valid) { + if (packet_completed) { rx_status |= STAT_C | STAT_OK; if (is_broadcast) { rx_status |= 0x0001; } - } else if (packet_completed) { - rx_status |= STAT_C; - if (!crc_valid) { - rx_status |= RX_CRC_ERRORS; - } } else { rx_status |= STAT_B; } @@ -1187,7 +1183,7 @@ rx_complete: return size; } - if (packet_completed && crc_valid && s->rx_status == RX_READY) { + if (packet_completed && s->rx_status == RX_READY) { uint32_t next_rfd_addr = i82596_translate_address(s, rfd.link, false); if (next_rfd_addr != 0 && next_rfd_addr != I596_NULL) { set_uint32(s->scb + 8, next_rfd_addr); diff --git a/hw/scsi/lasi_ncr710.c b/hw/scsi/lasi_ncr710.c index b674a4066f..7e0076c7a3 100644 --- a/hw/scsi/lasi_ncr710.c +++ b/hw/scsi/lasi_ncr710.c @@ -160,6 +160,10 @@ static const VMStateDescription vmstate_lasi_ncr710 = { .version_id = 1, .minimum_version_id = 1, .fields = (const VMStateField[]) { + VMSTATE_UINT32(hw_type, LasiNCR710State), + VMSTATE_UINT32(sversion, LasiNCR710State), + VMSTATE_UINT32(hversion, LasiNCR710State), + VMSTATE_STRUCT(ncr710, LasiNCR710State, 1, vmstate_ncr710, NCR710State), VMSTATE_END_OF_LIST() } }; diff --git a/hw/scsi/lasi_ncr710.h b/hw/scsi/lasi_ncr710.h index 3711233b0f..058718068e 100644 --- a/hw/scsi/lasi_ncr710.h +++ b/hw/scsi/lasi_ncr710.h @@ -46,7 +46,6 @@ typedef struct LasiNCR710State { uint32_t hw_type; /* Hardware type (HPHW_*) */ uint32_t sversion; /* Software version */ uint32_t hversion; /* Hardware version */ - SCSIBus bus; NCR710State ncr710; } LasiNCR710State; diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c index ade951b1d1..47a6983491 100644 --- a/hw/scsi/ncr53c710.c +++ b/hw/scsi/ncr53c710.c @@ -550,7 +550,7 @@ static inline uint8_t ncr710_scsi_fifo_dequeue(NCR710_SCSI_FIFO *fifo, static inline uint32_t ncr710_read_dword(NCR710State *s, uint32_t addr) { uint32_t buf; - address_space_read(&address_space_memory, addr, MEMTXATTRS_UNSPECIFIED, + address_space_read(s->as, addr, MEMTXATTRS_UNSPECIFIED, (uint8_t *)&buf, 4); /* * The NCR710 datasheet saying "operates internally in LE mode" @@ -565,7 +565,7 @@ static inline uint32_t ncr710_read_dword(NCR710State *s, uint32_t addr) static inline void ncr710_dma_read(NCR710State *s, uint32_t addr, void *buf, uint32_t len) { - address_space_read(&address_space_memory, addr, MEMTXATTRS_UNSPECIFIED, + address_space_read(s->as, addr, MEMTXATTRS_UNSPECIFIED, buf, len); NCR710_DPRINTF("Read %d bytes from %08x: ", len, addr); for (int i = 0; i < len && i < 16; i++) { @@ -577,7 +577,7 @@ static inline void ncr710_dma_read(NCR710State *s, uint32_t addr, static inline void ncr710_dma_write(NCR710State *s, uint32_t addr, const void *buf, uint32_t len) { - address_space_write(&address_space_memory, addr, MEMTXATTRS_UNSPECIFIED, + address_space_write(s->as, addr, MEMTXATTRS_UNSPECIFIED, buf, len); NCR710_DPRINTF("Wrote %d bytes to %08x\n", len, addr); } @@ -832,12 +832,11 @@ void ncr710_transfer_data(SCSIRequest *req, uint32_t len) } /* Host adapter (re)connected */ - s->current->dma_len = len; s->command_complete = NCR710_CMD_DATA_READY; - if (!s->current) { return; } + s->current->dma_len = len; if (s->waiting) { s->scntl1 |= NCR710_SCNTL1_CON; @@ -1362,11 +1361,6 @@ again: case PHASE_DI: s->waiting = NCR710_WAIT_DMA; ncr710_do_dma(s, 0); - if (s->waiting != NCR710_WAIT_NONE) { - /* Async - stop and wait */ - break; - } - /* Sync - continue execution */ break; case PHASE_CO: ncr710_do_command(s); @@ -2256,7 +2250,7 @@ static const VMStateDescription vmstate_ncr710_scsi_fifo = { } }; -static const VMStateDescription vmstate_ncr710 = { +const VMStateDescription vmstate_ncr710 = { .name = "ncr710", .version_id = 1, .minimum_version_id = 1, diff --git a/hw/scsi/ncr53c710.h b/hw/scsi/ncr53c710.h index 380e3959b3..6d30f9b663 100644 --- a/hw/scsi/ncr53c710.h +++ b/hw/scsi/ncr53c710.h @@ -242,5 +242,6 @@ void ncr710_transfer_data(SCSIRequest *req, uint32_t len); void ncr710_execute_script(NCR710State *s); void ncr710_set_phase(NCR710State *s, int phase); void ncr710_reselection_retry_callback(void *opaque); +extern const VMStateDescription vmstate_ncr710; #endif /* HW_NCR53C710_H */ diff --git a/pc-bios/hppa-firmware.img b/pc-bios/hppa-firmware.img index 74044a20ca..4267fe4b38 100644 Binary files a/pc-bios/hppa-firmware.img and b/pc-bios/hppa-firmware.img differ diff --git a/pc-bios/hppa-firmware64.img b/pc-bios/hppa-firmware64.img index 630edc3579..7d538e4ea3 100644 Binary files a/pc-bios/hppa-firmware64.img and b/pc-bios/hppa-firmware64.img differ diff --git a/roms/seabios-hppa b/roms/seabios-hppa index d0d359929a..a04b6f35c0 160000 --- a/roms/seabios-hppa +++ b/roms/seabios-hppa @@ -1 +1 @@ -Subproject commit d0d359929a009549f7cecac9d2a29c8bdbc07a98 +Subproject commit a04b6f35c0b7437ce968f64106ee6ff5aadee419