Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2003 19:45:10 -0400 
From:      Don Bowman <don@sandvine.com>
To:        "'freebsd-smp@freebsd.org'" <freebsd-smp@freebsd.org>, Don Bowman <don@sandvine.com>
Subject:   ichsmb SMP safe [in 4.7]?
Message-ID:  <FE045D4D9F7AED4CBFF1B3B813C8533701B36190@mail.sandvine.com>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE045D4D9F7AED4CBFF1B3B813C8533701B36190>