linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: SCSI QLA not working on latest *-mm SN2
@ 2004-09-17 22:55 Andrew Vasquez
  2004-09-17 23:10 ` Jesse Barnes
  2004-09-17 23:55 ` James Bottomley
  0 siblings, 2 replies; 78+ messages in thread
From: Andrew Vasquez @ 2004-09-17 22:55 UTC (permalink / raw)
  To: Jeremy Higdon
  Cc: Jesse Barnes, Paul Jackson, linux-scsi, mdr, jeremy, djh, jbarnes,
	Andrew Morton


On Thursday, September 16, 2004 4:14 PM, Jeremy Higdon wrote:
> On Thu, Sep 16, 2004 at 01:56:50PM -0700, Andrew Vasquez wrote:
> > 
> > Interesting, the only changes in reset_chip() are for PCI posting
> > issues.  Relevant diff attached.
> > 
> 
> Are all of those reads really necessary?  Generally the only reason
> for doing a read to flush a posted write is for timing issues (in
> which the read may not be good enough, according to a thread I saw
> from Grant Grundler), or to enforce ordering before releasing a lock
> (sleeping or spinning). 
> 

The reads are there to ensure ordering of the writes at each stage of
the reset (in qla_init.c) and fw dumps (qla_dbg.c).  After speaking
with the hardware and firmware folks, the readw() after the
soft-reset in qla_init.c was probably what triggered the MCA.  Seems
we will have to settle for some sort of udelay() as what was done in
reset_chip().

> Have you run into platforms in which two I/O writes from one CPU are
> retired out of order? 
> 

Again, only for completeness.

Regards,
Andrew Vasquez

^ permalink raw reply	[flat|nested] 78+ messages in thread
* RE: SCSI QLA not working on latest *-mm SN2
@ 2004-09-21 21:22 Andrew Vasquez
  2004-09-21 21:44 ` Jeremy Higdon
  0 siblings, 1 reply; 78+ messages in thread
From: Andrew Vasquez @ 2004-09-21 21:22 UTC (permalink / raw)
  To: Jeremy Higdon
  Cc: Matthew Wilcox, James Bottomley, Jesse Barnes, Grant Grundler, pj,
	SCSI Mailing List, mdr, jeremy, djh, Andrew Morton

On Tuesday, September 21, 2004 2:06 PM, Jeremy Higdon wrote:
> On Tue, Sep 21, 2004 at 01:50:02PM -0700, Andrew Vasquez wrote:
> > The only requirement after reception of a soft-reset request (by PIO
> > or MMIO) by the RISC is for the driver to wait 16 PCI clocks before
> > issuing another request.  The problem of course is determining when
> > to start timing within the driver.
> 
> So I think that we just wait for some reasonable worst case time for
> the write to complete.  We can't really do anything else.
>

That seems to be the case.
 
> Are these resets done as part of error recovery?  I.e., do we have
> to be concerned about long the write will take on a busy system?
> 

Just during initialization (qla2x00_chip_diag() and qla2x00_setup_chip())
and after a firmware dump (qla_dbg.c -- which requires a full 
re-initialization to recover).  If the driver is in the process of
performing a firmware-dump, the RISC has already been paused and nothing
is executing within the firmware.

--
Andrew

^ permalink raw reply	[flat|nested] 78+ messages in thread
* RE: SCSI QLA not working on latest *-mm SN2
@ 2004-09-21 20:50 Andrew Vasquez
  2004-09-21 21:06 ` Jeremy Higdon
  0 siblings, 1 reply; 78+ messages in thread
From: Andrew Vasquez @ 2004-09-21 20:50 UTC (permalink / raw)
  To: Jeremy Higdon, Matthew Wilcox
  Cc: James Bottomley, Jesse Barnes, Grant Grundler, pj,
	SCSI Mailing List, mdr, jeremy, djh, Andrew Morton


