linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-05 22:09 Mukker, Atul
  2003-08-06  5:43 ` 'Christoph Hellwig'
  0 siblings, 1 reply; 9+ messages in thread
From: Mukker, Atul @ 2003-08-05 22:09 UTC (permalink / raw)
  To: 'Christoph Hellwig'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

> +	spin_lock_irqsave(adapter->host->host_lock, flags);
But all kernels do not have this lock as part of the host structure. With
2.00.7, I have relapsed a patch which switches the lock to io_request_lock
if kernel does not support per host lock.

And not all kernels have the per host lock named as "host->host_lock", some
simply have "host->lock"

-Atul Mukker

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

* Re: [ANNOUNCE] megaraid linux driver version 2.00.7
  2003-08-05 22:09 [ANNOUNCE] megaraid linux driver version 2.00.7 Mukker, Atul
@ 2003-08-06  5:43 ` 'Christoph Hellwig'
  0 siblings, 0 replies; 9+ messages in thread
From: 'Christoph Hellwig' @ 2003-08-06  5:43 UTC (permalink / raw)
  To: Mukker, Atul
  Cc: 'Christoph Hellwig',
	'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

On Tue, Aug 05, 2003 at 06:09:10PM -0400, Mukker, Atul wrote:
> > +	spin_lock_irqsave(adapter->host->host_lock, flags);
> But all kernels do not have this lock as part of the host structure. With
> 2.00.7, I have relapsed a patch which switches the lock to io_request_lock
> if kernel does not support per host lock.
> 
> And not all kernels have the per host lock named as "host->host_lock", some
> simply have "host->lock"A

All 2.5/2.6 kernels do have host->host_lock and the 2.5 driver is different
from the 2.4 one.  In fact it will hopefuloly become &host->host_lock soon
but for that I have to repair the remaining abusers first.


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

