Added a sanity fatal() to the x54x SCSI controller famility code.
This commit is contained in:
@@ -260,6 +260,11 @@ x54x_bios_scsi_command(scsi_device_t *dev, uint8_t *cdb, uint8_t *buf, int len,
|
|||||||
return(completion_code(scsi_device_sense(dev)));
|
return(completion_code(scsi_device_sense(dev)));
|
||||||
|
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
|
if (dev->buffer_length == -1) {
|
||||||
|
fatal("Buffer length -1 when doing SCSI DMA\n");
|
||||||
|
return(0xff);
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->phase == SCSI_PHASE_DATA_IN) {
|
if (dev->phase == SCSI_PHASE_DATA_IN) {
|
||||||
if (buf)
|
if (buf)
|
||||||
memcpy(buf, dev->sc->temp_buffer, dev->buffer_length);
|
memcpy(buf, dev->sc->temp_buffer, dev->buffer_length);
|
||||||
|
Reference in New Issue
Block a user