On Tuesday, September 21, 2004 1:44 PM, Jeremy Higdon wrote:
> On Tue, Sep 21, 2004 at 05:25:35PM +0100, Matthew Wilcox wrote:
> > On Tue, Sep 21, 2004 at 08:58:23AM -0700, Andrew Vasquez wrote:
> > > From what I can gather from the hw engineers, the config-read
> > > will not guarantee a flush of posted writes.
> > 
> > I believe your hardware engineers to be mistaken.  See PCI 2.2,
> > Appendix E, section E.2: 
> > 
> > 2. Memory writes can be posted in both directions in a bridge. I/O
> > and Configuration writes are not posted. (I/O writes can be posted
> > in the Host Bridge, but some restrictions apply.) Read
> > transactions (Memory, I/O, or Configuration) are not posted.
> > 
> > 5. A read transaction must push ahead of it through the bridge any
> > posted writes originating on the same side of the bridge and
> > posted before the read. Before the read transaction can complete
> > on its originating bus, it must pull out of the bridge any posted
> > writes that originated on the opposite side and were posted before
> > the read command completes on the read-destination bus. 
> 
> 
> I would agree.  A config read should retire any posted I/O writes,
> whether Port or Memory Mapped.
> 
> So, unless the qla2xxx chips also do not respond to config reads
> after reset, the config read should be the answer . . .
> 

Yes, please see my earlier reply to Matthew:

	Hmm...adding more confusion to the mix.  I apologize -- my
	reply was not written correctly, yes, the config-read will
	flush any pending writes.  But, the same problem persists 
	- the RISC will still stop responding to requests (config
	or MMIO) during the soft-reset -- potentially resulting in
	a MAC (as seen by SGI).

> . . . unless there is some sort of random delay within the chip
> itself between a completion of the IO write on the PCI bus and the
> chip resetting itself.  That's not a problem, is it, Andrew?
>

The only requirement after reception of a soft-reset request (by PIO
or MMIO) by the RISC is for the driver to wait 16 PCI clocks before
issuing another request.  The problem of course is determining when to
start timing within the driver.

Regards,
Andrew Vasquez

^ permalink raw reply	[flat|nested] 78+ messages in thread
* RE: SCSI QLA not working on latest *-mm SN2
@ 2004-09-21 17:33 Andrew Vasquez
  2004-09-21 17:52 ` Jesse Barnes
                   ` (2 more replies)
  0 siblings, 3 replies; 78+ messages in thread
From: Andrew Vasquez @ 2004-09-21 17:33 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: James Bottomley, Jesse Barnes, Grant Grundler, pj,
	SCSI Mailing List, mdr, jeremy, djh, Andrew Morton


On , willy@www.linux.org.uk wrote:
> 
> On Tue, Sep 21, 2004 at 08:58:23AM -0700, Andrew Vasquez wrote:
> > From what I can gather from the hw engineers, the config-read will
> > not guarantee a flush of posted writes.
> 
> I believe your hardware engineers to be mistaken.  See PCI 2.2,
> Appendix E, section E.2:
> 
> 2. Memory writes can be posted in both directions in a bridge. I/O
> and Configuration writes are not posted. (I/O writes can be posted
> in the Host Bridge, but some restrictions apply.) Read transactions
> (Memory, I/O, or Configuration) are not posted.
> 
> 5. A read transaction must push ahead of it through the bridge any
> posted writes originating on the same side of the bridge and posted
> before the read. Before the read transaction can complete on its
> originating bus, it must pull out of the bridge any posted writes
> that originated on the opposite side and were posted before the read
> command completes on the read-destination bus.
> 

Hmm...adding more confusion to the mix.  I apologize -- my reply was
not written correctly, yes, the config-read will flush any pending
writes.  But, the same problem persists -- the RISC will still stop
responding to requests (config or MMIO) during the soft-reset -- 
potentially resulting in a MAC (as seen by SGI).

The 'safe' solution (as suggested by the hw people) was to use PIO to
issue the soft-reset, then udelay().  

--
Andrew 