* RE: [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-06 13:05 Mukker, Atul
  0 siblings, 0 replies; 9+ messages in thread
From: Mukker, Atul @ 2003-08-06 13:05 UTC (permalink / raw)
  To: 'Christoph Hellwig'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

> All 2.5/2.6 kernels do have host->host_lock and the 2.5 
> driver is different
Right, in next patch for 2.6 I will take care of this..

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

* Re: [ANNOUNCE] megaraid linux driver version 2.00.7
  2003-08-04 18:18 Mukker, Atul
@ 2003-08-04 20:47 ` 'Christoph Hellwig'
  0 siblings, 0 replies; 9+ messages in thread
From: 'Christoph Hellwig' @ 2003-08-04 20:47 UTC (permalink / raw)
  To: Mukker, Atul
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

On Mon, Aug 04, 2003 at 02:18:59PM -0400, Mukker, Atul wrote:
> > and incorporating my patch to kill
> > the useless hostlock redefintion?
> > 
> ??, can you resend this patch


diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c	Mon Jun 23 11:03:07 2003
+++ b/drivers/scsi/megaraid.c	Mon Jun 23 11:03:07 2003
@@ -32,15 +32,16 @@
 
 #include <linux/mm.h>
 #include <linux/fs.h>
-#include <linux/blk.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
+#include <linux/blkdev.h>
+#include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/module.h>
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <scsi/scsicam.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
 
 #include "scsi.h"
 #include "hosts.h"
@@ -368,8 +369,6 @@
 		INIT_LIST_HEAD(&adapter->completed_list);
 
 		adapter->flag = flag;
-		spin_lock_init(&adapter->lock);
-		scsi_assign_lock(host, &adapter->lock);
 
 		host->cmd_per_lun = max_cmd_per_lun;
 		host->max_sectors = max_sectors_per_io;
@@ -1754,7 +1753,7 @@
 	/*
 	 * loop till F/W has more commands for us to complete.
 	 */
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	do {
 		/* Check if a valid interrupt is pending */
@@ -1800,7 +1799,7 @@
 
  out_unlock:
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return IRQ_RETVAL(handled);
 }
@@ -1831,7 +1830,7 @@
 	/*
 	 * loop till F/W has more commands for us to complete.
 	 */
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	do {
 		/* Check if a valid interrupt is pending */
@@ -1880,7 +1879,7 @@
 
  out_unlock:
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return IRQ_RETVAL(handled);
 }
@@ -2608,7 +2607,7 @@
 	mc.cmd = MEGA_CLUSTER_CMD;
 	mc.opcode = MEGA_RESET_RESERVATIONS;
 
-	spin_unlock_irq(&adapter->lock);
+	spin_unlock_irq(adapter->host->host_lock);
 	if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
 		printk(KERN_WARNING
 				"megaraid: reservation reset failed.\n");
@@ -2616,7 +2615,7 @@
 	else {
 		printk(KERN_INFO "megaraid: reservation reset.\n");
 	}
-	spin_lock_irq(&adapter->lock);
+	spin_lock_irq(adapter->host->host_lock);
 #endif
 
 	rval =  megaraid_abort_and_reset(adapter, cmd, SCB_RESET);
@@ -4860,7 +4859,7 @@
 
 	rval = mega_do_del_logdrv(adapter, logdrv);
 
-	spin_lock_irqsave(&adapter->lock, flags);
+	spin_lock_irqsave(adapter->host->host_lock, flags);
 
 	/*
 	 * If delete operation was successful, add 0x80 to the logical drive
@@ -4879,7 +4878,7 @@
 
 	mega_runpendq(adapter);
 
-	spin_unlock_irqrestore(&adapter->lock, flags);
+	spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	return rval;
 }
@@ -5258,11 +5257,11 @@
 	/*
 	 * Get the lock only if the caller has not acquired it already
 	 */
-	if( ls == LOCK_INT ) spin_lock_irqsave(&adapter->lock, flags);
-
+	if( ls == LOCK_INT )
+		spin_lock_irqsave(adapter->host->host_lock, flags);
 	megaraid_queue(scmd, mega_internal_done);
-
-	if( ls == LOCK_INT ) spin_unlock_irqrestore(&adapter->lock, flags);
+	if( ls == LOCK_INT )
+		spin_unlock_irqrestore(adapter->host->host_lock, flags);
 
 	/*
 	 * Wait till this command finishes. Do not use
diff -Nru a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
--- a/drivers/scsi/megaraid.h	Mon Jun 23 11:03:07 2003
+++ b/drivers/scsi/megaraid.h	Mon Jun 23 11:03:07 2003
@@ -1,10 +1,6 @@
 #ifndef __MEGARAID_H__
 #define __MEGARAID_H__
 
-#include <linux/version.h>
-#include <linux/spinlock.h>
-
-
 #define MEGARAID_VERSION	\
 	"v2.00.3 (Release Date: Wed Feb 19 08:51:30 EST 2003)\n"
 
@@ -879,8 +875,6 @@
 					   drive needs to be done. Stop
 					   sending requests to the hba till
 					   delete operation is completed */
-	spinlock_t	lock;
-
 	u8	logdrv_chan[MAX_CHANNELS+NVIRT_CHAN]; /* logical drive are on
 							what channels. */
 	int	mega_ch_class;

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

* RE: [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-04 18:18 Mukker, Atul
  2003-08-04 20:47 ` 'Christoph Hellwig'
  0 siblings, 1 reply; 9+ messages in thread
From: Mukker, Atul @ 2003-08-04 18:18 UTC (permalink / raw)
  To: 'Christoph Hellwig'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

> Any plans to update the 2.6 version
Will do pretty soon now

> and incorporating my patch to kill
> the useless hostlock redefintion?
> 
??, can you resend this patch

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

* Re: [ANNOUNCE] megaraid linux driver version 2.00.7
  2003-08-01 21:56 Mukker, Atul
@ 2003-08-02  9:16 ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2003-08-02  9:16 UTC (permalink / raw)
  To: Mukker, Atul
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org',
	'linux-megaraid-devel@dell.com'

On Fri, Aug 01, 2003 at 05:56:16PM -0400, Mukker, Atul wrote:
> MegaRAID driver version 2.00.7 is released and can be download from

Any plans to update the 2.6 version and incorporating my patch to kill
the useless hostlock redefintion?


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

* RE: [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-02  4:59 haruo tomita
  0 siblings, 0 replies; 9+ messages in thread
From: haruo tomita @ 2003-08-02  4:59 UTC (permalink / raw)
  To: atulm
  Cc: linux-megaraid-devel, linux-kernel, linux-scsi, Manojj, sreenib,
	Peterj, hdoelfel, haruo.tomita

Hi Atul,

Atul wrote;

Atul>
Atul> MegaRAID driver version 2.00.7 is released and can be download from
Atul>
Atul> ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.7/
Atul>

Thanks!! I created the patch for kernel 2.4.22-pre10-ac1.
Here is patch.


diff -Nru linux-2.4.22-pre10-ac1/drivers/scsi/megaraid2.c linux-2.4.22-pre10-ac1-mr7/drivers/scsi/megaraid2.c
--- linux-2.4.22-pre10-ac1/drivers/scsi/megaraid2.c     2003-08-02 10:20:33.000000000 +0900
+++ linux-2.4.22-pre10-ac1-mr7/drivers/scsi/megaraid2.c      2003-08-02 10:50:57.000000000 +0900
@@ -14,7 +14,7 @@
  *    - speed-ups (list handling fixes, issued_list, optimizations.)
  *    - lots of cleanups.
  *
- * Version : v2.00.5 (Apr 24, 2003) - Atul Mukker <Atul.Mukker@lsil.com>
+ * Version : v2.00.7 (Aug 01, 2003) - Atul Mukker <Atul.Mukker@lsil.com>
  *
  * Description: Linux device driver for LSI Logic MegaRAID controller
  *
@@ -73,7 +73,9 @@

 static int hba_count;
 static adapter_t *hba_soft_state[MAX_CONTROLLERS];
+#ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *mega_proc_dir_entry;
+#endif

 static struct notifier_block mega_notifier = {
     .notifier_call = megaraid_reboot_notify
@@ -255,6 +257,16 @@

     while((pdev = pci_find_device(pci_vendor, pci_device, pdev))) {

+         // reset flags for all controllers in this class
+         did_ioremap_f = 0;
+         did_req_region_f = 0;
+         did_scsi_reg_f = 0;
+         got_ipdev_f = 0;
+         alloc_int_buf_f = 0;
+         alloc_scb_f = 0;
+         got_irq_f = 0;
+         did_setup_mbox_f = 0;
+
          if(pci_enable_device (pdev)) continue;

          pci_bus = pdev->bus->number;
@@ -290,6 +302,7 @@
          if( subsysvid && (subsysvid != AMI_SUBSYS_VID) &&
                    (subsysvid != DELL_SUBSYS_VID) &&
                    (subsysvid != HP_SUBSYS_VID) &&
+                   (subsysvid != INTEL_SUBSYS_VID) &&
                    (subsysvid != LSI_SUBSYS_VID) ) continue;


@@ -382,6 +395,8 @@
          adapter->flag = flag;
          spin_lock_init(&adapter->lock);

+         adapter->host_lock = &io_request_lock;
+
          host->cmd_per_lun = max_cmd_per_lun;
          host->max_sectors = max_sectors_per_io;

@@ -1624,7 +1639,7 @@
     /*
      * Increment the pending queue counter
      */
-    atomic_inc(&adapter->pend_cmds);
+    atomic_inc((atomic_t *)&adapter->pend_cmds);

     switch (mbox->cmd) {
     case MEGA_MBOXCMD_LREAD64:
@@ -1709,6 +1724,9 @@

          mbox->numstatus = 0xFF;

+         while((volatile u8)mbox->status == 0xFF)
+              cpu_relax();
+
          while( (volatile u8)mbox->poll != 0x77 )
               cpu_relax();

@@ -1758,7 +1776,7 @@
     unsigned long  flags;


-    spin_lock_irqsave(&adapter->lock, flags);
+    spin_lock_irqsave(adapter->host_lock, flags);

     megaraid_iombox_ack_sequence(adapter);

@@ -1767,7 +1785,7 @@
          mega_runpendq(adapter);
     }

-    spin_unlock_irqrestore(&adapter->lock, flags);
+    spin_unlock_irqrestore(adapter->host_lock, flags);

     return;
 }
@@ -1804,12 +1822,13 @@
               cpu_relax();
          adapter->mbox->numstatus = 0xFF;

-         status = adapter->mbox->status;
+         while((status = (volatile u8)adapter->mbox->status) == 0xFF)
+              cpu_relax();

          /*
           * decrement the pending queue counter
           */
-         atomic_sub(nstatus, &adapter->pend_cmds);
+         atomic_sub(nstatus, (atomic_t *)&adapter->pend_cmds);

          memcpy(completed, (void *)adapter->mbox->completed, nstatus);

@@ -1839,7 +1858,7 @@
     unsigned long  flags;


-    spin_lock_irqsave(&adapter->lock, flags);
+    spin_lock_irqsave(adapter->host_lock, flags);

     megaraid_memmbox_ack_sequence(adapter);

@@ -1848,7 +1867,7 @@
          mega_runpendq(adapter);
     }

-    spin_unlock_irqrestore(&adapter->lock, flags);
+    spin_unlock_irqrestore(adapter->host_lock, flags);

     return;
 }
@@ -1883,17 +1902,18 @@
          }
          WROUTDOOR(adapter, 0x10001234);

