Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261711
b: refs/heads/master
c: 4bcde50
h: refs/heads/master
i:
  261709: 57b5eca
  261707: d83bd28
  261703: f7efe98
  261695: 96293f8
v: v3
  • Loading branch information
adam radford authored and James Bottomley committed Jul 27, 2011
1 parent b1d7483 commit af70a55
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db21b6f41bf5a9ce335ced4b5feaa0ad04327003
refs/heads/master: 4bcde509a8fe664f2e688647d8427b6aedaa89b7
16 changes: 16 additions & 0 deletions trunk/drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include "megaraid_sas_fusion.h"
#include "megaraid_sas.h"

Expand Down Expand Up @@ -2057,6 +2058,20 @@ megasas_service_aen(struct megasas_instance *instance, struct megasas_cmd *cmd)
}
}

static int megasas_change_queue_depth(struct scsi_device *sdev,
int queue_depth, int reason)
{
if (reason != SCSI_QDEPTH_DEFAULT)
return -EOPNOTSUPP;

if (queue_depth > sdev->host->can_queue)
queue_depth = sdev->host->can_queue;
scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev),
queue_depth);

return queue_depth;
}

/*
* Scsi host template for megaraid_sas driver
*/
Expand All @@ -2074,6 +2089,7 @@ static struct scsi_host_template megasas_template = {
.eh_timed_out = megasas_reset_timer,
.bios_param = megasas_bios_param,
.use_clustering = ENABLE_CLUSTERING,
.change_queue_depth = megasas_change_queue_depth,
};

/**
Expand Down

0 comments on commit af70a55

Please sign in to comment.