/*****************************************************/
static int rsltq_wait_usecs = 4000; /* Default 4ms */
-static unsigned int MaxBuffLen;
+static unsigned int max_buff_len;
/* Module options */
static char *virthba_options = "NONE";
#define VIRTHBASOPENMAX 1
/* array of open devices maintained by open() and close(); */
-static struct virthba_devices_open VirtHbasOpen[VIRTHBASOPENMAX];
+static struct virthba_devices_open virthbas_open[VIRTHBASOPENMAX];
static struct dentry *virthba_debugfs_dir;
/*****************************************************/
virthbainfo = (struct virthba_info *)scsihost->hostdata;
memset(virthbainfo, 0, sizeof(struct virthba_info));
for (i = 0; i < VIRTHBASOPENMAX; i++) {
- if (VirtHbasOpen[i].virthbainfo == NULL) {
- VirtHbasOpen[i].virthbainfo = virthbainfo;
+ if (virthbas_open[i].virthbainfo == NULL) {
+ virthbas_open[i].virthbainfo = virthbainfo;
break;
}
}
cmdrsp->scsi.bufflen = scsi_bufflen(scsicmd);
/* keep track of the max buffer length so far. */
- if (cmdrsp->scsi.bufflen > MaxBuffLen)
- MaxBuffLen = cmdrsp->scsi.bufflen;
+ if (cmdrsp->scsi.bufflen > max_buff_len)
+ max_buff_len = cmdrsp->scsi.bufflen;
if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
LOGERR("scsicmd use_sg:%d greater than MAX:%d\n",
return -ENOMEM;
for (i = 0; i < VIRTHBASOPENMAX; i++) {
- if (VirtHbasOpen[i].virthbainfo == NULL)
+ if (virthbas_open[i].virthbainfo == NULL)
continue;
- virthbainfo = VirtHbasOpen[i].virthbainfo;
+ virthbainfo = virthbas_open[i].virthbainfo;
str_pos += scnprintf(vbuf + str_pos,
- len - str_pos, "MaxBuffLen:%u\n", MaxBuffLen);
+ len - str_pos, "max_buff_len:%u\n",
+ max_buff_len);
str_pos += scnprintf(vbuf + str_pos, len - str_pos,
"\nvirthba result queue poll wait:%d usecs.\n",
/* set all counts to new_value usually 0 */
for (i = 0; i < VIRTHBASOPENMAX; i++) {
- if (VirtHbasOpen[i].virthbainfo != NULL) {
- virthbainfo = VirtHbasOpen[i].virthbainfo;
+ if (virthbas_open[i].virthbainfo != NULL) {
+ virthbainfo = virthbas_open[i].virthbainfo;
Features_addr =
&virthbainfo->chinfo.queueinfo->chan->features;
if (new_value == 1) {
/* clear out array */
for (i = 0; i < VIRTHBASOPENMAX; i++)
- VirtHbasOpen[i].virthbainfo = NULL;
+ virthbas_open[i].virthbainfo = NULL;
/* Initialize the serverdown workqueue */
virthba_serverdown_workqueue =
create_singlethread_workqueue("virthba_serverdown");