aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2014-11-12 00:11:57 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-20 03:11:07 -0500
commit270ac2c290ad8b83c92ceeed07aaf49ec5807851 (patch)
tree0dabf1e56da98f3cf1432620702631c6e997309a
parent22f5f10d2dadc50bf26a482b782a5e04f6e9b362 (diff)
ncr5380: Remove NCR5380_STATS
The NCR5380_STATS option is only enabled by g_NCR5380 yet it adds clutter to all three core drivers. The atari_NCR5380.c and sun3_NCR5380.c core drivers have a slightly different implementation of the NCR5380_STATS option. Out of all ten NCR5380 drivers, only one of them (g_NCR5380) actually has the code to report on the collected stats. Aside from being unreadable, that code seems to be broken because there's no initialization of timebase. sun3_NCR5380.c and atari_NCR5380.c have the timebase initialization but lack the code to report the stats. Remove all of this code to improve readability and reduce divergence between the three core drivers. This patch and the next one completely eliminate the PRINTP and ANDP pre-processor abuse. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/NCR5380.c64
-rw-r--r--drivers/scsi/NCR5380.h9
-rw-r--r--drivers/scsi/atari_NCR5380.c65
-rw-r--r--drivers/scsi/g_NCR5380.c45
-rw-r--r--drivers/scsi/sun3_NCR5380.c69
5 files changed, 0 insertions, 252 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index c4b80219868d..2bb4df0e5551 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -833,18 +833,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
833 833
834 INIT_DELAYED_WORK(&hostdata->coroutine, NCR5380_main); 834 INIT_DELAYED_WORK(&hostdata->coroutine, NCR5380_main);
835 835
836#ifdef NCR5380_STATS
837 for (i = 0; i < 8; ++i) {
838 hostdata->time_read[i] = 0;
839 hostdata->time_write[i] = 0;
840 hostdata->bytes_read[i] = 0;
841 hostdata->bytes_write[i] = 0;
842 }
843 hostdata->timebase = 0;
844 hostdata->pendingw = 0;
845 hostdata->pendingr = 0;
846#endif
847
848 /* The CHECK code seems to break the 53C400. Will check it later maybe */ 836 /* The CHECK code seems to break the 53C400. Will check it later maybe */
849 if (flags & FLAG_NCR53C400) 837 if (flags & FLAG_NCR53C400)
850 hostdata->flags = FLAG_HAS_LAST_BYTE_SENT | flags; 838 hostdata->flags = FLAG_HAS_LAST_BYTE_SENT | flags;
@@ -943,25 +931,6 @@ static int NCR5380_queue_command_lck(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)
943 } 931 }
944#endif /* (NDEBUG & NDEBUG_NO_WRITE) */ 932#endif /* (NDEBUG & NDEBUG_NO_WRITE) */
945 933
946#ifdef NCR5380_STATS
947 switch (cmd->cmnd[0]) {
948 case WRITE:
949 case WRITE_6:
950 case WRITE_10:
951 hostdata->time_write[cmd->device->id] -= (jiffies - hostdata->timebase);
952 hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);
953 hostdata->pendingw++;
954 break;
955 case READ:
956 case READ_6:
957 case READ_10:
958 hostdata->time_read[cmd->device->id] -= (jiffies - hostdata->timebase);
959 hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);
960 hostdata->pendingr++;
961 break;
962 }
963#endif
964
965 /* 934 /*
966 * We use the host_scribble field as a pointer to the next command 935 * We use the host_scribble field as a pointer to the next command
967 * in a queue 936 * in a queue
@@ -1207,35 +1176,6 @@ static irqreturn_t NCR5380_intr(int dummy, void *dev_id)
1207 1176
1208#endif 1177#endif
1209 1178
1210/**
1211 * collect_stats - collect stats on a scsi command
1212 * @hostdata: adapter
1213 * @cmd: command being issued
1214 *
1215 * Update the statistical data by parsing the command in question
1216 */
1217
1218static void collect_stats(struct NCR5380_hostdata *hostdata, Scsi_Cmnd * cmd)
1219{
1220#ifdef NCR5380_STATS
1221 switch (cmd->cmnd[0]) {
1222 case WRITE:
1223 case WRITE_6:
1224 case WRITE_10:
1225 hostdata->time_write[scmd_id(cmd)] += (jiffies - hostdata->timebase);
1226 hostdata->pendingw--;
1227 break;
1228 case READ:
1229 case READ_6:
1230 case READ_10:
1231 hostdata->time_read[scmd_id(cmd)] += (jiffies - hostdata->timebase);
1232 hostdata->pendingr--;
1233 break;
1234 }
1235#endif
1236}
1237
1238
1239/* 1179/*
1240 * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd) 1180 * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd)
1241 * 1181 *
@@ -1464,7 +1404,6 @@ part2:
1464 return -1; 1404 return -1;
1465 } 1405 }
1466 cmd->result = DID_BAD_TARGET << 16; 1406 cmd->result = DID_BAD_TARGET << 16;
1467 collect_stats(hostdata, cmd);
1468 cmd->scsi_done(cmd); 1407 cmd->scsi_done(cmd);
1469 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); 1408 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
1470 dprintk(NDEBUG_SELECTION, "scsi%d : target did not respond within 250ms\n", instance->host_no); 1409 dprintk(NDEBUG_SELECTION, "scsi%d : target did not respond within 250ms\n", instance->host_no);
@@ -2216,7 +2155,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
2216 cmd->next_link->tag = cmd->tag; 2155 cmd->next_link->tag = cmd->tag;
2217 cmd->result = cmd->SCp.Status | (cmd->SCp.Message << 8); 2156 cmd->result = cmd->SCp.Status | (cmd->SCp.Message << 8);
2218 dprintk(NDEBUG_LINKED, "scsi%d : target %d lun %llu linked request done, calling scsi_done().\n", instance->host_no, cmd->device->id, cmd->device->lun); 2157 dprintk(NDEBUG_LINKED, "scsi%d : target %d lun %llu linked request done, calling scsi_done().\n", instance->host_no, cmd->device->id, cmd->device->lun);
2219 collect_stats(hostdata, cmd);
2220 cmd->scsi_done(cmd); 2158 cmd->scsi_done(cmd);
2221 cmd = hostdata->connected; 2159 cmd = hostdata->connected;
2222 break; 2160 break;
@@ -2268,7 +2206,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
2268 hostdata->issue_queue = (Scsi_Cmnd *) cmd; 2206 hostdata->issue_queue = (Scsi_Cmnd *) cmd;
2269 dprintk(NDEBUG_QUEUES, "scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no); 2207 dprintk(NDEBUG_QUEUES, "scsi%d : REQUEST SENSE added to head of issue queue\n", instance->host_no);
2270 } else { 2208 } else {
2271 collect_stats(hostdata, cmd);
2272 cmd->scsi_done(cmd); 2209 cmd->scsi_done(cmd);
2273 } 2210 }
2274 2211
@@ -2415,7 +2352,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
2415 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xFF)); 2352 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xFF));
2416 hostdata->connected = NULL; 2353 hostdata->connected = NULL;
2417 cmd->result = DID_ERROR << 16; 2354 cmd->result = DID_ERROR << 16;
2418 collect_stats(hostdata, cmd);
2419 cmd->scsi_done(cmd); 2355 cmd->scsi_done(cmd);
2420 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); 2356 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2421 return; 2357 return;
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index 4b0c628952ee..d811775ffd9d 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -272,15 +272,6 @@ struct NCR5380_hostdata {
272 int select_time; /* timer in select for target response */ 272 int select_time; /* timer in select for target response */
273 volatile Scsi_Cmnd *selecting; 273 volatile Scsi_Cmnd *selecting;
274 struct delayed_work coroutine; /* our co-routine */ 274 struct delayed_work coroutine; /* our co-routine */
275#ifdef NCR5380_STATS
276 unsigned timebase; /* Base for time calcs */
277 long time_read[8]; /* time to do reads */
278 long time_write[8]; /* time to do writes */
279 unsigned long bytes_read[8]; /* bytes read */
280 unsigned long bytes_write[8]; /* bytes written */
281 unsigned pendingr;
282 unsigned pendingw;
283#endif
284 struct scsi_eh_save ses; 275 struct scsi_eh_save ses;
285}; 276};
286 277
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index f69d36327a7d..6177830ef0d9 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -888,34 +888,6 @@ static int NCR5380_queue_command_lck(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
888 } 888 }
889#endif /* (NDEBUG & NDEBUG_NO_WRITE) */ 889#endif /* (NDEBUG & NDEBUG_NO_WRITE) */
890 890
891#ifdef NCR5380_STATS
892# if 0
893 if (!hostdata->connected && !hostdata->issue_queue &&
894 !hostdata->disconnected_queue) {
895 hostdata->timebase = jiffies;
896 }
897# endif
898# ifdef NCR5380_STAT_LIMIT
899 if (scsi_bufflen(cmd) > NCR5380_STAT_LIMIT)
900# endif
901 switch (cmd->cmnd[0]) {
902 case WRITE:
903 case WRITE_6:
904 case WRITE_10:
905 hostdata->time_write[cmd->device->id] -= (jiffies - hostdata->timebase);
906 hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);
907 hostdata->pendingw++;
908 break;
909 case READ:
910 case READ_6:
911 case READ_10:
912 hostdata->time_read[cmd->device->id] -= (jiffies - hostdata->timebase);
913 hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);
914 hostdata->pendingr++;
915 break;
916 }
917#endif
918
919 /* 891 /*
920 * We use the host_scribble field as a pointer to the next command 892 * We use the host_scribble field as a pointer to the next command
921 * in a queue 893 * in a queue
@@ -1309,31 +1281,6 @@ static irqreturn_t NCR5380_intr(int irq, void *dev_id)
1309 return IRQ_RETVAL(handled); 1281 return IRQ_RETVAL(handled);
1310} 1282}
1311 1283
1312#ifdef NCR5380_STATS
1313static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd)
1314{
1315# ifdef NCR5380_STAT_LIMIT
1316 if (scsi_bufflen(cmd) > NCR5380_STAT_LIMIT)
1317# endif
1318 switch (cmd->cmnd[0]) {
1319 case WRITE:
1320 case WRITE_6:
1321 case WRITE_10:
1322 hostdata->time_write[cmd->device->id] += (jiffies - hostdata->timebase);
1323 /*hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);*/
1324 hostdata->pendingw--;
1325 break;
1326 case READ:
1327 case READ_6:
1328 case READ_10:
1329 hostdata->time_read[cmd->device->id] += (jiffies - hostdata->timebase);
1330 /*hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);*/
1331 hostdata->pendingr--;
1332 break;
1333 }
1334}
1335#endif
1336
1337/* 1284/*
1338 * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd) 1285 * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd)
1339 * 1286 *
@@ -1598,9 +1545,6 @@ static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd)
1598 return -1; 1545 return -1;
1599 } 1546 }
1600 cmd->result = DID_BAD_TARGET << 16; 1547 cmd->result = DID_BAD_TARGET << 16;
1601#ifdef NCR5380_STATS
1602 collect_stats(hostdata, cmd);
1603#endif
1604#ifdef SUPPORT_TAGS 1548#ifdef SUPPORT_TAGS
1605 cmd_free_tag(cmd); 1549 cmd_free_tag(cmd);
1606#endif 1550#endif
@@ -2127,9 +2071,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
2127 dprintk(NDEBUG_LINKED, "scsi%d: target %d lun %llu linked request " 2071 dprintk(NDEBUG_LINKED, "scsi%d: target %d lun %llu linked request "
2128 "done, calling scsi_done().\n", 2072 "done, calling scsi_done().\n",
2129 HOSTNO, cmd->device->id, cmd->device->lun); 2073 HOSTNO, cmd->device->id, cmd->device->lun);
2130#ifdef NCR5380_STATS
2131 collect_stats(hostdata, cmd);
2132#endif
2133 cmd->scsi_done(cmd); 2074 cmd->scsi_done(cmd);
2134 cmd = hostdata->connected; 2075 cmd = hostdata->connected;
2135 break; 2076 break;
@@ -2209,9 +2150,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
2209 dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of " 2150 dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of "
2210 "issue queue\n", H_NO(cmd)); 2151 "issue queue\n", H_NO(cmd));
2211 } else { 2152 } else {
2212#ifdef NCR5380_STATS
2213 collect_stats(hostdata, cmd);
2214#endif
2215 cmd->scsi_done(cmd); 2153 cmd->scsi_done(cmd);
2216 } 2154 }
2217 2155
@@ -2396,9 +2334,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
2396#endif 2334#endif
2397 hostdata->connected = NULL; 2335 hostdata->connected = NULL;
2398 cmd->result = DID_ERROR << 16; 2336 cmd->result = DID_ERROR << 16;
2399#ifdef NCR5380_STATS
2400 collect_stats(hostdata, cmd);
2401#endif
2402 cmd->scsi_done(cmd); 2337 cmd->scsi_done(cmd);
2403 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); 2338 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2404 falcon_release_lock_if_possible(hostdata); 2339 falcon_release_lock_if_possible(hostdata);
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index a2b70fb4c67f..9040023ed1c0 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -69,8 +69,6 @@
69#define NCR53C400_PSEUDO_DMA 1 69#define NCR53C400_PSEUDO_DMA 1
70#define PSEUDO_DMA 70#define PSEUDO_DMA
71#define NCR53C400 71#define NCR53C400
72#define NCR5380_STATS
73#undef NCR5380_STAT_LIMIT
74#endif 72#endif
75 73
76#include <asm/io.h> 74#include <asm/io.h>
@@ -779,9 +777,6 @@ static int generic_NCR5380_show_info(struct seq_file *m, struct Scsi_Host *scsi_
779 int i; 777 int i;
780 Scsi_Cmnd *ptr; 778 Scsi_Cmnd *ptr;
781 struct NCR5380_hostdata *hostdata; 779 struct NCR5380_hostdata *hostdata;
782#ifdef NCR5380_STATS
783 struct scsi_device *dev;
784#endif
785 780
786 NCR5380_setup(scsi_ptr); 781 NCR5380_setup(scsi_ptr);
787 hostdata = (struct NCR5380_hostdata *) scsi_ptr->hostdata; 782 hostdata = (struct NCR5380_hostdata *) scsi_ptr->hostdata;
@@ -805,46 +800,6 @@ static int generic_NCR5380_show_info(struct seq_file *m, struct Scsi_Host *scsi_
805 else 800 else
806 PRINTP("on interrupt %d\n" ANDP scsi_ptr->irq); 801 PRINTP("on interrupt %d\n" ANDP scsi_ptr->irq);
807 802
808#ifdef NCR5380_STATS
809 if (hostdata->connected || hostdata->issue_queue || hostdata->disconnected_queue)
810 PRINTP("There are commands pending, transfer rates may be crud\n");
811 if (hostdata->pendingr)
812 PRINTP(" %d pending reads" ANDP hostdata->pendingr);
813 if (hostdata->pendingw)
814 PRINTP(" %d pending writes" ANDP hostdata->pendingw);
815 if (hostdata->pendingr || hostdata->pendingw)
816 PRINTP("\n");
817 shost_for_each_device(dev, scsi_ptr) {
818 unsigned long br = hostdata->bytes_read[dev->id];
819 unsigned long bw = hostdata->bytes_write[dev->id];
820 long tr = hostdata->time_read[dev->id] / HZ;
821 long tw = hostdata->time_write[dev->id] / HZ;
822
823 PRINTP(" T:%d %s " ANDP dev->id ANDP scsi_device_type(dev->type));
824 for (i = 0; i < 8; i++)
825 if (dev->vendor[i] >= 0x20)
826 seq_putc(m, dev->vendor[i]);
827 seq_putc(m, ' ');
828 for (i = 0; i < 16; i++)
829 if (dev->model[i] >= 0x20)
830 seq_putc(m, dev->model[i]);
831 seq_putc(m, ' ');
832 for (i = 0; i < 4; i++)
833 if (dev->rev[i] >= 0x20)
834 seq_putc(m, dev->rev[i]);
835 seq_putc(m, ' ');
836
837 PRINTP("\n%10ld kb read in %5ld secs" ANDP br / 1024 ANDP tr);
838 if (tr)
839 PRINTP(" @ %5ld bps" ANDP br / tr);
840
841 PRINTP("\n%10ld kb written in %5ld secs" ANDP bw / 1024 ANDP tw);
842 if (tw)
843 PRINTP(" @ %5ld bps" ANDP bw / tw);
844 PRINTP("\n");
845 }
846#endif
847
848 status = NCR5380_read(STATUS_REG); 803 status = NCR5380_read(STATUS_REG);
849 if (!(status & SR_REQ)) 804 if (!(status & SR_REQ))
850 PRINTP("REQ not asserted, phase unknown.\n"); 805 PRINTP("REQ not asserted, phase unknown.\n");
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index f52bda71dfb9..b00d97557cff 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -836,36 +836,6 @@ static int NCR5380_queue_command_lck(struct scsi_cmnd *cmd,
836 } 836 }
837#endif /* (NDEBUG & NDEBUG_NO_WRITE) */ 837#endif /* (NDEBUG & NDEBUG_NO_WRITE) */
838 838
839
840#ifdef NCR5380_STATS
841# if 0
842 if (!hostdata->connected && !hostdata->issue_queue &&
843 !hostdata->disconnected_queue) {
844 hostdata->timebase = jiffies;
845 }
846# endif
847# ifdef NCR5380_STAT_LIMIT
848 if (scsi_bufflen(cmd) > NCR5380_STAT_LIMIT)
849# endif
850 switch (cmd->cmnd[0])
851 {
852 case WRITE:
853 case WRITE_6:
854 case WRITE_10:
855 hostdata->time_write[cmd->device->id] -= (jiffies - hostdata->timebase);
856 hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);
857 hostdata->pendingw++;
858 break;
859 case READ:
860 case READ_6:
861 case READ_10:
862 hostdata->time_read[cmd->device->id] -= (jiffies - hostdata->timebase);
863 hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);
864 hostdata->pendingr++;
865 break;
866 }
867#endif
868
869 /* 839 /*
870 * We use the host_scribble field as a pointer to the next command 840 * We use the host_scribble field as a pointer to the next command
871 * in a queue 841 * in a queue
@@ -1246,33 +1216,6 @@ static irqreturn_t NCR5380_intr (int irq, void *dev_id)
1246 return IRQ_RETVAL(handled); 1216 return IRQ_RETVAL(handled);
1247} 1217}
1248 1218
1249#ifdef NCR5380_STATS
1250static void collect_stats(struct NCR5380_hostdata *hostdata,
1251 struct scsi_cmnd *cmd)
1252{
1253# ifdef NCR5380_STAT_LIMIT
1254 if (scsi_bufflen(cmd) > NCR5380_STAT_LIMIT)
1255# endif
1256 switch (cmd->cmnd[0])
1257 {
1258 case WRITE:
1259 case WRITE_6:
1260 case WRITE_10:
1261 hostdata->time_write[cmd->device->id] += (jiffies - hostdata->timebase);
1262 /*hostdata->bytes_write[cmd->device->id] += scsi_bufflen(cmd);*/
1263 hostdata->pendingw--;
1264 break;
1265 case READ:
1266 case READ_6:
1267 case READ_10:
1268 hostdata->time_read[cmd->device->id] += (jiffies - hostdata->timebase);
1269 /*hostdata->bytes_read[cmd->device->id] += scsi_bufflen(cmd);*/
1270 hostdata->pendingr--;
1271 break;
1272 }
1273}
1274#endif
1275
1276/* 1219/*
1277 * Function : int NCR5380_select(struct Scsi_Host *instance, 1220 * Function : int NCR5380_select(struct Scsi_Host *instance,
1278 * struct scsi_cmnd *cmd) 1221 * struct scsi_cmnd *cmd)
@@ -1538,9 +1481,6 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
1538 return -1; 1481 return -1;
1539 } 1482 }
1540 cmd->result = DID_BAD_TARGET << 16; 1483 cmd->result = DID_BAD_TARGET << 16;
1541#ifdef NCR5380_STATS
1542 collect_stats(hostdata, cmd);
1543#endif
1544#ifdef SUPPORT_TAGS 1484#ifdef SUPPORT_TAGS
1545 cmd_free_tag( cmd ); 1485 cmd_free_tag( cmd );
1546#endif 1486#endif
@@ -2090,9 +2030,6 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2090 dprintk(NDEBUG_LINKED, "scsi%d: target %d lun %llu linked request " 2030 dprintk(NDEBUG_LINKED, "scsi%d: target %d lun %llu linked request "
2091 "done, calling scsi_done().\n", 2031 "done, calling scsi_done().\n",
2092 HOSTNO, cmd->device->id, cmd->device->lun); 2032 HOSTNO, cmd->device->id, cmd->device->lun);
2093#ifdef NCR5380_STATS
2094 collect_stats(hostdata, cmd);
2095#endif
2096 cmd->scsi_done(cmd); 2033 cmd->scsi_done(cmd);
2097 cmd = hostdata->connected; 2034 cmd = hostdata->connected;
2098 break; 2035 break;
@@ -2174,9 +2111,6 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2174 dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of " 2111 dprintk(NDEBUG_QUEUES, "scsi%d: REQUEST SENSE added to head of "
2175 "issue queue\n", H_NO(cmd)); 2112 "issue queue\n", H_NO(cmd));
2176 } else { 2113 } else {
2177#ifdef NCR5380_STATS
2178 collect_stats(hostdata, cmd);
2179#endif
2180 cmd->scsi_done(cmd); 2114 cmd->scsi_done(cmd);
2181 } 2115 }
2182 2116
@@ -2359,9 +2293,6 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
2359#endif 2293#endif
2360 hostdata->connected = NULL; 2294 hostdata->connected = NULL;
2361 cmd->result = DID_ERROR << 16; 2295 cmd->result = DID_ERROR << 16;
2362#ifdef NCR5380_STATS
2363 collect_stats(hostdata, cmd);
2364#endif
2365 cmd->scsi_done(cmd); 2296 cmd->scsi_done(cmd);
2366 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); 2297 NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
2367 return; 2298 return;