netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OK if tg3_get_eeprom_hw_cfg() reads SRAM?
@ 2005-08-18  6:34 Grant Grundler
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Grundler @ 2005-08-18  6:34 UTC (permalink / raw)
  To: davem, mchan; +Cc: netdev, Grant Grundler

Michael,
tg3_get_eeprom_hw_cfg() was added in this patch:
	http://www.kernel.org/git/?p=linux/kernel/git/davem/net-2.6.git;a=commit;h=7d0c41ef89dad9008edf1c3c0022721ebad39999

The comment before tg3_get_eeprom_hw_cfg() suggests tg3 should
ONLY be touching PCI cfg space until the NIC gets to D0 power state.
But tg3_get_eeprom_hw_cfg() is called before tg3_set_power_state(tp,0).

Is it OK for tg3_get_eeprom_hw_cfg() to read NIC_SRAM_DATA_CFG?

thanks,
grant

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: OK if tg3_get_eeprom_hw_cfg() reads SRAM?
@ 2005-08-18  7:40 Michael Chan
  2005-08-18 17:03 ` Grant Grundler
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Chan @ 2005-08-18  7:40 UTC (permalink / raw)
  To: Grant Grundler, davem, mchan; +Cc: netdev

Grant Grundler wrote:

> The comment before tg3_get_eeprom_hw_cfg() suggests tg3
> should ONLY be touching PCI cfg space until the NIC gets
> to D0 power state.

The comment is correct. In D3 power state, the chip will
not respond to MMIO. When I did that patch, I made very
sure that only config. cycles were used before switching
to D0.

> But tg3_get_eeprom_hw_cfg() is called before
> tg3_set_power_state(tp,0).

> Is it OK for tg3_get_eeprom_hw_cfg() to read
> NIC_SRAM_DATA_CFG?

Yes, NIC_SRAM_DATA_CFG is in memory space (as opposed to
register space) and we always use config. cycles to
read/write memory space. Please see tg3_read/write_mem().

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OK if tg3_get_eeprom_hw_cfg() reads SRAM?
  2005-08-18  7:40 OK if tg3_get_eeprom_hw_cfg() reads SRAM? Michael Chan
@ 2005-08-18 17:03 ` Grant Grundler
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Grundler @ 2005-08-18 17:03 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev

On Thu, Aug 18, 2005 at 12:40:42AM -0700, Michael Chan wrote:
> > Is it OK for tg3_get_eeprom_hw_cfg() to read
> > NIC_SRAM_DATA_CFG?
> 
> Yes, NIC_SRAM_DATA_CFG is in memory space (as opposed to
> register space) and we always use config. cycles to
> read/write memory space. Please see tg3_read/write_mem().

doh! of course...I've looked at tg3_read_mem() more than
a few times.

thanks,
grant

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-18 17:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18  7:40 OK if tg3_get_eeprom_hw_cfg() reads SRAM? Michael Chan
2005-08-18 17:03 ` Grant Grundler
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18  6:34 Grant Grundler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).