aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss_scsi.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index efc0bea7693..e183a3ef783 100644
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -1144,6 +1144,7 @@ cciss_scsi_proc_info(struct Scsi_Host *sh,
1144 1144
1145 int buflen, datalen; 1145 int buflen, datalen;
1146 ctlr_info_t *ci; 1146 ctlr_info_t *ci;
1147 int i;
1147 int cntl_num; 1148 int cntl_num;
1148 1149
1149 1150
@@ -1154,8 +1155,28 @@ cciss_scsi_proc_info(struct Scsi_Host *sh,
1154 cntl_num = ci->ctlr; /* Get our index into the hba[] array */ 1155 cntl_num = ci->ctlr; /* Get our index into the hba[] array */
1155 1156
1156 if (func == 0) { /* User is reading from /proc/scsi/ciss*?/?* */ 1157 if (func == 0) { /* User is reading from /proc/scsi/ciss*?/?* */
1157 buflen = sprintf(buffer, "hostnum=%d\n", sh->host_no); 1158 buflen = sprintf(buffer, "cciss%d: SCSI host: %d\n",
1158 1159 cntl_num, sh->host_no);
1160
1161 /* this information is needed by apps to know which cciss
1162 device corresponds to which scsi host number without
1163 having to open a scsi target device node. The device
1164 information is not a duplicate of /proc/scsi/scsi because
1165 the two may be out of sync due to scsi hotplug, rather
1166 this info is for an app to be able to use to know how to
1167 get them back in sync. */
1168
1169 for (i=0;i<ccissscsi[cntl_num].ndevices;i++) {
1170 struct cciss_scsi_dev_t *sd = &ccissscsi[cntl_num].dev[i];
1171 buflen += sprintf(&buffer[buflen], "c%db%dt%dl%d %02d "
1172 "0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
1173 sh->host_no, sd->bus, sd->target, sd->lun,
1174 sd->devtype,
1175 sd->scsi3addr[0], sd->scsi3addr[1],
1176 sd->scsi3addr[2], sd->scsi3addr[3],
1177 sd->scsi3addr[4], sd->scsi3addr[5],
1178 sd->scsi3addr[6], sd->scsi3addr[7]);
1179 }
1159 datalen = buflen - offset; 1180 datalen = buflen - offset;
1160 if (datalen < 0) { /* they're reading past EOF. */ 1181 if (datalen < 0) { /* they're reading past EOF. */
1161 datalen = 0; 1182 datalen = 0;
@@ -1417,7 +1438,7 @@ cciss_proc_tape_report(int ctlr, unsigned char *buffer, off_t *pos, off_t *len)
1417 1438
1418 CPQ_TAPE_LOCK(ctlr, flags); 1439 CPQ_TAPE_LOCK(ctlr, flags);
1419 size = sprintf(buffer + *len, 1440 size = sprintf(buffer + *len,
1420 " Sequential access devices: %d\n\n", 1441 "Sequential access devices: %d\n\n",
1421 ccissscsi[ctlr].ndevices); 1442 ccissscsi[ctlr].ndevices);
1422 CPQ_TAPE_UNLOCK(ctlr, flags); 1443 CPQ_TAPE_UNLOCK(ctlr, flags);
1423 *pos += size; *len += size; 1444 *pos += size; *len += size;