patch-1.3.26 linux/drivers/scsi/scsi_ioctl.c

Next file: linux/drivers/scsi/scsi_ioctl.h
Previous file: linux/drivers/scsi/scsi_debug.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.25/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -318,15 +318,15 @@
     
     switch (cmd) {
     case SCSI_IOCTL_GET_IDLUN:
-        result = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
+        result = verify_area(VERIFY_WRITE, (void *) arg, 2*sizeof(long));
         if (result) return result;
 
-	put_user(dev->id + (dev->lun << 8) + (dev->host->host_no << 16) +
-		    /* This has been added to support 
-		     * multichannel HBAs, it might cause 
-		     * problems with some software */ 
-		    (dev->channel << 24), 
+	put_user(dev->id 
+                 + (dev->lun << 8) 
+                 + (dev->channel << 16)
+                 + ((dev->host->hostt->low_ino & 0xff) << 24),
 		    (unsigned long *) arg);
+        put_user( dev->host->unique_id, (unsigned long *) arg+1);
 	return 0;
     case SCSI_IOCTL_TAGGED_ENABLE:
 	if(!suser())  return -EACCES;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this