[parisc-linux-cvs] 53c700.c lost /proc info with 2.6 kernel

Helge Deller deller at gmx.de
Thu Nov 4 00:51:47 MST 2004


Hi James,

the 53c700.c driver (for lasi700.c on HPPA) does not show up under /proc/scsi/ any longer.
Would it be possible to add the /proc-Interface again, since some scripts I'm using (e.g. "rescan_scsi") else won't work ?

Attached is a very simple patch which made the driver appear under /proc again, but I'm sure you have a better idea.

Best regards,
Helge
-------------- next part --------------
Index: 53c700.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/scsi/53c700.c,v
retrieving revision 1.11
diff -u -p -r1.11 53c700.c
--- 53c700.c	21 Oct 2004 18:59:20 -0000	1.11
+++ 53c700.c	4 Nov 2004 07:47:49 -0000
@@ -292,6 +292,27 @@ NCR_700_get_SXFER(struct scsi_device *SD
 					      spi_period(SDp->sdev_target));
 }
 
+static int 
+NCR_700_proc_info(struct Scsi_Host *host, char *buffer,
+			char **start, off_t offset, int length, int write)
+{
+	struct NCR_700_Host_Parameters *host_data;
+	int retv = -EINVAL;
+	int len = 0;
+
+	host_data = (struct NCR_700_Host_Parameters *) host->hostdata;
+
+	if (write)
+		return -EINVAL;
+
+	if (start)
+		*start = buffer;
+	len += sprintf(&buffer[len], "Total commands outstanding: %d\n", host_data->command_slot_count);
+	retv = len;
+
+	return retv;
+}
+
 struct Scsi_Host *
 NCR_700_detect(struct scsi_host_template *tpnt,
 	       struct NCR_700_Host_Parameters *hostdata, struct device *dev,
@@ -343,7 +364,8 @@ NCR_700_detect(struct scsi_host_template
 		tpnt->name = "53c700";
 	if(tpnt->proc_name == NULL)
 		tpnt->proc_name = "53c700";
-	
+	if(tpnt->proc_info == NULL)
+		tpnt->proc_info = NCR_700_proc_info;
 
 	host = scsi_host_alloc(tpnt, 4);
 	if (!host)


More information about the parisc-linux-cvs mailing list