Mark.
diff -Nru base_linux-2.5/drivers/scsi/aacraid/aachba.c linux-2.5/drivers/scsi/aacraid/aachba.c
--- base_linux-2.5/drivers/scsi/aacraid/aachba.c	Mon Oct  7 13:03:15 2002
+++ linux-2.5/drivers/scsi/aacraid/aachba.c	Mon Oct 14 11:14:05 2002
@@ -1060,7 +1060,11 @@
 			 */
 			 
 			spin_unlock_irq(scsicmd->host->host_lock);
-			fsa_dev_ptr->devno[cid] = DEVICE_NR(scsicmd->sc_request->sr_request->rq_dev);
+		
+			if (scsicmd->sc_request != NULL) {
+				fsa_dev_ptr->devno[cid] = 
+					DEVICE_NR(scsicmd->sc_request->sr_request->rq_dev);
+			} 
 			ret = aac_read(scsicmd, cid);
 			spin_lock_irq(scsicmd->host->host_lock);
 			return ret;
diff -Nru base_linux-2.5/drivers/scsi/aacraid/commctrl.c linux-2.5/drivers/scsi/aacraid/commctrl.c
--- base_linux-2.5/drivers/scsi/aacraid/commctrl.c	Mon Oct  7 13:03:15 2002
+++ linux-2.5/drivers/scsi/aacraid/commctrl.c	Mon Oct 14 10:35:04 2002
@@ -424,7 +424,12 @@
 		status = aac_get_pci_info(dev,arg);
 		break;
 	default:
-		status = -ENOTTY;
+		/*
+		 * Return EINVAL instead of ENOTTY because blkdev_ioctl 
+		 * understands the EINVAL return code to mean that the
+		 * ioctl wasn't handled and blk_ioctl should be called.
+		 */
+		status = -EINVAL;
 	  	break;	
 	}
 	return status;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/