# [SOLVED]kernel flag for LSI MPT

## huuan

compiling a hardened 2.6.32 kerenl for a box with an LSI MPT SAS

the old kernel setting was this:

 *Quote:*   

> Device Drivers --->
> 
>   Fusion MPT device support  --->
> 
>      <*> Fusion MPT ScsiHost drivers for SAS

 

and the new seems to be this

 *Quote:*   

>  Symbol: SCSI_MPT2SAS_MAX_SGE [=128]                                                                                                             │
> 
>   │ Prompt: LSI MPT Fusion Max number of SG Entries (16 - 128)                                                                                      │
> 
>   │   Defined at drivers/scsi/mpt2sas/Kconfig:50                                                                                                    │
> ...

 

Will the new flag give equivalent results? That is will that setting allow the kernel to find the drives?

I'm a bit hesitant to reboot into the new kernel until I know it can find the drives as UDEV installed won't work with the previous kernel...

Thanks.Last edited by huuan on Wed Jul 28, 2010 4:31 pm; edited 1 time in total

----------

## BradN

I suggest downgrading udev or whatever you need to to make your current kernel work, then try building a new kernel that has the different driver settings.

----------

## huuan

 *BradN wrote:*   

> I suggest downgrading udev or whatever you need to to make your current kernel work, then try building a new kernel that has the different driver settings.

 

Thanks. I already have the new kernel built several times over. 

Here's the rub: hardened jumps a bunch of kernel revs each time for stable, going from hardened 2.6.23 --> 28 --> 32 

UDEV (141) for the 23 kernel will not work with  the 32 kernel and vice versa. Not sure if UDEV (146) for the 28 kernel will work with the 23 kernel but I doubt it. As I recall  

I think though my q is more related to the flag for LSI MPT and that my mentioning UDEV is a red herring in this case. I apologize for the diversion.

Here's the lspci line for the controller:

SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)

I think I may move the server to backup hardware with a different controller that I can test in advance so I can assure some reasonable amount of uptime while I test out the MPT kernel settings just in case it ends up taking a day or two to sort.

----------

## krinn

the real question is why you doubt it's the proper kernel driver ?

Don't expect kernel help to be like that  :Smile: 

 *Quote:*   

> Symbol: SCSI_MPT2SAS_MAX_SGE [=128] │
> 
> │ Prompt: LSI MPT Fusion Max number of SG Entries (16 - 128) │
> 
> │ Defined at drivers/scsi/mpt2sas/Kconfig:50 │
> ...

 

if you're in doubt, try lspci -k this way kernel will tell you the device drivers name you should use and you might compare it with the one show in the help, but in your case, i don't think this check is a real need.

----------

## huuan

 *krinn wrote:*   

> the real question is why you doubt it's the proper kernel driver ?

 

Thanks Krinn.

My hesitancy is that the old setting was not  low level and the names seemed slightly different. 

Then when test driving the new kernel on backup hardware (same cpu but not same sata hardware), the kernel panicled for the drives on boot even though on that system it showed VIA in lspci and I had specified SATA_VIA in make menuconfig. When I rebuilt with almost all versions of sata hardware included it found it ok, but then had issues with checking the root filesystem but the latter is for another thread. Just gave me pause to wonder and ask rather than be sorry later.

 *krinn wrote:*   

> if you're in doubt, try lspci -k this way kernel will tell you the device drivers name you should use and you might compare it with the one show in the help, but in your case, i don't think this check is a real need.

 

Thanks that gives much more information.

----------

## mimosinnet

I have been a while unable to boot into the kernel because I have been been able to find this option. I am very grateful to this thread.

I wander about the "LSI MPT Fusion Max number of SG Entries (16 - 128)". I have looked for information on "scatter-gather", but unable to understand which would be the optimal value for CONFIG_SCSI_MPT2SAS_MAX_SGE.

Let me know if you have any thoughts on this.

Thanks!

----------

## huuan

 *mimosinnet wrote:*   

> 
> 
> I wander about the "LSI MPT Fusion Max number of SG Entries (16 - 128)". I have looked for information on "scatter-gather", but unable to understand which would be the optimal value for CONFIG_SCSI_MPT2SAS_MAX_SGE.
> 
> Let me know if you have any thoughts on this.
> ...

 

I just checked my config and it has this:

```
# zcat /proc/config.gz | grep CONFIG_SCSI_MPT2SAS_MAX_SGE

CONFIG_SCSI_MPT2SAS_MAX_SGE=128

```

No clue what a good value is.

You may want to ask in a separate thread as it may be that only you an I are reading this as it says solved...

----------

## mimosinnet

 *huuan wrote:*   

> No clue what a good value is.
> 
> You may want to ask in a separate thread as it may be that only you an I are reading this as it says solved...

 

Thanks for checking it! I will explore a bit more!

Cheers!

----------

## wcg

"SG Entries" in the documentation is vague. That could mean discrete

sg devices (to talk to different targets on the other end of an scsi

transport; think SAS expanders, etc), or it could mean the maxium

size of some pre-allocated data structure used by the scsi mid-layer

(or both).

Try enabling the maximum value listed there, conpiling and booting it,

saving the output of "lsscsi --generic -lll", then halving that value, recompiling

it, booting it, saving the value of "lsscsi --generic -lll" again, and comparing

the outputs.

What is an "sg device"? It is an scsi-generic way to talk to something

that has a lower-level bus driver, lower-level device interface, etc.

"man lsscsi" and read the "Transports" section.

The sg_map man page:

http://linux.die.net/man/8/sg_map

----------

