- User Since
- Apr 25 2019, 3:12 PM (12 w, 17 h)
Mon, Jul 8
Based on the comments from the previous patch I've made some changes to how LSR errors are stored:
- instead of saving the entire LSR register, only saving the error bits that are clear by the UART. In this way the current implementation remains the same and only update the code in places where the value from bit errors is needed, eg. ns8250_bus_receive.
- created two functions, one to clear and one to update the save LSR error bits.
- clear the saved error bits after they are used or after a read on REG_DATA took place.
May 22 2019
I only saved the LSR flags so I can later use it into the read to detect parity errors.
I don't know if saving LSR is useful in other places except for the parity errors. So maybe it would be enough to save the error bits from LSR,, because it looks like everything else works fine in driver.
What do you think it might be useful to save entire LSR and clear bits when needed, or just fix this parity error and rename to reflect for what is used? I don't know what will be the implication, but but we can also change into uart_intr to call a new function to handle the parity errors, in the same way like for overflow and then we don't save anymore the LSR internaly?