public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MPT Fusion driver update
@ 2003-11-07 15:38 James Bottomley
  2003-11-08  8:33 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2003-11-07 15:38 UTC (permalink / raw)
  To: SCSI Mailing List

This one's from: Eric Moore <emoore@lsil.com>

Changes in patch
* removed __init from mptscsih_setup
* removed __init from get_setup_token
* changed copyright from 2002 to 2003
* added new mailto, and removed Pam.Delaney
* added some fix for 32bit emulation when unloading mptctl module

James

diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/isense.c linux-2.6.0-test9/drivers/message/fusion/isense.c
--- linux-2.6.0-test9-reference/drivers/message/fusion/isense.c	2003-10-25 12:43:38.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/isense.c	2003-11-04 10:00:16.208538968 -0700
@@ -5,11 +5,11 @@
  *      Error Report logging output.  This module implements SCSI-3
  *      Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings.
  *
- *  Copyright (c) 1991-2002 Steven J. Ralston
+ *  Copyright (c) 1991-2003 Steven J. Ralston
  *  Written By: Steven J. Ralston
  *  (yes I wrote some of the orig. code back in 1991!)
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $
  */
@@ -66,7 +66,7 @@
 #endif
 
 #define MODULEAUTHOR "Steven J. Ralston"
-#define COPYRIGHT "Copyright (c) 2001-2002 " MODULEAUTHOR
+#define COPYRIGHT "Copyright (c) 2001-2003 " MODULEAUTHOR
 #include "mptbase.h"
 
 #include "isense.h"
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptbase.c linux-2.6.0-test9/drivers/message/fusion/mptbase.c
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptbase.c	2003-10-25 12:43:08.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptbase.c	2003-11-04 10:00:16.207539120 -0700
@@ -44,10 +44,10 @@
  *      for gobs of hard work fixing and optimizing LAN code.
  *      THANK YOU!
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptbase.c,v 1.126 2002/12/16 15:28:45 pdelaney Exp $
  */
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptbase.h linux-2.6.0-test9/drivers/message/fusion/mptbase.h
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptbase.h	2003-10-25 12:43:02.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptbase.h	2003-11-04 10:00:16.206539272 -0700
@@ -8,10 +8,10 @@
  *  Credits:
  *     (see mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptbase.h,v 1.144 2003/01/28 21:31:56 pdelaney Exp $
  */
@@ -77,11 +77,11 @@
 #endif
 
 #ifndef COPYRIGHT
-#define COPYRIGHT	"Copyright (c) 1999-2002 " MODULEAUTHOR
+#define COPYRIGHT	"Copyright (c) 1999-2003 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON	"2.05.00.03"
-#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-2.05.00.03"
+#define MPT_LINUX_VERSION_COMMON	"2.05.00.04"
+#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-2.05.00.04"
 #define WHAT_MAGIC_STRING		"@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptctl.c linux-2.6.0-test9/drivers/message/fusion/mptctl.c
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptctl.c	2003-10-25 12:42:49.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptctl.c	2003-11-04 10:00:15.941579552 -0700
@@ -29,10 +29,10 @@
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston, Noah Romer
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptctl.c,v 1.63 2002/12/03 21:26:33 pdelaney Exp $
  */
@@ -91,7 +91,7 @@
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
 
-#define COPYRIGHT	"Copyright (c) 1999-2001 LSI Logic Corporation"
+#define COPYRIGHT	"Copyright (c) 1999-2003 LSI Logic Corporation"
 #define MODULEAUTHOR	"Steven J. Ralston, Noah Romer, Pamela Delaney"
 #include "mptbase.h"
 #include "mptctl.h"
@@ -2985,6 +2985,21 @@
 	mpt_deregister(mptctl_id);
 	printk(KERN_INFO MYNAM ": Deregistered from Fusion MPT base driver\n");
 
+#ifdef CONFIG_COMPAT
+	unregister_ioctl32_conversion(MPTIOCINFO);
+	unregister_ioctl32_conversion(MPTIOCINFO1);
+	unregister_ioctl32_conversion(MPTTARGETINFO);
+	unregister_ioctl32_conversion(MPTTEST);
+	unregister_ioctl32_conversion(MPTEVENTQUERY);
+	unregister_ioctl32_conversion(MPTEVENTENABLE);
+	unregister_ioctl32_conversion(MPTEVENTREPORT);
+	unregister_ioctl32_conversion(MPTHARDRESET);
+	unregister_ioctl32_conversion(MPTCOMMAND32);
+	unregister_ioctl32_conversion(MPTFWDOWNLOAD32);
+	unregister_ioctl32_conversion(HP_GETHOSTINFO);
+	unregister_ioctl32_conversion(HP_GETTARGETINFO);
+#endif
+
 	/* Free allocated memory */
 	for (i=0; i<MPT_MAX_ADAPTERS; i++) {
 		ioc = NULL;
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptctl.h linux-2.6.0-test9/drivers/message/fusion/mptctl.h
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptctl.h	2003-10-25 12:43:38.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptctl.h	2003-11-04 10:00:16.209538816 -0700
@@ -15,10 +15,10 @@
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptctl.h,v 1.13 2002/12/03 21:26:33 pdelaney Exp $
  */
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptlan.c linux-2.6.0-test9/drivers/message/fusion/mptlan.c
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptlan.c	2003-10-25 12:43:39.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptlan.c	2003-11-04 10:00:16.209538816 -0700
@@ -23,8 +23,9 @@
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 2000-2002 LSI Logic Corporation
+ *  Copyright (c) 2000-2003 LSI Logic Corporation
  *  Originally By: Noah Romer
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptlan.c,v 1.53 2002/10/17 20:15:58 pdelaney Exp $
  */
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptscsih.c linux-2.6.0-test9/drivers/message/fusion/mptscsih.c
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptscsih.c	2003-10-25 12:43:27.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptscsih.c	2003-11-04 10:00:16.208538968 -0700
@@ -21,10 +21,10 @@
  *
  *      (see mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Original author: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptscsih.c,v 1.104 2002/12/03 21:26:34 pdelaney Exp $
  */
@@ -6900,7 +6900,7 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 static int
-__init get_setup_token(char *p)
+get_setup_token(char *p)
 {
 	char *cur = setup_token;
 	char *pc;
@@ -6918,7 +6918,7 @@
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 static int
-__init mptscsih_setup(char *str)
+mptscsih_setup(char *str)
 {
 	char *cur = str;
 	char *pc, *pv;
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/mptscsih.h linux-2.6.0-test9/drivers/message/fusion/mptscsih.h
--- linux-2.6.0-test9-reference/drivers/message/fusion/mptscsih.h	2003-10-25 12:44:58.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/mptscsih.h	2003-11-04 10:00:16.210538664 -0700
@@ -15,10 +15,10 @@
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptscsih.h,v 1.21 2002/12/03 21:26:35 pdelaney Exp $
  */
diff -uarN linux-2.6.0-test9-reference/drivers/message/fusion/scsi3.h linux-2.6.0-test9/drivers/message/fusion/scsi3.h
--- linux-2.6.0-test9-reference/drivers/message/fusion/scsi3.h	2003-10-25 12:43:30.000000000 -0600
+++ linux-2.6.0-test9/drivers/message/fusion/scsi3.h	2003-11-04 10:00:16.208538968 -0700
@@ -4,10 +4,10 @@
  *      (Ultimately) SCSI-3 definitions; for now, inheriting
  *      SCSI-2 definitions.
  *
- *  Copyright (c) 1996-2002 Steven J. Ralston
+ *  Copyright (c) 1996-2003 Steven J. Ralston
  *  Written By: Steven J. Ralston (19960517)
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: scsi3.h,v 1.9 2002/02/27 18:45:02 sralston Exp $
  */


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH] MPT Fusion driver update
@ 2003-11-10 15:17 Moore, Eric Dean
  2003-11-10 18:01 ` Matthew Wilcox
  2003-11-11  9:22 ` Christoph Hellwig
  0 siblings, 2 replies; 6+ messages in thread
From: Moore, Eric Dean @ 2003-11-10 15:17 UTC (permalink / raw)
  To: Christoph Hellwig, James Bottomley; +Cc: linux-scsi

Christoph,

Can you let me know what the *real problems* are with the
driver. This patch was mostly cosmetic. It was only fixing
problems unloading/reloading the IOCTL driver.  I'm new to
handling this driver, and I would like to know what the
outstanding issues are. Thanks.

In addition, its going to be very difficult to 
inline source into email clients. The problem that I see
are the tabs and over 80 characters per line. I've tried 
a handful of email clients, non work. So I decided to 
email James Bottomley the patch as an attachment.  When Pam
Delaney was supporting this driver, she was directly
emailing patches to Alan Cox, etc.  I can email you 
the patch or put in on our ftp so you can download. 

Eric 


On Saturday, November 08, 2003 1:34 AM, Christoph Hellwig wrote:
> On Fri, Nov 07, 2003 at 09:38:25AM -0600, James Bottomley wrote:
> > This one's from: Eric Moore <emoore@lsil.com>
> > 
> > Changes in patch
> > * removed __init from mptscsih_setup
> > * removed __init from get_setup_token
> > * changed copyright from 2002 to 2003
> > * added new mailto, and removed Pam.Delaney
> > * added some fix for 32bit emulation when unloading mptctl module
> 
> The patch doesn't look bad but doesn't fix the real problems 
> the driver
> has either..
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH] MPT Fusion driver update
@ 2003-11-10 22:43 Moore, Eric Dean
  0 siblings, 0 replies; 6+ messages in thread
From: Moore, Eric Dean @ 2003-11-10 22:43 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Christoph Hellwig, James Bottomley, linux-scsi

I will see what I can do to clean up the source
coding style. I don't know what the purpose of
the DROP_TEST is??

I have another patch in the works that should 
fix up error recovery.  There is lengthy 
over 30s polling being done from within eh entry points; 
and these mdelays sometimes creating NMI's on a SMP 
AMD-64 system.  Also during the polling, the system is 
non-responsive as the host_lock is acquired.

I plan to get started soon implementing some of
the new PCI API in the driver, ACPI, etc. 

Eric


On Monday, November 10, 2003 11:01 AM, Matthew Wilcox wrote:
> 
> On Mon, Nov 10, 2003 at 10:17:36AM -0500, Moore, Eric Dean wrote:
> > In addition, its going to be very difficult to 
> > inline source into email clients. The problem that I see
> > are the tabs and over 80 characters per line. I've tried 
> > a handful of email clients, non work. So I decided to 
> > email James Bottomley the patch as an attachment.  When Pam
> > Delaney was supporting this driver, she was directly
> > emailing patches to Alan Cox, etc.  I can email you 
> > the patch or put in on our ftp so you can download. 
> 
> Inlining patches into your message is definitely the best approach.
> They get read by the maximum number of people that way, improving the
> chances of bugs being found.
> 
> If you can't do that, an attachment is next best.  If you can, attach
> it with mime-type text/plain as that lets people reply to it 
> more easily.
> 
> If it's far too big (eg you're moving big chunks of code 
> around to make
> the driver more readable), third best is to put the patch on a web/ftp
> site and send a URL.
> 
> There's some fairly easy techniques you can use to reduce the 
> line length
> in your driver.  Here's an example...
> 
> drivers/message/fusion/mptscsih.c :: mptscsih_qcmd().  This 
> function is
> nearly 300 lines long (see Documentation/CodingStyle).  Let's start by
> reordering some bits to get rid of indentation:
> 
> -	if (rc == SUCCESS) {
> -		[...]
> -	} else {
> +	if (rc != SUCCESS) {
>                 mptscsih_freeChainBuffers(hd, my_idx);
>                 mpt_free_msg_frame(ScsiDoneCtx, hd->ioc->id, mf);
>                 did_errcode = 3;
>                 goto did_error;
> 	}
> 
> +	[...]
> 
> ifdefs in the middle of functions are frowned upon, so we can 
> take out the
> DROP_TEST and move it into its own function, like this (for example):
> 
> +#ifdef DROP_TEST
> +static int drop_test(MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, 
> Scsi_Cmnd *SCpnt, in
> t target, int my_idx)
> +{
> +       numTotCmds++;
> +       if ((hd->ioc->id != DROP_IOC) || (target != DROP_TARGET))
> +               return 0;
> +
> +       dropCounter++;
> +
> +       /* If counter matches DROP_THIS, do not issue command to FW to
> +        * force a reset.  Save the MF pointer so we can free 
> resources
> +        * when task management completes.
> +        */
> +       if (dropCounter != DROP_THIS_CMD)
> +               return 0;
> +
> +       dropCounter = 0;
> +
> +       /* If global is set, then we are already doing something -
> +        * so keep issuing commands.
> +        */
> +       if (dropMfPtr != NULL)
> +               return 0;
> +
> +       dropTestNum++;
> +       dropMfPtr = mf;
> +       atomic_inc(&queue_depth);
> +       printk(MYIOC_s_INFO_FMT "Dropped SCSI cmd (%p)\n", 
> hd->ioc->name, SCpnt)
> ;
> +       printk("mf (%p) req (%4x) tot cmds (%d)\n", mf, 
> my_idx, numTotCmds);
> +
> +       return 1;
> +}
> +#else
> +static int drop_test(MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, 
> Scsi_Cmnd *SCpnt, in
> t target, int my_idx) { return 0; }
> +#endif
> 
> [...]
> 
> -#ifdef DROP_TEST
> -               numTotCmds++;
> -               /* If the IOC number and target match, increment
> -                * counter. If counter matches DROP_THIS, do not
> -                * issue command to FW to force a reset.
> -                * Save the MF pointer so we can free resources
> -                * when task mgmt completes.
> -                */
> -               if ((hd->ioc->id == DROP_IOC) && (target == 
> DROP_TARGET)) {
> -                       dropCounter++;
> - 
> -                       if (dropCounter == DROP_THIS_CMD) {
> -                               dropCounter = 0;
> - 
> -                               /* If global is set, then we 
> are already
> -                                * doing something - so keep 
> issuing commands.
> -                                */
> -                               if (dropMfPtr == NULL) {
> -                                       dropTestNum++;
> -                                       dropMfPtr = mf;
> -                                       atomic_inc(&queue_depth);
> -                                       printk(MYIOC_s_INFO_FMT
> -                                               "Dropped SCSI 
> cmd (%p)\n",
> -                                               hd->ioc->name, SCpnt);
> -                                       printk("mf (%p) req 
> (%4x) tot cmds (%d)\
> n",
> -                                               mf, my_idx, 
> numTotCmds);
> -                                       return 0;
> -                               }
> -			}
> -               }
> -#endif
> +       if (drop_test(hd, mf, SCpnt, target, my_idx))
> +               return 0;
> 
> I note the DROP_TEST code is broken -- for example dropMfPtr 
> is referenced
> in mptscsih_flush_drop_test() before its definition on line 2199.
> Perhaps this code is junk and can simply be deleted?
> 
> -- 
> "It's not Hollywood.  War is real, war is primarily not about 
> defeat or
> victory, it is about death.  I've seen thousands and 
> thousands of dead bodies.
> Do you think I want to have an academic debate on this 
> subject?" -- Robert Fisk
> 

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

end of thread, other threads:[~2003-11-11  9:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-07 15:38 [PATCH] MPT Fusion driver update James Bottomley
2003-11-08  8:33 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2003-11-10 15:17 Moore, Eric Dean
2003-11-10 18:01 ` Matthew Wilcox
2003-11-11  9:22 ` Christoph Hellwig
2003-11-10 22:43 Moore, Eric Dean

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