* Driver for Adaptec AHA-1530P
@ 2004-01-10 0:26 Kai Ruhnau
2004-01-10 12:48 ` Guennadi Liakhovetski
0 siblings, 1 reply; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-10 0:26 UTC (permalink / raw)
To: linux-scsi
Hi,
I have an old scsi-only P200. It has an Adaptec AHA-1530P ISA-board.
I had and have a running Kernel 2.4.10. It uses the driver aha152x
successfully. I tried to update to 2.4.16, 2.4.20 and now I try 2.4.24. All
show the same behaviour:
Kernel-parameter: 'aha152x=0x340'
<snip>
SCSI subsystem driver Revision: 1.00
aha152x: processing commandline: <3>
aha152x: 0x340
aha152x: Invalid line
ok
aha152x: BIOS test: passed, detected 1 controller(s)
aha152x: resetting bus...
aha152x0: vital data: rev=7, io=0x340 (0x340/0x340), irq=11, scsiid=7,
reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000, extended
translation=disabled
aha152x0: trying software interrupt, ok.
scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
(long pause)
aha152x: ABORT timed out - removed from issue queue
scsi: device set offline - not ready or command retry failed after bus
reset: host 0 channel 0 id 0 lun 0
scsi: unknown type 22
Vendor: [crap] Model: [more crap] Rev:
Type: Unknown
(again long pause)
</snip>
And the last seven lines count up the lun and the id up to 'id 7 lun 7'.
After that, I end up with a kernel-panic due to the missing root-device.
The [crap] and [more crap] are always the same characters.
In kernel 2.6.0 the aha152x-driver does not find any appropiate device. Here
I also tried the aha1542, but I can't read any error, it scrolls up too
fast.
I know from the Changelogs that there were a couple of changes since 2.4.10,
but is it possible to convince the aha152x (or any other) driver to work
with my card?
Of course I'm willing to help everybody as I can.
Greetings
Kai
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-10 0:26 Driver for Adaptec AHA-1530P Kai Ruhnau
@ 2004-01-10 12:48 ` Guennadi Liakhovetski
2004-01-10 15:03 ` Kai Ruhnau
0 siblings, 1 reply; 13+ messages in thread
From: Guennadi Liakhovetski @ 2004-01-10 12:48 UTC (permalink / raw)
To: Kai Ruhnau; +Cc: linux-scsi
Hi
Can you send the relevant lines from 2.4.10 boot?
Cheers
Guennadi
On Sat, 10 Jan 2004, Kai Ruhnau wrote:
> Hi,
>
> I have an old scsi-only P200. It has an Adaptec AHA-1530P ISA-board.
>
> I had and have a running Kernel 2.4.10. It uses the driver aha152x
> successfully. I tried to update to 2.4.16, 2.4.20 and now I try 2.4.24. All
> show the same behaviour:
>
> Kernel-parameter: 'aha152x=0x340'
>
> <snip>
> SCSI subsystem driver Revision: 1.00
> aha152x: processing commandline: <3>
> aha152x: 0x340
> aha152x: Invalid line
> ok
> aha152x: BIOS test: passed, detected 1 controller(s)
> aha152x: resetting bus...
> aha152x0: vital data: rev=7, io=0x340 (0x340/0x340), irq=11, scsiid=7,
> reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000, extended
> translation=disabled
> aha152x0: trying software interrupt, ok.
> scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
> (long pause)
> aha152x: ABORT timed out - removed from issue queue
> scsi: device set offline - not ready or command retry failed after bus
> reset: host 0 channel 0 id 0 lun 0
> scsi: unknown type 22
> Vendor: [crap] Model: [more crap] Rev:
> Type: Unknown
> (again long pause)
> </snip>
>
> And the last seven lines count up the lun and the id up to 'id 7 lun 7'.
> After that, I end up with a kernel-panic due to the missing root-device.
> The [crap] and [more crap] are always the same characters.
>
> In kernel 2.6.0 the aha152x-driver does not find any appropiate device. Here
> I also tried the aha1542, but I can't read any error, it scrolls up too
> fast.
>
>
> I know from the Changelogs that there were a couple of changes since 2.4.10,
> but is it possible to convince the aha152x (or any other) driver to work
> with my card?
>
> Of course I'm willing to help everybody as I can.
>
> Greetings
> Kai
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-10 12:48 ` Guennadi Liakhovetski
@ 2004-01-10 15:03 ` Kai Ruhnau
2004-01-10 18:01 ` Kai Ruhnau
2004-01-10 21:24 ` Guennadi Liakhovetski
0 siblings, 2 replies; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-10 15:03 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Hi,
Thank you for the quick reply!
> Can you send the relevant lines from 2.4.10 boot?
The kernel 2.4.10 is from a SuSE-Linux 7.3 boot-disk with the aha152x as
module.
Here is the log after I loaded the module:
<snip>
[...]
[isapnp]
aha152x: BIOS test: passed, auto configuration: ok, detected 1 controller(s)
aha152x: resetting bus...
aha152x0: vital data: rev=1, io=0x340 (0x340/0x340), irq=11, scsiid=7,
reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000, extended
translation=disabled
aha152x0: trying software interrupt, ok.
scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $
(scsi0:0:0) 01 03 01 32 08 00
Vendor: IBM Model: DCAS-34330 Rev: S65A
Type: Direct-Access ANSI SCSI revision: 02
[my cdrom @ scsi0:5:0]
[...]
</snip>
HTH
Greetings
Kai
----- Original Message -----
From: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
To: "Kai Ruhnau" <kai@tragetaschen.dyndns.org>
Cc: <linux-scsi@vger.kernel.org>
Sent: Saturday, January 10, 2004 1:48 PM
Subject: Re: Driver for Adaptec AHA-1530P
> Hi
>
> Can you send the relevant lines from 2.4.10 boot?
>
> Cheers
> Guennadi
>
> On Sat, 10 Jan 2004, Kai Ruhnau wrote:
>
> > Hi,
> >
> > I have an old scsi-only P200. It has an Adaptec AHA-1530P ISA-board.
> >
> > I had and have a running Kernel 2.4.10. It uses the driver aha152x
> > successfully. I tried to update to 2.4.16, 2.4.20 and now I try 2.4.24.
All
> > show the same behaviour:
> >
> > Kernel-parameter: 'aha152x=0x340'
> >
> > <snip>
> > SCSI subsystem driver Revision: 1.00
> > aha152x: processing commandline: <3>
> > aha152x: 0x340
> > aha152x: Invalid line
> > ok
> > aha152x: BIOS test: passed, detected 1 controller(s)
> > aha152x: resetting bus...
> > aha152x0: vital data: rev=7, io=0x340 (0x340/0x340), irq=11, scsiid=7,
> > reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000,
extended
> > translation=disabled
> > aha152x0: trying software interrupt, ok.
> > scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
> > (long pause)
> > aha152x: ABORT timed out - removed from issue queue
> > scsi: device set offline - not ready or command retry failed after bus
> > reset: host 0 channel 0 id 0 lun 0
> > scsi: unknown type 22
> > Vendor: [crap] Model: [more crap] Rev:
> > Type: Unknown
> > (again long pause)
> > </snip>
> >
> > And the last seven lines count up the lun and the id up to 'id 7 lun 7'.
> > After that, I end up with a kernel-panic due to the missing root-device.
> > The [crap] and [more crap] are always the same characters.
> >
> > In kernel 2.6.0 the aha152x-driver does not find any appropiate device.
Here
> > I also tried the aha1542, but I can't read any error, it scrolls up too
> > fast.
> >
> >
> > I know from the Changelogs that there were a couple of changes since
2.4.10,
> > but is it possible to convince the aha152x (or any other) driver to work
> > with my card?
> >
> > Of course I'm willing to help everybody as I can.
> >
> > Greetings
> > Kai
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> >
>
> ---
> Guennadi Liakhovetski
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-10 15:03 ` Kai Ruhnau
@ 2004-01-10 18:01 ` Kai Ruhnau
2004-01-10 21:24 ` Guennadi Liakhovetski
1 sibling, 0 replies; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-10 18:01 UTC (permalink / raw)
To: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 4585 bytes --]
Hi,
I retract having a working 2.4.10 in the following sense:
I have a precompiled kernel 2.4.10 from SuSE-Linux 7.3. It worked before,
but I decided to install Gentoo as my new Linux-distribution. Now 2.4.10 is
only left on a boot disk set.
I can load the module for aha152x from these bootdisks and it works.
But I just tried to use a self-compiled 2.4.10 from the kernel.org sources
and it fails.
After "scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $" I get a timeout
and a NULL-pointer dereference.
I now wonder, what my fault was during the installation/configuration.
I'll be happy, if someone finds time to have a look at my configuration.
Greetings
Kai
----- Original Message -----
From: "Kai Ruhnau" <kai@tragetaschen.dyndns.org>
To: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
Cc: <linux-scsi@vger.kernel.org>
Sent: Saturday, January 10, 2004 4:03 PM
Subject: Re: Driver for Adaptec AHA-1530P
> Hi,
>
> Thank you for the quick reply!
>
> > Can you send the relevant lines from 2.4.10 boot?
>
> The kernel 2.4.10 is from a SuSE-Linux 7.3 boot-disk with the aha152x as
> module.
>
> Here is the log after I loaded the module:
>
> <snip>
> [...]
> [isapnp]
> aha152x: BIOS test: passed, auto configuration: ok, detected 1
controller(s)
> aha152x: resetting bus...
> aha152x0: vital data: rev=1, io=0x340 (0x340/0x340), irq=11, scsiid=7,
> reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000,
extended
> translation=disabled
> aha152x0: trying software interrupt, ok.
> scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $
> (scsi0:0:0) 01 03 01 32 08 00
> Vendor: IBM Model: DCAS-34330 Rev: S65A
> Type: Direct-Access ANSI SCSI revision: 02
> [my cdrom @ scsi0:5:0]
> [...]
> </snip>
>
> HTH
> Greetings
> Kai
>
> ----- Original Message -----
> From: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
> To: "Kai Ruhnau" <kai@tragetaschen.dyndns.org>
> Cc: <linux-scsi@vger.kernel.org>
> Sent: Saturday, January 10, 2004 1:48 PM
> Subject: Re: Driver for Adaptec AHA-1530P
>
>
> > Hi
> >
> > Can you send the relevant lines from 2.4.10 boot?
> >
> > Cheers
> > Guennadi
> >
> > On Sat, 10 Jan 2004, Kai Ruhnau wrote:
> >
> > > Hi,
> > >
> > > I have an old scsi-only P200. It has an Adaptec AHA-1530P ISA-board.
> > >
> > > I had and have a running Kernel 2.4.10. It uses the driver aha152x
> > > successfully. I tried to update to 2.4.16, 2.4.20 and now I try
2.4.24.
> All
> > > show the same behaviour:
> > >
> > > Kernel-parameter: 'aha152x=0x340'
> > >
> > > <snip>
> > > SCSI subsystem driver Revision: 1.00
> > > aha152x: processing commandline: <3>
> > > aha152x: 0x340
> > > aha152x: Invalid line
> > > ok
> > > aha152x: BIOS test: passed, detected 1 controller(s)
> > > aha152x: resetting bus...
> > > aha152x0: vital data: rev=7, io=0x340 (0x340/0x340), irq=11, scsiid=7,
> > > reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000,
> extended
> > > translation=disabled
> > > aha152x0: trying software interrupt, ok.
> > > scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
> > > (long pause)
> > > aha152x: ABORT timed out - removed from issue queue
> > > scsi: device set offline - not ready or command retry failed after bus
> > > reset: host 0 channel 0 id 0 lun 0
> > > scsi: unknown type 22
> > > Vendor: [crap] Model: [more crap] Rev:
> > > Type: Unknown
> > > (again long pause)
> > > </snip>
> > >
> > > And the last seven lines count up the lun and the id up to 'id 7 lun
7'.
> > > After that, I end up with a kernel-panic due to the missing
root-device.
> > > The [crap] and [more crap] are always the same characters.
> > >
> > > In kernel 2.6.0 the aha152x-driver does not find any appropiate
device.
> Here
> > > I also tried the aha1542, but I can't read any error, it scrolls up
too
> > > fast.
> > >
> > >
> > > I know from the Changelogs that there were a couple of changes since
> 2.4.10,
> > > but is it possible to convince the aha152x (or any other) driver to
work
> > > with my card?
> > >
> > > Of course I'm willing to help everybody as I can.
> > >
> > > Greetings
> > > Kai
> > >
> > > -
> > > To unsubscribe from this list: send the line "unsubscribe linux-scsi"
in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> > >
> >
> > ---
> > Guennadi Liakhovetski
> >
> >
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: config.kai --]
[-- Type: application/octet-stream, Size: 14126 bytes --]
#
# Automatically generated by make menuconfig: don't edit
#
CONFIG_X86=y
CONFIG_ISA=y
# CONFIG_SBUS is not set
CONFIG_UID16=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
CONFIG_M586MMX=y
# CONFIG_M686 is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_USE_STRING_486=y
CONFIG_X86_ALIGNMENT_16=y
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
# CONFIG_TOSHIBA is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
# CONFIG_MTRR is not set
# CONFIG_SMP is not set
# CONFIG_X86_UP_IOAPIC is not set
#
# General setup
#
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
# CONFIG_PM is not set
# CONFIG_ACPI is not set
# CONFIG_APM is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Parallel port support
#
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_PC_FIFO=y
CONFIG_PARPORT_PC_SUPERIO=y
# CONFIG_PARPORT_AMIGA is not set
# CONFIG_PARPORT_MFC3 is not set
# CONFIG_PARPORT_ATARI is not set
# CONFIG_PARPORT_SUNBPP is not set
# CONFIG_PARPORT_OTHER is not set
# CONFIG_PARPORT_1284 is not set
#
# Plug and Play configuration
#
CONFIG_PNP=y
CONFIG_ISAPNP=y
# CONFIG_PNPBIOS is not set
#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_SIZE=8192
# CONFIG_BLK_DEV_INITRD is not set
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not set
# CONFIG_MD_MULTIPATH is not set
# CONFIG_BLK_DEV_LVM is not set
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
# CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
CONFIG_IP_ROUTE_TOS=y
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_ROUTE_LARGE_TABLES is not set
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
#
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_CONNTRACK is not set
# CONFIG_IP_NF_QUEUE is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Telephony Support
#
# CONFIG_PHONE is not set
# CONFIG_PHONE_IXJ is not set
# CONFIG_PHONE_IXJ_PCMCIA is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_SR_EXTRA_DEVS=2
# CONFIG_CHR_DEV_SG is not set
CONFIG_SCSI_DEBUG_QUEUES=y
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
CONFIG_SCSI_AHA152X=y
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR_D700 is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
CONFIG_SCSI_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=4
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_SEAGATE is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_DEBUG is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_BOOT is not set
# CONFIG_FUSION_ISENSE is not set
# CONFIG_FUSION_CTL is not set
# CONFIG_FUSION_LAN is not set
#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
# CONFIG_I2O_PCI is not set
# CONFIG_I2O_BLOCK is not set
# CONFIG_I2O_LAN is not set
# CONFIG_I2O_SCSI is not set
# CONFIG_I2O_PROC is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_SUNLANCE is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNBMAC is not set
# CONFIG_SUNQE is not set
# CONFIG_SUNLANCE is not set
# CONFIG_SUNGEM is not set
CONFIG_NET_VENDOR_3COM=y
# CONFIG_EL1 is not set
# CONFIG_EL2 is not set
# CONFIG_ELPLUS is not set
# CONFIG_EL16 is not set
CONFIG_EL3=y
# CONFIG_3C515 is not set
# CONFIG_ELMC is not set
# CONFIG_ELMC_II is not set
# CONFIG_VORTEX is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_PCI is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_MYRI_SBUS is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set
# CONFIG_PPP_DEFLATE is not set
# CONFIG_PPP_BSDCOMP is not set
CONFIG_PPPOE=m
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Input core support
#
# CONFIG_INPUT is not set
# CONFIG_INPUT_KEYBDEV is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_INPUT_GAMEPORT is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
CONFIG_FAT_FS=m
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
CONFIG_TMPFS=y
# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_DEVFS_FS=y
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_SMB_NLS=y
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Bluetooth support
#
# CONFIG_BLUEZ is not set
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-10 15:03 ` Kai Ruhnau
2004-01-10 18:01 ` Kai Ruhnau
@ 2004-01-10 21:24 ` Guennadi Liakhovetski
2004-01-11 0:33 ` Kai Ruhnau
1 sibling, 1 reply; 13+ messages in thread
From: Guennadi Liakhovetski @ 2004-01-10 21:24 UTC (permalink / raw)
To: Kai Ruhnau; +Cc: linux-scsi
On Sat, 10 Jan 2004, Kai Ruhnau wrote:
> The kernel 2.4.10 is from a SuSE-Linux 7.3 boot-disk with the aha152x as
> module.
>
> Here is the log after I loaded the module:
Hm, it might also be, that your problem comes not from changes in the
driver, but from switching from module to compiled-in. Can you try either
2.4.10 with driver compiled-in or 2.4.2x with driver as a module (also
with a diskette or initrd)?
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-10 21:24 ` Guennadi Liakhovetski
@ 2004-01-11 0:33 ` Kai Ruhnau
2004-01-11 12:15 ` Guennadi Liakhovetski
0 siblings, 1 reply; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-11 0:33 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Guennadi Liakhovetski wrote:
> On Sat, 10 Jan 2004, Kai Ruhnau wrote:
>
> > The kernel 2.4.10 is from a SuSE-Linux 7.3 boot-disk with the aha152x as
> > module.
> >
> > Here is the log after I loaded the module:
>
> Hm, it might also be, that your problem comes not from changes in the
> driver, but from switching from module to compiled-in. Can you try either
> 2.4.10 with driver compiled-in or 2.4.2x with driver as a module (also
> with a diskette or initrd)?
My Post:
> I retract having a working 2.4.10 in the following sense:
>
> I have a precompiled kernel 2.4.10 from SuSE-Linux 7.3. It worked before,
> but I decided to install Gentoo as my new Linux-distribution. Now 2.4.10
is
> only left on a boot disk set.
> I can load the module for aha152x from these bootdisks and it works.
This precompiled kernel is with aha152x as a module.
> But I just tried to use a self-compiled 2.4.10 from the kernel.org sources
> and it fails.
> After "scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $" I get a timeout
> and a NULL-pointer dereference.
This one is with aha152x compiled in.
Greetings
Kai
> ----- Original Message -----
> From: "Kai Ruhnau" <kai@tragetaschen.dyndns.org>
> To: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
> Cc: <linux-scsi@vger.kernel.org>
> Sent: Saturday, January 10, 2004 4:03 PM
> Subject: Re: Driver for Adaptec AHA-1530P
>
>
> > Hi,
> >
> > Thank you for the quick reply!
> >
> > > Can you send the relevant lines from 2.4.10 boot?
> >
> > The kernel 2.4.10 is from a SuSE-Linux 7.3 boot-disk with the aha152x as
> > module.
> >
> > Here is the log after I loaded the module:
> >
> > <snip>
> > [...]
> > [isapnp]
> > aha152x: BIOS test: passed, auto configuration: ok, detected 1
> controller(s)
> > aha152x: resetting bus...
> > aha152x0: vital data: rev=1, io=0x340 (0x340/0x340), irq=11, scsiid=7,
> > reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000,
> extended
> > translation=disabled
> > aha152x0: trying software interrupt, ok.
> > scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $
> > (scsi0:0:0) 01 03 01 32 08 00
> > Vendor: IBM Model: DCAS-34330 Rev: S65A
> > Type: Direct-Access ANSI SCSI revision: 02
> > [my cdrom @ scsi0:5:0]
> > [...]
> > </snip>
> >
> > HTH
> > Greetings
> > Kai
> >
> > ----- Original Message -----
> > From: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
> > To: "Kai Ruhnau" <kai@tragetaschen.dyndns.org>
> > Cc: <linux-scsi@vger.kernel.org>
> > Sent: Saturday, January 10, 2004 1:48 PM
> > Subject: Re: Driver for Adaptec AHA-1530P
> >
> >
> > > Hi
> > >
> > > Can you send the relevant lines from 2.4.10 boot?
> > >
> > > Cheers
> > > Guennadi
> > >
> > > On Sat, 10 Jan 2004, Kai Ruhnau wrote:
> > >
> > > > Hi,
> > > >
> > > > I have an old scsi-only P200. It has an Adaptec AHA-1530P ISA-board.
> > > >
> > > > I had and have a running Kernel 2.4.10. It uses the driver aha152x
> > > > successfully. I tried to update to 2.4.16, 2.4.20 and now I try
> 2.4.24.
> > All
> > > > show the same behaviour:
> > > >
> > > > Kernel-parameter: 'aha152x=0x340'
> > > >
> > > > <snip>
> > > > SCSI subsystem driver Revision: 1.00
> > > > aha152x: processing commandline: <3>
> > > > aha152x: 0x340
> > > > aha152x: Invalid line
> > > > ok
> > > > aha152x: BIOS test: passed, detected 1 controller(s)
> > > > aha152x: resetting bus...
> > > > aha152x0: vital data: rev=7, io=0x340 (0x340/0x340), irq=11,
scsiid=7,
> > > > reconnect=enabled, parity=enabled, synchronous=enabled, delay=1000,
> > extended
> > > > translation=disabled
> > > > aha152x0: trying software interrupt, ok.
> > > > scsi0 : Adaptec 152x SCSI driver; $Revision: 2.5 $
> > > > (long pause)
> > > > aha152x: ABORT timed out - removed from issue queue
> > > > scsi: device set offline - not ready or command retry failed after
bus
> > > > reset: host 0 channel 0 id 0 lun 0
> > > > scsi: unknown type 22
> > > > Vendor: [crap] Model: [more crap] Rev:
> > > > Type: Unknown
> > > > (again long pause)
> > > > </snip>
> > > >
> > > > And the last seven lines count up the lun and the id up to 'id 7 lun
> 7'.
> > > > After that, I end up with a kernel-panic due to the missing
> root-device.
> > > > The [crap] and [more crap] are always the same characters.
> > > >
> > > > In kernel 2.6.0 the aha152x-driver does not find any appropiate
> device.
> > Here
> > > > I also tried the aha1542, but I can't read any error, it scrolls up
> too
> > > > fast.
> > > >
> > > >
> > > > I know from the Changelogs that there were a couple of changes since
> > 2.4.10,
> > > > but is it possible to convince the aha152x (or any other) driver to
> work
> > > > with my card?
> > > >
> > > > Of course I'm willing to help everybody as I can.
> > > >
> > > > Greetings
> > > > Kai
> > > >
> > > > -
> > > > To unsubscribe from this list: send the line "unsubscribe
linux-scsi"
> in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > > >
> > > >
> > >
> > > ---
> > > Guennadi Liakhovetski
> > >
> > >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-11 0:33 ` Kai Ruhnau
@ 2004-01-11 12:15 ` Guennadi Liakhovetski
2004-01-12 9:38 ` Kai Ruhnau
0 siblings, 1 reply; 13+ messages in thread
From: Guennadi Liakhovetski @ 2004-01-11 12:15 UTC (permalink / raw)
To: Kai Ruhnau; +Cc: linux-scsi
On Sun, 11 Jan 2004, Kai Ruhnau wrote:
> > I can load the module for aha152x from these bootdisks and it works.
>
> This precompiled kernel is with aha152x as a module.
See below.
> > But I just tried to use a self-compiled 2.4.10 from the kernel.org sources
> > and it fails.
> > After "scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $" I get a timeout
> > and a NULL-pointer dereference.
>
> This one is with aha152x compiled in.
Ok, this proves, that also 2.4.10 manages to handle your controller only
when compiled as a module. What might help you is to compile 2.4.24 with
aha152x as a module - also to boot either from a diskette or with an
initramdisk. If this works, it will give us a good hint where to look
further. Another thing would be to see if SuSE had some patches for
aha152x. Do you have sources for SuSE 2.4.10? Would be interesting to
compare the whole drivers/scsi directories from stock 2.4.10 and that from
SuSE. Also, could be useful to see the decoded Oops from vanilla 2.4.10.
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-11 12:15 ` Guennadi Liakhovetski
@ 2004-01-12 9:38 ` Kai Ruhnau
2004-01-12 23:00 ` Guennadi Liakhovetski
0 siblings, 1 reply; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-12 9:38 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Guennadi Liakhovetski wrote:
> On Sun, 11 Jan 2004, Kai Ruhnau wrote:
>
> > > I can load the module for aha152x from these bootdisks and it works.
> >
> > This precompiled kernel is with aha152x as a module.
>
> See below.
>
> > > But I just tried to use a self-compiled 2.4.10 from the kernel.org
> > > sources and it fails.
> > > After "scsi0 : Adaptec 152x SCSI driver; $Revision: 2.4 $" I get a
> > > timeout and a NULL-pointer dereference.
> >
> > This one is with aha152x compiled in.
>
> Ok, this proves, that also 2.4.10 manages to handle your controller only
> when compiled as a module. What might help you is to compile 2.4.24 with
> aha152x as a module - also to boot either from a diskette or with an
> initramdisk. If this works, it will give us a good hint where to look
> further. Another thing would be to see if SuSE had some patches for
> aha152x. Do you have sources for SuSE 2.4.10? Would be interesting to
> compare the whole drivers/scsi directories from stock 2.4.10 and that from
> SuSE. Also, could be useful to see the decoded Oops from vanilla 2.4.10.
First of all
s/2\.4\.24/2.4.22/g
Sorry.
I try to do, what I can:
kernel 2.4.22 aha152x compiled in:
aha152x: ABORT timed out - removed from issue queue
kernel 2.4.22 aha152x as module:
No such device
kernel 2.4.10 aha152x compiled in:
timeout and NULL-pointer dereference
kernel 2.4.10 aha152x as module:
kernel Oops (NULL pointer dereference) during linuxrc
drivers/scsi/ of SuSE's 2.4.10:
please have a look at
http://tragetaschen.dyndns.org/kernel/drivers_scsi.tar.bz2
original, full sources at
ftp://ftp.suse.com/pub/suse/i386/7.3/suse/d2/kernel-source.rpm
the drivers/scsi/ diff from vanilla-2.4.10 to SuSE-2.4.10 is at
http://tragetaschen.dyndns.org/kernel/vanilla2suse.bz2
(Sorry, but I only have 16k upload)
decoded Oops (I hope I did it right)
ksymoops 2.4.9 on i586 2.4.10-4GB. Options used
-v /usr/src/linux-2.4.10/vmlinux (specified)
-K (specified)
-l /proc/modules (default)
-o /lib/modules/2.4.10/ (specified)
-m /usr/src/linux-2.4.10/System.map (specified)
No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel NULL pointer dereference at virtual address 000000ef
c01a1eab
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c01a1eab>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010082
eax: 00000000 ebx: c7f81dd0 ecx: c01a1f40 edx: 00000000
esi: 00000000 edi: c7f82078 ebp: c7f82000 esp: c7181f74
ds: 0018 es: 0018 ss: 0018
Process scsi_eh_0 (pid: 7, stackpage=c7f81000)
Stack: 00000082 00000282 c7f82000 00000000 c024f640 c01a1f53 c7f82000
c7f82078
00000282 c7fc6c00 c019bacd c7fc6c00 00000000 c7fc6c00 c019c26c
c7fc6c00
c7f8c160 00000000 c7f80000 c7f82000 c7f81fd4 c024f640 c019c5e9
c7f82000
Call Trace: [<c01a1f53>] [<c019bacd>] [<c019c26c>] [<c019c5e9>] [<c0105586>]
[<c019c520>]
Code: f6 80 ef 00 00 00 10 75 66 8b 0f 31 d2 85 c9 74 3a 39 cb 74
>>EIP; c01a1eab <scsi_resize_dma_pool+3ab/470> <=====
>>ecx; c01a1f40 <scsi_resize_dma_pool+440/470>
Trace; c01a1f53 <scsi_resize_dma_pool+453/470>
Trace; c019bacd <scsi_register+13d/380>
Trace; c019c26c <scsi_ioctl_get_pci+2c/30>
Trace; c019c5e9 <scsi_ioctl+379/3b0>
Trace; c0105586 <machine_restart+46/80>
Trace; c019c520 <scsi_ioctl+2b0/3b0>
Code; c01a1eab <scsi_resize_dma_pool+3ab/470>
00000000 <_EIP>:
Code; c01a1eab <scsi_resize_dma_pool+3ab/470> <=====
0: f6 80 ef 00 00 00 10 testb $0x10,0xef(%eax) <=====
Code; c01a1eb2 <scsi_resize_dma_pool+3b2/470>
7: 75 66 jne 6f <_EIP+0x6f>
Code; c01a1eb4 <scsi_resize_dma_pool+3b4/470>
9: 8b 0f mov (%edi),%ecx
Code; c01a1eb6 <scsi_resize_dma_pool+3b6/470>
b: 31 d2 xor %edx,%edx
Code; c01a1eb8 <scsi_resize_dma_pool+3b8/470>
d: 85 c9 test %ecx,%ecx
Code; c01a1eba <scsi_resize_dma_pool+3ba/470>
f: 74 3a je 4b <_EIP+0x4b>
Code; c01a1ebc <scsi_resize_dma_pool+3bc/470>
11: 39 cb cmp %ecx,%ebx
Code; c01a1ebe <scsi_resize_dma_pool+3be/470>
13: 74 00 je 15 <_EIP+0x15>
HTH and Greetings
Kai
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-12 9:38 ` Kai Ruhnau
@ 2004-01-12 23:00 ` Guennadi Liakhovetski
2004-01-16 7:49 ` Kai Ruhnau
0 siblings, 1 reply; 13+ messages in thread
From: Guennadi Liakhovetski @ 2004-01-12 23:00 UTC (permalink / raw)
To: Kai Ruhnau; +Cc: linux-scsi
On Mon, 12 Jan 2004, Kai Ruhnau wrote:
> I try to do, what I can:
>
> kernel 2.4.22 aha152x compiled in:
> aha152x: ABORT timed out - removed from issue queue
> kernel 2.4.22 aha152x as module:
> No such device
> kernel 2.4.10 aha152x compiled in:
> timeout and NULL-pointer dereference
> kernel 2.4.10 aha152x as module:
> kernel Oops (NULL pointer dereference) during linuxrc
Please try the patch below - just to see where it fails. It looks like
you've got another driver claiming the 0x340 region - can you check your
/proc/ioports? If not - I don't understand why SuSE-7.3 detected the chip,
and vanilla kernels don't - among all SuSE-7.3 patches nothing touches
aha152x.*. The patch might not apply cleanly to your kernel-version, but
you should be able to add the required lines manually.
Also, can you install SuSE 2.4.10 sources, compile a kernel from them and
see if that works? It would be useful to get a kernel, that works, that we
can compile ourselves, that we can compare with those kernels, that fail,
and that we can put some debugging output in.
> drivers/scsi/ of SuSE's 2.4.10:
> please have a look at
> http://tragetaschen.dyndns.org/kernel/drivers_scsi.tar.bz2
...couldn't get to this site.
> original, full sources at
> ftp://ftp.suse.com/pub/suse/i386/7.3/suse/d2/kernel-source.rpm
> the drivers/scsi/ diff from vanilla-2.4.10 to SuSE-2.4.10 is at
>
> http://tragetaschen.dyndns.org/kernel/vanilla2suse.bz2
> (Sorry, but I only have 16k upload)
I downloaded SuSE-patches from one of their ftp-sites - only some generic
scsi error-handling / reset patches. Nothing aha152x-specific.
Regards
Guennadi
---
Guennadi Liakhovetski
--- aha152x.c~ Sun Jan 11 23:40:37 2004
+++ aha152x.c Mon Jan 12 23:42:18 2004
@@ -849,8 +849,10 @@
{
int i;
- if (check_region(io_port, IO_RANGE))
+ if (check_region(io_port, IO_RANGE)) {
+ printk(KERN_WARNING"Port 0x%x[%d] busy\n", io_port, IO_RANGE);
return 0;
+ }
SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
for (i = 0; i < 16; i++)
@@ -867,8 +869,10 @@
{
int i;
- if (check_region(io_port, IO_RANGE))
+ if (check_region(io_port, IO_RANGE)) {
+ printk(KERN_WARNING"Port 0x%x[%d] busy\n", io_port, IO_RANGE);
return 0;
+ }
SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
for (i = 0; i < 16; i++)
@@ -895,8 +899,10 @@
if(aha152x_porttest(setup->io_port)) {
setup->tc1550=0;
+ printk("%s(): aha152x found at %x\n", __FUNCTION__, setup->io_port);
} else if(tc1550_porttest(setup->io_port)) {
setup->tc1550=1;
+ printk("%s(): tc1550 found at %x\n", __FUNCTION__, setup->io_port);
} else
return 0;
@@ -1308,6 +1314,7 @@
continue;
if (aha152x_porttest(ports[i])) {
+ printk("%s(): aha152x found at %x\n", __FUNCTION__, ports[i]);
ok++;
setup[setup_count].io_port = ports[i];
setup[setup_count].tc1550 = 0;
@@ -1327,6 +1334,7 @@
#endif
setup_count++;
} else if (tc1550_porttest(ports[i])) {
+ printk("%s(): tc1550 found at %x\n", __FUNCTION__, ports[i]);
ok++;
setup[setup_count].io_port = ports[i];
setup[setup_count].tc1550 = 1;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-12 23:00 ` Guennadi Liakhovetski
@ 2004-01-16 7:49 ` Kai Ruhnau
2004-01-16 23:42 ` Guennadi Liakhovetski
0 siblings, 1 reply; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-16 7:49 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Guennadi Liakhovetski wrote:
> On Mon, 12 Jan 2004, Kai Ruhnau wrote:
>
> > I try to do, what I can:
> >
> > kernel 2.4.22 aha152x compiled in:
> > aha152x: ABORT timed out - removed from issue queue
> > kernel 2.4.22 aha152x as module:
> > No such device
> > kernel 2.4.10 aha152x compiled in:
> > timeout and NULL-pointer dereference
> > kernel 2.4.10 aha152x as module:
> > kernel Oops (NULL pointer dereference) during linuxrc
>
> Please try the patch below - just to see where it fails. It looks like
> you've got another driver claiming the 0x340 region - can you check your
> /proc/ioports? If not - I don't understand why SuSE-7.3 detected the chip,
> and vanilla kernels don't - among all SuSE-7.3 patches nothing touches
> aha152x.*. The patch might not apply cleanly to your kernel-version, but
> you should be able to add the required lines manually.
>
> Also, can you install SuSE 2.4.10 sources, compile a kernel from them and
> see if that works? It would be useful to get a kernel, that works, that we
> can compile ourselves, that we can compare with those kernels, that fail,
> and that we can put some debugging output in.
>
[patch]
Hi,
I actually didn't integrate the patch, but I noticed a difference between my
initrd and SuSEs initrd. And I think, it is the error, you predicted.
The problem does not lie in the aha152x driver, but in the parameters for
isa-pnp. To make everything work, I have to specify the parameter
'isapnp_reset=0' when I load isa-pnp. After that, my network-card gets
another io-range (the same as under SuSE).
I don't know if this is the solution or just a workaround that happens to
work, but it works. Perhaps someone can explain me, what happens when the
cards get 'reseted'.
Thanks to all readers. And especially to you Guennadi for your help!
Greetings
Kai
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-16 7:49 ` Kai Ruhnau
@ 2004-01-16 23:42 ` Guennadi Liakhovetski
2004-01-18 22:55 ` Kai Ruhnau
0 siblings, 1 reply; 13+ messages in thread
From: Guennadi Liakhovetski @ 2004-01-16 23:42 UTC (permalink / raw)
To: Kai Ruhnau; +Cc: linux-scsi
On Fri, 16 Jan 2004, Kai Ruhnau wrote:
> Guennadi Liakhovetski wrote:
> >
> > Please try the patch below - just to see where it fails. It looks like
> > you've got another driver claiming the 0x340 region - can you check your
> > /proc/ioports? If not - I don't understand why SuSE-7.3 detected the chip,
>
> I actually didn't integrate the patch, but I noticed a difference between my
> initrd and SuSEs initrd. And I think, it is the error, you predicted.
> The problem does not lie in the aha152x driver, but in the parameters for
> isa-pnp. To make everything work, I have to specify the parameter
> 'isapnp_reset=0' when I load isa-pnp. After that, my network-card gets
> another io-range (the same as under SuSE).
Ok, as I suspected, resourse-conflict. You have PNP, but the AHA-card is
not PNP. So, looks like the right thing to do would be just to make the
error in case of busy io-region more explicite. But the proper fix should
also, of course, replace check_region with request_region. Perhaps,
something like what's attached below. Sould you, please, test? It
compiles:-) It should just fail nicely if request_region() fails, and work
otherwise. It is against 2.6.0.
Guennadi
---
Guennadi Liakhovetski
--- drivers/scsi/aha152x.c~ Mon Nov 24 20:44:18 2003
+++ drivers/scsi/aha152x.c Sat Jan 17 00:36:38 2004
@@ -849,9 +849,6 @@
{
int i;
- if (check_region(io_port, IO_RANGE))
- return 0;
-
SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
for (i = 0; i < 16; i++)
SETPORT(io_port + O_STACK, i);
@@ -867,9 +864,6 @@
{
int i;
- if (check_region(io_port, IO_RANGE))
- return 0;
-
SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
for (i = 0; i < 16; i++)
SETPORT(io_port + O_STACK, i);
@@ -1030,9 +1024,6 @@
aha->delay,
aha->ext_trans ? "enabled" : "disabled");
- if (!request_region(shost->io_port, IO_RANGE, "aha152x"))
- goto out_unregister;
-
/* not expecting any interrupts */
SETPORT(SIMODE0, 0);
SETPORT(SIMODE1, 0);
@@ -1086,15 +1077,13 @@
out_unregister_host:
aha152x_host[registered_count] = NULL;
out_release_region:
- release_region(shost->io_port, IO_RANGE);
-out_unregister:
scsi_unregister(shost);
return NULL;
}
static int aha152x_detect(Scsi_Host_Template * tpnt)
{
- int i, j, ok;
+ int i, j, ok = 0;
#if defined(AUTOCONF)
aha152x_config conf;
#ifdef __ISAPNP__
@@ -1105,12 +1094,27 @@
if (setup_count) {
printk(KERN_INFO "aha152x: processing commandline: ");
- for (i = 0; i < setup_count; i++)
+ for (i = 0; i < setup_count; i++) {
+ if (request_region(setup[i].io_port, IO_RANGE, "aha152x") == NULL) {
+ printk("\n");
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", setup[i].io_port, IO_RANGE);
+ continue;
+ }
if (!checksetup(&setup[i])) {
- printk(KERN_ERR "\naha152x: %s\n", setup[i].conf);
+ release_region(setup[i].io_port, IO_RANGE);
+ printk("\n" KERN_ERR "aha152x: %s\n", setup[i].conf);
printk(KERN_ERR "aha152x: invalid line\n");
+ } else {
+ ok++;
+ printk("%s, ", setup[i].tc1550 ? "tc1550" : "aha152x");
}
- printk("ok\n");
+ }
+ if (ok) {
+ printk("ok\n");
+ ok = 0;
+ } else
+ /* If nothing found at command-line specified addresses, fail */
+ return 0;
}
#if defined(SETUP0)
@@ -1118,7 +1122,10 @@
struct aha152x_setup override = SETUP0;
if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
- if (!checksetup(&override)) {
+ if (request_region(override.io_port, IO_RANGE, "aha152x") == NULL)
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", override.io_port, IO_RANGE);
+ else if (!checksetup(&override)) {
+ release_region(override.io_port, IO_RANGE);
printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
override.io_port,
override.irq,
@@ -1139,7 +1146,10 @@
struct aha152x_setup override = SETUP1;
if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
- if (!checksetup(&override)) {
+ if (request_region(override.io_port, IO_RANGE, "aha152x") == NULL)
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", override.io_port, IO_RANGE);
+ else if (!checksetup(&override)) {
+ release_region(override.io_port, IO_RANGE);
printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
override.io_port,
override.irq,
@@ -1185,9 +1195,12 @@
#endif
}
- if (checksetup(&setup[setup_count]))
+ if (request_region(setup[setup_count].io_port, IO_RANGE, "aha152x") == NULL)
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", setup[setup_count].io_port, IO_RANGE);
+ else if (checksetup(&setup[setup_count]))
setup_count++;
- else
+ else {
+ release_region(setup[setup_count].io_port, IO_RANGE);
printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
setup[setup_count].io_port,
setup[setup_count].irq,
@@ -1197,6 +1210,7 @@
setup[setup_count].synchronous,
setup[setup_count].delay,
setup[setup_count].ext_trans);
+ }
}
if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) {
@@ -1227,9 +1241,12 @@
setup[setup_count].debug = debug[1];
#endif
}
- if (checksetup(&setup[setup_count]))
+ if (request_region(setup[setup_count].io_port, IO_RANGE, "aha152x") == NULL)
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", setup[setup_count].io_port, IO_RANGE);
+ else if (checksetup(&setup[setup_count]))
setup_count++;
- else
+ else {
+ release_region(setup[setup_count].io_port, IO_RANGE);
printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
setup[setup_count].io_port,
setup[setup_count].irq,
@@ -1239,6 +1256,7 @@
setup[setup_count].synchronous,
setup[setup_count].delay,
setup[setup_count].ext_trans);
+ }
}
#endif
@@ -1300,7 +1318,9 @@
if ((setup_count == 1) && (setup[0].io_port == ports[i]))
continue;
- if (aha152x_porttest(ports[i])) {
+ if (request_region(ports[i], IO_RANGE, "aha152x") == NULL)
+ printk(KERN_WARNING "aha152x: port 0x%x[%d] busy\n", ports[i], IO_RANGE);
+ else if (aha152x_porttest(ports[i])) {
ok++;
setup[setup_count].io_port = ports[i];
setup[setup_count].tc1550 = 0;
@@ -1338,7 +1358,8 @@
setup[setup_count].debug = DEBUG_DEFAULT;
#endif
setup_count++;
- }
+ } else
+ release_region(ports[i], IO_RANGE);
}
if (ok)
@@ -1349,7 +1370,8 @@
printk("detected %d controller(s)\n", setup_count);
for (i=0; i<setup_count; i++) {
- aha152x_probe_one(&setup[i]);
+ if (aha152x_probe_one(&setup[i]) == NULL)
+ release_region(setup[i].io_port, IO_RANGE);
if (aha152x_host[registered_count])
registered_count++;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-16 23:42 ` Guennadi Liakhovetski
@ 2004-01-18 22:55 ` Kai Ruhnau
2004-01-18 23:11 ` Juergen E. Fischer
0 siblings, 1 reply; 13+ messages in thread
From: Kai Ruhnau @ 2004-01-18 22:55 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-scsi
Guennadi Liakhovetski wrote:
> Ok, as I suspected, resourse-conflict. You have PNP, but the AHA-card is
> not PNP. So, looks like the right thing to do would be just to make the
> error in case of busy io-region more explicite. But the proper fix should
> also, of course, replace check_region with request_region. Perhaps,
> something like what's attached below. Sould you, please, test? It
> compiles:-) It should just fail nicely if request_region() fails, and work
> otherwise. It is against 2.6.0.
>
[patch]
Hi,
I integrated the patch and changed drivers/pnp/isapnp/core.c to switch
'isapnp_reset' permanently to 0 (If I don't do this, I get "No such device"
on module-load). When I load the aha152x.ko I get a kernel-oops (I'm sorry,
but the first three lines and everything before that get lost)[1].
If I compile aha152x in, I guess, it is the same oops (but I didn't copy it
yet).
But the kernel also oopses, when I use the original aha152x.c.
HTH
Greetings
Kai
[1]
ksymoops 2.4.9 on i586 2.4.22-gentoo-r2. Options used
-v /usr/src/linux-2.6.0-gentoo/vmlinux (specified)
-K (specified)
-l /proc/modules (default)
-o /lib/modules/2.6.0-gentoo/ (specified)
-m /usr/src/linux-2.6.0-gentoo/System.map (specified)
No modules in ksyms, skipping objects
No ksyms, skipping lsmod
EIP: 0060:[<c880f022>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010086
eax: c797a800 ebx: c797da00 ecx: c797bce0 edx: 0000001b
esi: c797a800 edi: c7fc6000 ebp: 00000246 esp: c7fc7f2c
ds: 007b es: 007b ss: 0068
Stack: c797bce0 00000002 c797a800 00000008 00000001 00000000 c88113d3
c797a800
fffbdd99 00000000 c8816720 00000000 c7ffdc20 c880ebb0 c797a800
00000000
c0129db1 00000000 c7ffdc30 c7ffdc38 c7fc6000 c7fc6000 c7fc6000
c7fc6000
Call Trace:
[<c88113d3>] is_complete+0x2d3/0x320 [aha152x]
[<c880ebb0>] run+0x30/0x40 [aha152x]
[<c0129db1>] worker_thread+0x1e1/0x2d0
[<c880eb80>] run+0x0/0x40 [aha152x]
[<c0117d30>] default_wake_function+0x0/0x20
[<c010aa76>] ret_from_fork+0x6/0x20
[<c0117d30>] default_wake_function+0x0/0x20
[<c0129bd0>] worker_thread+0x0/0x2d0
[<c0108be5>] kernel_thread_helper+0x5/0x10
Code: 89 02 8b 41 04 8b 53 04 8b 40 3c 89 42 3c 8b 41 04 8b 53 04
>>EIP; c880f022 <_end+84d5872/3fcc4850> <=====
>>eax; c797a800 <_end+7641050/3fcc4850>
>>ebx; c797da00 <_end+7644250/3fcc4850>
>>ecx; c797bce0 <_end+7642530/3fcc4850>
>>esi; c797a800 <_end+7641050/3fcc4850>
>>edi; c7fc6000 <_end+7c8c850/3fcc4850>
>>esp; c7fc7f2c <_end+7c8e77c/3fcc4850>
Trace; c88113d3 <_end+84d7c23/3fcc4850>
Trace; c880ebb0 <_end+84d5400/3fcc4850>
Trace; c0129db1 <worker_thread+1e1/2d0>
Trace; c880eb80 <_end+84d53d0/3fcc4850>
Trace; c0117d30 <default_wake_function+0/20>
Trace; c010aa76 <ret_from_fork+6/20>
Trace; c0117d30 <default_wake_function+0/20>
Trace; c0129bd0 <worker_thread+0/2d0>
Trace; c0108be5 <kernel_thread_helper+5/10>
Code; c880f022 <_end+84d5872/3fcc4850>
00000000 <_EIP>:
Code; c880f022 <_end+84d5872/3fcc4850> <=====
0: 89 02 mov %eax,(%edx) <=====
Code; c880f024 <_end+84d5874/3fcc4850>
2: 8b 41 04 mov 0x4(%ecx),%eax
Code; c880f027 <_end+84d5877/3fcc4850>
5: 8b 53 04 mov 0x4(%ebx),%edx
Code; c880f02a <_end+84d587a/3fcc4850>
8: 8b 40 3c mov 0x3c(%eax),%eax
Code; c880f02d <_end+84d587d/3fcc4850>
b: 89 42 3c mov %eax,0x3c(%edx)
Code; c880f030 <_end+84d5880/3fcc4850>
e: 8b 41 04 mov 0x4(%ecx),%eax
Code; c880f033 <_end+84d5883/3fcc4850>
11: 8b 53 04 mov 0x4(%ebx),%edx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Driver for Adaptec AHA-1530P
2004-01-18 22:55 ` Kai Ruhnau
@ 2004-01-18 23:11 ` Juergen E. Fischer
0 siblings, 0 replies; 13+ messages in thread
From: Juergen E. Fischer @ 2004-01-18 23:11 UTC (permalink / raw)
To: linux-scsi
[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]
Hi Kai,
On Sun, Jan 18, 2004 at 23:55:36 +0100, Kai Ruhnau wrote:
> But the kernel also oopses, when I use the original aha152x.c.
Please try the attached patch.
Jürgen
--
"I hear that if you play the NT 4.0 CD backwards, you get a satanic message".
"That's nothing. If you play it forward, it installs NT 4.0!"
-- unknown
[-- Attachment #1.2: aha152x.diff --]
[-- Type: text/plain, Size: 47138 bytes --]
Changes:
- move code not used for PCMCIA (detection and configuration) to the end of the
file (which is the main reason for the size of the patch)
- migration to new scsi host api (remove legacy code)
- move request_region for non-pcmia case to detection
- cleanup pcmcia stub module: remove release_region hack and let the core
module add/remove the host
- default to synchronous transfers also for pcmcia
- fix: free host scribble before scsi_done
- fix error handling
diff -udr orig/linux-2.6.0/drivers/scsi/aha152x.c linux-2.6.0/drivers/scsi/aha152x.c
--- orig/linux-2.6.0/drivers/scsi/aha152x.c 2004-01-18 17:03:33.000000000 +0100
+++ linux-2.6.0/drivers/scsi/aha152x.c 2004-01-18 17:34:05.000000000 +0100
@@ -1,6 +1,6 @@
/* aha152x.c -- Adaptec AHA-152x driver
* Author: Jürgen E. Fischer, fischer@norbit.de
- * Copyright 1993-2000 Jürgen E. Fischer
+ * Copyright 1993-2004 Jürgen E. Fischer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -344,7 +344,8 @@
MODULE_DESCRIPTION(AHA152X_REVID);
MODULE_LICENSE("GPL");
-#if defined(MODULE) && !defined(PCMCIA)
+#if !defined(PCMCIA)
+#if defined(MODULE)
MODULE_PARM(io, "1-2i");
MODULE_PARM_DESC(io,"base io address of controller");
static int io[] = {0, 0};
@@ -398,7 +399,7 @@
MODULE_PARM_DESC(aha152x1, "parameters for second controller");
static int aha152x1[] = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT};
#endif /* !defined(AHA152X_DEBUG) */
-#endif /* MODULE && !PCMCIA */
+#endif /* MODULE */
#ifdef __ISAPNP__
static struct isapnp_device_id id_table[] __devinitdata = {
@@ -408,11 +409,10 @@
MODULE_DEVICE_TABLE(isapnp, id_table);
#endif /* ISAPNP */
-/* set by aha152x_setup according to the command line */
-static int setup_count;
-static int registered_count;
-static struct aha152x_setup setup[2];
-static struct Scsi_Host *aha152x_host[2];
+#endif /* !PCMCIA */
+
+static int registered_count=0;
+static struct Scsi_Host *aha152x_host[2] = {0, 0};
static Scsi_Host_Template aha152x_driver_template;
/*
@@ -658,7 +658,6 @@
static void reset_ports(struct Scsi_Host *shpnt);
static void aha152x_error(struct Scsi_Host *shpnt, char *msg);
static void done(struct Scsi_Host *shpnt, int error);
-static int checksetup(struct aha152x_setup *setup);
/* diagnostics */
static void disp_ports(struct Scsi_Host *shpnt);
@@ -666,66 +665,6 @@
static void show_queues(struct Scsi_Host *shpnt);
static void disp_enintr(struct Scsi_Host *shpnt);
-/* possible i/o addresses for the AIC-6260; default first */
-static unsigned short ports[] = { 0x340, 0x140 };
-
-#if !defined(SKIP_BIOSTEST)
-/* possible locations for the Adaptec BIOS; defaults first */
-static unsigned int addresses[] =
-{
- 0xdc000, /* default first */
- 0xc8000,
- 0xcc000,
- 0xd0000,
- 0xd4000,
- 0xd8000,
- 0xe0000,
- 0xeb800, /* VTech Platinum SMP */
- 0xf0000,
-};
-
-/* signatures for various AIC-6[23]60 based controllers.
- The point in detecting signatures is to avoid useless and maybe
- harmful probes on ports. I'm not sure that all listed boards pass
- auto-configuration. For those which fail the BIOS signature is
- obsolete, because user intervention to supply the configuration is
- needed anyway. May be an information whether or not the BIOS supports
- extended translation could be also useful here. */
-static struct signature {
- unsigned char *signature;
- int sig_offset;
- int sig_length;
-} signatures[] =
-{
- { "Adaptec AHA-1520 BIOS", 0x102e, 21 },
- /* Adaptec 152x */
- { "Adaptec AHA-1520B", 0x000b, 17 },
- /* Adaptec 152x rev B */
- { "Adaptec AHA-1520B", 0x0026, 17 },
- /* Iomega Jaz Jet ISA (AIC6370Q) */
- { "Adaptec ASW-B626 BIOS", 0x1029, 21 },
- /* on-board controller */
- { "Adaptec BIOS: ASW-B626", 0x000f, 22 },
- /* on-board controller */
- { "Adaptec ASW-B626 S2", 0x2e6c, 19 },
- /* on-board controller */
- { "Adaptec BIOS:AIC-6360", 0x000c, 21 },
- /* on-board controller */
- { "ScsiPro SP-360 BIOS", 0x2873, 19 },
- /* ScsiPro-Controller */
- { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },
- /* Gigabyte Local-Bus-SCSI */
- { "Adaptec BIOS:AVA-282X", 0x000c, 21 },
- /* Adaptec 282x */
- { "Adaptec IBM Dock II SCSI", 0x2edd, 24 },
- /* IBM Thinkpad Dock II */
- { "Adaptec BIOS:AHA-1532P", 0x001c, 22 },
- /* IBM Thinkpad Dock II SCSI */
- { "DTC3520A Host Adapter BIOS", 0x318a, 26 },
- /* DTC 3520A ISA SCSI */
-};
-#endif
-
/*
* queue services:
@@ -799,140 +738,6 @@
return ptr;
}
-#if defined(PCMCIA) || !defined(MODULE)
-static void aha152x_setup(char *str, int *ints)
-{
- if(setup_count>=ARRAY_SIZE(setup)) {
- printk(KERN_ERR "aha152x: you can only configure up to two controllers\n");
- return;
- }
-
- setup[setup_count].conf = str;
- setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340;
- setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11;
- setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7;
- setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1;
- setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1;
- setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1;
- setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT;
- setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0;
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = ints[0] >= 9 ? ints[9] : DEBUG_DEFAULT;
- if (ints[0] > 9) {
- printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
- "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>[,<DEBUG>]]]]]]]]\n");
-#else
- if (ints[0] > 8) { /*}*/
- printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
- "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>]]]]]]]\n");
-#endif
- } else {
- setup_count++;
- }
-}
-#endif
-
-#if !defined(MODULE)
-static int __init do_setup(char *str)
-{
-
-#if defined(AHA152X_DEBUG)
- int ints[11];
-#else
- int ints[10];
-#endif
- int count=setup_count;
-
- get_options(str, ARRAY_SIZE(ints), ints);
- aha152x_setup(str,ints);
-
- return count<setup_count;
-}
-
-__setup("aha152x=", do_setup);
-#endif
-
-/*
- * Test, if port_base is valid.
- *
- */
-static int aha152x_porttest(int io_port)
-{
- int i;
-
- if (check_region(io_port, IO_RANGE))
- return 0;
-
- SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
- for (i = 0; i < 16; i++)
- SETPORT(io_port + O_STACK, i);
-
- SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
- for (i = 0; i < 16 && GETPORT(io_port + O_STACK) == i; i++)
- ;
-
- return (i == 16);
-}
-
-static int tc1550_porttest(int io_port)
-{
- int i;
-
- if (check_region(io_port, IO_RANGE))
- return 0;
-
- SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
- for (i = 0; i < 16; i++)
- SETPORT(io_port + O_STACK, i);
-
- SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
- for (i = 0; i < 16 && GETPORT(io_port + O_TC_STACK) == i; i++)
- ;
-
- return (i == 16);
-}
-
-static int checksetup(struct aha152x_setup *setup)
-{
-
-#if !defined(PCMCIA)
- int i;
- for (i = 0; i < ARRAY_SIZE(ports) && (setup->io_port != ports[i]); i++)
- ;
-
- if (i == ARRAY_SIZE(ports))
- return 0;
-#endif
-
- if(aha152x_porttest(setup->io_port)) {
- setup->tc1550=0;
- } else if(tc1550_porttest(setup->io_port)) {
- setup->tc1550=1;
- } else
- return 0;
-
- if ((setup->irq < IRQ_MIN) || (setup->irq > IRQ_MAX))
- return 0;
-
- if ((setup->scsiid < 0) || (setup->scsiid > 7))
- return 0;
-
- if ((setup->reconnect < 0) || (setup->reconnect > 1))
- return 0;
-
- if ((setup->parity < 0) || (setup->parity > 1))
- return 0;
-
- if ((setup->synchronous < 0) || (setup->synchronous > 1))
- return 0;
-
- if ((setup->ext_trans < 0) || (setup->ext_trans > 1))
- return 0;
-
-
- return 1;
-}
-
static inline struct Scsi_Host *lookup_irq(int irqno)
{
int i;
@@ -949,7 +754,6 @@
struct Scsi_Host *shpnt = lookup_irq(irqno);
if (!shpnt) {
- /* no point using HOSTNO here! */
printk(KERN_ERR "aha152x: catched software interrupt %d for unknown controller.\n", irqno);
return IRQ_NONE;
}
@@ -960,17 +764,19 @@
return IRQ_HANDLED;
}
-
struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
{
struct Scsi_Host *shpnt;
- shpnt = scsi_register(&aha152x_driver_template, sizeof(struct aha152x_hostdata));
+ shpnt = scsi_host_alloc(&aha152x_driver_template, sizeof(struct aha152x_hostdata));
if (!shpnt) {
- printk(KERN_ERR "aha152x: scsi_register failed\n");
+ printk(KERN_ERR "aha152x: scsi_host_alloc failed\n");
return NULL;
}
+ /* need to have host registered before triggering any interrupt */
+ aha152x_host[registered_count] = shpnt;
+
memset(HOSTDATA(shpnt), 0, sizeof *HOSTDATA(shpnt));
shpnt->io_port = setup->io_port;
@@ -1033,24 +839,19 @@
DELAY,
EXT_TRANS ? "enabled" : "disabled");
- if (!request_region(shpnt->io_port, IO_RANGE, "aha152x"))
- goto out_unregister;
-
/* not expecting any interrupts */
SETPORT(SIMODE0, 0);
SETPORT(SIMODE1, 0);
- if (request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) < 0) {
+ if( request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) {
printk(KERN_ERR "aha152x%d: driver needs an IRQ.\n", shpnt->host_no);
- goto out_release_region;
+ goto out_host_put;
}
HOSTDATA(shpnt)->swint = 0;
printk(KERN_INFO "aha152x%d: trying software interrupt, ", shpnt->host_no);
- /* need to have host registered before triggering any interrupt */
- aha152x_host[registered_count] = shpnt;
mb();
SETPORT(DMACNTRL0, SWINT|INTEN);
mdelay(1000);
@@ -1067,7 +868,7 @@
printk(KERN_ERR "aha152x%d: IRQ %d possibly wrong. "
"Please verify.\n", shpnt->host_no, shpnt->irq);
- goto out_unregister_host;
+ goto out_host_put;
}
printk("ok.\n");
@@ -1076,309 +877,53 @@
SETPORT(SSTAT0, 0x7f);
SETPORT(SSTAT1, 0xef);
- if (request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) < 0) {
+ if ( request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) {
printk(KERN_ERR "aha152x%d: failed to reassign interrupt.\n", shpnt->host_no);
- goto out_unregister_host;
- }
- return shpnt; /* the pcmcia stub needs the return value; */
-
-out_unregister_host:
- aha152x_host[registered_count] = NULL;
-out_release_region:
- release_region(shpnt->io_port, IO_RANGE);
-out_unregister:
- scsi_unregister(shpnt);
- return NULL;
-}
-
-static int aha152x_detect(Scsi_Host_Template * tpnt)
-{
- int i, j, ok;
-#if defined(AUTOCONF)
- aha152x_config conf;
-#endif
-#ifdef __ISAPNP__
- struct pnp_dev *dev=0, *pnpdev[2] = {0, 0};
-#endif
-
- if (setup_count) {
- printk(KERN_INFO "aha152x: processing commandline: ");
-
- for (i = 0; i < setup_count; i++)
- if (!checksetup(&setup[i])) {
- printk(KERN_ERR "\naha152x: %s\n", setup[i].conf);
- printk(KERN_ERR "aha152x: invalid line\n");
- }
- printk("ok\n");
- }
-
-#if defined(SETUP0)
- if (setup_count < ARRAY_SIZE(setup)) {
- struct aha152x_setup override = SETUP0;
-
- if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
- if (!checksetup(&override)) {
- printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
- override.io_port,
- override.irq,
- override.scsiid,
- override.reconnect,
- override.parity,
- override.synchronous,
- override.delay,
- override.ext_trans);
- } else
- setup[setup_count++] = override;
- }
- }
-#endif
-
-#if defined(SETUP1)
- if (setup_count < ARRAY_SIZE(setup)) {
- struct aha152x_setup override = SETUP1;
-
- if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
- if (!checksetup(&override)) {
- printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
- override.io_port,
- override.irq,
- override.scsiid,
- override.reconnect,
- override.parity,
- override.synchronous,
- override.delay,
- override.ext_trans);
- } else
- setup[setup_count++] = override;
- }
- }
-#endif
-
-#if defined(MODULE) && !defined(PCMCIA)
- if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) {
- if(aha152x[0]!=0) {
- setup[setup_count].conf = "";
- setup[setup_count].io_port = aha152x[0];
- setup[setup_count].irq = aha152x[1];
- setup[setup_count].scsiid = aha152x[2];
- setup[setup_count].reconnect = aha152x[3];
- setup[setup_count].parity = aha152x[4];
- setup[setup_count].synchronous = aha152x[5];
- setup[setup_count].delay = aha152x[6];
- setup[setup_count].ext_trans = aha152x[7];
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = aha152x[8];
-#endif
- } else if(io[0]!=0 || irq[0]!=0) {
- if(io[0]!=0) setup[setup_count].io_port = io[0];
- if(irq[0]!=0) setup[setup_count].irq = irq[0];
-
- setup[setup_count].scsiid = scsiid[0];
- setup[setup_count].reconnect = reconnect[0];
- setup[setup_count].parity = parity[0];
- setup[setup_count].synchronous = sync[0];
- setup[setup_count].delay = delay[0];
- setup[setup_count].ext_trans = exttrans[0];
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = debug[0];
-#endif
- }
-
- if (checksetup(&setup[setup_count]))
- setup_count++;
- else
- printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
- setup[setup_count].io_port,
- setup[setup_count].irq,
- setup[setup_count].scsiid,
- setup[setup_count].reconnect,
- setup[setup_count].parity,
- setup[setup_count].synchronous,
- setup[setup_count].delay,
- setup[setup_count].ext_trans);
- }
-
- if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) {
- if(aha152x1[0]!=0) {
- setup[setup_count].conf = "";
- setup[setup_count].io_port = aha152x1[0];
- setup[setup_count].irq = aha152x1[1];
- setup[setup_count].scsiid = aha152x1[2];
- setup[setup_count].reconnect = aha152x1[3];
- setup[setup_count].parity = aha152x1[4];
- setup[setup_count].synchronous = aha152x1[5];
- setup[setup_count].delay = aha152x1[6];
- setup[setup_count].ext_trans = aha152x1[7];
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = aha152x1[8];
-#endif
- } else if(io[1]!=0 || irq[1]!=0) {
- if(io[1]!=0) setup[setup_count].io_port = io[1];
- if(irq[1]!=0) setup[setup_count].irq = irq[1];
-
- setup[setup_count].scsiid = scsiid[1];
- setup[setup_count].reconnect = reconnect[1];
- setup[setup_count].parity = parity[1];
- setup[setup_count].synchronous = sync[1];
- setup[setup_count].delay = delay[1];
- setup[setup_count].ext_trans = exttrans[1];
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = debug[1];
-#endif
- }
- if (checksetup(&setup[setup_count]))
- setup_count++;
- else
- printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
- setup[setup_count].io_port,
- setup[setup_count].irq,
- setup[setup_count].scsiid,
- setup[setup_count].reconnect,
- setup[setup_count].parity,
- setup[setup_count].synchronous,
- setup[setup_count].delay,
- setup[setup_count].ext_trans);
+ goto out_host_put;
}
-#endif
-#ifdef __ISAPNP__
- while ( setup_count<ARRAY_SIZE(setup) && (dev=pnp_find_dev(NULL, ISAPNP_VENDOR('A','D','P'), ISAPNP_FUNCTION(0x1505), dev)) ) {
- if (pnp_device_attach(dev) < 0)
- continue;
- if (pnp_activate_dev(dev) < 0) {
- pnp_device_detach(dev);
- continue;
- }
- if (!pnp_port_valid(dev, 0)) {
- pnp_device_detach(dev);
- continue;
- }
- if (setup_count==1 && pnp_port_start(dev, 0)==setup[0].io_port) {
- pnp_device_detach(dev);
- continue;
- }
- setup[setup_count].io_port = pnp_port_start(dev, 0);
- setup[setup_count].irq = pnp_irq(dev, 0);
- setup[setup_count].scsiid = 7;
- setup[setup_count].reconnect = 1;
- setup[setup_count].parity = 1;
- setup[setup_count].synchronous = 1;
- setup[setup_count].delay = DELAY_DEFAULT;
- setup[setup_count].ext_trans = 0;
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = DEBUG_DEFAULT;
-#endif
- pnpdev[setup_count] = dev;
- printk (KERN_INFO
- "aha152x: found ISAPnP AVA-1505A at io=0x%03x, irq=%d\n",
- setup[setup_count].io_port, setup[setup_count].irq);
- setup_count++;
+ if( scsi_add_host(shpnt, 0) ) {
+ free_irq(shpnt->irq, shpnt);
+ printk(KERN_ERR "aha152x%d: failed to add host.\n", shpnt->host_no);
+ goto out_host_put;
}
-#endif
-
-#if defined(AUTOCONF)
- if (setup_count<ARRAY_SIZE(setup)) {
-#if !defined(SKIP_BIOSTEST)
- ok = 0;
- for (i = 0; i < ARRAY_SIZE(addresses) && !ok; i++)
- for (j = 0; j<ARRAY_SIZE(signatures) && !ok; j++)
- ok = isa_check_signature(addresses[i] + signatures[j].sig_offset,
- signatures[j].signature, signatures[j].sig_length);
- if (!ok && setup_count == 0)
- return 0;
-
- printk(KERN_INFO "aha152x: BIOS test: passed, ");
-#else
- printk(KERN_INFO "aha152x: ");
-#endif /* !SKIP_BIOSTEST */
-
- ok = 0;
- for (i = 0; i < ARRAY_SIZE(ports) && setup_count < 2; i++) {
- if ((setup_count == 1) && (setup[0].io_port == ports[i]))
- continue;
-
- if (aha152x_porttest(ports[i])) {
- ok++;
- setup[setup_count].io_port = ports[i];
- setup[setup_count].tc1550 = 0;
-
- conf.cf_port =
- (GETPORT(ports[i] + O_PORTA) << 8) + GETPORT(ports[i] + O_PORTB);
-
- setup[setup_count].irq = IRQ_MIN + conf.cf_irq;
- setup[setup_count].scsiid = conf.cf_id;
- setup[setup_count].reconnect = conf.cf_tardisc;
- setup[setup_count].parity = !conf.cf_parity;
- setup[setup_count].synchronous = conf.cf_syncneg;
- setup[setup_count].delay = DELAY_DEFAULT;
- setup[setup_count].ext_trans = 0;
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = DEBUG_DEFAULT;
-#endif
- setup_count++;
- } else if (tc1550_porttest(ports[i])) {
- ok++;
- setup[setup_count].io_port = ports[i];
- setup[setup_count].tc1550 = 1;
-
- conf.cf_port =
- (GETPORT(ports[i] + O_PORTA) << 8) + GETPORT(ports[i] + O_PORTB);
-
- setup[setup_count].irq = IRQ_MIN + conf.cf_irq;
- setup[setup_count].scsiid = conf.cf_id;
- setup[setup_count].reconnect = conf.cf_tardisc;
- setup[setup_count].parity = !conf.cf_parity;
- setup[setup_count].synchronous = conf.cf_syncneg;
- setup[setup_count].delay = DELAY_DEFAULT;
- setup[setup_count].ext_trans = 0;
-#if defined(AHA152X_DEBUG)
- setup[setup_count].debug = DEBUG_DEFAULT;
-#endif
- setup_count++;
- }
- }
+ scsi_scan_host(shpnt);
- if (ok)
- printk("auto configuration: ok, ");
- }
-#endif
+ registered_count++;
- printk("detected %d controller(s)\n", setup_count);
+ return shpnt;
- for (i=0; i<setup_count; i++) {
- aha152x_probe_one(&setup[i]);
- if (aha152x_host[registered_count]) {
-#ifdef __ISAPNP__
- if(pnpdev[i])
- HOSTDATA(aha152x_host[registered_count])->pnpdev=pnpdev[i];
-#endif
- registered_count++;
- }
- }
+out_host_put:
+ aha152x_host[registered_count]=0;
+ scsi_host_put(shpnt);
- return registered_count>0;
+ return 0;
}
-
-static int aha152x_release(struct Scsi_Host *shpnt)
+void aha152x_release(struct Scsi_Host *shpnt)
{
+ if(!shpnt)
+ return;
+
if (shpnt->irq)
free_irq(shpnt->irq, shpnt);
+#if !defined(PCMCIA)
if (shpnt->io_port)
release_region(shpnt->io_port, IO_RANGE);
+#endif
#ifdef __ISAPNP__
if (HOSTDATA(shpnt)->pnpdev)
pnp_device_detach(HOSTDATA(shpnt)->pnpdev);
#endif
- scsi_unregister(shpnt);
-
- return 0;
+ scsi_remove_host(shpnt);
+ scsi_host_put(shpnt);
}
+
/*
* setup controller to generate interrupts depending
* on current state (lock has to be acquired)
@@ -1429,8 +974,8 @@
#if defined(AHA152X_DEBUG)
if (HOSTDATA(shpnt)->debug & debug_queue) {
- printk(INFO_LEAD "queue: cmd_len=%d pieces=%d size=%u cmnd=",
- CMDINFO(SCpnt), SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen);
+ printk(INFO_LEAD "queue: %p; cmd_len=%d pieces=%d size=%u cmnd=",
+ CMDINFO(SCpnt), SCpnt, SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen);
print_command(SCpnt->cmnd);
}
#endif
@@ -1449,7 +994,7 @@
return FAILED;
}
} else {
- SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
+ SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
if(SCpnt->host_scribble==0) {
printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
return FAILED;
@@ -1544,11 +1089,6 @@
Scsi_Cmnd *ptr;
unsigned long flags;
- if(!shpnt) {
- printk(ERR_LEAD "abort(%p): no host structure\n", CMDINFO(SCpnt), SCpnt);
- return FAILED;
- }
-
#if defined(AHA152X_DEBUG)
if(HOSTDATA(shpnt)->debug & debug_eh) {
printk(DEBUG_LEAD "abort(%p)", CMDINFO(SCpnt), SCpnt);
@@ -1593,15 +1133,12 @@
Scsi_Cmnd *SCp = (Scsi_Cmnd *)p;
struct semaphore *sem = SCSEM(SCp);
struct Scsi_Host *shpnt = SCp->device->host;
+ unsigned long flags;
/* remove command from issue queue */
- if(remove_SC(&ISSUE_SC, SCp)) {
- printk(KERN_INFO "aha152x: ABORT timed out - removed from issue queue\n");
- kfree(SCp->host_scribble);
- SCp->host_scribble=0;
- } else {
- printk(KERN_INFO "aha152x: ABORT timed out - not on issue queue\n");
- }
+ DO_LOCK(flags);
+ remove_SC(&ISSUE_SC, SCp);
+ DO_UNLOCK(flags);
up(sem);
}
@@ -1609,15 +1146,16 @@
/*
* Reset a device
*
- * FIXME: never seen this live. might lockup...
- *
*/
static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
DECLARE_MUTEX_LOCKED(sem);
struct timer_list timer;
+ unsigned long flags;
int ret;
+ int issued=0;
+ int disconnected=0;
#if defined(AHA152X_DEBUG)
if(HOSTDATA(shpnt)->debug & debug_eh) {
@@ -1631,6 +1169,11 @@
return FAILED;
}
+ DO_LOCK(flags);
+ issued = remove_SC(&ISSUE_SC, SCpnt)==0;
+ disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt);
+ DO_UNLOCK(flags);
+
SCpnt->cmd_len = 0;
SCpnt->use_sg = 0;
SCpnt->request_buffer = 0;
@@ -1645,15 +1188,30 @@
add_timer(&timer);
down(&sem);
del_timer(&timer);
-
+
SCpnt->cmd_len = SCpnt->old_cmd_len;
SCpnt->use_sg = SCpnt->old_use_sg;
SCpnt->request_buffer = SCpnt->buffer;
SCpnt->request_bufflen = SCpnt->bufflen;
if(SCpnt->SCp.phase & resetted) {
+ HOSTDATA(shpnt)->commands--;
+ if (!HOSTDATA(shpnt)->commands)
+ SETPORT(PORTA, 0);
+ kfree(SCpnt->host_scribble);
+ SCpnt->host_scribble=0;
+
ret = SUCCESS;
} else {
+ /* requeue */
+ DO_LOCK(flags);
+ if(!issued) {
+ append_SC(&ISSUE_SC, SCpnt);
+ } else if(disconnected) {
+ append_SC(&DISCONNECTED_SC, SCpnt);
+ }
+ DO_UNLOCK(flags);
+
ret = FAILED;
}
@@ -1664,13 +1222,17 @@
static void free_hard_reset_SCs(struct Scsi_Host *shpnt, Scsi_Cmnd **SCs)
{
Scsi_Cmnd *ptr;
- unsigned long flags;
-
- DO_LOCK(flags);
ptr=*SCs;
while(ptr) {
- Scsi_Cmnd *next = SCNEXT(ptr);
+ Scsi_Cmnd *next;
+
+ if(SCDATA(ptr)) {
+ next = SCNEXT(ptr);
+ } else {
+ printk(DEBUG_LEAD "queue corrupted at %p\n", CMDINFO(ptr), ptr);
+ next = 0;
+ }
if (!ptr->device->soft_reset) {
DPRINTK(debug_eh, DEBUG_LEAD "disconnected command %p removed\n", CMDINFO(ptr), ptr);
@@ -1682,8 +1244,6 @@
ptr = next;
}
-
- DO_UNLOCK(flags);
}
/*
@@ -1695,6 +1255,8 @@
struct Scsi_Host *shpnt = SCpnt->device->host;
unsigned long flags;
+ DO_LOCK(flags);
+
#if defined(AHA152X_DEBUG)
if(HOSTDATA(shpnt)->debug & debug_eh) {
printk(DEBUG_LEAD "aha152x_bus_reset(%p)", CMDINFO(SCpnt), SCpnt);
@@ -1712,12 +1274,12 @@
SETPORT(SCSISEQ, 0);
mdelay(DELAY);
- DPRINTK(debug_eh, DEBUG_LEAD "bus reset returns\n", CMDINFO(SCpnt));
+ DPRINTK(debug_eh, DEBUG_LEAD "bus resetted\n", CMDINFO(SCpnt));
- DO_LOCK(flags);
setup_expected_interrupts(shpnt);
if(HOSTDATA(shpnt)->commands==0)
SETPORT(PORTA, 0);
+
DO_UNLOCK(flags);
return SUCCESS;
@@ -1983,6 +1545,7 @@
#if defined(AHA152X_STAT)
action++;
#endif
+
if(DONE_SC->SCp.phase & check_condition) {
#if 0
if(HOSTDATA(shpnt)->debug & debug_eh) {
@@ -2012,47 +1575,57 @@
#endif
if(!(DONE_SC->SCp.Status & not_issued)) {
+ Scsi_Cmnd *ptr = DONE_SC;
+ DONE_SC=0;
#if 0
- DPRINTK(debug_eh, ERR_LEAD "requesting sense\n", CMDINFO(DONE_SC));
+ DPRINTK(debug_eh, ERR_LEAD "requesting sense\n", CMDINFO(ptr));
#endif
- DONE_SC->cmnd[0] = REQUEST_SENSE;
- DONE_SC->cmnd[1] = 0;
- DONE_SC->cmnd[2] = 0;
- DONE_SC->cmnd[3] = 0;
- DONE_SC->cmnd[4] = sizeof(DONE_SC->sense_buffer);
- DONE_SC->cmnd[5] = 0;
- DONE_SC->cmd_len = 6;
- DONE_SC->use_sg = 0;
- DONE_SC->request_buffer = DONE_SC->sense_buffer;
- DONE_SC->request_bufflen = sizeof(DONE_SC->sense_buffer);
+ ptr->cmnd[0] = REQUEST_SENSE;
+ ptr->cmnd[1] = 0;
+ ptr->cmnd[2] = 0;
+ ptr->cmnd[3] = 0;
+ ptr->cmnd[4] = sizeof(ptr->sense_buffer);
+ ptr->cmnd[5] = 0;
+ ptr->cmd_len = 6;
+ ptr->use_sg = 0;
+ ptr->request_buffer = ptr->sense_buffer;
+ ptr->request_bufflen = sizeof(ptr->sense_buffer);
DO_UNLOCK(flags);
- aha152x_internal_queue(DONE_SC, 0, check_condition, DONE_SC->scsi_done);
+ aha152x_internal_queue(ptr, 0, check_condition, ptr->scsi_done);
DO_LOCK(flags);
-
- DONE_SC=0;
- } else {
#if 0
+ } else {
DPRINTK(debug_eh, ERR_LEAD "command not issued - CHECK CONDITION ignored\n", CMDINFO(DONE_SC));
#endif
}
}
if(DONE_SC && DONE_SC->scsi_done) {
- /* turn led off, when no commands are in the driver */
- HOSTDATA(shpnt)->commands--;
- if (!HOSTDATA(shpnt)->commands)
- SETPORT(PORTA, 0); /* turn led off */
+#if defined(AHA152X_DEBUG)
+ int hostno=DONE_SC->device->host->host_no;
+ int id=DONE_SC->device->id & 0xf;
+ int lun=DONE_SC->device->lun & 0x7;
+#endif
+ Scsi_Cmnd *ptr = DONE_SC;
+ DONE_SC=0;
+
+ if(ptr->scsi_done != reset_done) {
+ kfree(ptr->host_scribble);
+ ptr->host_scribble=0;
+ }
DO_UNLOCK(flags);
- DPRINTK(debug_done, DEBUG_LEAD "calling scsi_done(%p)\n", CMDINFO(DONE_SC), DONE_SC);
- DONE_SC->scsi_done(DONE_SC);
- DPRINTK(debug_done, DEBUG_LEAD "scsi_done(%p) returned\n", CMDINFO(DONE_SC), DONE_SC);
+ DPRINTK(debug_done, DEBUG_LEAD "calling scsi_done(%p)\n", hostno, id, lun, ptr);
+ ptr->scsi_done(ptr);
+ DPRINTK(debug_done, DEBUG_LEAD "scsi_done(%p) returned\n", hostno, id, lun, ptr);
DO_LOCK(flags);
- kfree(DONE_SC->host_scribble);
- DONE_SC->host_scribble=0;
+ /* turn led off, when no commands are in the driver */
+ HOSTDATA(shpnt)->commands--;
+ if (!HOSTDATA(shpnt)->commands)
+ SETPORT(PORTA, 0); /* turn led off */
}
DONE_SC=0;
@@ -2920,10 +2493,10 @@
remove_SC(&DISCONNECTED_SC, ptr);
ptr->result = DID_RESET << 16;
- ptr->scsi_done(ptr);
-
kfree(ptr->host_scribble);
ptr->host_scribble=0;
+ ptr->scsi_done(ptr);
+
}
ptr = next;
@@ -3365,7 +2938,11 @@
printk("aborted|");
if (ptr->SCp.phase & resetted)
printk("resetted|");
- printk("; next=0x%p\n", SCNEXT(ptr));
+ if( SCDATA(ptr) ) {
+ printk("; next=0x%p\n", SCNEXT(ptr));
+ } else {
+ printk("; next=(host scribble NULL)\n");
+ }
}
/*
@@ -3389,7 +2966,7 @@
printk(KERN_DEBUG "none\n");
printk(KERN_DEBUG "disconnected_SC:\n");
- for (ptr = DISCONNECTED_SC; ptr; ptr = SCNEXT(ptr))
+ for (ptr = DISCONNECTED_SC; ptr; ptr = SCDATA(ptr) ? SCNEXT(ptr) : 0)
show_command(ptr);
disp_ports(shpnt);
@@ -3880,26 +3457,489 @@
}
static Scsi_Host_Template aha152x_driver_template = {
- .module = THIS_MODULE,
- .name = AHA152X_REVID,
- .proc_name = "aha152x",
- .proc_info = aha152x_proc_info,
- .detect = aha152x_detect,
- .queuecommand = aha152x_queue,
- .eh_abort_handler = aha152x_abort,
- .eh_device_reset_handler = aha152x_device_reset,
- .eh_bus_reset_handler = aha152x_bus_reset,
- .eh_host_reset_handler = aha152x_host_reset,
- .release = aha152x_release,
- .bios_param = aha152x_biosparam,
- .can_queue = 1,
- .this_id = 7,
- .sg_tablesize = SG_ALL,
- .cmd_per_lun = 1,
- .use_clustering = DISABLE_CLUSTERING,
+ .module = THIS_MODULE,
+ .name = AHA152X_REVID,
+ .proc_name = "aha152x",
+ .proc_info = aha152x_proc_info,
+ .queuecommand = aha152x_queue,
+ .eh_abort_handler = aha152x_abort,
+ .eh_device_reset_handler = aha152x_device_reset,
+ .eh_bus_reset_handler = aha152x_bus_reset,
+ .eh_host_reset_handler = aha152x_host_reset,
+ .bios_param = aha152x_biosparam,
+ .can_queue = 1,
+ .this_id = 7,
+ .sg_tablesize = SG_ALL,
+ .cmd_per_lun = 1,
+ .use_clustering = DISABLE_CLUSTERING,
};
-#ifndef PCMCIA
-#define driver_template aha152x_driver_template
-#include "scsi_module.c"
+#if !defined(PCMCIA)
+static int setup_count;
+static struct aha152x_setup setup[2];
+
+/* possible i/o addresses for the AIC-6260; default first */
+static unsigned short ports[] = { 0x340, 0x140 };
+
+#if !defined(SKIP_BIOSTEST)
+/* possible locations for the Adaptec BIOS; defaults first */
+static unsigned int addresses[] =
+{
+ 0xdc000, /* default first */
+ 0xc8000,
+ 0xcc000,
+ 0xd0000,
+ 0xd4000,
+ 0xd8000,
+ 0xe0000,
+ 0xeb800, /* VTech Platinum SMP */
+ 0xf0000,
+};
+
+/* signatures for various AIC-6[23]60 based controllers.
+ The point in detecting signatures is to avoid useless and maybe
+ harmful probes on ports. I'm not sure that all listed boards pass
+ auto-configuration. For those which fail the BIOS signature is
+ obsolete, because user intervention to supply the configuration is
+ needed anyway. May be an information whether or not the BIOS supports
+ extended translation could be also useful here. */
+static struct signature {
+ unsigned char *signature;
+ int sig_offset;
+ int sig_length;
+} signatures[] =
+{
+ { "Adaptec AHA-1520 BIOS", 0x102e, 21 },
+ /* Adaptec 152x */
+ { "Adaptec AHA-1520B", 0x000b, 17 },
+ /* Adaptec 152x rev B */
+ { "Adaptec AHA-1520B", 0x0026, 17 },
+ /* Iomega Jaz Jet ISA (AIC6370Q) */
+ { "Adaptec ASW-B626 BIOS", 0x1029, 21 },
+ /* on-board controller */
+ { "Adaptec BIOS: ASW-B626", 0x000f, 22 },
+ /* on-board controller */
+ { "Adaptec ASW-B626 S2", 0x2e6c, 19 },
+ /* on-board controller */
+ { "Adaptec BIOS:AIC-6360", 0x000c, 21 },
+ /* on-board controller */
+ { "ScsiPro SP-360 BIOS", 0x2873, 19 },
+ /* ScsiPro-Controller */
+ { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },
+ /* Gigabyte Local-Bus-SCSI */
+ { "Adaptec BIOS:AVA-282X", 0x000c, 21 },
+ /* Adaptec 282x */
+ { "Adaptec IBM Dock II SCSI", 0x2edd, 24 },
+ /* IBM Thinkpad Dock II */
+ { "Adaptec BIOS:AHA-1532P", 0x001c, 22 },
+ /* IBM Thinkpad Dock II SCSI */
+ { "DTC3520A Host Adapter BIOS", 0x318a, 26 },
+ /* DTC 3520A ISA SCSI */
+};
+#endif /* !SKIP_BIOSTEST */
+
+/*
+ * Test, if port_base is valid.
+ *
+ */
+static int aha152x_porttest(int io_port)
+{
+ int i;
+
+ SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
+ for (i = 0; i < 16; i++)
+ SETPORT(io_port + O_STACK, i);
+
+ SETPORT(io_port + O_DMACNTRL1, 0); /* reset stack pointer */
+ for (i = 0; i < 16 && GETPORT(io_port + O_STACK) == i; i++)
+ ;
+
+ return (i == 16);
+}
+
+static int tc1550_porttest(int io_port)
+{
+ int i;
+
+ SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
+ for (i = 0; i < 16; i++)
+ SETPORT(io_port + O_STACK, i);
+
+ SETPORT(io_port + O_TC_DMACNTRL1, 0); /* reset stack pointer */
+ for (i = 0; i < 16 && GETPORT(io_port + O_TC_STACK) == i; i++)
+ ;
+
+ return (i == 16);
+}
+
+
+static int checksetup(struct aha152x_setup *setup)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(ports) && (setup->io_port != ports[i]); i++)
+ ;
+
+ if (i == ARRAY_SIZE(ports))
+ return 0;
+
+ if( aha152x_porttest(setup->io_port) ) {
+ setup->tc1550=0;
+ } else if( tc1550_porttest(setup->io_port) ) {
+ setup->tc1550=1;
+ } else {
+ return 0;
+ }
+
+ if ((setup->irq < IRQ_MIN) || (setup->irq > IRQ_MAX))
+ return 0;
+
+ if ((setup->scsiid < 0) || (setup->scsiid > 7))
+ return 0;
+
+ if ((setup->reconnect < 0) || (setup->reconnect > 1))
+ return 0;
+
+ if ((setup->parity < 0) || (setup->parity > 1))
+ return 0;
+
+ if ((setup->synchronous < 0) || (setup->synchronous > 1))
+ return 0;
+
+ if ((setup->ext_trans < 0) || (setup->ext_trans > 1))
+ return 0;
+
+
+ return 1;
+}
+
+
+static int __init aha152x_init(void)
+{
+ int i, j, ok;
+#if defined(AUTOCONF)
+ aha152x_config conf;
#endif
+#ifdef __ISAPNP__
+ struct pnp_dev *dev=0, *pnpdev[2] = {0, 0};
+#endif
+
+ if ( setup_count ) {
+ printk(KERN_INFO "aha152x: processing commandline: ");
+
+ for (i = 0; i<setup_count; i++) {
+ if (!checksetup(&setup[i])) {
+ printk(KERN_ERR "\naha152x: %s\n", setup[i].conf);
+ printk(KERN_ERR "aha152x: invalid line\n");
+ }
+ }
+ printk("ok\n");
+ }
+
+#if defined(SETUP0)
+ if (setup_count < ARRAY_SIZE(setup)) {
+ struct aha152x_setup override = SETUP0;
+
+ if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
+ if (!checksetup(&override)) {
+ printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
+ override.io_port,
+ override.irq,
+ override.scsiid,
+ override.reconnect,
+ override.parity,
+ override.synchronous,
+ override.delay,
+ override.ext_trans);
+ } else
+ setup[setup_count++] = override;
+ }
+ }
+#endif
+
+#if defined(SETUP1)
+ if (setup_count < ARRAY_SIZE(setup)) {
+ struct aha152x_setup override = SETUP1;
+
+ if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
+ if (!checksetup(&override)) {
+ printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
+ override.io_port,
+ override.irq,
+ override.scsiid,
+ override.reconnect,
+ override.parity,
+ override.synchronous,
+ override.delay,
+ override.ext_trans);
+ } else
+ setup[setup_count++] = override;
+ }
+ }
+#endif
+
+#if defined(MODULE)
+ if (setup_count<ARRAY_SIZE(setup) && (aha152x[0]!=0 || io[0]!=0 || irq[0]!=0)) {
+ if(aha152x[0]!=0) {
+ setup[setup_count].conf = "";
+ setup[setup_count].io_port = aha152x[0];
+ setup[setup_count].irq = aha152x[1];
+ setup[setup_count].scsiid = aha152x[2];
+ setup[setup_count].reconnect = aha152x[3];
+ setup[setup_count].parity = aha152x[4];
+ setup[setup_count].synchronous = aha152x[5];
+ setup[setup_count].delay = aha152x[6];
+ setup[setup_count].ext_trans = aha152x[7];
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = aha152x[8];
+#endif
+ } else if(io[0]!=0 || irq[0]!=0) {
+ if(io[0]!=0) setup[setup_count].io_port = io[0];
+ if(irq[0]!=0) setup[setup_count].irq = irq[0];
+
+ setup[setup_count].scsiid = scsiid[0];
+ setup[setup_count].reconnect = reconnect[0];
+ setup[setup_count].parity = parity[0];
+ setup[setup_count].synchronous = sync[0];
+ setup[setup_count].delay = delay[0];
+ setup[setup_count].ext_trans = exttrans[0];
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = debug[0];
+#endif
+ }
+
+ if (checksetup(&setup[setup_count]))
+ setup_count++;
+ else
+ printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
+ setup[setup_count].io_port,
+ setup[setup_count].irq,
+ setup[setup_count].scsiid,
+ setup[setup_count].reconnect,
+ setup[setup_count].parity,
+ setup[setup_count].synchronous,
+ setup[setup_count].delay,
+ setup[setup_count].ext_trans);
+ }
+
+ if (setup_count<ARRAY_SIZE(setup) && (aha152x1[0]!=0 || io[1]!=0 || irq[1]!=0)) {
+ if(aha152x1[0]!=0) {
+ setup[setup_count].conf = "";
+ setup[setup_count].io_port = aha152x1[0];
+ setup[setup_count].irq = aha152x1[1];
+ setup[setup_count].scsiid = aha152x1[2];
+ setup[setup_count].reconnect = aha152x1[3];
+ setup[setup_count].parity = aha152x1[4];
+ setup[setup_count].synchronous = aha152x1[5];
+ setup[setup_count].delay = aha152x1[6];
+ setup[setup_count].ext_trans = aha152x1[7];
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = aha152x1[8];
+#endif
+ } else if(io[1]!=0 || irq[1]!=0) {
+ if(io[1]!=0) setup[setup_count].io_port = io[1];
+ if(irq[1]!=0) setup[setup_count].irq = irq[1];
+
+ setup[setup_count].scsiid = scsiid[1];
+ setup[setup_count].reconnect = reconnect[1];
+ setup[setup_count].parity = parity[1];
+ setup[setup_count].synchronous = sync[1];
+ setup[setup_count].delay = delay[1];
+ setup[setup_count].ext_trans = exttrans[1];
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = debug[1];
+#endif
+ }
+ if (checksetup(&setup[setup_count]))
+ setup_count++;
+ else
+ printk(KERN_ERR "aha152x: invalid module params io=0x%x, irq=%d,scsiid=%d,reconnect=%d,parity=%d,sync=%d,delay=%d,exttrans=%d\n",
+ setup[setup_count].io_port,
+ setup[setup_count].irq,
+ setup[setup_count].scsiid,
+ setup[setup_count].reconnect,
+ setup[setup_count].parity,
+ setup[setup_count].synchronous,
+ setup[setup_count].delay,
+ setup[setup_count].ext_trans);
+ }
+#endif
+
+#ifdef __ISAPNP__
+ while ( setup_count<ARRAY_SIZE(setup) && (dev=pnp_find_dev(NULL, ISAPNP_VENDOR('A','D','P'), ISAPNP_FUNCTION(0x1505), dev)) ) {
+ if (pnp_device_attach(dev) < 0)
+ continue;
+ if (pnp_activate_dev(dev) < 0) {
+ pnp_device_detach(dev);
+ continue;
+ }
+ if (!pnp_port_valid(dev, 0)) {
+ pnp_device_detach(dev);
+ continue;
+ }
+ if (setup_count==1 && pnp_port_start(dev, 0)==setup[0].io_port) {
+ pnp_device_detach(dev);
+ continue;
+ }
+ setup[setup_count].io_port = pnp_port_start(dev, 0);
+ setup[setup_count].irq = pnp_irq(dev, 0);
+ setup[setup_count].scsiid = 7;
+ setup[setup_count].reconnect = 1;
+ setup[setup_count].parity = 1;
+ setup[setup_count].synchronous = 1;
+ setup[setup_count].delay = DELAY_DEFAULT;
+ setup[setup_count].ext_trans = 0;
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = DEBUG_DEFAULT;
+#endif
+ pnpdev[setup_count] = dev;
+ printk (KERN_INFO
+ "aha152x: found ISAPnP AVA-1505A at io=0x%03x, irq=%d\n",
+ setup[setup_count].io_port, setup[setup_count].irq);
+ setup_count++;
+ }
+#endif
+
+#if defined(AUTOCONF)
+ if (setup_count<ARRAY_SIZE(setup)) {
+#if !defined(SKIP_BIOSTEST)
+ ok = 0;
+ for (i = 0; i < ARRAY_SIZE(addresses) && !ok; i++)
+ for (j = 0; j<ARRAY_SIZE(signatures) && !ok; j++)
+ ok = isa_check_signature(addresses[i] + signatures[j].sig_offset,
+ signatures[j].signature, signatures[j].sig_length);
+ if (!ok && setup_count == 0)
+ return 0;
+
+ printk(KERN_INFO "aha152x: BIOS test: passed, ");
+#else
+ printk(KERN_INFO "aha152x: ");
+#endif /* !SKIP_BIOSTEST */
+
+ ok = 0;
+ for (i = 0; i < ARRAY_SIZE(ports) && setup_count < 2; i++) {
+ if ((setup_count == 1) && (setup[0].io_port == ports[i]))
+ continue;
+
+ if (aha152x_porttest(ports[i])) {
+ ok++;
+ setup[setup_count].io_port = ports[i];
+ setup[setup_count].tc1550 = 0;
+
+ conf.cf_port =
+ (GETPORT(ports[i] + O_PORTA) << 8) + GETPORT(ports[i] + O_PORTB);
+
+ setup[setup_count].irq = IRQ_MIN + conf.cf_irq;
+ setup[setup_count].scsiid = conf.cf_id;
+ setup[setup_count].reconnect = conf.cf_tardisc;
+ setup[setup_count].parity = !conf.cf_parity;
+ setup[setup_count].synchronous = conf.cf_syncneg;
+ setup[setup_count].delay = DELAY_DEFAULT;
+ setup[setup_count].ext_trans = 0;
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = DEBUG_DEFAULT;
+#endif
+ setup_count++;
+ } else if (tc1550_porttest(ports[i])) {
+ ok++;
+ setup[setup_count].io_port = ports[i];
+ setup[setup_count].tc1550 = 1;
+
+ conf.cf_port =
+ (GETPORT(ports[i] + O_PORTA) << 8) + GETPORT(ports[i] + O_PORTB);
+
+ setup[setup_count].irq = IRQ_MIN + conf.cf_irq;
+ setup[setup_count].scsiid = conf.cf_id;
+ setup[setup_count].reconnect = conf.cf_tardisc;
+ setup[setup_count].parity = !conf.cf_parity;
+ setup[setup_count].synchronous = conf.cf_syncneg;
+ setup[setup_count].delay = DELAY_DEFAULT;
+ setup[setup_count].ext_trans = 0;
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = DEBUG_DEFAULT;
+#endif
+ setup_count++;
+ }
+ }
+
+ if (ok)
+ printk("auto configuration: ok, ");
+ }
+#endif
+
+ printk("%d controller(s) configured\n", setup_count);
+
+ for (i=0; i<setup_count; i++) {
+ if ( request_region(setup[i].io_port, IO_RANGE, "aha152x") ) {
+ struct Scsi_Host *shpnt = aha152x_probe_one(&setup[i]);
+
+ if( !shpnt ) {
+ release_region(setup[i].io_port, IO_RANGE);
+#if defined(__ISAPNP__)
+ } else if( pnpdev[i] ) {
+ HOSTDATA(shpnt)->pnpdev=pnpdev[i];
+#endif
+ }
+ }
+ }
+
+ return registered_count>0;
+}
+
+static void __exit aha152x_exit(void)
+{
+ int i;
+
+ for(i=0; i<ARRAY_SIZE(setup); i++) {
+ aha152x_release(aha152x_host[i]);
+ aha152x_host[i]=0;
+ }
+}
+
+module_init(aha152x_init);
+module_exit(aha152x_exit);
+
+#if !defined(MODULE)
+static int __init aha152x_setup(char *str)
+{
+#if defined(AHA152X_DEBUG)
+ int ints[11];
+#else
+ int ints[10];
+#endif
+ get_options(str, ARRAY_SIZE(ints), ints);
+
+ if(setup_count>=ARRAY_SIZE(setup)) {
+ printk(KERN_ERR "aha152x: you can only configure up to two controllers\n");
+ return 1;
+ }
+
+ setup[setup_count].conf = str;
+ setup[setup_count].io_port = ints[0] >= 1 ? ints[1] : 0x340;
+ setup[setup_count].irq = ints[0] >= 2 ? ints[2] : 11;
+ setup[setup_count].scsiid = ints[0] >= 3 ? ints[3] : 7;
+ setup[setup_count].reconnect = ints[0] >= 4 ? ints[4] : 1;
+ setup[setup_count].parity = ints[0] >= 5 ? ints[5] : 1;
+ setup[setup_count].synchronous = ints[0] >= 6 ? ints[6] : 1;
+ setup[setup_count].delay = ints[0] >= 7 ? ints[7] : DELAY_DEFAULT;
+ setup[setup_count].ext_trans = ints[0] >= 8 ? ints[8] : 0;
+#if defined(AHA152X_DEBUG)
+ setup[setup_count].debug = ints[0] >= 9 ? ints[9] : DEBUG_DEFAULT;
+ if (ints[0] > 9) {
+ printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
+ "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>[,<DEBUG>]]]]]]]]\n");
+#else
+ if (ints[0] > 8) { /*}*/
+ printk(KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>"
+ "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>]]]]]]]\n");
+#endif
+ } else {
+ setup_count++;
+ return 0;
+ }
+
+ return 1;
+}
+__setup("aha152x=", aha152x_setup);
+#endif
+
+#endif /* !PCMCIA */
diff -udr orig/linux-2.6.0/drivers/scsi/aha152x.h linux-2.6.0/drivers/scsi/aha152x.h
--- orig/linux-2.6.0/drivers/scsi/aha152x.h 2003-12-18 03:59:05.000000000 +0100
+++ linux-2.6.0/drivers/scsi/aha152x.h 2004-01-13 21:26:46.000000000 +0100
@@ -331,6 +331,7 @@
};
struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *);
-int aha152x_host_reset(struct scsi_cmnd *);
+void aha152x_release(struct Scsi_Host *);
+int aha152x_host_reset(Scsi_Cmnd *);
#endif /* _AHA152X_H */
diff -udr orig/linux-2.6.0/drivers/scsi/pcmcia/aha152x_stub.c linux-2.6.0/drivers/scsi/pcmcia/aha152x_stub.c
--- orig/linux-2.6.0/drivers/scsi/pcmcia/aha152x_stub.c 2003-12-18 03:59:36.000000000 +0100
+++ linux-2.6.0/drivers/scsi/pcmcia/aha152x_stub.c 2004-01-15 18:42:29.000000000 +0100
@@ -78,7 +78,7 @@
static int host_id = 7;
static int reconnect = 1;
static int parity = 1;
-static int synchronous = 0;
+static int synchronous = 1;
static int reset_delay = 100;
static int ext_trans = 0;
@@ -246,9 +246,6 @@
CS_CHECK(RequestIRQ, handle, &link->irq);
CS_CHECK(RequestConfiguration, handle, &link->conf);
- /* A bad hack... */
- release_region(link->io.BasePort1, link->io.NumPorts1);
-
/* Set configuration options for the aha152x driver */
memset(&s, 0, sizeof(s));
s.conf = "PCMCIA setup";
@@ -268,9 +265,6 @@
goto cs_failed;
}
- scsi_add_host(host, NULL); /* XXX handle failure */
- scsi_scan_host(host);
-
sprintf(info->node.dev_name, "scsi%d", host->host_no);
link->dev = &info->node;
info->host = host;
@@ -288,7 +282,7 @@
{
scsi_info_t *info = link->priv;
- scsi_remove_host(info->host);
+ aha152x_release(info->host);
link->dev = NULL;
CardServices(ReleaseConfiguration, link->handle);
@@ -296,7 +290,6 @@
CardServices(ReleaseIRQ, link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
- scsi_unregister(info->host);
}
static int aha152x_event(event_t event, int priority,
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-01-18 23:11 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-10 0:26 Driver for Adaptec AHA-1530P Kai Ruhnau
2004-01-10 12:48 ` Guennadi Liakhovetski
2004-01-10 15:03 ` Kai Ruhnau
2004-01-10 18:01 ` Kai Ruhnau
2004-01-10 21:24 ` Guennadi Liakhovetski
2004-01-11 0:33 ` Kai Ruhnau
2004-01-11 12:15 ` Guennadi Liakhovetski
2004-01-12 9:38 ` Kai Ruhnau
2004-01-12 23:00 ` Guennadi Liakhovetski
2004-01-16 7:49 ` Kai Ruhnau
2004-01-16 23:42 ` Guennadi Liakhovetski
2004-01-18 22:55 ` Kai Ruhnau
2004-01-18 23:11 ` Juergen E. Fischer
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.