^ permalink raw reply	[flat|nested] 78+ messages in thread
* RE: SCSI QLA not working on latest *-mm SN2
@ 2004-09-21 15:58 Andrew Vasquez
  2004-09-21 16:07 ` Jesse Barnes
  2004-09-21 16:25 ` Matthew Wilcox
  0 siblings, 2 replies; 78+ messages in thread
From: Andrew Vasquez @ 2004-09-21 15:58 UTC (permalink / raw)
  To: James Bottomley, Jesse Barnes
  Cc: Grant Grundler, pj, SCSI Mailing List, mdr, jeremy, djh,
	Andrew Morton

On Tuesday, September 21, 2004 8:42 AM, James Bottomley wrote:
> On Tue, 2004-09-21 at 11:13, Jesse Barnes wrote:
> > On Tuesday, September 21, 2004 1:46 am, Grant Grundler wrote:
> > > No it doesn't. Only if it depends on *when* the write hits the
> > >  device. The classic example is: writel(x, CMD_RESET);
> > >  udelay(10);
> > >  readl(x+STATUS); /* parisc will crash if not ready */
> > 
> > Ok, hopefully I've covered this in this release (patch to
> > deviceiobook will come later). 
> > 
> > The short of it is that we really need pioflush.  I'll resurrect my
> > mmiob patches, change the name and prototype, and resubmit.
> 
> Just to get back to the actual qla2xxx problem.
> 
> Do we agree that there are two possible solutions:
> 
> 1) Find a safe mmio read to trigger the flush of the posted
> reset write.
> 
> 2) Use a pio write to trigger the reset because we know the reset is
> active as soon as the write returns.
> 
> and if so, which one are we going to implement?
> 

>From what I can gather from the hw engineers, the config-read will not
guarantee a flush of posted writes.  And since there is 'no safe register'
accessible during the soft-reset, it seems that the pio-write issuance of 
the request to the RISC will be needed.  The issue of post-soft-reset delay
still persists -- so it would seem the udelay() are still needed.

BTW: Side comment, the 'failover-capable' driver which the 'vanilla-kernel'
driver is derived from has some special RD/WRT_REG_WORD macros defined which
perform explicit PIO operations:

	#define RD_REG_WORD_PIO(addr)		(inw((unsigned long)addr))
	#define WRT_REG_WORD_PIO(addr, data)	(outw(data,(unsigned long)addr))

that are used to access flash/gpio registers of an ISP2312v2 chip due to
some hardware problems.  I can post a patch for the soft-reset issue using 
these macros?  Which tree shall I use as a base, several patches have been
floating around which 'fix' the issue on SN2 paltforms, but also remove
what has been called 'excessive', or 'unnecessary' readw()s?

--
AV