-         while((nstatus = adapter->mbox->numstatus) == 0xFF) {
+         while((nstatus = (volatile u8)adapter->mbox->numstatus)
+                   == 0xFF)
               cpu_relax();
-         }
          adapter->mbox->numstatus = 0xFF;

-         status = adapter->mbox->status;
+         while((status = (volatile u8)adapter->mbox->status) == 0xFF)
+              cpu_relax();

          /*
           * decrement the pending queue counter
           */
-         atomic_sub(nstatus, &adapter->pend_cmds);
+         atomic_sub(nstatus, (atomic_t *)&adapter->pend_cmds);

          memcpy(completed, (void *)adapter->mbox->completed, nstatus);

@@ -2395,7 +2415,9 @@
     adapter_t *adapter;
     mbox_t    *mbox;
     u_char    raw_mbox[16];
+#ifdef CONFIG_PROC_FS
     char buf[12] = { 0 };
+#endif

     adapter = (adapter_t *)host->hostdata;
     mbox = (mbox_t *)raw_mbox;
@@ -2597,7 +2619,7 @@

     adapter = (adapter_t *)scp->host->hostdata;

-    ASSERT( spin_is_locked(&adapter->lock) );
+    ASSERT( spin_is_locked(adapter->host_lock) );

     printk("megaraid: aborting-%ld cmd=%x <c=%d t=%d l=%d>\n",
          scp->serial_number, scp->cmnd[0], scp->channel, scp->target,
@@ -2640,8 +2662,7 @@
      * completed by the firmware
      */
     iter = 0;
-    while( !list_empty(&adapter->pending_list) ) {
-
+    while( atomic_read(&adapter->pend_cmds) > 0 ) {
          /*
           * Perform the ack sequence, since interrupts are not
           * available right now!
@@ -2694,7 +2715,7 @@

     adapter = (adapter_t *)cmd->host->hostdata;

-    ASSERT( spin_is_locked(&adapter->lock) );
+    ASSERT( spin_is_locked(adapter->host_lock) );

     printk("megaraid: reset-%ld cmd=%x <c=%d t=%d l=%d>\n",
          cmd->serial_number, cmd->cmnd[0], cmd->channel, cmd->target,
@@ -2705,7 +2726,7 @@
     mc.cmd = MEGA_CLUSTER_CMD;
     mc.opcode = MEGA_RESET_RESERVATIONS;

-    spin_unlock_irq(&adapter->lock);
+    spin_unlock_irq(adapter->host_lock);
     if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
          printk(KERN_WARNING
                    "megaraid: reservation reset failed.\n");
@@ -2713,7 +2734,7 @@
     else {
          printk(KERN_INFO "megaraid: reservation reset.\n");
     }
-    spin_lock_irq(&adapter->lock);
+    spin_lock_irq(adapter->host_lock);
 #endif

     /*
@@ -2721,8 +2742,7 @@
      * firmware
      */
     iter = 0;
-    while( !list_empty(&adapter->pending_list) ) {
-
+    while( atomic_read(&adapter->pend_cmds) > 0 ) {
          /*
           * Perform the ack sequence, since interrupts are not
           * available right now!
@@ -3564,6 +3584,7 @@
     u32  array_sz;
     int  len = 0;
     int  i;
+    u8   span8_flag = 1;

     pdev = adapter->ipdev;

@@ -3585,6 +3606,7 @@
     memset(&mc, 0, sizeof(megacmd_t));

     if( adapter->flag & BOARD_40LD ) {
+
          array_sz = sizeof(disk_array_40ld);

          rdrv_state = ((mega_inquiry3 *)inquiry)->ldrv_state;
@@ -3592,7 +3614,12 @@
          num_ldrv = ((mega_inquiry3 *)inquiry)->num_ldrv;
     }
     else {
-         array_sz = sizeof(disk_array_8ld);
+         /*
+          * 'array_sz' is either the size of diskarray_span4_t or the
+          * size of disk_array_span8_t. We use span8_t's size because
+          * it is bigger of the two.
+          */
+         array_sz = sizeof( diskarray_span8_t );

          rdrv_state = ((mraid_ext_inquiry *)inquiry)->
               raid_inq.logdrv_info.ldrv_state;
@@ -3632,10 +3659,17 @@

     }
     else {
+         /*
+          * Try 8-Span "read config" command
+          */
          mc.cmd = NEW_READ_CONFIG_8LD;

          if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) ) {

+              /*
+               * 8-Span command failed; try 4-Span command
+               */
+              span8_flag = 0;
               mc.cmd = READ_CONFIG_8LD;

               if( mega_internal_command(adapter, LOCK_INT, &mc,
@@ -3662,8 +3696,14 @@
               &((disk_array_40ld *)disk_array)->ldrv[i].lparam;
          }
          else {
-              lparam =
-              &((disk_array_8ld *)disk_array)->ldrv[i].lparam;
+              if( span8_flag ) {
+                   lparam = (logdrv_param*) &((diskarray_span8_t*)
+                             (disk_array))->log_drv[i];
+              }
+              else {
+                   lparam = (logdrv_param*) &((diskarray_span4_t*)
+                             (disk_array))->log_drv[i];
+              }
          }

          /*
@@ -4705,7 +4745,7 @@

     mbox = (mbox_t *)raw_mbox;

-    memset(mbox, 0, sizeof(mbox));
+    memset(mbox, 0, 16);

     memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE);

@@ -4738,7 +4778,7 @@

     mbox = (mbox_t *)raw_mbox;

-    memset(mbox, 0, sizeof(mbox));
+    memset(mbox, 0, 16);

     /*
      * issue command to find out what channels are raid/scsi
@@ -4859,7 +4899,7 @@

     mbox = (mbox_t *)raw_mbox;

-    memset(mbox, 0, sizeof(mbox));
+    memset(mbox, 0, 16);

     /*
      * issue command
@@ -4888,7 +4928,7 @@

     mbox = (mbox_t *)raw_mbox;

-    memset(mbox, 0, sizeof (mbox));
+    memset(mbox, 0, 16);
     /*
      * issue command to find out if controller supports extended CDBs.
      */
@@ -4917,7 +4957,7 @@
     scb_t *scb;
     int rval;

-    ASSERT( !spin_is_locked(&adapter->lock) );
+    ASSERT( !spin_is_locked(adapter->host_lock) );

     /*
      * Stop sending commands to the controller, queue them internally.
@@ -4937,7 +4977,7 @@
     rval = mega_do_del_logdrv(adapter, logdrv);


-    spin_lock_irqsave(&adapter->lock, flags);
+    spin_lock_irqsave(adapter->host_lock, flags);

     /*
      * If delete operation was successful, add 0x80 to the logical drive
@@ -4956,7 +4996,7 @@

     mega_runpendq(adapter);

-    spin_unlock_irqrestore(&adapter->lock, flags);
+    spin_unlock_irqrestore(adapter->host_lock, flags);

     return rval;
 }
@@ -5318,6 +5358,7 @@



+#ifdef CONFIG_PROC_FS
 /**
  * mega_adapinq()
  * @adapter - pointer to our soft state
@@ -5440,6 +5481,7 @@

     return rval;
 }
+#endif   // #ifdef CONFIG_PROC_FS


 /**
@@ -5504,11 +5546,11 @@
     /*
      * Get the lock only if the caller has not acquired it already
      */
-    if( ls == LOCK_INT ) spin_lock_irqsave(&adapter->lock, flags);
+    if( ls == LOCK_INT ) spin_lock_irqsave(adapter->host_lock, flags);

     megaraid_queue(scmd, mega_internal_done);

-    if( ls == LOCK_INT ) spin_unlock_irqrestore(&adapter->lock, flags);
+    if( ls == LOCK_INT ) spin_unlock_irqrestore(adapter->host_lock, flags);

     /*
      * Wait till this command finishes. Do not use
diff -Nru linux-2.4.22-pre10-ac1/drivers/scsi/megaraid2.h linux-2.4.22-pre10-ac1-mr7/drivers/scsi/megaraid2.h
--- linux-2.4.22-pre10-ac1/drivers/scsi/megaraid2.h     2003-08-02 10:20:33.000000000 +0900
+++ linux-2.4.22-pre10-ac1-mr7/drivers/scsi/megaraid2.h      2003-08-02 10:52:39.000000000 +0900
@@ -6,7 +6,7 @@


 #define MEGARAID_VERSION     \
-    "v2.00.5 (Release Date: Thu Apr 24 14:06:55 EDT 2003)\n"
+    "v2.00.7 (Release Date: Fri Aug  1 11:01:11 EDT 2003)\n"

 /*
  * Driver features - change the values to enable or disable features in the
@@ -83,6 +83,7 @@
 #define DELL_SUBSYS_VID           0x1028
 #define  HP_SUBSYS_VID            0x103C
 #define LSI_SUBSYS_VID            0x1000
+#define INTEL_SUBSYS_VID          0x8086

 #define HBA_SIGNATURE                   0x3344
 #define HBA_SIGNATURE_471         0xCCCC
@@ -509,6 +510,70 @@
     phys_drv  pdrv[MAX_PHYSICAL_DRIVES];
 }__attribute__ ((packed)) disk_array_8ld;

+/*
+ *    FW Definitions & Data Structures for 8LD 4-Span and 8-Span Controllers
+ */
+#define  MAX_STRIPES    8
+#define SPAN4_DEPTH     4
+#define SPAN8_DEPTH     8
+#define MAX_PHYDRVS     5 * 16    /* 5 Channels * 16 Targets */
+
+typedef struct  {
+    unsigned char  channel;
+    unsigned char  target;
+}__attribute__ ((packed)) device_t;
+
+typedef struct {
+    unsigned long  start_blk;
+    unsigned long  total_blks;
+    device_t  device[ MAX_STRIPES ];
+}__attribute__ ((packed)) span_t;
+
+typedef struct {
+    unsigned char  type;
+    unsigned char  curr_status;
+    unsigned char  tag_depth;
+    unsigned char  resvd1;
+    unsigned long  size;
+}__attribute__ ((packed)) phydrv_t;
+
+typedef struct {
+    unsigned char  span_depth;
+    unsigned char  raid;
+    unsigned char  read_ahead;    /* 0=No rdahead,1=RDAHEAD,2=adaptive */
+    unsigned char  stripe_sz;
+    unsigned char  status;
+    unsigned char  write_policy;  /* 0=wrthru,1=wrbak */
+    unsigned char  direct_io;     /* 1=directio,0=cached */
+    unsigned char  no_stripes;
+    span_t         span[ SPAN4_DEPTH ];
+}__attribute__ ((packed)) ld_span4_t;
+
+typedef struct {
+    unsigned char  span_depth;
+    unsigned char  raid;
+    unsigned char  read_ahead;    /* 0=No rdahead,1=RDAHEAD,2=adaptive */
+    unsigned char  stripe_sz;
+    unsigned char  status;
+    unsigned char  write_policy;  /* 0=wrthru,1=wrbak */
+    unsigned char  direct_io;     /* 1=directio,0=cached */
+    unsigned char  no_stripes;
+    span_t         span[ SPAN8_DEPTH ];
+}__attribute__ ((packed)) ld_span8_t;
+
+typedef struct {
+    unsigned char  no_log_drives;
+    unsigned char  pad[3];
+    ld_span4_t     log_drv[ MAX_LOGICAL_DRIVES_8LD ];
+    phydrv_t  phys_drv[ MAX_PHYDRVS ];
+}__attribute__ ((packed)) diskarray_span4_t;
+
+typedef struct {
+    unsigned char  no_log_drives;
+    unsigned char  pad[3];
+    ld_span8_t     log_drv[ MAX_LOGICAL_DRIVES_8LD ];
+    phydrv_t  phys_drv[ MAX_PHYDRVS ];
+}__attribute__ ((packed)) diskarray_span8_t;

 /*
  * User ioctl structure.
@@ -847,8 +912,8 @@
     u8        max_cmds;
     scb_t          *scb_list;

-    atomic_t  pend_cmds;     /* maintain a counter for pending
-                           commands in firmware */
+    volatile atomic_t   pend_cmds;      /* maintain a counter for
+                             pending commands in firmware */

 #if MEGA_HAVE_STATS
     u32  nreads[MAX_LOGICAL_DRIVES_40LD];
@@ -899,6 +964,7 @@
                            sending requests to the hba till
                            delete operation is completed */
     spinlock_t     lock;
+    spinlock_t     *host_lock;    // pointer to appropriate lock

     u8   logdrv_chan[MAX_CHANNELS+NVIRT_CHAN]; /* logical drive are on
                                   what channels. */
@@ -1049,7 +1115,6 @@
 static int megaraid_abort(Scsi_Cmnd *);
 static int megaraid_reset(Scsi_Cmnd *);
 static int megaraid_biosparam (Disk *, kdev_t, int *);
-static int mega_print_inquiry(char *, char *);

 static int mega_build_sglist (adapter_t *adapter, scb_t *scb,
                     u32 *buffer, u32 *length);
@@ -1092,12 +1157,13 @@
 static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
 static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
 static int proc_rdrv(adapter_t *, char *, int, int);
-#endif

 static int mega_adapinq(adapter_t *, dma_addr_t);
 static int mega_internal_dev_inquiry(adapter_t *, u8, u8, dma_addr_t);
 static inline caddr_t mega_allocate_inquiry(dma_addr_t *, struct pci_dev *);
 static inline void mega_free_inquiry(caddr_t, dma_addr_t, struct pci_dev *);
+static int mega_print_inquiry(char *, char *);
+#endif

 static int mega_support_ext_cdb(adapter_t *);
 static mega_passthru* mega_prepare_passthru(adapter_t *, scb_t *,



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

* [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-01 21:56 Mukker, Atul
  2003-08-02  9:16 ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Mukker, Atul @ 2003-08-01 21:56 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org'
  Cc: 'linux-megaraid-devel@dell.com'

MegaRAID driver version 2.00.7 is released and can be download from

ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.7/

Changes from 2.00.6:

i.	Adapter lock re-definition so that patch for kernels w/o per host
lock
	is less intrusive - Jens Axboe <axboe@suse.de>

ii.	While in abort and reset handling, check for non-empty pending list
is
	invalid. The intent is to wait for pending commands in FW to
complete,
	not the pending commands with the driver - Atul Mukker
<atulm@lsil.com>


Atul Mukker
Storage Systems
LSI Logic Corporation

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

* [ANNOUNCE] megaraid linux driver version 2.00.7
@ 2003-08-01 20:39 Mukker, Atul
  0 siblings, 0 replies; 9+ messages in thread
From: Mukker, Atul @ 2003-08-01 20:39 UTC (permalink / raw)
  To: 'linux-megaraid-devel@dell.com',
	'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org'
  Cc: Mukker, Atul, Jose, Manoj, Bagalkote, Sreenivas, Jarrett,
	Peter B.,
	Doelfel, Hardy

MegaRAID driver version 2.00.7 is released and can be download from

ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.7/

Changes from 2.00.6:

i.	Adapter lock re-definition so that patch for kernels w/o per host
lock
	is less intrusive - Jens Axboe <axboe@suse.de>

ii.	While in abort and reset handling, check for non-empty pending list
is
	invalid. The intent is to wait for pending commands in FW to
complete,
	not the pending commands with the driver - Atul Mukker
<atulm@lsil.com>


Atul Mukker
Storage Systems
LSI Logic Corporation
U.S.A.

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

end of thread, other threads:[~2003-08-06 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 22:09 [ANNOUNCE] megaraid linux driver version 2.00.7 Mukker, Atul
2003-08-06  5:43 ` 'Christoph Hellwig'
  -- strict thread matches above, loose matches on Subject: below --
2003-08-06 13:05 Mukker, Atul
2003-08-04 18:18 Mukker, Atul
2003-08-04 20:47 ` 'Christoph Hellwig'
2003-08-02  4:59 haruo tomita
2003-08-01 21:56 Mukker, Atul
2003-08-02  9:16 ` Christoph Hellwig
2003-08-01 20:39 Mukker, Atul

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).