mcs7830 usb net: "scheduling while atomic" danger?

From: Andreas Mohr
Date: Mon Jan 18 2010 - 13:49:49 EST


drivers/net/usb/mcs7830.c does several:

/* write the MII command */
ret = mcs7830_set_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
if (ret < 0)
goto out;

/* wait for the data to become valid, should be within < 1ms */
for (i = 0; i < 10; i++) {
ret = mcs7830_get_reg(dev, HIF_REG_PHY_CMD1, 2, cmd);
if ((ret < 0) || (cmd[1] &
ret = -EIO;

Forgive me, but doesn't that mutex_lock()/msleep() (ab)use mean
risking a "scheduling while atomic"?
(such as discussed in e.g. )

And, if that is the case, shouldn't all such cases simply be killed for
good via a capable semantic patch?


Andreas Mohr
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at