Commit Graph

11 Commits

Author SHA1 Message Date
Labun, Marcin 3c8bfb5ddd probe_roms: allow to probe expansion ROMs using vendor and device id.
Adds data offset to PCI expansion ROM Data Structure in resource
describing Expansion ROMs. This allows AHCI OROM scanning function
to identify AHCI OROM by device id 0x2822 and vendor id 0x8086.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2011-03-10 11:41:46 +11:00
Labun Marcin a8e5382a54 imsm platform: support for Intel(R) SAS controller.
This patch adds platform support for SAS controller(s) built in Intel(R) Patsburg
chipset.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2011-01-26 11:06:55 +10:00
NeilBrown f21e18ca89 Compile with -Wextra by default
This produced lots of warning, some of which pointed to actual bugs.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-08-05 13:13:02 +10:00
Artur Wojcik 5dbb8c8d76 Fix for buffer overflow defect.
Array index of 'path' may be out of bounds. Array
'path' of size 256 may use index value(s) 0..284.

Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-12-10 12:03:40 -07:00
Artur Wojcik 37f0e1e025 Fix for buffer overflow error.
Array index of 'device' may be out of bounds. Array 'device'
of size 40 may use index value(s) 0..43.

Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-12-10 12:03:40 -07:00
Artur Wojcik 5a1920f2c2 Fix for buffer overflow defect in 'link'.
Potential buffer overflow of 'link' caused by user input may occur,
due to non null-terminated string 'link'.

Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-12-10 11:52:23 -07:00
NeilBrown 2a17c77bdb Add a missing 'closedir'.
Thanks to David Binderman for finding and reporting it.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-09-11 16:10:24 +10:00
Dan Williams 969c255511 platform: relax rom scanning alignment for ahci platforms
The PCI-3.0 Firmware specification allows for option-roms to have
512-byte alignment rather than 2048-byte.  As there does not appear to
be a reliable method to detect a PCI-3.0 compliant BIOS from userspace
we allow the imsm platform detection code to presume that a system
modern enough to have an Intel AHCI controller does not have
dangerous/legacy ISA regions in the option-ROM memory space.

An environment variable to disable this behaviour, IMSM_SAFE_OROM_SCAN,
is added in case this presumption is ever proven wrong.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-07-31 17:11:41 -07:00
Dan Williams cceebc67f1 imsm: provide a simulated option-rom for regression tests
IMSM_NO_PLATFORM turns off checks that should be tested, so provide a
IMSM_TEST_OROM variable to allow testing the orom constraints in the
mdadm regression suite.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2009-02-23 14:26:10 -07:00
Dan Williams 25921536da imsm: sysfs support routines for determining device connectivity
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-12-08 16:59:18 -07:00
Dan Williams b390f61061 imsm: detect option-rom capabilities
The option-rom advertises its capabilities in a data structure located in
the platform ROM region 0xc0000-0xf0000.  Attempt to detect the option-rom
and limit array creation to the platform's capabilities.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-12-08 16:59:18 -07:00