Jeff: E1000_osdep.h has a macro msec_delay that does exactly what you've mentioned below (check for the correct context and call msleep). Did you mean that you did not want drivers to have their own msec_delay() macros?
Ganesh. >-----Original Message----- >From: Chilakala, Mallikarjuna >Sent: Thursday, August 25, 2005 1:33 PM >To: Venkatesan, Ganesh; Ronciak, John; Brandeburg, Jesse >Subject: FW: PATCH net-drivers-2.6 1/8] e1000: Support for 82571 and 82572 >controllers > > > >-----Original Message----- >From: Jeff Garzik [mailto:[EMAIL PROTECTED] >Sent: Thursday, August 25, 2005 1:31 PM >To: Chilakala, Mallikarjuna >Cc: netdev >Subject: Re: PATCH net-drivers-2.6 1/8] e1000: Support for 82571 and 82572 >controllers > >Malli Chilakala wrote: >> - /* Simply wait for 10ms */ >> - msec_delay(10); >> + switch (hw->mac_type) { >> + default: >> + msec_delay(10); >> + break; >> + case e1000_82571: >> + case e1000_82572: >> + while (timeout) { >> + if (E1000_READ_REG(hw, EEMNGCTL) & cfg_mask) >> + break; >> + else >> + msec_delay(1); >> + timeout--; >> + } >> + >> + if (!timeout) { >> + DEBUGOUT("MNG configuration cycle has not completed.\n"); >> + return -E1000_ERR_RESET; >> + } >> + break; >> + } > > >Don't add new calls to msec_delay(), we want to get rid of those. > >Directly use msleep() (after making sure you're in kernel thread >context, of course). > >Otherwise OK. > > Jeff > - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html