Re: [PATCH part1 v5 3/7] PCI: Add support for Device Serial Number capability

2014-02-10 Thread Yijing Wang
On 2014/2/10 18:21, Oliver Neukum wrote: > > On Mon, 2014-02-10 at 12:04 +0800, Yijing Wang wrote: >> +static u64 pci_device_serial_number(struct pci_bus *bus, int devfn) >> +{ >> + int pos; >> + u32 lo, hi; >> + >> + if (!pci_bus_find_capability(bus, devfn, PCI_CAP_ID_EXP)) >> +

Re: [PATCH part1 v5 3/7] PCI: Add support for Device Serial Number capability

2014-02-10 Thread Oliver Neukum
On Mon, 2014-02-10 at 12:04 +0800, Yijing Wang wrote: > +static u64 pci_device_serial_number(struct pci_bus *bus, int devfn) > +{ > + int pos; > + u32 lo, hi; > + > + if (!pci_bus_find_capability(bus, devfn, PCI_CAP_ID_EXP)) > + return 0; > + > + pos = pci_bus

[PATCH part1 v5 3/7] PCI: Add support for Device Serial Number capability

2014-02-09 Thread Yijing Wang
Add support for the Device Serial Number capability, so we can use the unique device serial number to identify the physical device. This helps determine whether a device was replaced while the system was suspended. [bhelgaas: changelog, drop pci_dsn_init(), spell out "serial_number"] Reviewed-by: