* [parisc-linux] gdth driver on L2000
@ 2004-03-24 15:31 Eric Sproul
2004-03-24 17:31 ` Grant Grundler
0 siblings, 1 reply; 8+ messages in thread
From: Eric Sproul @ 2004-03-24 15:31 UTC (permalink / raw)
To: PA-RISC Linux
Hi all,
Forgive me if this is a FAQ. I read the website FAQ and did a little
searching, but didn't turn up anything. I am not a kernel hacker--
that's why I'm posting here.
I am running Debian sid on a 2-way L2000-44 (rp5450). I have
successfully built a 64-bit, SMP 2.4.25 kernel using Debian's source
(I'd be happy to share my config if anyone is interested) and the
kernel-patch-2.4.25-hppa patch.
I want to use an Intel SRCU RAID controller in this machine, so I
modified my config to build the gdth driver into the kernel. It fails
with an error about DMA_MODE_CASCADE being undeclared. Looking further,
I note that this is normally declared in include/asm-$ARCH/dma.h, but it
doesn't appear in include/asm-parisc/dma.h. Is it undeclared because it
doesn't work or because no one has needed it before? Below is the build
output.
Would I be better off with a 2.6 kernel? I have not yet attempted to
build any 2.6 kernels on this machine. I took the lack of stock 2.6
kernels for hppa in sid to mean that there was a problem, but I'd love
to be wrong about that. ;)
Thanks,
Eric
$ uname -a
Linux parisc 2.4.25-64-smp #1 SMP Mon Mar 22 10:09:38 EST 2004 parisc64
GNU/Linux
gcc-3.3-hppa64 3.3.3-2
binutils-hppa64 2.14.90.0.7-5
hppa64-linux-gcc -D__KERNEL__ -I/usr/src/kernel-source-2.4.25/include
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -O2 -D__linux__ -pipe -fno-strength-reduce -mno-space-regs
-mfast-indirect-calls -mdisable-fpregs -ffunction-sections -march=2.0
-mschedule=8000 -nostdinc -I
/usr/lib/gcc-lib/hppa64-linux/3.3.3/include -DKBUILD_BASENAME=gdth -c
-o gdth.o gdth.c
gdth.c: In function `gdth_init_isa':
gdth.c:1135: warning: passing arg 1 of `memset_io' makes integer from pointer without a cast
gdth.c: In function `gdth_init_pci':
gdth.c:1292: warning: passing arg 1 of `memset_io' makes integer from pointer without a cast
gdth.c:1405: warning: passing arg 1 of `memset_io' makes integer from pointer without a cast
gdth.c:1560: warning: passing arg 1 of `memset_io' makes integer from pointer without a cast
gdth.c: In function `gdth_copy_command':
gdth.c:1792: warning: passing arg 1 of `memcpy_toio' makes integer from pointer without a cast
gdth.c:1799: warning: passing arg 1 of `memcpy_toio' makes integer from pointer without a cast
gdth.c:1806: warning: passing arg 1 of `memcpy_toio' makes integer from pointer without a cast
gdth.c:1813: warning: passing arg 1 of `memcpy_toio' makes integer from pointer without a cast
gdth.c: In function `gdth_detect':
gdth.c:4066: error: `DMA_MODE_CASCADE' undeclared (first use in this function)
gdth.c:4066: error: (Each undeclared identifier is reported only once
gdth.c:4066: error: for each function it appears in.)
make[4]: *** [gdth.o] Error 1
make[4]: Leaving directory `/usr/src/kernel-source-2.4.25/drivers/scsi'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/kernel-source-2.4.25/drivers/scsi'
make[2]: *** [_subdir_scsi] Error 2
make[2]: Leaving directory `/usr/src/kernel-source-2.4.25/drivers'
make[1]: *** [_dir_drivers] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.4.25'
make: *** [stamp-build] Error 2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] gdth driver on L2000
2004-03-24 15:31 [parisc-linux] gdth driver on L2000 Eric Sproul
@ 2004-03-24 17:31 ` Grant Grundler
2004-03-24 19:56 ` Eric Sproul
0 siblings, 1 reply; 8+ messages in thread
From: Grant Grundler @ 2004-03-24 17:31 UTC (permalink / raw)
To: Eric Sproul; +Cc: PA-RISC Linux
On Wed, Mar 24, 2004 at 10:31:20AM -0500, Eric Sproul wrote:
> Forgive me if this is a FAQ.
It's not - no problem
...
> I want to use an Intel SRCU RAID controller in this machine, so I
> modified my config to build the gdth driver into the kernel. It fails
> with an error about DMA_MODE_CASCADE being undeclared. Looking further,
> I note that this is normally declared in include/asm-$ARCH/dma.h, but it
> doesn't appear in include/asm-parisc/dma.h. Is it undeclared because it
> doesn't work or because no one has needed it before?
DMA_MODE_CASCADE is for ISA bus support (8237A chips).
AFAIK, parisc doesn't support ISA.
And EISA support isn't fully working yet.
EISA support still needs some code written for the WAX chip IOMMU.
gdth is a "multi-bus" driver:
static int gdth_init_eisa(ushort eisa_adr,gdth_ha_str *ha);
static int gdth_init_isa(ulong32 bios_adr,gdth_ha_str *ha);
static int gdth_init_pci(gdth_pci_str *pcistr,gdth_ha_str *ha);
The problem is the driver assumes EISA/ISA/PCI are all enabled.
The linux-2.6/drivers/scsi/Kconfig entry says only any one of those:
config SCSI_GDTH
tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support
"
depends on (ISA || EISA || PCI) && SCSI
In short, the driver needs to be mangled so it works with only PCI enabled.
[ Actually, this driver violates Documentation/CodingStyle pretty seriously.
o too many "#if LINUX_VERSION_CODE" spread out all over the place.
o indentation is 4 spaces and nests too deep
]
> Would I be better off with a 2.6 kernel?
Not really. linux-2.6 shows the same problem:
grundler <507>fgrep DMA_MODE_CASCADE drivers/*/gdth*
drivers/scsi/gdth.c: set_dma_mode(ha->drq,DMA_MODE_CASCADE);
I've hacked a quick patch together that lets this driver *build* without
ISA/EISA support using linux-2.6/arch/parisc/configs/a500_defconfig.
Just enable CONFIG_GDTH and apply this patch:
ftp://ftp.parisc-linux.org/patches/diff-2.6.5-gdth-01
If it "works for you", please submit the patch to linux-scsi mailing list
(linux-scsi@vger.kernel.org) and cc parisc-linux mailing list.
> I took the lack of stock 2.6
> kernels for hppa in sid to mean that there was a problem, but I'd love
> to be wrong about that.
2.6 is working pretty well and I think it's just up to someone to
package and upload a linux-2.6 kernel*hppa.deb.
Thanks to Paul Bame, prebuilt tar balls and .debs of nightly builds
are available for both 2.4 and 2.6 hppa kernels:
http://cvs.parisc-linux.org/download/linux-2.4/
http://cvs.parisc-linux.org/download/linux-2.6/
For the L2000, you can run the "a500" flavor builds.
grant
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [parisc-linux] gdth driver on L2000
2004-03-24 17:31 ` Grant Grundler
@ 2004-03-24 19:56 ` Eric Sproul
2004-03-24 21:21 ` Eric Sproul
2004-03-25 3:26 ` Grant Grundler
0 siblings, 2 replies; 8+ messages in thread
From: Eric Sproul @ 2004-03-24 19:56 UTC (permalink / raw)
To: PA-RISC Linux
On Wed, 2004-03-24 at 12:31, Grant Grundler wrote:
> I've hacked a quick patch together that lets this driver *build* without
> ISA/EISA support using linux-2.6/arch/parisc/configs/a500_defconfig.
> Just enable CONFIG_GDTH and apply this patch:
> ftp://ftp.parisc-linux.org/patches/diff-2.6.5-gdth-01
>
> If it "works for you", please submit the patch to linux-scsi mailing list
> (linux-scsi@vger.kernel.org) and cc parisc-linux mailing list.
Grant,
I'm working with Debian's 2.6.4 sources, but the gdth driver must be
unchanged since the patch applies cleanly. Thanks!
All,
Does anyone else who is running Debian have a working config I could use
to start from? I've started with the stock Debian config (with changes
applied from the parisc Kconfig) but I'm having ugly build problems and
I know I've probably screwed up somewhere. When I built my 2.4.25
kernel, I started with the config from Debian's stock 2.4.20-64-smp
kernel and made my adjustments from there. I don't have that luxury
with 2.6.4 as there is no stock hppa kernel yet. If you have a working
2.6 config, please post it or email me off-list.
Thanks,
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] gdth driver on L2000
2004-03-24 19:56 ` Eric Sproul
@ 2004-03-24 21:21 ` Eric Sproul
2004-03-25 3:27 ` Grant Grundler
2004-03-25 3:26 ` Grant Grundler
1 sibling, 1 reply; 8+ messages in thread
From: Eric Sproul @ 2004-03-24 21:21 UTC (permalink / raw)
To: PA-RISC Linux
On Wed, 2004-03-24 at 14:56, Eric Sproul wrote:
> All,
> Does anyone else who is running Debian have a working config I could use
> to start from? I've started with the stock Debian config (with changes
> applied from the parisc Kconfig) but I'm having ugly build problems and
> I know I've probably screwed up somewhere.
Bad form replying to my own post, but I continue to have this problem
and could use some extra eyes/brain cells. ;)
I put together what I thought was a sensible config for my L2000.
However, I get a funky error where it claims the UTS Release is
mismatched, but the stated values are identical. That may or may not be
connected to the make error where cpu_present_map appears undefined but
does appear in include/asm-parisc/smp.h. Maybe even though CONFIG_SMP=Y
it is not including smp.h?
Could someone point me in the right direction to correct this error?
Thanks,
Eric
I am appending an extraversion of "-64-smp" because I am specifying the
following config options:
CONFIG_PA8X00=y
CONFIG_PA20=y
CONFIG_PARISC64=y
CONFIG_64BIT=y
CONFIG_SMP=y
(configure step completes normally, then...)
/usr/bin/make EXTRAVERSION=-64-smp \
ARCH=parisc prepare
make[1]: Entering directory `/usr/src/kernel-source-2.6.4'
HOSTCC scripts/split-include
HOSTCC scripts/conmakehash
HOSTCC scripts/docproc
HOSTCC scripts/kallsyms
CC scripts/empty.o
HOSTCC scripts/mk_elfconfig
MKELF scripts/elfconfig.h
HOSTCC scripts/file2alias.o
HOSTCC scripts/modpost.o
HOSTCC scripts/sumversion.o
HOSTLD scripts/modpost
HOSTCC scripts/pnmtologo
HOSTCC scripts/bin2c
SYMLINK include/asm -> include/asm-parisc
CHK include/linux/version.h
UPD include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/parisc/kernel/asm-offsets.s
CHK include/asm-parisc/offsets.h
UPD include/asm-parisc/offsets.h
make[1]: Leaving directory `/usr/src/kernel-source-2.6.4'
echo done > stamp-kernel-configure
echo done > stamp-configure
The UTS Release version in include/linux/version.h
"2.6.4-64-smp"
does not match current version
"2.6.4-64-smp"
Reconfiguring.
touch Makefile
test -f stamp-configure || /usr/bin/make -f
/usr/share/kernel-package/rules configure
/usr/bin/make EXTRAVERSION=-64-smp ARCH=parisc \
vmlinux
make[1]: Entering directory `/usr/src/kernel-source-2.6.4'
CHK include/linux/version.h
make[2]: `arch/parisc/kernel/asm-offsets.s' is up to date.
CC init/main.o
In file included from init/main.c:35:
include/linux/kernel_stat.h: In function `kstat_irqs':
include/linux/kernel_stat.h:47: error: `cpu_present_map' undeclared
(first use in this function)
include/linux/kernel_stat.h:47: error: (Each undeclared identifier is
reported only once
include/linux/kernel_stat.h:47: error: for each function it appears in.)
init/main.c: In function `smp_init':
init/main.c:362: error: `cpu_present_map' undeclared (first use in this
function)
make[2]: *** [init/main.o] Error 1
make[1]: *** [init] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.4'
make: *** [stamp-build] Error 2
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [parisc-linux] gdth driver on L2000
2004-03-24 21:21 ` Eric Sproul
@ 2004-03-25 3:27 ` Grant Grundler
2004-03-25 13:31 ` Eric Sproul
0 siblings, 1 reply; 8+ messages in thread
From: Grant Grundler @ 2004-03-25 3:27 UTC (permalink / raw)
To: Eric Sproul; +Cc: PA-RISC Linux
On Wed, Mar 24, 2004 at 04:21:16PM -0500, Eric Sproul wrote:
> Maybe even though CONFIG_SMP=Y it is not including smp.h?
Do not enable CONFIG_SMP on 2.6 kernels. It doesn't work.
grant
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] gdth driver on L2000
2004-03-25 3:27 ` Grant Grundler
@ 2004-03-25 13:31 ` Eric Sproul
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sproul @ 2004-03-25 13:31 UTC (permalink / raw)
To: PA-RISC Linux
(should have replied to the list...)
On Wed, 2004-03-24 at 22:27, Grant Grundler wrote:
> On Wed, Mar 24, 2004 at 04:21:16PM -0500, Eric Sproul wrote:
> > Maybe even though CONFIG_SMP=Y it is not including smp.h?
>
> Do not enable CONFIG_SMP on 2.6 kernels. It doesn't work.
Ah, OK. Well that's a deal-breaker for me. I really need SMP.
I'll see if I can adapt your gdth patch to 2.4.25 and I'll post my
results. Thanks again for doing that. It's one more piece of the
kernel I understand just a bit better now. :)
Thanks,
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] gdth driver on L2000
2004-03-24 19:56 ` Eric Sproul
2004-03-24 21:21 ` Eric Sproul
@ 2004-03-25 3:26 ` Grant Grundler
2004-03-25 17:04 ` Eric Sproul
1 sibling, 1 reply; 8+ messages in thread
From: Grant Grundler @ 2004-03-25 3:26 UTC (permalink / raw)
To: Eric Sproul; +Cc: PA-RISC Linux
On Wed, Mar 24, 2004 at 02:56:49PM -0500, Eric Sproul wrote:
> Grant,
> I'm working with Debian's 2.6.4 sources, but the gdth driver must be
> unchanged since the patch applies cleanly. Thanks!
good
> All,
> Does anyone else who is running Debian have a working config I could use
> to start from?
Grab a500_defconfig from
http://cvs.parisc-linux.org/linux-2.6/arch/parisc/configs
that works.
grant
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [parisc-linux] gdth driver on L2000
2004-03-25 3:26 ` Grant Grundler
@ 2004-03-25 17:04 ` Eric Sproul
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sproul @ 2004-03-25 17:04 UTC (permalink / raw)
To: PA-RISC Linux
On Wed, 2004-03-24 at 22:26, Grant Grundler wrote:
> On Wed, Mar 24, 2004 at 02:56:49PM -0500, Eric Sproul wrote:
> > Grant,
> > I'm working with Debian's 2.6.4 sources, but the gdth driver must be
> > unchanged since the patch applies cleanly. Thanks!
>
> good
I successfully ported Grant's patch to 2.4.25, and have attached a diff
for gdth.c. All credit for this goes to Grant-- I just adjusted the
line numbers. ;) I'll be submitting this patch as requested to
linux-scsi.
The driver appears to work now in my 2.4.25-64-smp kernel:
GDT: Storage RAID Controller Driver. Version: 2.05
GDT: Found 1 PCI Storage RAID Controllers
GDT CTR0: Configuring GDT-PCI HA at 32/0 IRQ 128
lspci:
20:00.0 RAID bus controller: Intel Corp. RAID Controller
I'm moving now to check out the RAID management utility from Intel that
supposedly worked under Debian 2.2. I haven't even peeked at it yet.
Many thanks to Grant for getting me going.
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-03-25 17:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-24 15:31 [parisc-linux] gdth driver on L2000 Eric Sproul
2004-03-24 17:31 ` Grant Grundler
2004-03-24 19:56 ` Eric Sproul
2004-03-24 21:21 ` Eric Sproul
2004-03-25 3:27 ` Grant Grundler
2004-03-25 13:31 ` Eric Sproul
2004-03-25 3:26 ` Grant Grundler
2004-03-25 17:04 ` Eric Sproul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox