Re: Adaptec-2920 eats too much cpu time when reading from the CD-ROM

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 6 Dec 2001 09:28:08 +0000 (GMT)


> I have recently purchased a Plextor 12x CD-RW and I have attached it to
> and Adaptec-2920 SCSI card. The card uses the "Future Domain Corp. TMC-18C30
> [36C70]" chip.
>
> The problem I see: when reading from the CD-RW my system becomes very
> unresponsive and top reveals 90-95% of the time is spent on "system".
> My CPU is AMD K6-III/500MHz with 256 Mb RAM.

I'd expect that. The 2920 is pretty old. It has no DMA channel and several
processes it must perform are polled not interrupt driven.

> scsi1: <fdomain> No BIOS; using scsi id 7
> scsi1: <fdomain> TMC-36C70 (PCI bus) chip at 0xdc00 irq 10
> Bad boy: fdomain (at 0xd08b7866) called us without a dev_id!

The Bad boy: line is fixable tho.. This should do it - let me know if it
makes that one go away.

--- linux.gamma/drivers/scsi/fdomain.h Sat Nov 17 20:47:53 2001
+++ linux.ac/drivers/scsi/fdomain.h Thu Dec 6 10:14:51 2001
@@ -43,6 +43,7 @@
abort: fdomain_16x0_abort, \
reset: fdomain_16x0_reset, \
bios_param: fdomain_16x0_biosparam, \
+ release: fdomain_16x0_release, \
can_queue: 1, \
this_id: 6, \
sg_tablesize: 64, \
--- linux.gamma/drivers/scsi/fdomain.c Sat Nov 17 20:47:53 2001
+++ linux.ac/drivers/scsi/fdomain.c Thu Dec 6 10:15:08 2001
@@ -983,7 +983,7 @@
/* Register the IRQ with the kernel */

retcode = request_irq( interrupt_level,
- do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", NULL);
+ do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt);

if (retcode < 0) {
if (retcode == -EINVAL) {
@@ -2033,6 +2033,15 @@
}

return 0;
+}
+
+int fdomain_16x0_release(struct Scsi_Host *shpnt)
+{
+ if (shpnt->irq)
+ free_irq(shpnt->irq, shpnt);
+ if (shpnt->io_port && shpnt->n_io_port)
+ release_region(shpnt->io_port, shpnt->n_io_port);
+
}

MODULE_LICENSE("GPL");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/