Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359478
b: refs/heads/master
c: 5b1c1bf
h: refs/heads/master
v: v3
  • Loading branch information
Karen Higgins authored and James Bottomley committed Jan 30, 2013
1 parent 46ca29c commit 33026d4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 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: ff4108dce9e82acbde8e8b1899aaa4d91bf504b7
refs/heads/master: 5b1c1bff07d579f8a7b672d4e5262d52eba5ef01
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
#define RESPONSE_QUEUE_DEPTH 64
#define QUEUE_SIZE 64
#define DMA_BUFFER_SIZE 512
#define IOCB_HIWAT_CUSHION 4

/*
* Misc
Expand Down Expand Up @@ -540,6 +541,7 @@ struct scsi_qla_host {
uint32_t tot_ddbs;

uint16_t iocb_cnt;
uint16_t iocb_hiwat;

/* SRB cache. */
#define SRB_MIN_REQ 128
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/qla4xxx/ql4_iocb.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
goto queuing_error;

/* total iocbs active */
if ((ha->iocb_cnt + req_cnt) >= REQUEST_QUEUE_DEPTH)
if ((ha->iocb_cnt + req_cnt) >= ha->iocb_hiwat)
goto queuing_error;

/* Build command packet */
Expand Down
20 changes: 18 additions & 2 deletions trunk/drivers/scsi/qla4xxx/ql4_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,24 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha)
return QLA_ERROR;
}

ql4_printk(KERN_INFO, ha, "%ld firmware IOCBs available (%d).\n",
ha->host_no, mbox_sts[2]);
/* High-water mark of IOCBs */
ha->iocb_hiwat = mbox_sts[2];
DEBUG2(ql4_printk(KERN_INFO, ha,
"%s: firmware IOCBs available = %d\n", __func__,
ha->iocb_hiwat));

if (ha->iocb_hiwat > IOCB_HIWAT_CUSHION)
ha->iocb_hiwat -= IOCB_HIWAT_CUSHION;

/* Ideally, we should not enter this code, as the # of firmware
* IOCBs is hard-coded in the firmware. We set a default
* iocb_hiwat here just in case */
if (ha->iocb_hiwat == 0) {
ha->iocb_hiwat = REQUEST_QUEUE_DEPTH / 4;
DEBUG2(ql4_printk(KERN_WARNING, ha,
"%s: Setting IOCB's to = %d\n", __func__,
ha->iocb_hiwat));
}

return QLA_SUCCESS;
}
Expand Down

0 comments on commit 33026d4

Please sign in to comment.