diff options
Diffstat (limited to 'drivers/scsi/sun3_NCR5380.c')
-rw-r--r-- | drivers/scsi/sun3_NCR5380.c | 69 |
1 files changed, 0 insertions, 69 deletions
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 | ||
1250 | static 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; |