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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
wxwisiasdf
Member
Member
Posts: 34
Joined: Sat Sep 07, 2019 5:17 pm
Libera.chat IRC: Superleaf1995

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

Post 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?
:-)
Octocontrabass
Member
Member
Posts: 6280
Joined: Mon Mar 25, 2013 7:01 pm

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

Post 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.
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

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

Post 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
Post Reply