public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IOMMU overflow handling fix for MPT fusion
@ 2003-08-10 14:13 Andi Kleen
  0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2003-08-10 14:13 UTC (permalink / raw)
  To: linux-scsi, James.Bottomley; +Cc: Pam.Delaney


Currently mpt fusion does not handle IOMMU overflow (pci_map_sg returning 0) 
very gracefully. It gets not reported to the upper layers. This patch fixes this.

As a related note the fusion driver tends to trigger the NMI watchdog as soon
as it goes into any error recovery, because it busy waits for seconds with
interrupts disabled (seems to be still true with the new error handling in 2.6).
This is a big inconvenient because it leads to a forced oops. 

I tried to work around it by exporting touch_nmi_watchdog and using it in
the delays, but Linus was opposed to this approach. It would be nice
if someone could fix this. Afaik in 2.6 the error recovery should mostly
run in process context, so it should be possible to use schedule_timeout()
with interrupts on for the delays. 

At least on x86-64 the NMI watchdog runs by default and even on i386 it is a
very useful debugging tool.

-Andi

diff -burpN -X ../KDIFX linux/drivers/message/fusion/mptscsih.c linux-2.6.0test3-amd64/drivers/message/fusion/mptscsih.c
--- linux/drivers/message/fusion/mptscsih.c	2003-07-28 23:12:23.000000000 +0200
+++ linux-2.6.0test3-amd64/drivers/message/fusion/mptscsih.c	2003-08-03 12:15:10.000000000 +0200
@@ -475,6 +476,8 @@ mptscsih_AddSGE(MPT_SCSI_HOST *hd, Scsi_
 			       (struct scatterlist *) SCpnt->request_buffer,
 			       SCpnt->use_sg,
 			       scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+		if (sges_left == 0) 
+			return FAILED;
 	} else if (SCpnt->request_bufflen) {
 		dma_addr_t	 buf_dma_addr;
 		scPrivate	*my_priv;

 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-10 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-10 14:13 [PATCH] IOMMU overflow handling fix for MPT fusion Andi Kleen

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