* Advansys SCSI driver and 2.6.16
@ 2006-04-19 18:49 Ken Witherow
2006-04-19 23:32 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Ken Witherow @ 2006-04-19 18:49 UTC (permalink / raw)
To: linux-kernel
I use an Advansys controller for an old, slow SCSI drive and my flatbed
scanner. I noticed that upon trying to boot 2.6.16, my Advansys controller
wasn't detected. Further investigation shows that the driver has been
fairly silently disappearing over the last couple releases.
Is this a permanent change or is the Advansys driver just in need of some
updating to current APIs? I'd hate to have to replace this controller and
I don't want to be stuck at 2.6.15 forever. If someone could point me in
the right direction about what the problem is, I'd be glad to take a look
at seeing if I could fix it.
--
Ken Witherow <phantoml AT rochester.rr.com>
ICQ: 21840670 AIM: phantomlordken
http://www.krwtech.com/ken
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Advansys SCSI driver and 2.6.16
2006-04-19 18:49 Advansys SCSI driver and 2.6.16 Ken Witherow
@ 2006-04-19 23:32 ` Andrew Morton
2006-04-20 5:42 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-04-19 23:32 UTC (permalink / raw)
To: Ken Witherow; +Cc: linux-kernel
Ken Witherow <ken@krwtech.com> wrote:
>
> I use an Advansys controller for an old, slow SCSI drive and my flatbed
> scanner. I noticed that upon trying to boot 2.6.16, my Advansys controller
> wasn't detected. Further investigation shows that the driver has been
> fairly silently disappearing over the last couple releases.
>
> Is this a permanent change or is the Advansys driver just in need of some
> updating to current APIs? I'd hate to have to replace this controller and
> I don't want to be stuck at 2.6.15 forever. If someone could point me in
> the right direction about what the problem is, I'd be glad to take a look
> at seeing if I could fix it.
There have been no changes in the advansys driver since November 2005, and
nothing substantial in over a year. So I'd say what we have here is either
a faulty .config or a bug.
Please check the .config and if it looks OK, provide a full description of
the problem. It may be useful to do
boot (2.6.15)
dmesg -s 1000000 > 1
boot (2.6.16)
dmesg -s 1000000 > 2
diff -u 1 2 > 3
and include `3' in the report.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Advansys SCSI driver and 2.6.16
2006-04-19 23:32 ` Andrew Morton
@ 2006-04-20 5:42 ` Andrew Morton
2006-04-20 6:50 ` Ken Witherow
2006-04-20 17:23 ` Advansys SCSI driver and 2.6.16 Dave Jones
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2006-04-20 5:42 UTC (permalink / raw)
To: ken, linux-kernel
Andrew Morton <akpm@osdl.org> wrote:
>
> There have been no changes in the advansys driver since November 2005, and
> nothing substantial in over a year.
The advansys driver has been disabled for two years - since 2.6.8:
> ChangeSet@1.497.4282.43, 2004-06-26 10:50:12-05:00, jejb@mulgrave.(none)
> advansys: add warning and convert #includes
>
> The DMA conversion of the advansys driver is still
> broken. Add a #warning to the driver and a comment
> above it explaining what needs to be done.
>
> Mark the driver as BROKEN because of the warning
>
> Also remove the #include "scsi.h"
>
> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
>
So I don't know how you managed to get it to build in 2.6.15.
You can reenable it with:
--- devel/drivers/scsi/Kconfig~a 2006-04-19 22:39:51.000000000 -0700
+++ devel-akpm/drivers/scsi/Kconfig 2006-04-19 22:40:00.000000000 -0700
@@ -453,7 +453,7 @@ config SCSI_DPT_I2O
config SCSI_ADVANSYS
tristate "AdvanSys SCSI support"
- depends on (ISA || EISA || PCI) && SCSI && BROKEN
+ depends on (ISA || EISA || PCI) && SCSI
help
This is a driver for all SCSI host adapters manufactured by
AdvanSys. It is documented in the kernel source in
_
and it does compile. Does it actually work?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Advansys SCSI driver and 2.6.16
2006-04-20 5:42 ` Andrew Morton
@ 2006-04-20 6:50 ` Ken Witherow
2006-04-20 7:49 ` Andrew Morton
2006-04-20 17:23 ` Advansys SCSI driver and 2.6.16 Dave Jones
1 sibling, 1 reply; 8+ messages in thread
From: Ken Witherow @ 2006-04-20 6:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On Wed, 19 Apr 2006, Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
>>
>> There have been no changes in the advansys driver since November 2005, and
>> nothing substantial in over a year.
>
> The advansys driver has been disabled for two years - since 2.6.8:
>
>> ChangeSet@1.497.4282.43, 2004-06-26 10:50:12-05:00, jejb@mulgrave.(none)
>> advansys: add warning and convert #includes
>>
>> The DMA conversion of the advansys driver is still
>> broken. Add a #warning to the driver and a comment
>> above it explaining what needs to be done.
>>
>> Mark the driver as BROKEN because of the warning
>>
>> Also remove the #include "scsi.h"
>>
>> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
>>
>
> So I don't know how you managed to get it to build in 2.6.15.
>
> You can reenable it with:
>
> --- devel/drivers/scsi/Kconfig~a 2006-04-19 22:39:51.000000000 -0700
> +++ devel-akpm/drivers/scsi/Kconfig 2006-04-19 22:40:00.000000000 -0700
> @@ -453,7 +453,7 @@ config SCSI_DPT_I2O
>
> config SCSI_ADVANSYS
> tristate "AdvanSys SCSI support"
> - depends on (ISA || EISA || PCI) && SCSI && BROKEN
> + depends on (ISA || EISA || PCI) && SCSI
> help
> This is a driver for all SCSI host adapters manufactured by
> AdvanSys. It is documented in the kernel source in
> _
>
> and it does compile. Does it actually work?
[root@death ~]# cat /proc/version
Linux version 2.6.16 (ken@death.krwtech.com) (gcc version 4.1.0) #20 SMP PREEMPT Thu Apr 20 02:30:28 EDT 2006
[root@death ~]# cat /proc/scsi/advansys/0
AdvanSys SCSI 3.3K: PCI Ultra: IO 0x1800-0x180F, IRQ 0x10
Device Information for AdvanSys SCSI Host 0:
Target IDs Detected: 5, 7, (7=Host Adapter)
EEPROM Settings for AdvanSys SCSI Host 0:
Serial Number: AE54C713B960
Host SCSI ID: 7, Host Queue Size: 16, Device Queue Size: 8
cntl 0x7ff7, no_scam 0x0
Target ID: 0 1 2 3 4 5 6 7
Disconnects: Y Y Y N Y Y Y Y
Command Queuing: N N N N N N N N
Start Motor: Y Y Y Y Y Y Y Y
Synchronous Transfer: Y Y Y Y Y Y Y Y
Linux Driver Configuration and Information for AdvanSys SCSI Host 0:
host_busy 0, last_reset 0, max_id 8, max_lun 8, max_channel 0
unique_id 0, can_queue 16, this_id 7, sg_tablesize 50, cmd_per_lun 1
unchecked_isa_dma 0, use_clustering 1
flags 0x8, last_reset 0x0, jiffies 0x5c14, asc_n_io_port 0x10
io_port 0x1800, n_io_port 0x10
Linux Driver Statistics for AdvanSys SCSI Host 0:
queuecommand 101, reset 0, biosparam 0, interrupt 102
callback 101, done 101, build_error 0, build_noreq 0, build_nosg 0
exe_noerror 101, exe_busy 0, exe_error 0, exe_unknown 0
cont_cnt 3, cont_xfer 0.0 kb avg_xfer 0.0 kb
sg_cnt 98, sg_elem 208, sg_xfer 1569.0 kb
avg_num_elem 2.1, avg_elem_size 7.5 kb, avg_xfer_size 16.0 kb
Active and Waiting Request Queues (Time Unit: 250 HZ):
target 5
active: cnt [cur 0, max 4, tot 95], time [min 0, max 16, avg 3.7]
waiting: cnt [cur 0, max 0, tot 0], time [min 0, max 0, avg 0.0]
Asc Library Configuration and Statistics for AdvanSys SCSI Host 0:
chip_version 10, lib_version 0x118, lib_serial_no 123, mcode_date 0x12c3
mcode_version 0x50d, err_code 0
Total Command Pending: 0
Command Queuing: 5:N
Command Queue Pending: 5:0
Command Queue Limit: 5:4
Command Queue Full: 5:N
Synchronous Transfer: 5:N
[root@death ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 05 Lun: 00
Vendor: SEAGATE Model: SX410800N Rev: 7117
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DNES-309170 Rev: SAH0
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: WDIGTL Model: WD183 ULTRA2 Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 02 Lun: 00
Vendor: TEAC Model: CD-W512SB Rev: 1.0C
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: CyberDrv Model: CD-ROM TW240S Rev: 1.20
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 14 Lun: 00
Vendor: SEAGATE Model: SX118273LC Rev: 6367
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: SanDisk Model: ImageMate II Rev: 1.30
Type: Direct-Access ANSI SCSI revision: 02
The SX410800N is the drive off the Advansys controller and is working just
fine. I also have a scanner that I've been using all along as well but it
isn't turned on atm so it isn't in the list.
I haven't had a problem with the controller in linux for as long as I
can remember until 2.6.16. I've been using the patches rather than
tarballs as they've come out for years. I believe I freshened the tree
from tarball around 2.6.11.
I would say driver is working as intended, though I do get a slew of:
drivers/scsi/advansys.c:18223: warning: passing argument 2 of 'writew'
makes pointer from integer without a cast
drivers/scsi/advansys.c:18223: warning: passing argument 2 of 'writeb'
makes pointer from integer without a cast
warnings when compiling
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Advansys SCSI driver and 2.6.16
2006-04-20 6:50 ` Ken Witherow
@ 2006-04-20 7:49 ` Andrew Morton
2006-04-20 22:19 ` [PATCH 2.6.16] scsi: clean up warnings in Advansys driver Ken Witherow
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-04-20 7:49 UTC (permalink / raw)
To: Ken Witherow; +Cc: phantoml, linux-kernel
Ken Witherow <phantoml@rochester.rr.com> wrote:
>
> I would say driver is working as intended,
OK, thanks. The driver needs some caring for. Probably marking it as
BROKEN was the wrong thing to do, because then everyone ignores it. I'll
enable it in -mm, see if that motivates someone to take pity upon it.
> though I do get a slew of:
>
> drivers/scsi/advansys.c:18223: warning: passing argument 2 of 'writew'
> makes pointer from integer without a cast
> drivers/scsi/advansys.c:18223: warning: passing argument 2 of 'writeb'
> makes pointer from integer without a cast
>
> warnings when compiling
Yes, you will. I stuck a few typecasts in there just to quieten things down.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Advansys SCSI driver and 2.6.16
2006-04-20 5:42 ` Andrew Morton
2006-04-20 6:50 ` Ken Witherow
@ 2006-04-20 17:23 ` Dave Jones
1 sibling, 0 replies; 8+ messages in thread
From: Dave Jones @ 2006-04-20 17:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: ken, linux-kernel
On Wed, Apr 19, 2006 at 10:42:02PM -0700, Andrew Morton wrote:
> --- devel/drivers/scsi/Kconfig~a 2006-04-19 22:39:51.000000000 -0700
> +++ devel-akpm/drivers/scsi/Kconfig 2006-04-19 22:40:00.000000000 -0700
> @@ -453,7 +453,7 @@ config SCSI_DPT_I2O
>
> config SCSI_ADVANSYS
> tristate "AdvanSys SCSI support"
> - depends on (ISA || EISA || PCI) && SCSI && BROKEN
> + depends on (ISA || EISA || PCI) && SCSI
> help
> This is a driver for all SCSI host adapters manufactured by
> AdvanSys. It is documented in the kernel source in
> _
>
> and it does compile. Does it actually work?
It doesn't work on all architectures, but for the one most
people care about (x86), it seems to have quite a few happy users.
(I got a slew of bug reports in Fedora bugzilla when it disappeared,
and resurrected it with the exact same patch you did).
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2.6.16] scsi: clean up warnings in Advansys driver
2006-04-20 7:49 ` Andrew Morton
@ 2006-04-20 22:19 ` Ken Witherow
2006-04-20 22:29 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Ken Witherow @ 2006-04-20 22:19 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-kernel, linux-scsi, Andrew Morton
Fix typecast warnings and switch from check_region to request_region
Signed-off-by: Ken Witherow <ken@krwtech.com>
---
drivers/scsi/advansys.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
--- linux-2.6.16/drivers/scsi/advansys.c 2006-03-20 00:53:29.000000000 -0500
+++ linux/drivers/scsi/advansys.c 2006-04-20 17:27:43.000000000 -0400
@@ -2056,11 +2056,11 @@ STATIC ASC_DCNT AscGetMaxDmaCount(ushor
/*
* Define Adv Library required memory access macros.
*/
-#define ADV_MEM_READB(addr) readb(addr)
-#define ADV_MEM_READW(addr) readw(addr)
-#define ADV_MEM_WRITEB(addr, byte) writeb(byte, addr)
-#define ADV_MEM_WRITEW(addr, word) writew(word, addr)
-#define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr)
+#define ADV_MEM_READB(addr) readb((void *) addr)
+#define ADV_MEM_READW(addr) readw((void *) addr)
+#define ADV_MEM_WRITEB(addr, byte) writeb(byte, (void *) addr)
+#define ADV_MEM_WRITEW(addr, word) writew(word, (void *) addr)
+#define ADV_MEM_WRITEDW(addr, dword) writel(dword,(void *) addr)
#define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)
@@ -4415,7 +4415,7 @@ advansys_detect(struct scsi_host_templat
ASC_DBG1(1,
"advansys_detect: probing I/O port 0x%x...\n",
iop);
- if (check_region(iop, ASC_IOADR_GAP) != 0) {
+ if (!request_region(iop, ASC_IOADR_GAP, "advansys")){
printk(
"AdvanSys SCSI: specified I/O Port 0x%X is busy\n", iop);
/* Don't try this I/O port twice. */
@@ -4425,6 +4425,7 @@ advansys_detect(struct scsi_host_templat
printk(
"AdvanSys SCSI: specified I/O Port 0x%X has no adapter\n", iop);
/* Don't try this I/O port twice. */
+ release_region(iop, ASC_IOADR_GAP);
asc_ioport[ioport] = 0;
goto ioport_try_again;
} else {
@@ -4445,6 +4446,7 @@ advansys_detect(struct scsi_host_templat
ioport++;
goto ioport_try_again;
}
+ release_region(iop, ASC_IOADR_GAP);
}
/*
* This board appears good, don't try the I/O port
@@ -9752,13 +9754,14 @@ AscSearchIOPortAddr11(
}
for (; i < ASC_IOADR_TABLE_MAX_IX; i++) {
iop_base = _asc_def_iop_base[i];
- if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
+ if (!request_region(iop_base, ASC_IOADR_GAP, "advansys")){
ASC_DBG1(1,
"AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
iop_base);
continue;
}
ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base);
+ release_region(iop_base, ASC_IOADR_GAP);
if (AscFindSignature(iop_base)) {
return (iop_base);
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2.6.16] scsi: clean up warnings in Advansys driver
2006-04-20 22:19 ` [PATCH 2.6.16] scsi: clean up warnings in Advansys driver Ken Witherow
@ 2006-04-20 22:29 ` Andrew Morton
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2006-04-20 22:29 UTC (permalink / raw)
To: Ken Witherow; +Cc: James.Bottomley, linux-kernel, linux-scsi
Ken Witherow <ken@krwtech.com> wrote:
>
> Fix typecast warnings and switch from check_region to request_region
>
> Signed-off-by: Ken Witherow <ken@krwtech.com>
>
> ---
> drivers/scsi/advansys.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
>
>
> --- linux-2.6.16/drivers/scsi/advansys.c 2006-03-20 00:53:29.000000000 -0500
> +++ linux/drivers/scsi/advansys.c 2006-04-20 17:27:43.000000000 -0400
> @@ -2056,11 +2056,11 @@ STATIC ASC_DCNT AscGetMaxDmaCount(ushor
> /*
> * Define Adv Library required memory access macros.
> */
> -#define ADV_MEM_READB(addr) readb(addr)
> -#define ADV_MEM_READW(addr) readw(addr)
> -#define ADV_MEM_WRITEB(addr, byte) writeb(byte, addr)
> -#define ADV_MEM_WRITEW(addr, word) writew(word, addr)
> -#define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr)
> +#define ADV_MEM_READB(addr) readb((void *) addr)
> +#define ADV_MEM_READW(addr) readw((void *) addr)
> +#define ADV_MEM_WRITEB(addr, byte) writeb(byte, (void *) addr)
> +#define ADV_MEM_WRITEW(addr, word) writew(word, (void *) addr)
> +#define ADV_MEM_WRITEDW(addr, dword) writel(dword,(void *) addr)
Yes, I already did that, only I stuck a new #warning in there as well,
because this isn't the right fix.
> #define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)
>
> @@ -4415,7 +4415,7 @@ advansys_detect(struct scsi_host_templat
> ASC_DBG1(1,
> "advansys_detect: probing I/O port 0x%x...\n",
> iop);
> - if (check_region(iop, ASC_IOADR_GAP) != 0) {
> + if (!request_region(iop, ASC_IOADR_GAP, "advansys")){
> printk(
> "AdvanSys SCSI: specified I/O Port 0x%X is busy\n", iop);
> /* Don't try this I/O port twice. */
> @@ -4425,6 +4425,7 @@ advansys_detect(struct scsi_host_templat
> printk(
> "AdvanSys SCSI: specified I/O Port 0x%X has no adapter\n", iop);
> /* Don't try this I/O port twice. */
> + release_region(iop, ASC_IOADR_GAP);
> asc_ioport[ioport] = 0;
> goto ioport_try_again;
> } else {
> @@ -4445,6 +4446,7 @@ advansys_detect(struct scsi_host_templat
> ioport++;
> goto ioport_try_again;
> }
> + release_region(iop, ASC_IOADR_GAP);
> }
> /*
> * This board appears good, don't try the I/O port
> @@ -9752,13 +9754,14 @@ AscSearchIOPortAddr11(
> }
> for (; i < ASC_IOADR_TABLE_MAX_IX; i++) {
> iop_base = _asc_def_iop_base[i];
> - if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
> + if (!request_region(iop_base, ASC_IOADR_GAP, "advansys")){
> ASC_DBG1(1,
> "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
> iop_base);
> continue;
> }
> ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base);
> + release_region(iop_base, ASC_IOADR_GAP);
> if (AscFindSignature(iop_base)) {
> return (iop_base);
> }
OK, thanks. But I added this fixup on top:
--- devel/drivers/scsi/advansys.c~scsi-clean-up-warnings-in-advansys-driver-fix 2006-04-20 15:28:07.000000000 -0700
+++ devel-akpm/drivers/scsi/advansys.c 2006-04-20 15:28:07.000000000 -0700
@@ -4445,9 +4445,9 @@ advansys_detect(struct scsi_host_templat
* 'ioport' past this board.
*/
ioport++;
+ release_region(iop, ASC_IOADR_GAP);
goto ioport_try_again;
}
- release_region(iop, ASC_IOADR_GAP);
}
/*
* This board appears good, don't try the I/O port
_
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-04-20 22:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-19 18:49 Advansys SCSI driver and 2.6.16 Ken Witherow
2006-04-19 23:32 ` Andrew Morton
2006-04-20 5:42 ` Andrew Morton
2006-04-20 6:50 ` Ken Witherow
2006-04-20 7:49 ` Andrew Morton
2006-04-20 22:19 ` [PATCH 2.6.16] scsi: clean up warnings in Advansys driver Ken Witherow
2006-04-20 22:29 ` Andrew Morton
2006-04-20 17:23 ` Advansys SCSI driver and 2.6.16 Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®