tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: svwsata: lost/missing interrupt



Hello,

On Tue, 18 Feb 2025 19:33:39 +0100
Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:

> > Has anyone looked at FreeBSD for fixes after the routine has been copied?  
> I tried, but they seem to have partially re-factored the code.
> 
> Initially, the fix was #ifdef __powerpc__.

... which is technically wrong since this isn't really powerpc-specific.

> It looks like they are doing the magic (additional 4-byte read on the status 
> register) only for what they call the ATA_K2 chip: ata_serverworks_ch_attach() 
> will, only in that case, set ch->hw.status = ata_serverworks_status (the 
> interrupt handler doing the magic read) plus set ATA_DMA_BEFORE_CMD plus 
> two other special treatments I don't understand: two ATA_OUTL at the 
> beginning of the block commented as
> 	Set SICR registers to turn off waiting for a status message
> 	before sending FIS. Values obtained from the Darwin driver.
> and setting a ATA_STATUS_IS_LONG flag (whatever that is) commented as
> 	The status register must be read as a long to fill the other
> 	registers.
> 
> Can anyone make sense of that?

I'm not sure about the DMA changes, I'd leave them alone if they don't
do anything bad on your hardware.
K2 is the svwsata variant used in G5 macs - no idea if they exist
anywhere else, but there is really no good reason to assume they don't.
This seems to work around a hardware bug in K2, so we should do the
same and use the 32bit read only on those.

have fun
Michael


Home | Main Index | Thread Index | Old Index