Re: [PATCH 0/4] Add VPD support to pciutils (2nd try)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> Any access method that doesn't have a mutex for the VPD should not
> be used by default.  I don't think an option should be needed to
> use the sysfs method.

Yes, but it's kinda hard to satisfy both of these requirements :-)

The question is what should pci_read_vpd() do when we use a non-locking
access method. The obvious behavior is that it should read the VPD as
requested. However, this means that lspci does so as well, which we
do not want.

I see three possibilities:

   a) pci_read_vpd() will be available only with some special
      permissions, let's say a parameter set via pci_set_param().

   b) pci_read_vpd() will work, but lspci will call it only when
      explicitly asked to do so. (However, since lspci is back-end
      agnostic, the option will be needed for sysfs, too.)

   c) pci_read_vpd() will work, but libpci will report (probably
      via the parameter interface) that it's unsafe, so lspci will
      not call it by default.

(c) is certainly possible, but I do not like it too much as it brings
too much complexity into the game -- why should an option be required
on some machines and not on the others?

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@xxxxxx>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
COBOL -- Compiles Only Because Of Luck
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux