* Please pull drivers/scsi/dec_esp.c from Linus' git
@ 2006-02-13 22:53 Martin Michlmayr
2006-02-15 15:08 ` Ralf Baechle
0 siblings, 1 reply; 10+ messages in thread
From: Martin Michlmayr @ 2006-02-13 22:53 UTC (permalink / raw)
To: linux-mips
linux-mips git on DECstation currently fails to compile with:
CC drivers/scsi/dec_esp.o
drivers/scsi/dec_esp.c:137: error: static declaration of ‘dec_esp_detect’ follows non-static declaration
drivers/scsi/dec_esp.c:101: error: previous declaration of ‘dec_esp_detect’ was here
make[2]: *** [drivers/scsi/dec_esp.o] Error 1
make[1]: *** [drivers/scsi] Error 2
This declaration is correct in Linus' git tree but not in ours. Ralf,
can you please compare the two again and sync.
The current delta is included below.
--- drivers/scsi/dec_esp.c 2006-02-13 21:48:12.000000000 +0000
+++ /home/tbm/index.html?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=blob_plain;h=a35ee43a48df78e1b627c63e33e6895035d0fe1a;f=drivers%2Fscsi%2Fdec_esp.c 2006-02-13 22:52:06.000000000 +0000
@@ -55,7 +55,7 @@
static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count);
static void dma_drain(struct NCR_ESP *esp);
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd * sp);
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd *sp);
static void dma_dump_state(struct NCR_ESP *esp);
static void dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length);
static void dma_init_write(struct NCR_ESP *esp, u32 vaddress, int length);
@@ -64,9 +64,9 @@
static int dma_irq_p(struct NCR_ESP *esp);
static int dma_ports_p(struct NCR_ESP *esp);
static void dma_setup(struct NCR_ESP *esp, u32 addr, int count, int write);
-static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp);
-static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd * sp);
-static void dma_advance_sg(Scsi_Cmnd * sp);
+static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd * sp);
+static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd * sp);
+static void dma_advance_sg(struct scsi_cmnd * sp);
static void pmaz_dma_drain(struct NCR_ESP *esp);
static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length);
@@ -74,7 +74,7 @@
static void pmaz_dma_ints_off(struct NCR_ESP *esp);
static void pmaz_dma_ints_on(struct NCR_ESP *esp);
static void pmaz_dma_setup(struct NCR_ESP *esp, u32 addr, int count, int write);
-static void pmaz_dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp);
+static void pmaz_dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd * sp);
#define TC_ESP_RAM_SIZE 0x20000
#define ESP_TGT_DMA_SIZE ((TC_ESP_RAM_SIZE/7) & ~(sizeof(int)-1))
@@ -98,7 +98,7 @@
static irqreturn_t scsi_dma_err_int(int, void *, struct pt_regs *);
static irqreturn_t scsi_dma_int(int, void *, struct pt_regs *);
-int dec_esp_detect(struct scsi_host_template * tpnt);
+static int dec_esp_detect(struct scsi_host_template * tpnt);
static int dec_esp_release(struct Scsi_Host *shost)
{
@@ -112,7 +112,7 @@
static struct scsi_host_template driver_template = {
.proc_name = "dec_esp",
- .proc_info = &esp_proc_info,
+ .proc_info = esp_proc_info,
.name = "NCR53C94",
.detect = dec_esp_detect,
.slave_alloc = esp_slave_alloc,
@@ -230,7 +230,7 @@
mem_start = get_tc_base_addr(slot);
/* Store base addr into esp struct */
- esp->slot = mem_start;
+ esp->slot = CPHYSADDR(mem_start);
esp->dregs = 0;
esp->eregs = (void *)CKSEG1ADDR(mem_start +
@@ -379,7 +379,7 @@
}
}
-static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd * sp)
+static int dma_can_transfer(struct NCR_ESP *esp, struct scsi_cmnd * sp)
{
return sp->SCp.this_residual;
}
@@ -491,12 +491,12 @@
dma_init_write(esp, addr, count);
}
-static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp)
+static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd * sp)
{
sp->SCp.ptr = (char *)virt_to_phys(sp->request_buffer);
}
-static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd * sp)
+static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, struct scsi_cmnd * sp)
{
int sz = sp->SCp.buffers_residual;
struct scatterlist *sg = sp->SCp.buffer;
@@ -508,7 +508,7 @@
sp->SCp.ptr = (char *)(sp->SCp.buffer->dma_address);
}
-static void dma_advance_sg(Scsi_Cmnd * sp)
+static void dma_advance_sg(struct scsi_cmnd * sp)
{
sp->SCp.ptr = (char *)(sp->SCp.buffer->dma_address);
}
@@ -572,7 +572,7 @@
pmaz_dma_init_write(esp, addr, count);
}
-static void pmaz_dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp)
+static void pmaz_dma_mmu_get_scsi_one(struct NCR_ESP *esp, struct scsi_cmnd * sp)
{
sp->SCp.ptr = (char *)virt_to_phys(sp->request_buffer);
}
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-13 22:53 Please pull drivers/scsi/dec_esp.c from Linus' git Martin Michlmayr
@ 2006-02-15 15:08 ` Ralf Baechle
2006-02-16 10:17 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Ralf Baechle @ 2006-02-15 15:08 UTC (permalink / raw)
To: Martin Michlmayr; +Cc: Maciej W. Rozycki, linux-mips
On Mon, Feb 13, 2006 at 10:53:31PM +0000, Martin Michlmayr wrote:
> @@ -230,7 +230,7 @@
> mem_start = get_tc_base_addr(slot);
>
> /* Store base addr into esp struct */
> - esp->slot = mem_start;
> + esp->slot = CPHYSADDR(mem_start);
>
> esp->dregs = 0;
> esp->eregs = (void *)CKSEG1ADDR(mem_start +
I merged allmost all of the differences from mainline except this one.
Maciej, does this need the CPHYSADDR() op or not here?
Ralf
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-15 15:08 ` Ralf Baechle
@ 2006-02-16 10:17 ` Maciej W. Rozycki
2006-02-16 14:59 ` Ralf Baechle
0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2006-02-16 10:17 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Martin Michlmayr, linux-mips
On Wed, 15 Feb 2006, Ralf Baechle wrote:
> > @@ -230,7 +230,7 @@
> > mem_start = get_tc_base_addr(slot);
> >
> > /* Store base addr into esp struct */
> > - esp->slot = mem_start;
> > + esp->slot = CPHYSADDR(mem_start);
> >
> > esp->dregs = 0;
> > esp->eregs = (void *)CKSEG1ADDR(mem_start +
>
> I merged allmost all of the differences from mainline except this one.
>
> Maciej, does this need the CPHYSADDR() op or not here?
Of course not as get_tc_base_addr() returns a physical address these
days. Thanks for spotting this bit.
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-16 10:17 ` Maciej W. Rozycki
@ 2006-02-16 14:59 ` Ralf Baechle
2006-02-16 15:48 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Ralf Baechle @ 2006-02-16 14:59 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Martin Michlmayr, linux-mips
On Thu, Feb 16, 2006 at 10:17:38AM +0000, Maciej W. Rozycki wrote:
> Date: Thu, 16 Feb 2006 10:17:38 +0000 (GMT)
> From: "Maciej W. Rozycki" <macro@linux-mips.org>
> To: Ralf Baechle <ralf@linux-mips.org>
> cc: Martin Michlmayr <tbm@cyrius.com>, linux-mips@linux-mips.org
> Subject: Re: Please pull drivers/scsi/dec_esp.c from Linus' git
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Wed, 15 Feb 2006, Ralf Baechle wrote:
>
> > > @@ -230,7 +230,7 @@
> > > mem_start = get_tc_base_addr(slot);
> > >
> > > /* Store base addr into esp struct */
> > > - esp->slot = mem_start;
> > > + esp->slot = CPHYSADDR(mem_start);
> > >
> > > esp->dregs = 0;
> > > esp->eregs = (void *)CKSEG1ADDR(mem_start +
> >
> > I merged allmost all of the differences from mainline except this one.
> >
> > Maciej, does this need the CPHYSADDR() op or not here?
>
> Of course not as get_tc_base_addr() returns a physical address these
> days. Thanks for spotting this bit.
Ok, I sent this bit upstream.
That still leaves below gem to sort out.
Ralf
diff --git a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h
index 65a9b37..81d03d1 100644
--- a/drivers/scsi/NCR53C9x.h
+++ b/drivers/scsi/NCR53C9x.h
@@ -145,12 +145,7 @@
#ifndef MULTIPLE_PAD_SIZES
-#ifdef CONFIG_CPU_HAS_WB
-#include <asm/wbflush.h>
-#define esp_write(__reg, __val) do{(__reg) = (__val); wbflush();} while(0)
-#else
-#define esp_write(__reg, __val) ((__reg) = (__val))
-#endif
+#define esp_write(__reg, __val) do{(__reg) = (__val); iob();} while(0)
#define esp_read(__reg) (__reg)
struct ESP_regs {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-16 14:59 ` Ralf Baechle
@ 2006-02-16 15:48 ` Maciej W. Rozycki
2006-02-17 9:12 ` Jes Sorensen
0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2006-02-16 15:48 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Martin Michlmayr, linux-mips
On Thu, 16 Feb 2006, Ralf Baechle wrote:
> That still leaves below gem to sort out.
Yeah -- there is that mmiowb() macro that is supposed to fit here, but
some MIPS-based hardware is ordered weakly (and strangely) enough for this
single macro to be a bit insufficient. I think we should have at least
mmiowb() and mmiob() (corresponding to wmb() and mb(), respectively) as
there is a system we support that does writes in order, but snoops the
writeback buffer (the R3220). Another one is worse yet as does all of
that plus byte gathering (the R2020). At least the latter cannot have the
NCR/Emulex SCSI chip and uses DEC's own design instead (a DC7061 gate
array highly suspected to also support DSSI if appropriately configured).
I'm not sure if we really need mmiorb() -- probably not.
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-16 15:48 ` Maciej W. Rozycki
@ 2006-02-17 9:12 ` Jes Sorensen
2006-02-17 10:45 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Jes Sorensen @ 2006-02-17 9:12 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Ralf Baechle, Martin Michlmayr, linux-mips
>>>>> "Maciej" == Maciej W Rozycki <macro@linux-mips.org> writes:
Maciej> On Thu, 16 Feb 2006, Ralf Baechle wrote:
>> That still leaves below gem to sort out.
Maciej> Yeah -- there is that mmiowb() macro that is supposed to fit
Maciej> here, but some MIPS-based hardware is ordered weakly (and
Maciej> strangely) enough for this single macro to be a bit
Maciej> insufficient. I think we should have at least mmiowb() and
Maciej> mmiob() (corresponding to wmb() and mb(), respectively) as
Maciej> there is a system we support that does writes in order, but
Maciej> snoops the writeback buffer (the R3220). Another one is worse
Maciej> yet as does all of that plus byte gathering (the R2020). At
Maciej> least the latter cannot have the NCR/Emulex SCSI chip and uses
Maciej> DEC's own design instead (a DC7061 gate array highly suspected
Maciej> to also support DSSI if appropriately configured).
Maciej> I'm not sure if we really need mmiorb() -- probably not.
Just make mmiowb() strong enough on those platforms. There's really no
reason to introduce yet another variation at this point.
Jes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-17 9:12 ` Jes Sorensen
@ 2006-02-17 10:45 ` Maciej W. Rozycki
2006-02-17 12:35 ` Jes Sorensen
0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2006-02-17 10:45 UTC (permalink / raw)
To: Jes Sorensen; +Cc: Ralf Baechle, Martin Michlmayr, linux-mips
On Fri, 17 Feb 2006, Jes Sorensen wrote:
> Just make mmiowb() strong enough on those platforms. There's really no
> reason to introduce yet another variation at this point.
It's just horribly slow and an overkill if it's only ordering of
consecutive writes rather than ordering of a read after a write that has
to be guaranteed. But perhaps we could keep abusing wmb() for the
former...
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-17 10:45 ` Maciej W. Rozycki
@ 2006-02-17 12:35 ` Jes Sorensen
2006-02-17 12:51 ` Maciej W. Rozycki
0 siblings, 1 reply; 10+ messages in thread
From: Jes Sorensen @ 2006-02-17 12:35 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Ralf Baechle, Martin Michlmayr, linux-mips
Maciej W. Rozycki wrote:
> On Fri, 17 Feb 2006, Jes Sorensen wrote:
>
>
>>Just make mmiowb() strong enough on those platforms. There's really no
>>reason to introduce yet another variation at this point.
>
>
> It's just horribly slow and an overkill if it's only ordering of
> consecutive writes rather than ordering of a read after a write that has
> to be guaranteed. But perhaps we could keep abusing wmb() for the
> former...
Depends on where it's happening. If it's the CPU doing it before it hits
the bus then wmb() would probably be ok.
Jes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-17 12:35 ` Jes Sorensen
@ 2006-02-17 12:51 ` Maciej W. Rozycki
2006-02-17 15:17 ` Jes Sorensen
0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2006-02-17 12:51 UTC (permalink / raw)
To: Jes Sorensen; +Cc: Ralf Baechle, Martin Michlmayr, linux-mips
On Fri, 17 Feb 2006, Jes Sorensen wrote:
> > It's just horribly slow and an overkill if it's only ordering of consecutive
> > writes rather than ordering of a read after a write that has to be
> > guaranteed. But perhaps we could keep abusing wmb() for the former...
>
> Depends on where it's happening. If it's the CPU doing it before it hits
> the bus then wmb() would probably be ok.
These systems only allow the CPU to access devices other than RAM. But
consistency between platforms is important as the same drivers may be used
for systems that have different access rules. Examples are currently the
defxx and the tgafb drivers. They should work correctly with the R3220
writeback buffer as well as with PCI.
Maciej
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Please pull drivers/scsi/dec_esp.c from Linus' git
2006-02-17 12:51 ` Maciej W. Rozycki
@ 2006-02-17 15:17 ` Jes Sorensen
0 siblings, 0 replies; 10+ messages in thread
From: Jes Sorensen @ 2006-02-17 15:17 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Ralf Baechle, Martin Michlmayr, linux-mips
>>>>> "Maciej" == Maciej W Rozycki <macro@linux-mips.org> writes:
Maciej> These systems only allow the CPU to access devices other than
Maciej> RAM. But consistency between platforms is important as the
Maciej> same drivers may be used for systems that have different
Maciej> access rules. Examples are currently the defxx and the tgafb
Maciej> drivers. They should work correctly with the R3220 writeback
Maciej> buffer as well as with PCI.
So just change the implementation of mmiowb depending on whether it's
on an R3220 or a PCI system.
Cheers,
Jes
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-02-17 15:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 22:53 Please pull drivers/scsi/dec_esp.c from Linus' git Martin Michlmayr
2006-02-15 15:08 ` Ralf Baechle
2006-02-16 10:17 ` Maciej W. Rozycki
2006-02-16 14:59 ` Ralf Baechle
2006-02-16 15:48 ` Maciej W. Rozycki
2006-02-17 9:12 ` Jes Sorensen
2006-02-17 10:45 ` Maciej W. Rozycki
2006-02-17 12:35 ` Jes Sorensen
2006-02-17 12:51 ` Maciej W. Rozycki
2006-02-17 15:17 ` Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.