Re: Areca RAID driver remaining items?

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

 



On Iau, 2006-02-23 at 17:50 +0800, erich wrote:
> But unfortunately I found some mainboards will hang up if I always enable 
> this function in my lab.
> To avoid this issue, I do an option for this case.
> 
> But  Christoph Hellwig give me comment with it.


Another thing you can also do for many of these cases is to use either
the PCI or DMI interfaces to identify the problem board and
automatically set the option as well.

There are two ways to do this. One is 

	struct pci_dev *bridge_dev = pci_get_slot(pdev->bus, PCI_DEVFN(0,0));
	if(bridge_dev) {
		if(bridge_dev->subsystem_vendor == 0xXXXX &&
			bridge_dev->subsystem_device == 0xXXXX)
			/* Match by svid/sdid for problem boards */

The other is like this

#include <linux/dmi.h>

struct dmi_system_id problem_dmi_table[] = {
	{
		.ident = "Broken Board Name 1",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "EvilCorp");
			DMI_MATCH(DMI_PRODUCTNAME, "Wombat 1000");
		}
	}
	{
		ditto per board
	},
	{ }	/* End of list mark
};


And then

	if (dmi_system_check(problem_dmi_table))
		disable_msi..


The DMI code matches on the DMI strings in the ROM BIOS (the ones dumped
by 'dmidecode')


An example driver using this interface is drivers/char/sonypi.c which
uses it to make sure it *is* only run on a sony laptop.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux