Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328759
b: refs/heads/master
c: 4b19317
h: refs/heads/master
i:
  328757: e8a8641
  328755: d81a08d
  328751: c13ae69
v: v3
  • Loading branch information
sreekanth.reddy@lsi.com authored and James Bottomley committed Aug 24, 2012
1 parent 4ca4589 commit 6d9ab7f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c79d6267b5dbf98e1b275e3e3b74f3467ba618a
refs/heads/master: 4b193175364ac2c31999f0e571df02a6b9315c8c
21 changes: 20 additions & 1 deletion trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ module_param(diag_buffer_enable, int, 0);
MODULE_PARM_DESC(diag_buffer_enable, " post diag buffers "
"(TRACE=1/SNAPSHOT=2/EXTENDED=4/default=0)");

static int disable_discovery = -1;
module_param(disable_discovery, int, 0);
MODULE_PARM_DESC(disable_discovery, " disable discovery ");

/**
* struct sense_info - common structure for obtaining sense keys
* @skey: sense key
Expand Down Expand Up @@ -5973,8 +5977,14 @@ _scsih_sas_discovery_event(struct MPT2SAS_ADAPTER *ioc,
#endif

if (event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED &&
!ioc->sas_hba.num_phys)
!ioc->sas_hba.num_phys) {
if (disable_discovery > 0 && ioc->shost_recovery) {
/* Wait for the reset to complete */
while (ioc->shost_recovery)
ssleep(1);
}
_scsih_sas_host_add(ioc);
}
}

/**
Expand Down Expand Up @@ -7929,6 +7939,9 @@ _scsih_scan_start(struct Scsi_Host *shost)
if (diag_buffer_enable != -1 && diag_buffer_enable != 0)
mpt2sas_enable_diag_buffer(ioc, diag_buffer_enable);

if (disable_discovery > 0)
return;

ioc->start_scan = 1;
rc = mpt2sas_port_enable(ioc);

Expand All @@ -7950,6 +7963,12 @@ _scsih_scan_finished(struct Scsi_Host *shost, unsigned long time)
{
struct MPT2SAS_ADAPTER *ioc = shost_priv(shost);

if (disable_discovery > 0) {
ioc->is_driver_loading = 0;
ioc->wait_for_discovery_to_complete = 0;
return 1;
}

if (time >= (300 * HZ)) {
ioc->base_cmds.status = MPT2_CMD_NOT_USED;
printk(MPT2SAS_INFO_FMT "port enable: FAILED with timeout "
Expand Down

0 comments on commit 6d9ab7f

Please sign in to comment.