public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] RE: How to add/drop SCSI drives from within the drive r?
@ 2004-12-10  1:18 Bagalkote, Sreenivas
  2004-12-10  3:24 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Bagalkote, Sreenivas @ 2004-12-10  1:18 UTC (permalink / raw)
  To: 'Matt Domsch'
  Cc: 'brking@us.ibm.com', 'James Bottomley',
	'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org', 'bunk@fs.tum.de',
	'Andrew Morton', Ju, Seokmann, Doelfel, Hardy,
	Mukker, Atul

>>
>>I believe, per the discussion, that this was unnecessary and possibly 
>>even incorrect.  Please repost one more time with this removed.
>>
>
>Yes, thank you. I will do that. The patch that I submitted 
>earlier had an one more critical fix. I will separate them 
>into two patches and submit them as PATCH 1/2 & 2/2 as well.
>
>Thanks,
>Sreenivas
>LSI Logic
>

diff -Naur a/Documentation/scsi/ChangeLog.megaraid
b/Documentation/scsi/ChangeLog.megaraid
--- a/Documentation/scsi/ChangeLog.megaraid	2004-12-07
16:40:23.000000000 -0500
+++ b/Documentation/scsi/ChangeLog.megaraid	2004-12-09
19:05:47.795231320 -0500
@@ -1,3 +1,10 @@
+Release Date	: Thu Dec  9 19:02:14 EST 2004 - Sreenivas Bagalkote
<sreenib@lsil.com>
+
+Current Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
+Older Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
+
+i.	Fix a bug in kioc's dma buffer deallocation
+
 Release Date	: Thu Nov  4 18:24:56 EST 2004 - Sreenivas Bagalkote
<sreenib@lsil.com>
 
 Current Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
diff -Naur a/drivers/scsi/megaraid/megaraid_ioctl.h
b/drivers/scsi/megaraid/megaraid_ioctl.h
--- a/drivers/scsi/megaraid/megaraid_ioctl.h	2004-12-07
16:40:16.000000000 -0500
+++ b/drivers/scsi/megaraid/megaraid_ioctl.h	2004-12-09
19:00:59.284091680 -0500
@@ -142,7 +142,7 @@
 
 	caddr_t			buf_vaddr;
 	dma_addr_t		buf_paddr;
-	uint8_t			pool_index;
+	int8_t			pool_index;
 	uint8_t			free_buf;
 
 	uint8_t			timedout;
diff -Naur a/drivers/scsi/megaraid/megaraid_mm.c
b/drivers/scsi/megaraid/megaraid_mm.c
--- a/drivers/scsi/megaraid/megaraid_mm.c	2004-12-07
16:40:16.000000000 -0500
+++ b/drivers/scsi/megaraid/megaraid_mm.c	2004-12-09
19:03:27.659535184 -0500
@@ -10,7 +10,7 @@
  *	   2 of the License, or (at your option) any later version.
  *
  * FILE		: megaraid_mm.c
- * Version	: v2.20.2.2 (Nov 04 2004)
+ * Version	: v2.20.2.3 (Dec 09 2004)
  *
  * Common management module
  */
@@ -614,23 +614,27 @@
 	mm_dmapool_t	*pool;
 	unsigned long	flags;
 
-	pool = &adp->dma_pool_list[kioc->pool_index];
+	if (kioc->pool_index != -1) {
+		pool = &adp->dma_pool_list[kioc->pool_index];
 
-	/* This routine may be called in non-isr context also */
-	spin_lock_irqsave(&pool->lock, flags);
+		/* This routine may be called in non-isr context also */
+		spin_lock_irqsave(&pool->lock, flags);
 
-	/*
-	 * While attaching the dma buffer, if we didn't get the required
-	 * buffer from the pool, we would have allocated it at the run time
-	 * and set the free_buf flag. We must free that buffer. Otherwise,
-	 * just mark that the buffer is not in use
-	 */
-	if (kioc->free_buf == 1)
-		pci_pool_free(pool->handle, kioc->buf_vaddr,
kioc->buf_paddr);
-	else
-		pool->in_use = 0;
+		/*
+		 * While attaching the dma buffer, if we didn't get the 
+		 * required buffer from the pool, we would have allocated 
+		 * it at the run time and set the free_buf flag. We must 
+		 * free that buffer. Otherwise, just mark that the buffer is

+		 * not in use
+		 */
+		if (kioc->free_buf == 1)
+			pci_pool_free(pool->handle, kioc->buf_vaddr, 
+							kioc->buf_paddr);
+		else
+			pool->in_use = 0;
 
-	spin_unlock_irqrestore(&pool->lock, flags);
+		spin_unlock_irqrestore(&pool->lock, flags);
+	}
 
 	/* Return the kioc to the free pool */
 	spin_lock_irqsave(&adp->kioc_pool_lock, flags);
diff -Naur a/drivers/scsi/megaraid/megaraid_mm.h
b/drivers/scsi/megaraid/megaraid_mm.h
--- a/drivers/scsi/megaraid/megaraid_mm.h	2004-12-07
16:40:15.000000000 -0500
+++ b/drivers/scsi/megaraid/megaraid_mm.h	2004-12-09
19:03:00.020736920 -0500
@@ -29,10 +29,9 @@
 #include "megaraid_ioctl.h"
 
 
-#define LSI_COMMON_MOD_VERSION	"2.20.2.2"
+#define LSI_COMMON_MOD_VERSION	"2.20.2.3"
 #define LSI_COMMON_MOD_EXT_VERSION	\
-		"(Release Date: Thu Nov  4 17:46:29 EST 2004)"
-
+		"(Release Date: Thu Dec  9 19:02:14 EST 2004)"
 
 #define LSI_DBGLVL			dbglevel
 


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

* Re: [PATCH 1/2] RE: How to add/drop SCSI drives from within the drive r?
  2004-12-10  1:18 [PATCH 1/2] RE: How to add/drop SCSI drives from within the drive r? Bagalkote, Sreenivas
@ 2004-12-10  3:24 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2004-12-10  3:24 UTC (permalink / raw)
  To: Bagalkote, Sreenivas
  Cc: Matt Domsch, 'brking@us.ibm.com', Linux Kernel,
	SCSI Mailing List, 'bunk@fs.tum.de', Andrew Morton,
	Ju, Seokmann, Doelfel, Hardy, Mukker, Atul

On Thu, 2004-12-09 at 20:18 -0500, Bagalkote, Sreenivas wrote:
> diff -Naur a/Documentation/scsi/ChangeLog.megaraid
> b/Documentation/scsi/ChangeLog.megaraid
> --- a/Documentation/scsi/ChangeLog.megaraid	2004-12-07
> 16:40:23.000000000 -0500
> +++ b/Documentation/scsi/ChangeLog.megaraid	2004-12-09
> 19:05:47.795231320 -0500
> @@ -1,3 +1,10 @@
> +Release Date	: Thu Dec  9 19:02:14 EST 2004 - Sreenivas Bagalkote
> <sreenib@lsil.com>
> +
> +Current Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
> +Older Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
> +
> +i.	Fix a bug in kioc's dma buffer deallocation

This patch won't apply --- it looks like your mailer broke the lines.
Could you resend it?

Thanks,

James



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

end of thread, other threads:[~2004-12-10  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10  1:18 [PATCH 1/2] RE: How to add/drop SCSI drives from within the drive r? Bagalkote, Sreenivas
2004-12-10  3:24 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox