From: Stephen Hemminger <stephen.hemminger@vyatta.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] sky2: EEPROM read/write bug fixes
Date: Sun, 31 Aug 2008 16:24:04 -0700 [thread overview]
Message-ID: <48BB2814.6020000@vyatta.com> (raw)
In-Reply-To: <20080831203556.GR7908@solarflare.com>
Ben Hutchings wrote:
> Stephen Hemminger wrote:
>
>> On Thu, 28 Aug 2008 08:30:35 -0700
>> Stephen Hemminger <shemminger@linux-foundation.org> wrote:
>>
>>
>>> On Thu, 28 Aug 2008 12:13:25 +0100
>>> Ben Hutchings <bhutchings@solarflare.com> wrote:
>>>
>>>
>>>> Stephen Hemminger wrote:
>>>>
>>>>> Cleanup and harden the routines accessing the EEPROM.
>>>>> 1. Prevent spin forever waiting for the TWSI bus
>>>>> 2. Fix write eeprom to write full words rather than only 16 bits
>>>>> Luckly the vendor doesn't provide EEPROM in Linux format so it must never
>>>>> have been used.
>>>>> 3. Don't allow partial eeprom writes, not needed, not safe.
>>>>>
>>>> [...]
>>>>
>>>> You should be able to replace the VPD access code with calls through
>>>> pci_dev->vpd->ops - though you'd need to remove some declarations from
>>>> drivers/pci/pci.h to include/linux/pci.h.
>>>>
>>>> Ben.
>>>>
>>>>
>>> Generically a good idea, but it won't work for this device.
>>> It turns out that the read/write timeouts in pci/access.c are too
>>> short. Since the pci vpd code spins under spin lock with irq's disabled,
>>> it really can't wait for up to 10ms!
>>>
>> You can show that the pci->vpd code won't work because any access to
>> /sys/class/net/eth0/device/vpd gets ETIMEDOUT.
>>
>
> Then please change the time limit. There is no time limit for VPD in the
> PCI spec so I started with a value that I knew was enough for our devices.
>
> Ben.
>
>
The time limit is part of the generic pci vpd ops reading code. Maybe if
I have time, I'll have sky2 driver
overload the vpd->ops with its own ops, but not sure if it is really
worth it. What besides device/vpd uses
or plans to use vpd ops?
next prev parent reply other threads:[~2008-08-31 23:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 3:46 [PATCH 1/2] sky2: EEPROM read/write bug fixes Stephen Hemminger
2008-08-28 3:48 ` [PATCH 2/2] sky2: display product info on boot Stephen Hemminger
2008-08-28 11:13 ` [PATCH 1/2] sky2: EEPROM read/write bug fixes Ben Hutchings
2008-08-28 15:30 ` Stephen Hemminger
2008-08-30 15:03 ` Stephen Hemminger
2008-08-31 20:35 ` Ben Hutchings
2008-08-31 23:24 ` Stephen Hemminger [this message]
[not found] ` <20080903155316.1a0a5698@extreme>
2008-09-03 22:57 ` [PATCH 2/3] pci: revise VPD access interface Stephen Hemminger
2008-09-03 23:00 ` [PATCH 3/3] sky2: use pci_read_vpd to read info during boot Stephen Hemminger
2008-09-04 7:36 ` Jeff Garzik
2008-09-09 4:36 ` Jesse Barnes
2008-09-03 22:57 ` [PATCH 1/3] pci: VPD access timeout increase Stephen Hemminger
2008-09-04 12:52 ` Matthew Wilcox
2008-09-04 14:19 ` Ben Hutchings
2008-09-04 16:10 ` Matthew Wilcox
2008-09-04 16:32 ` Stephen Hemminger
2008-09-04 16:07 ` [PATCH] Return value from schedule() Matthew Wilcox
2008-09-04 16:14 ` Ingo Molnar
2008-09-04 16:21 ` Matthew Wilcox
2008-09-04 17:30 ` Arjan van de Ven
2008-09-04 17:48 ` Matthew Wilcox
2008-09-04 19:05 ` Stephen Hemminger
2008-09-05 7:40 ` Peter Zijlstra
2008-09-03 14:25 ` [PATCH 1/2] sky2: EEPROM read/write bug fixes Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48BB2814.6020000@vyatta.com \
--to=stephen.hemminger@vyatta.com \
--cc=bhutchings@solarflare.com \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).