Page 1 of 1

PS/2 driver sends data to device instead of the controller

Posted: Wed Dec 25, 2019 9:26 am
by wxwisiasdf
I have two routines: io_send_byte_ctr
Wich should send a byte to the controller, hand has no timeout

io_send_byte_dev, Wich sends to devices.

Everything is ok, but it seems both send bytes to devices (when I check reply I always get ACK)

I'm using bochs and virtualbox, why does this happen?

Re: PS/2 driver sends data to device instead of the controll

Posted: Thu Dec 26, 2019 4:22 am
by Octocontrabass
It probably happens because there's a bug in your code.

Maybe I could find the bug if I could see your code.

Re: PS/2 driver sends data to device instead of the controll

Posted: Thu Dec 26, 2019 4:26 am
by bzt
Hi,

Read the PS/2 wiki article, particularly the "host to device" part. It describes this in great detail.

Basically you always send data to the controller, never to the devices. You can ask the controller to forward those data to one of the devices, but still, you're talking to the controller. What you have written seems like you are accidentally keep asking the controller to send the data to one of the devices.

Cheers,
bzt