/* This function is called by the midlayer and the LLD to alter the queue depth for a scsi device. This function sets the queue depth to the new value and sends an event out to log the queue depth change.  */
int lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
/* This function is called by the midlayer and the LLD to alter the queue depth for a scsi device. This function sets the queue depth to the new value and sends an event out to log the queue depth change.  */
int lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
{
	struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata;
	struct lpfc_hba   *phba = vport->phba;
	struct lpfc_rport_data *rdata;
	unsigned long new_queue_depth, old_queue_depth;
	old_queue_depth = sdev->queue_depth;
	scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
	new_queue_depth = sdev->queue_depth;
	rdata = sdev->hostdata;
	if (rdata)
		lpfc_send_sdev_queuedepth_change_event(phba, vport,
						       rdata->pnode, sdev->lun,
						       old_queue_depth,
						       new_queue_depth);
	return sdev->queue_depth;
}