* [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd)
@ 2001-01-19 8:31 Geert Uytterhoeven
2001-01-19 8:40 ` Houten K.H.C. van (Karel)
0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2001-01-19 8:31 UTC (permalink / raw)
To: Linux/MIPS Development; +Cc: Rasmus Andersen
---------- Forwarded message ----------
Date: Wed, 17 Jan 2001 23:18:52 +0100
From: Rasmus Andersen <rasmus@jaquet.dk>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code
(240p3)
Hi.
(I have not been able to find a maintainer for this code.)
This patch makes drivers/scsi/dec_esp.c check the return code of
request_irq. It applies cleanly against 240p3 and ac9.
In the search_tc_slot loop I made it continue the search on failure
for one slot. Would this be correct?
Please comment.
--- linux-ac9/drivers/scsi/dec_esp.c.org Sun Jan 14 20:03:50 2001
+++ linux-ac9/drivers/scsi/dec_esp.c Wed Jan 17 22:52:52 2001
@@ -87,7 +87,7 @@
unsigned char scsi_pmaz_dma_buff_used[ESP_NCMD];
unsigned char scsi_cur_buff = 1; /* Leave space for command buffer */
__u32 esp_virt_buffer;
-int scsi_current_length = 0;
+int scsi_current_length;
volatile unsigned char cmd_buffer[16];
volatile unsigned char pmaz_cmd_buffer[16];
@@ -181,10 +181,13 @@
esp->esp_command_dvma = (__u32) KSEG1ADDR((volatile unsigned char *) cmd_buffer);
esp->irq = SCSI_INT;
- request_irq(esp->irq, esp_intr, SA_INTERRUPT, "NCR 53C94 SCSI",
- NULL);
- request_irq(SCSI_DMA_INT, scsi_dma_int, SA_INTERRUPT, "JUNKIO SCSI DMA",
- NULL);
+ if (request_irq(esp->irq, esp_intr, SA_INTERRUPT,
+ "NCR 53C94 SCSI", NULL))
+ goto err_dealloc;
+ if (request_irq(SCSI_DMA_INT, scsi_dma_int, SA_INTERRUPT,
+ "JUNKIO SCSI DMA", NULL))
+ goto err_free_irq;
+
esp->scsi_id = 7;
@@ -257,7 +260,12 @@
esp->dma_mmu_release_scsi_sgl = 0;
esp->dma_advance_sg = 0;
- request_irq(esp->irq, esp_intr, SA_INTERRUPT, "PMAZ_AA", NULL);
+ if (request_irq(esp->irq, esp_intr, SA_INTERRUPT,
+ "PMAZ_AA", NULL)) {
+ esp_deallocate(esp);
+ release_tc_card(slot);
+ continue;
+ }
esp->scsi_id = 7;
esp->diff = 0;
esp_initialize(esp);
@@ -267,10 +275,16 @@
if(nesps) {
printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use);
- esps_running = esps_in_use;
- return esps_in_use;
- } else
- return 0;
+ esps_running = esps_in_use;
+ return esps_in_use;
+ }
+ return 0;
+
+ err_free_irq:
+ free_irq(esp->irq, esp_intr);
+ err_dealloc:
+ esp_deallocate(esp);
+ return 0;
}
/************************************************************* DMA Functions */
@@ -524,4 +538,4 @@
(char *) KSEG0ADDR((sp->request_buffer));
}
-#endif
\ No newline at end of file
+#endif
--
Regards,
Rasmus(rasmus@jaquet.dk)
``When the president does it, that means that it is not illegal.''
--Richard M. Nixon, TV interview with David Frost, 1977 May 4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd)
2001-01-19 8:31 [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd) Geert Uytterhoeven
@ 2001-01-19 8:40 ` Houten K.H.C. van (Karel)
2001-01-19 10:58 ` Florian Lohoff
2001-01-19 20:03 ` Rasmus Andersen
0 siblings, 2 replies; 5+ messages in thread
From: Houten K.H.C. van (Karel) @ 2001-01-19 8:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux/MIPS Development, Rasmus Andersen, K.H.C.vanHouten
Hi all,
Geert Forwarded:
> Date: Wed, 17 Jan 2001 23:18:52 +0100
> From: Rasmus Andersen <rasmus@jaquet.dk>
> To: linux-kernel@vger.kernel.org
> Subject: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code
> (240p3)
>
> Hi.
>
> (I have not been able to find a maintainer for this code.)
>
> This patch makes drivers/scsi/dec_esp.c check the return code of
> request_irq. It applies cleanly against 240p3 and ac9.
>
> In the search_tc_slot loop I made it continue the search on failure
> for one slot. Would this be correct?
>
> Please comment.
Would this be the cause of the problem I have in my 5000/260
that I can only use the on-board SCSI interface, and not
the TC scsi card (which should use the same driver)?
I hope to be able to test this patch this weekend!
Regards,
Karel.
--
Karel van Houten
----------------------------------------------------------
The box said "Requires Windows 95 or better."
I can't understand why it won't work on my Linux computer.
----------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd)
2001-01-19 8:40 ` Houten K.H.C. van (Karel)
@ 2001-01-19 10:58 ` Florian Lohoff
2001-01-19 11:46 ` Florian Lohoff
2001-01-19 20:03 ` Rasmus Andersen
1 sibling, 1 reply; 5+ messages in thread
From: Florian Lohoff @ 2001-01-19 10:58 UTC (permalink / raw)
To: K.H.C.vanHouten; +Cc: Linux/MIPS Development, Rasmus Andersen, K.H.C.vanHouten
On Fri, Jan 19, 2001 at 09:40:44AM +0100, Houten K.H.C. van (Karel) wrote:
> Hi all,
>
> Would this be the cause of the problem I have in my 5000/260
> that I can only use the on-board SCSI interface, and not
> the TC scsi card (which should use the same driver)?
>
> I hope to be able to test this patch this weekend!
I dont think so - The addtional cards have been broken since early
2.4.0 and i tried once to fix it and clean up the spaghetti stuff
but i think i failed horribly and made it worse in the cvs.
I'll have a look at it soon(tm).
Flo
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Why is it called "common sense" when nobody seems to have any?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd)
2001-01-19 10:58 ` Florian Lohoff
@ 2001-01-19 11:46 ` Florian Lohoff
0 siblings, 0 replies; 5+ messages in thread
From: Florian Lohoff @ 2001-01-19 11:46 UTC (permalink / raw)
To: K.H.C.vanHouten; +Cc: Linux/MIPS Development, Rasmus Andersen, K.H.C.vanHouten
On Fri, Jan 19, 2001 at 11:58:05AM +0100, Florian Lohoff wrote:
> On Fri, Jan 19, 2001 at 09:40:44AM +0100, Houten K.H.C. van (Karel) wrote:
> > Hi all,
> >
> > Would this be the cause of the problem I have in my 5000/260
> > that I can only use the on-board SCSI interface, and not
> > the TC scsi card (which should use the same driver)?
> >
> > I hope to be able to test this patch this weekend!
>
> I dont think so - The addtional cards have been broken since early
> 2.4.0 and i tried once to fix it and clean up the spaghetti stuff
> but i think i failed horribly and made it worse in the cvs.
>
> I'll have a look at it soon(tm).
Sorry - Meant early 2.3.
Flo
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Why is it called "common sense" when nobody seems to have any?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd)
2001-01-19 8:40 ` Houten K.H.C. van (Karel)
2001-01-19 10:58 ` Florian Lohoff
@ 2001-01-19 20:03 ` Rasmus Andersen
1 sibling, 0 replies; 5+ messages in thread
From: Rasmus Andersen @ 2001-01-19 20:03 UTC (permalink / raw)
To: K.H.C.vanHouten
Cc: Geert Uytterhoeven, Linux/MIPS Development, K.H.C.vanHouten
On Fri, Jan 19, 2001 at 09:40:44AM +0100, Houten K.H.C. van (Karel) wrote:
> Would this be the cause of the problem I have in my 5000/260
> that I can only use the on-board SCSI interface, and not
> the TC scsi card (which should use the same driver)?
As Florian Lohoff commented I doubt this patch will be of any
help for you. My comment wrt. continuing in the tc loop was
merely in case of a request_irq failure, a failure ignored
earlier. So I would guess that this patch is not your
problemkiller. But testing is always nice :)
--
Regards,
Rasmus(rasmus@jaquet.dk)
There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence. -- Jeremy S. Anderson
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-01-19 20:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-19 8:31 [PATCH] make drivers/scsi/dec_esp.c check request_irq return code (240p3) (fwd) Geert Uytterhoeven
2001-01-19 8:40 ` Houten K.H.C. van (Karel)
2001-01-19 10:58 ` Florian Lohoff
2001-01-19 11:46 ` Florian Lohoff
2001-01-19 20:03 ` Rasmus Andersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox