]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] fix for bugzilla 8426: massive slowdown on SCSI CD/DVD drive connected to...
authorDoug Chapman <doug.chapman@hp.com>
Fri, 11 May 2007 06:01:08 +0000 (23:01 -0700)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:49 +0000 (14:32 -0700)
Patch for: http://bugzilla.kernel.org/show_bug.cgi?id=8426

A recent code cleanup that moved code from mptscsih to mptspi inadvertently
change the order some code was called.  This caused a massive slowdown (of
150x to 300x) on the CD/DVD drive on the high-end HP Integrity servers.

Signed-off-by: Doug Chapman <doug.chapman@hp.com>
Cc: <Eric.Moore@lsil.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/message/fusion/mptspi.c

index 85f21b54cb7de6702e89d4fb6728fa25e37e0e3c..2eb5741a933236066f657e6c6a2d8e1971f4eb8d 100644 (file)
@@ -726,13 +726,15 @@ static int mptspi_slave_configure(struct scsi_device *sdev)
        struct _MPT_SCSI_HOST *hd =
                (struct _MPT_SCSI_HOST *)sdev->host->hostdata;
        VirtTarget *vtarget = scsi_target(sdev)->hostdata;
-       int ret = mptscsih_slave_configure(sdev);
+       int ret;
+
+       mptspi_initTarget(hd, vtarget, sdev);
+
+       ret = mptscsih_slave_configure(sdev);
 
        if (ret)
                return ret;
 
-       mptspi_initTarget(hd, vtarget, sdev);
-
        ddvprintk((MYIOC_s_INFO_FMT "id=%d min_period=0x%02x"
                " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
                sdev->id, spi_min_period(scsi_target(sdev)),