aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth_proc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-02 16:59:53 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:55:42 -0400
commit52759e6abc88fe007a080772ee01ef1154f96f30 (patch)
tree54d780f27ad1c522d0ceb0e4f300a1090d77feca /drivers/scsi/gdth_proc.c
parent69916b7ceac0dfbbc868ae5451062cb789b1b58a (diff)
[SCSI] gdth: Remove virt hosts
The virt_ctr option allows to register a new scsi_host for each bus on the raid controller. This non-default option makes no sense with the current scsi code and prevents cleaning up the host registration, so remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/gdth_proc.c')
-rw-r--r--drivers/scsi/gdth_proc.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
index cece6f2bdc2e..b060bd6ffe17 100644
--- a/drivers/scsi/gdth_proc.c
+++ b/drivers/scsi/gdth_proc.c
@@ -7,26 +7,25 @@
7int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length, 7int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length,
8 int inout) 8 int inout)
9{ 9{
10 int hanum,busnum; 10 int hanum;
11 11
12 TRACE2(("gdth_proc_info() length %d offs %d inout %d\n", 12 TRACE2(("gdth_proc_info() length %d offs %d inout %d\n",
13 length,(int)offset,inout)); 13 length,(int)offset,inout));
14 14
15 hanum = NUMDATA(host)->hanum; 15 hanum = NUMDATA(host)->hanum;
16 busnum= NUMDATA(host)->busnum;
17 16
18 if (inout) 17 if (inout)
19 return(gdth_set_info(buffer,length,host,hanum,busnum)); 18 return(gdth_set_info(buffer,length,host,hanum));
20 else 19 else
21 return(gdth_get_info(buffer,start,offset,length,host,hanum,busnum)); 20 return(gdth_get_info(buffer,start,offset,length,host,hanum));
22} 21}
23 22
24static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host, 23static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host,
25 int hanum,int busnum) 24 int hanum)
26{ 25{
27 int ret_val = -EINVAL; 26 int ret_val = -EINVAL;
28 27
29 TRACE2(("gdth_set_info() ha %d bus %d\n",hanum,busnum)); 28 TRACE2(("gdth_set_info() ha %d\n",hanum,));
30 29
31 if (length >= 4) { 30 if (length >= 4) {
32 if (strncmp(buffer,"gdth",4) == 0) { 31 if (strncmp(buffer,"gdth",4) == 0) {
@@ -154,7 +153,7 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer,
154} 153}
155 154
156static int gdth_get_info(char *buffer,char **start,off_t offset,int length, 155static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
157 struct Scsi_Host *host,int hanum,int busnum) 156 struct Scsi_Host *host,int hanum)
158{ 157{
159 int size = 0,len = 0; 158 int size = 0,len = 0;
160 off_t begin = 0,pos = 0; 159 off_t begin = 0,pos = 0;
@@ -187,7 +186,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
187 memset(cmnd, 0xff, 12); 186 memset(cmnd, 0xff, 12);
188 memset(gdtcmd, 0, sizeof(gdth_cmd_str)); 187 memset(gdtcmd, 0, sizeof(gdth_cmd_str));
189 188
190 TRACE2(("gdth_get_info() ha %d bus %d\n",hanum,busnum)); 189 TRACE2(("gdth_get_info() ha %d\n",hanum));
191 ha = HADATA(gdth_ctr_tab[hanum]); 190 ha = HADATA(gdth_ctr_tab[hanum]);
192 191
193 192
@@ -218,10 +217,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
218 /* controller information */ 217 /* controller information */
219 size = sprintf(buffer+len,"\nDisk Array Controller Information:\n"); 218 size = sprintf(buffer+len,"\nDisk Array Controller Information:\n");
220 len += size; pos = begin + len; 219 len += size; pos = begin + len;
221 if (virt_ctr) 220 strcpy(hrec, ha->binfo.type_string);
222 sprintf(hrec, "%s (Bus %d)", ha->binfo.type_string, busnum);
223 else
224 strcpy(hrec, ha->binfo.type_string);
225 size = sprintf(buffer+len, 221 size = sprintf(buffer+len,
226 " Number: \t%d \tName: \t%s\n", 222 " Number: \t%d \tName: \t%s\n",
227 hanum, hrec); 223 hanum, hrec);
@@ -753,7 +749,7 @@ static void gdth_wait_completion(int hanum, int busnum, int id)
753 for (i = 0; i < GDTH_MAXCMDS; ++i) { 749 for (i = 0; i < GDTH_MAXCMDS; ++i) {
754 scp = ha->cmd_tab[i].cmnd; 750 scp = ha->cmd_tab[i].cmnd;
755 751
756 b = virt_ctr ? NUMDATA(scp->device->host)->busnum : scp->device->channel; 752 b = scp->device->channel;
757 t = scp->device->id; 753 t = scp->device->id;
758 if (!SPECIAL_SCP(scp) && t == (unchar)id && 754 if (!SPECIAL_SCP(scp) && t == (unchar)id &&
759 b == (unchar)busnum) { 755 b == (unchar)busnum) {
@@ -779,8 +775,7 @@ static void gdth_stop_timeout(int hanum, int busnum, int id)
779 775
780 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { 776 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
781 if (!IS_GDTH_INTERNAL_CMD(scp)) { 777 if (!IS_GDTH_INTERNAL_CMD(scp)) {
782 b = virt_ctr ? 778 b = scp->device->channel;
783 NUMDATA(scp->device->host)->busnum : scp->device->channel;
784 t = scp->device->id; 779 t = scp->device->id;
785 if (t == (unchar)id && b == (unchar)busnum) { 780 if (t == (unchar)id && b == (unchar)busnum) {
786 TRACE2(("gdth_stop_timeout(): update_timeout()\n")); 781 TRACE2(("gdth_stop_timeout(): update_timeout()\n"));
@@ -803,8 +798,7 @@ static void gdth_start_timeout(int hanum, int busnum, int id)
803 798
804 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { 799 for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) {
805 if (!IS_GDTH_INTERNAL_CMD(scp)) { 800 if (!IS_GDTH_INTERNAL_CMD(scp)) {
806 b = virt_ctr ? 801 b = scp->device->channel;
807 NUMDATA(scp->device->host)->busnum : scp->device->channel;
808 t = scp->device->id; 802 t = scp->device->id;
809 if (t == (unchar)id && b == (unchar)busnum) { 803 if (t == (unchar)id && b == (unchar)busnum) {
810 TRACE2(("gdth_start_timeout(): update_timeout()\n")); 804 TRACE2(("gdth_start_timeout(): update_timeout()\n"));