^ permalink raw reply	[flat|nested] 78+ messages in thread
[parent not found: <B179AE41C1147041AA1121F44614F0B060EF48@AVEXCH02.qlogic.org>]
* SCSI QLA not working on latest *-mm SN2
@ 2004-09-15 22:51 Paul Jackson
  2004-09-15 23:13 ` Andrew Morton
  0 siblings, 1 reply; 78+ messages in thread
From: Paul Jackson @ 2004-09-15 22:51 UTC (permalink / raw)
  To: linux-scsi, Andrew Vasquez; +Cc: mdr, jeremy, djh, jbarnes, Andrew Morton

Andrew Vasquez,

[My inbox had a message recommending a copy linux-scsi as well,
 so resending to include that list as well. ]

Jeremy Higdon recommended I send this to you.  I am running into
a fatal problem with SCSI QLA2, unable to boot using the latest *-mm
on SGI's SN2 hardware (don't know if other hardware involved or not).

This is on 2.6.9-rc1-mm5, and more recent variants of *-mm.

$ grep QLA2XXX_VERSION drivers/scsi/qla2xxx/qla_version.h
#define QLA2XXX_VERSION      "8.00.00b21-k"

My source currently includes the patch of Monday that begins:

======================================================================
===== drivers/scsi/qla2xxx/qla_os.c 1.46 vs edited =====
--- 1.46/drivers/scsi/qla2xxx/qla_os.c	2004-09-06 12:07:52 -07:00
+++ edited/drivers/scsi/qla2xxx/qla_os.c	2004-09-13 14:07:23 -07:00
@@ -2892,6 +2892,19 @@
 			continue;
 		}
 
+		/* get consistent memory allocated for init control block */
+		ha->init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
...
======================================================================

I am pretty sure that I also saw this problem earlier Monday morning,
before this patch.

Beginning with 2.6.9-rc1-mm5, I have had to comment out some of the QLA
config options in order to boot on an SN2.  That is, unless I make the
following edit to my .config:

========================================
--- 2.6.9-rc2-mmx/.config       2004-09-14 23:03:21.000000000 -0700
+++ 2.6.9-rc2-mmx/.config.disable_qla   2004-09-14 23:02:50.000000000 -0700
@@ -315,9 +315,9 @@ CONFIG_SCSI_SATA_VITESSE=y
 CONFIG_SCSI_QLOGIC_1280=y
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
-CONFIG_SCSI_QLA22XX=y
-CONFIG_SCSI_QLA2300=y
-CONFIG_SCSI_QLA2322=y
+# CONFIG_SCSI_QLA22XX is not set
+# CONFIG_SCSI_QLA2300 is not set
+# CONFIG_SCSI_QLA2322 is not set
 # CONFIG_SCSI_QLA6312 is not set
 # CONFIG_SCSI_QLA6322 is not set
 # CONFIG_SCSI_DC395x is not set
========================================

my boot fails with the following output:

========================================
Uniform CD-ROM driver Revision: 3.20
qla1280: QLA12160 found on PCI bus 1, dev 3
ACPI: PCI interrupt 0000:01:03.0[A]: no GSI
scsi(0): Enabling SN2 PCI DMA dual channel lockup workaround
scsi(0): Enabling SN2 PCI DMA workaround
scsi(0:0): Resetting SCSI BUS
scsi(0:1): Resetting SCSI BUS
scsi0 : QLogic QLA12160 PCI to SCSI Host Adapter
       Firmware version: 10.04.32, Driver version 3.24.4
  Vendor: SGI       Model: ST336753LC        Rev: 2741
  Type:   Direct-Access                      ANSI SCSI revision: 03
scsi(0:0:1:0): Sync: period 9, offset 14, Wide, DT, Tagged queuing: depth 255
  Vendor: SGI       Model: ST336753LC        Rev: 2741
  Type:   Direct-Access                      ANSI SCSI revision: 03
scsi(0:0:2:0): Sync: period 9, offset 14, Wide, DT, Tagged queuing: depth 255
QLogic Fibre Channel HBA Driver (a0000001007ab1d0)
ACPI: PCI interrupt 0000:02:01.0[A]: no GSI
qla2200 0000:02:01.0: Found an ISP2200, irq 58, iobase 0xc00000080cc00000
qla2200 0000:02:01.0: Configuring PCI space...
PCI: slot 0000:02:01.0 has incorrect PCI cache line size of 0 bytes, correcting to 128
POD entered via OS requested halt, using Cac mode
========================================

This is on a couple of small (4 and 8 cpu) SN2 systems, that boot with
earlier kernels just fine.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2004-09-22 21:33 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17 22:55 SCSI QLA not working on latest *-mm SN2 Andrew Vasquez
2004-09-17 23:10 ` Jesse Barnes
2004-09-17 23:55 ` James Bottomley
2004-09-18  1:15   ` Andrew Vasquez
2004-09-18  1:25     ` Matthew Wilcox
2004-09-18  1:24       ` Andrew Vasquez
2004-09-18  2:36       ` Jeremy Higdon
2004-09-18 19:12       ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2004-09-21 21:22 Andrew Vasquez
2004-09-21 21:44 ` Jeremy Higdon
2004-09-21 22:37   ` Jesse Barnes
2004-09-21 22:49     ` Jeremy Higdon
2004-09-21 20:50 Andrew Vasquez
2004-09-21 21:06 ` Jeremy Higdon
2004-09-21 22:36   ` Jesse Barnes
2004-09-21 22:39     ` Jeremy Higdon
2004-09-21 22:43       ` Jesse Barnes
2004-09-21 22:54         ` Jeremy Higdon
2004-09-21 23:17           ` Jesse Barnes
2004-09-22 21:33             ` Jesse Barnes
2004-09-21 17:33 Andrew Vasquez
2004-09-21 17:52 ` Jesse Barnes
2004-09-21 18:04 ` Matthew Wilcox
2004-09-21 18:59 ` Matthew Wilcox
2004-09-21 19:10   ` Jesse Barnes
2004-09-21 15:58 Andrew Vasquez
2004-09-21 16:07 ` Jesse Barnes
2004-09-21 16:25 ` Matthew Wilcox
2004-09-21 16:33   ` James Bottomley
2004-09-21 20:39     ` Jeremy Higdon
2004-09-21 20:43   ` Jeremy Higdon
     [not found] <B179AE41C1147041AA1121F44614F0B060EF48@AVEXCH02.qlogic.org>
     [not found] ` <20040916121235.5e4f9c32.pj@sgi.com>
     [not found]   ` <1095362263.16326.12.camel@praka>
