From 29982e9acd3e81a289c73321401427d02eaa8adc Mon Sep 17 00:00:00 2001 From: Doug Chapman Date: Mon, 7 May 2007 15:59:46 -0400 Subject: [PATCH 1/2] [SCSI] fusion: fix for BZ 8426 - massive slowdown on SCSI CD/DVD drive 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 Acked-by: Eric Moore Signed-off-by: James Bottomley --- drivers/message/fusion/mptspi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index d75f7ffbb02e..37bf65348372 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -727,13 +727,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)), From 204abf28679cd55a8e254b18965583bb1c8bc739 Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Wed, 13 Jun 2007 12:58:53 -0700 Subject: [PATCH 2/2] [SCSI] ESP: Don't forget to clear ESP_FLAG_RESETTING. esp_reset_cleanup() does everything necessary except clear the flag, so we never exit resetting state. Signed-off-by: David S. Miller Signed-off-by: James Bottomley --- drivers/scsi/esp_scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index ec71061aef61..71caf2ded6ba 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -2033,6 +2033,7 @@ static void esp_reset_cleanup(struct esp *esp) starget_for_each_device(tp->starget, NULL, esp_clear_hold); } + esp->flags &= ~ESP_FLAG_RESETTING; } /* Runs under host->lock */