ichsmb SMP safe [in 4.7]?

Don Bowman don at sandvine.com
Wed Apr 9 16:45:12 PDT 2003


is the ichsmb driver SMP safe in 4.7?

I have a supermicro x5DPR-8g2+ motherboard with 2 2.8GHz XEON.
If I compile a non-SMP kernel for it, it works well on
accessing the SMB to get the Xeon temperature.

If I compile an SMP kernel for it, I get one of two things:
messages like 'ichsmb0: device timeout, status=0x42',
or else the system locks up.

It really comes down to the ichsmb_wait function i think.
I do a 'readb'. This does:
splhigh()
 ...
bus_space_write(...)
ichsmb_wait(...)
splx()

static int
ichsmb_wait(sc_p sc)
{
 ...
sleep:
        error = tsleep(sc, PZERO | PCATCH, "ichsmb", hz / 3);
        switch (error) {
        case ERESTART:
                if (sc->ich_cmd != -1)
                        goto sleep;
                /* FALLTHROUGH */
        case 0:
                smb_error = sc->smb_error;
                break;
        case EWOULDBLOCK:
 ...
                smb_error = SMB_ETIMEOUT;
                break;
        default:
                smb_error = SMB_EABORT;
                break;
        }
        return (smb_error);
} 

All I can see for the hang would be the ERESTART happening?
I'm going to put a timeout in there to see what it does
for me, but am otherwise not sure why the behaviour of
SMP versus non SMP would be different for this driver?

--don


More information about the freebsd-smp mailing list