2004-09-16 19:56     ` Paul Jackson
2004-09-16 20:05       ` Jesse Barnes
2004-09-16 20:56         ` Andrew Vasquez
2004-09-16 21:09           ` Jesse Barnes
2004-09-16 21:40             ` Andrew Vasquez
2004-09-16 22:25               ` Andrew Morton
2004-09-16 22:29                 ` Jesse Barnes
2004-09-17 17:21                   ` Jesse Barnes
2004-09-18  6:10                     ` Grant Grundler
2004-09-20 22:40                       ` Jesse Barnes
2004-09-20 23:27                         ` Grant Grundler
2004-09-21  0:09                           ` Jesse Barnes
2004-09-21  5:46                             ` Grant Grundler
2004-09-21  6:45                               ` Jeremy Higdon
2004-09-21 13:29                                 ` Jesse Barnes
2004-09-21 13:25                               ` Jesse Barnes
2004-09-21 15:13                               ` Jesse Barnes
2004-09-21 15:41                                 ` James Bottomley
2004-09-21 15:58                                   ` Jesse Barnes
2004-09-21 16:01                                     ` Matthew Wilcox
2004-09-21 16:05                                       ` Jesse Barnes
2004-09-21 16:11                                         ` James Bottomley
2004-09-21 16:18                                           ` Jesse Barnes
2004-09-21 16:24                                             ` James Bottomley
2004-09-21 17:03                                           ` Jesse Barnes
2004-09-21 17:15                                             ` Matthew Wilcox
2004-09-21 17:24                                               ` Jesse Barnes
2004-09-21 17:20                                             ` James Bottomley
2004-09-21 17:46                                               ` Jesse Barnes
2004-09-21 17:56                                                 ` James Bottomley
2004-09-21 18:09                                                   ` Jesse Barnes
2004-09-21 19:06                                                     ` Grant Grundler
2004-09-21 19:40                                                       ` Jesse Barnes
2004-09-21 22:44                                                         ` Grant Grundler
2004-09-21 21:03                                                       ` Jeremy Higdon
2004-09-21 21:11                                                         ` Matthew Wilcox
2004-09-21 21:43                                                           ` Jeremy Higdon
2004-09-21 22:33                                                             ` Jesse Barnes
2004-09-22  0:02                                                             ` Matthew Wilcox
2004-09-22  1:16                                                               ` Jeremy Higdon
2004-09-22  1:44                                                                 ` Grant Grundler
2004-09-22  2:58                                                                   ` Jeremy Higdon
2004-09-21 23:03                             ` Guennadi Liakhovetski
2004-09-16 23:14           ` Jeremy Higdon
2004-09-16 20:11       ` Andrew Morton
2004-09-15 22:51 Paul Jackson
2004-09-15 23:13 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).