Commit 0733326d authored by Jens Axboe's avatar Jens Axboe

[PATCH] sym2 get host

Recent scsi host changes broke sym2, it iterates over the scsi host list
itself. This patch changes sym2 to use scsi_host_hn_get() to find a scsi
host from its hostno.
parent 9d617bc7
...@@ -1793,16 +1793,12 @@ static int sym53c8xx_proc_info(char *buffer, char **start, off_t offset, ...@@ -1793,16 +1793,12 @@ static int sym53c8xx_proc_info(char *buffer, char **start, off_t offset,
hcb_p np = 0; hcb_p np = 0;
int retv; int retv;
for (host = first_host; host; host = host->next) { host = scsi_host_hn_get(hostno);
if (host->hostt != first_host->hostt) if (!host)
continue; return -EINVAL;
if (host->host_no == hostno) {
host_data = (struct host_data *) host->hostdata; host_data = (struct host_data *) host->hostdata;
np = host_data->ncb; np = host_data->ncb;
break;
}
}
if (!np) if (!np)
return -EINVAL; return -EINVAL;
...@@ -1823,6 +1819,7 @@ static int sym53c8xx_proc_info(char *buffer, char **start, off_t offset, ...@@ -1823,6 +1819,7 @@ static int sym53c8xx_proc_info(char *buffer, char **start, off_t offset,
#endif #endif
} }
scsi_host_put(host);
return retv; return retv;
} }
#endif /* SYM_LINUX_PROC_INFO_SUPPORT */ #endif /* SYM_LINUX_PROC_INFO_SUPPORT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment