aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-23 07:58:09 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-29 13:03:11 -0400
commit32e0eb569df09a8cb790cf370ee498721d88e5c6 (patch)
tree719dcb9b7f3f2131217889ba038f6a7a669423ad /drivers/scsi/mpt2sas/mpt2sas_base.c
parentcef7a12cd1e0647ce2b566a76bbf4cd132b9118d (diff)
[SCSI] mpt2sas: Added command line option diag_buffer_enable.
Added command line option diag_buffer_enable. When the command line option is set, the driver will automatically post diag buffers at driver load time. The command line option diag_buffer_enable is bitwise, so it's possible to enable both and/or snapshot + trace buffers. For trace, the driver will allocate 1MB buffer, whereas for snapshot its 2MB. The purpose for this is so the enduser doesn't have to manually use an application to setup diag buffers for debugging firmware related issues. Here is some examples trace: # insmod mpt2sas.ko diag_buffer_enable=1 snapshot: # insmod mpt2sas.ko diag_buffer_enable=2 both trace and snapshot: # insmod mpt2sas.ko diag_buffer_enable=3 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index ec3f57732e97..1d2374b5a0a1 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -77,6 +77,17 @@ static int msix_disable = -1;
77module_param(msix_disable, int, 0); 77module_param(msix_disable, int, 0);
78MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)"); 78MODULE_PARM_DESC(msix_disable, " disable msix routed interrupts (default=0)");
79 79
80/* diag_buffer_enable is bitwise
81 * bit 0 set = MPI2_DIAG_BUF_TYPE_TRACE(1)
82 * bit 1 set = MPI2_DIAG_BUF_TYPE_SNAPSHOT(2)
83 *
84 * Either bit can be set, or both
85 */
86static int diag_buffer_enable;
87module_param(diag_buffer_enable, int, 0);
88MODULE_PARM_DESC(diag_buffer_enable, " enable diag buffer at driver load "
89 "time (TRACE=1/SNAP=2/default=0)");
90
80int mpt2sas_fwfault_debug; 91int mpt2sas_fwfault_debug;
81MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault " 92MODULE_PARM_DESC(mpt2sas_fwfault_debug, " enable detection of firmware fault "
82 "and halt firmware - (default=0)"); 93 "and halt firmware - (default=0)");
@@ -3588,6 +3599,8 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
3588 goto out_free_resources; 3599 goto out_free_resources;
3589 3600
3590 mpt2sas_base_start_watchdog(ioc); 3601 mpt2sas_base_start_watchdog(ioc);
3602 if (diag_buffer_enable != 0)
3603 mpt2sas_enable_diag_buffer(ioc, diag_buffer_enable);
3591 return 0; 3604 return 0;
3592 3605
3593 out_free_resources: 3606 out_free_resources: