lkml.org 
[lkml]   [2015]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Save SMBIOS Type 9 System Slots during DMI Scan
On Thu, 26 Nov 2015 02:02:52 -0600, Jordan Hargrave wrote:
> On Wed, Nov 25, 2015 at 5:47 AM, Jean Delvare <jdelvare@suse.de> wrote:
> > On Wed, 18 Nov 2015 16:02:14 -0600, Jordan Hargrave wrote:
> > > +static void __init dmi_save_system_slot(const struct dmi_header *dm)
> > > +{
> > > + const char *name;
> > > + const u8 *d = (u8*)dm;
> > > +
> > > + if (dm->type == DMI_ENTRY_SYSTEM_SLOT && dm->length >= 0x11) {
> >
> > The first half of the test will always succeed so it can be omitted.
> > OTOH you do not check the value of d + 0x07 (current usage.) As I
> > understand it, you should only consider slots which are in use, so
> > where *(d + 0x07) == 0x04?
>
> Unfortunately BIOS often get 'usage' wrong. And I'd like to keep all slots
> recorded if user hotplugs PCIe card.

OK, then please add a comment saying so.

I'm curious how the BIOS can assign a device number and function when
there is no card in the slot. I'm also curious how multi-function
cards are handled. I suppose that only the first function has a DMI
record?

--
Jean Delvare
SUSE L3 Support


\
 
 \ /
  Last update: 2015-11-26 10:01    [W:0.574 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site