All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Gene Heskett <gene.heskett@verizon.net>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [ADVANSYS] Add basic highmem/DMA support
Date: Thu, 24 Jun 2004 22:09:41 +1000	[thread overview]
Message-ID: <40DAC485.2090404@torque.net> (raw)
In-Reply-To: <1088005899.1639.9.camel@mulgrave>

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

James Bottomley wrote:
> On Wed, 2004-06-23 at 09:13, Christoph Hellwig wrote:
> 
>>There were actually two patches to advansys in that timeframe.  Although
>>it's much more likely that the dma api patch is the culprit can you test
>>with the compat code cleanup patch below reversed?:
> 
> 
> I've got to say I would bet quite a lot on the DMA API conversion being
> the culpret.  Also, because the narrow board works and the wide board
> doesn't, the fault has got to be in adv_build_req().
> 
> There is a logic change in that routine that seems to be a simple
> initialisation clean up, but, since it's in a globally visible
> structure, could be altering the behaviour.  I don't have time to follow
> these structures all around the logic, but just see if this makes the
> problem go away.  (A correct fix, if this is the problem, is going to be
> a bit nasty).

James,
Your patch fixed the PCI wide problem. The attached incorporates
your fix and also fixes the ISA oops. So now all my advansys cards
work.

Changelog:
   - fix PCI wide "use_sg > 0" problem introduced in lk 2.6.7-bk2
   - fix ISA oops (present in all versions of the lk 2.6 series to date)
   - bump version to "3.3K" and add comments
   - fix compilation error when ADVANSYS_DEBUG defined

Doug Gilbert

[-- Attachment #2: advansys267bk2fix.diff --]
[-- Type: text/x-patch, Size: 2156 bytes --]

--- linux/drivers/scsi/advansys.c	2004-06-20 13:29:28.000000000 +1000
+++ linux/drivers/scsi/advansys.c267bk2fix	2004-06-24 21:25:34.309239520 +1000
@@ -1,4 +1,4 @@
-#define ASC_VERSION "3.3GJ"    /* AdvanSys Driver Version */
+#define ASC_VERSION "3.3K"    /* AdvanSys Driver Version */
 
 /*
  * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters
@@ -677,6 +677,11 @@
          1. change select_queue_depths to slave_configure
 	 2. make cmd_per_lun be sane again
 
+     3.3K [2004/06/24]:
+         1. continuing cleanup for lk 2.6 series
+         2. Fix problem in lk 2.6.7-bk2 that broke PCI wide cards
+         3. Fix problem that oopsed ISA cards
+
   I. Known Problems/Fix List (XXX)
 
      1. Need to add memory mapping workaround. Test the memory mapping.
@@ -6615,6 +6620,10 @@
      * buffer command.
      */
 
+    scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen);
+    scsiqp->vdata_addr = scp->request_buffer;
+    scsiqp->data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer));
+
     if (scp->use_sg == 0) {
         /*
          * CDB request of single contiguous buffer.
@@ -6643,10 +6652,6 @@
 	struct scatterlist *slp;
 	int use_sg;
 
-	scsiqp->data_cnt = 0;
-	scsiqp->vdata_addr = 0;
-	scsiqp->data_addr = 0;
-
 	slp = (struct scatterlist *)scp->request_buffer;
 	use_sg = dma_map_sg(dev, slp, scp->use_sg, scp->sc_data_direction);
 
@@ -9198,9 +9203,7 @@
 " timeout_per_command %d, timeout_total %d, timeout %d\n",
         s->timeout_per_command, s->timeout_total, s->timeout);
 
-    printk(
-" internal_timeout %u, flags %u\n",
-        s->internal_timeout, s->flags);
+    printk(" internal_timeout %u\n", s->internal_timeout);
 
     printk(
 " scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n",
@@ -12011,7 +12014,10 @@
     ushort              pci_device_id;
 
     iop_base = asc_dvc->iop_base;
-    pci_device_id = to_pci_dev(asc_dvc->cfg->dev)->device;
+    if (asc_dvc->cfg->dev)
+        pci_device_id = to_pci_dev(asc_dvc->cfg->dev)->device;
+    else
+	pci_device_id = 0;
     warn_code = 0;
     cfg_msw = AscGetChipCfgMsw(iop_base);
     if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {

  reply	other threads:[~2004-06-24 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-08  0:39 [ADVANSYS] Add basic highmem/DMA support Herbert Xu
2004-05-19 10:38 ` Herbert Xu
2004-05-31 18:02   ` James Bottomley
2004-06-21  8:41     ` Douglas Gilbert
2004-06-21 14:28       ` James Bottomley
2004-06-22  0:35         ` Douglas Gilbert
2004-06-23  6:35         ` Douglas Gilbert
2004-06-23 14:13           ` Christoph Hellwig
2004-06-23 15:51             ` James Bottomley
2004-06-24 12:09               ` Douglas Gilbert [this message]
2004-06-24 13:00                 ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40DAC485.2090404@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=gene.heskett@verizon.net \
    --cc=hch@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.