linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.5.42] aacraid code changes
@ 2002-10-14 18:25 Mark Haverkamp
  2002-10-14 21:32 ` Mark Haverkamp
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Haverkamp @ 2002-10-14 18:25 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Here are a couple changes to the aacraid code that I made to get the
module to load and run.   The change in aachba.c is a work around so I
could get the module to load.  The sc_request element is always NULL as
far as I can tell. I haven't yet found an alternate place to get the
rq_dev information.  With this change and the one to commctrl.c, I have
been able to get access to the drives and use them.

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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.5.42] aacraid code changes
  2002-10-14 18:25 [PATCH 2.5.42] aacraid code changes Mark Haverkamp
@ 2002-10-14 21:32 ` Mark Haverkamp
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Haverkamp @ 2002-10-14 21:32 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

I found a source for the rq_dev element elsewhere in the Scsi_Cmnd
structure.  This patch contains a replacement for the one I sent
earlier.

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 14:24:16 2002
@@ -1060,7 +1060,8 @@
 			 */
 			 
 			spin_unlock_irq(scsicmd->host->host_lock);
-			fsa_dev_ptr->devno[cid] = DEVICE_NR(scsicmd->sc_request->sr_request->rq_dev);
+			fsa_dev_ptr->devno[cid] = 
+					DEVICE_NR(scsicmd->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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-14 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14 18:25 [PATCH 2.5.42] aacraid code changes Mark Haverkamp
2002-10-14 21:32 ` Mark Haverkamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).