Re: [PATCH 1/2] sky2: EEPROM read/write bug fixes
From: Stephen Hemminger <hidden>
Date: 2008-08-28 15:31:33
On Thu, 28 Aug 2008 12:13:25 +0100 Ben Hutchings [off-list ref] wrote:
Stephen Hemminger wrote:quoted
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! Minor note: the pci code seems to be much more verbose with little gain in real functionality.