* [RFT] DEC SCSI driver clean-up
@ 2002-11-21 13:07 Maciej W. Rozycki
2002-11-21 13:23 ` Geert Uytterhoeven
2002-11-24 19:49 ` Karsten Merker
0 siblings, 2 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2002-11-21 13:07 UTC (permalink / raw)
To: linux-mips
Hello,
Following is a patch that removes SCp.have_data_in references -- the
member is initialized by the NCR53C9x.c core and by the dec_esp.c
front-end, but used by neither. I believe it's some leftover cruft from
the days there were no front-ends -- it's actually used by esp.c. There
are a few less significant clean-ups here and there as well.
I want to apply the patch to the CVS, but I have no means to test it with
a SCSI device -- I could only verify after the change the driver works
well enough to detect the absence of devices in my systems. I would
appreciate if someone with a real SCSI setup could test these changes
before I apply them.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
patch-mips-2.4.20-pre6-20021106-mips64-dec_esp-2
diff -up --recursive --new-file linux-mips-2.4.20-pre6-20021106.macro/drivers/scsi/NCR53C9x.c linux-mips-2.4.20-pre6-20021106/drivers/scsi/NCR53C9x.c
--- linux-mips-2.4.20-pre6-20021106.macro/drivers/scsi/NCR53C9x.c 2002-09-12 03:20:28.000000000 +0000
+++ linux-mips-2.4.20-pre6-20021106/drivers/scsi/NCR53C9x.c 2002-10-22 23:02:09.000000000 +0000
@@ -917,7 +917,7 @@ static void esp_get_dmabufs(struct NCR_E
if (esp->dma_mmu_get_scsi_one)
esp->dma_mmu_get_scsi_one(esp, sp);
else
- sp->SCp.have_data_in = (int) sp->SCp.ptr =
+ sp->SCp.ptr =
(char *) virt_to_phys(sp->request_buffer);
} else {
sp->SCp.buffer = (struct scatterlist *) sp->buffer;
diff -up --recursive --new-file linux-mips-2.4.20-pre6-20021106.macro/drivers/scsi/dec_esp.c linux-mips-2.4.20-pre6-20021106/drivers/scsi/dec_esp.c
--- linux-mips-2.4.20-pre6-20021106.macro/drivers/scsi/dec_esp.c 2002-10-02 17:22:42.000000000 +0000
+++ linux-mips-2.4.20-pre6-20021106/drivers/scsi/dec_esp.c 2002-10-22 23:49:24.000000000 +0000
@@ -323,7 +323,7 @@ static int dma_bytes_sent(struct NCR_ESP
static void dma_drain(struct NCR_ESP *esp)
{
unsigned long nw = *scsi_scr;
- unsigned short *p = KSEG1ADDR((unsigned short *) ((*scsi_dma_ptr) >> 3));
+ unsigned short *p = (unsigned short *)KSEG1ADDR((*scsi_dma_ptr) >> 3);
/*
* Is there something in the dma buffers left?
@@ -437,8 +437,7 @@ static void dma_setup(struct NCR_ESP *es
*/
static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp)
{
- sp->SCp.have_data_in = PHYSADDR(sp->SCp.buffer);
- sp->SCp.ptr = (char *) ((unsigned long) sp->SCp.have_data_in);
+ sp->SCp.ptr = (char *)PHYSADDR(sp->SCp.buffer);
}
static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd * sp)
@@ -484,8 +483,8 @@ static void pmaz_dma_init_write(struct N
{
volatile int *dmareg = (volatile int *) ( esp->slot + DEC_SCSI_DMAREG );
- memcpy((void *) (esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE),
- KSEG0ADDR((void *) vaddress), length);
+ memcpy((void *)(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE),
+ (void *)KSEG0ADDR(vaddress), length);
*dmareg = TC_ESP_DMAR_WRITE |
TC_ESP_DMA_ADDR(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE);
@@ -516,7 +515,5 @@ static void pmaz_dma_setup(struct NCR_ES
static void pmaz_dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp)
{
- sp->SCp.have_data_in = (int) sp->SCp.ptr =
- (char *) KSEG0ADDR((sp->request_buffer));
+ sp->SCp.ptr = (char *)KSEG0ADDR((sp->request_buffer));
}
-
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 13:07 [RFT] DEC SCSI driver clean-up Maciej W. Rozycki
@ 2002-11-21 13:23 ` Geert Uytterhoeven
2002-11-21 14:32 ` Maciej W. Rozycki
2002-11-21 14:37 ` Ralf Baechle
2002-11-24 19:49 ` Karsten Merker
1 sibling, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2002-11-21 13:23 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Linux/MIPS Development, Linux/m68k
On Thu, 21 Nov 2002, Maciej W. Rozycki wrote:
> Following is a patch that removes SCp.have_data_in references -- the
> member is initialized by the NCR53C9x.c core and by the dec_esp.c
> front-end, but used by neither. I believe it's some leftover cruft from
> the days there were no front-ends -- it's actually used by esp.c. There
> are a few less significant clean-ups here and there as well.
BTW, it's also used by jazz_esp, oktagon_esp, and sun3_exp (the last 2 are
m68k).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 13:23 ` Geert Uytterhoeven
@ 2002-11-21 14:32 ` Maciej W. Rozycki
2002-11-21 14:37 ` Ralf Baechle
1 sibling, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2002-11-21 14:32 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/MIPS Development, Linux/m68k
On Thu, 21 Nov 2002, Geert Uytterhoeven wrote:
> On Thu, 21 Nov 2002, Maciej W. Rozycki wrote:
> > Following is a patch that removes SCp.have_data_in references -- the
> > member is initialized by the NCR53C9x.c core and by the dec_esp.c
> > front-end, but used by neither. I believe it's some leftover cruft from
> > the days there were no front-ends -- it's actually used by esp.c. There
> > are a few less significant clean-ups here and there as well.
>
> BTW, it's also used by jazz_esp, oktagon_esp, and sun3_exp (the last 2 are
> m68k).
Yes, I know. Of these jazz_esp.c and sun3x_esp.c actually make use of
SCp.have_data_in and properly initialize it. OTOH, oktagon_esp.c
initializes the field similarly to the NCR53C9x.c core, but it doesn't use
it afterwards at all and should be fixed similarly.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 13:23 ` Geert Uytterhoeven
2002-11-21 14:32 ` Maciej W. Rozycki
@ 2002-11-21 14:37 ` Ralf Baechle
2002-11-21 14:59 ` Geert Uytterhoeven
1 sibling, 1 reply; 9+ messages in thread
From: Ralf Baechle @ 2002-11-21 14:37 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Maciej W. Rozycki, Linux/MIPS Development, Linux/m68k, tsbogend
On Thu, Nov 21, 2002 at 02:23:13PM +0100, Geert Uytterhoeven wrote:
> BTW, it's also used by jazz_esp, oktagon_esp, and sun3_exp (the last 2 are
> m68k).
Thomas has unfortunately stopped maintaining the Jazz support so this is
probably pretty broken by now. Nobody left who cares about Jazz, that's
Acer PICA, MIPS Magnum & Olivetti M400 ?
Ralf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 14:37 ` Ralf Baechle
@ 2002-11-21 14:59 ` Geert Uytterhoeven
2002-11-25 12:30 ` Maciej W. Rozycki
0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2002-11-21 14:59 UTC (permalink / raw)
To: Ralf Baechle
Cc: Maciej W. Rozycki, Linux/MIPS Development, Linux/m68k, tsbogend
On Thu, 21 Nov 2002, Ralf Baechle wrote:
> On Thu, Nov 21, 2002 at 02:23:13PM +0100, Geert Uytterhoeven wrote:
> > BTW, it's also used by jazz_esp, oktagon_esp, and sun3_exp (the last 2 are
> > m68k).
>
> Thomas has unfortunately stopped maintaining the Jazz support so this is
> probably pretty broken by now. Nobody left who cares about Jazz, that's
Yes, it definitely doesn't work, since SCSI_JAZZ_ESP isn't used at all in
jazz_esp.c (noticed while moving the SCSI host template initializers from the
header files to the source files).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 14:59 ` Geert Uytterhoeven
@ 2002-11-25 12:30 ` Maciej W. Rozycki
0 siblings, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2002-11-25 12:30 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/MIPS Development, Linux/m68k, tsbogend
On Thu, 21 Nov 2002, Geert Uytterhoeven wrote:
> Yes, it definitely doesn't work, since SCSI_JAZZ_ESP isn't used at all in
> jazz_esp.c (noticed while moving the SCSI host template initializers from the
> header files to the source files).
I suggest the following patch for the Oktagon driver.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
patch-mips-2.4.20-pre6-20021125-oktagon_esp-0
--- linux/drivers/scsi/oktagon_esp.c.macro Thu Jun 27 02:59:32 2002
+++ linux/drivers/scsi/oktagon_esp.c Mon Nov 25 12:11:43 2002
@@ -548,7 +548,7 @@ static void dma_invalidate(struct NCR_ES
void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd *sp)
{
- sp->SCp.have_data_in = (int) sp->SCp.ptr =
+ sp->SCp.ptr =
sp->request_buffer;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFT] DEC SCSI driver clean-up
2002-11-21 13:07 [RFT] DEC SCSI driver clean-up Maciej W. Rozycki
2002-11-21 13:23 ` Geert Uytterhoeven
@ 2002-11-24 19:49 ` Karsten Merker
2002-11-25 12:26 ` Maciej W. Rozycki
1 sibling, 1 reply; 9+ messages in thread
From: Karsten Merker @ 2002-11-24 19:49 UTC (permalink / raw)
To: linux-mips
On Thu, Nov 21, 2002 at 02:07:20PM +0100, Maciej W. Rozycki wrote:
[DEC SCSI driver patch]
> I want to apply the patch to the CVS, but I have no means to test it with
> a SCSI device -- I could only verify after the change the driver works
> well enough to detect the absence of devices in my systems. I would
> appreciate if someone with a real SCSI setup could test these changes
> before I apply them.
At least a short test on my /150 did not show any problems.
Regards,
Karsten
--
#include <standard_disclaimer>
Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung
oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder
Meinungsforschung.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFT] DEC SCSI driver clean-up
2002-11-24 19:49 ` Karsten Merker
@ 2002-11-25 12:26 ` Maciej W. Rozycki
0 siblings, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2002-11-25 12:26 UTC (permalink / raw)
To: Karsten Merker; +Cc: linux-mips
On Sun, 24 Nov 2002, Karsten Merker wrote:
> At least a short test on my /150 did not show any problems.
The change is such that if the driver works at all, it will work in all
cases, not worse then before. The patch is now in. Thanks a lot for
testing it.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFT] DEC SCSI driver clean-up
@ 2002-11-21 14:51 Tor Arntsen
0 siblings, 0 replies; 9+ messages in thread
From: Tor Arntsen @ 2002-11-21 14:51 UTC (permalink / raw)
To: Ralf Baechle, Geert Uytterhoeven
Cc: Maciej W. Rozycki, Linux/MIPS Development, Linux/m68k, tsbogend
On Nov 21, 15:38, Ralf Baechle wrote:
>Thomas has unfortunately stopped maintaining the Jazz support so this is
>probably pretty broken by now. Nobody left who cares about Jazz, that's
>Acer PICA, MIPS Magnum & Olivetti M400 ?
Well, I care, because I have an M400 sitting right here.. unfortunately
I have no time available for even testing the current status until
somewhen next year :-(
-Tor
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-11-25 12:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-21 13:07 [RFT] DEC SCSI driver clean-up Maciej W. Rozycki
2002-11-21 13:23 ` Geert Uytterhoeven
2002-11-21 14:32 ` Maciej W. Rozycki
2002-11-21 14:37 ` Ralf Baechle
2002-11-21 14:59 ` Geert Uytterhoeven
2002-11-25 12:30 ` Maciej W. Rozycki
2002-11-24 19:49 ` Karsten Merker
2002-11-25 12:26 ` Maciej W. Rozycki
-- strict thread matches above, loose matches on Subject: below --
2002-11-21 14:51 Tor Arntsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox