Skip to contentSkip to conversation

aic79xx problems

DISCUSSION Stefan Boresch 3 participants 8 messages Sep 20, 2007 – Sep 21, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

I am trying to set up a server with an onboard Super Micro AIC 7902B U320 controller under the latest Ubuntu version(s), i.e., using the respective Ubuntu supplied kernels (2.6.20 based for "feisty" and 2.6.22 based for "gutsy"). However, so far all kernels
based on 2.6.x, x greater or equal to 20 hang/crash when inserting the aic79xx module. Earlier kernels from various distributions,
e.g. 2.6.15 (ubuntu dapper), 2.6.18 (opensuse 10.2), 2.6.18 (debian unstable install kernel) work, but the discs are only running at a fraction of the theoretical performance (see below).

I fully understand that it's not the job of the developers to take care of users of the various distributions, but I guess if there are experts to be found who have "been there, done this", then this is the place to ask. I am perfectly happy to try to boot the machine with a standard, self-compiled Linux 2.6.2x kernel, but would appreciate hints as to what version plus which patches (if any) to use.

So, if anyone is willing to take a look, here are some facts (again, please let me know whatever other info you need!). I have put the output of lspci, dmesg and cat /proc/scsi/aic79xx/0 of the system running a default Ubuntu dapper installation (2.6.15 based kernel) on

http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.lspci.output
http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.dmesg.output
http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.proc_aic79xx.output

respectively.

Hardware:

* Supermicro H8DAR-8 motherboard with two dual-core Opterons
* Two Seagate Cheetahs (ST373207LC) attached to the onboard Super Micro (Adaptec) AIC 7902B U320 controller
* There is also a LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08) controller, to which an external RAID is connected. This part of the system seems to be working flawlessly!!

The problem(s):

With the kernels 2.6.x (x < 20) I have tried so far the system boots, but there are many warnings during the boot when loading the aic79xx controller and the result to me seems nowhere near the speed which the disks should be capable of.

E.g., for the first SCSI disk from /proc/scsi/aic79xx/0

Target 0 Negotiation Settings
User: 320.000MB/s transfers (160.000MHz RDSTRM|DT|IU|RTI|QAS, 16bit)
Goal: 40.000MB/s transfers (40.000MHz)
Curr: 40.000MB/s transfers (40.000MHz)
Channel A Target 0 Lun 0 Settings
Commands Queued 3039
Commands Active 0
Command Openings 32
Max Tagged Openings 32
Device Queue Frozen Count 0

The User: entries correspond to what is set in the SCSI BIOS (Adaptec, version 4.30), and which, according to the vendor of the box (transtec) is correct.

I could live with all this if kernels 2.6.2x I have tried would not simply crash. When the aic79xx module loads, I get again endless

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Dump Card State Begins <<<<<<<<<<<<<<<<<

listings, but the warnings / error messages get more and more severe until the system hangs.

At this point I am really unexperienced and have no clue how I could capture these pages of messages. Again, I am happy to dig in but don't quite know where to start.

According to Seagate Tools the disks themselves are fine.

I can easily dig out all the source from which the various Ubuntu kernels are compiled; in fact, i have stared at them, and my feeling is that this may be less an issue with the low level driver itself (which claims to be version 3.0 in all cases) but with the
surrounding SCSI subsystem ...

Many thanks in advance,

Stefan

Signature · 4 lines
Stefan Boresch
Institute for Computational Biological Chemistry
University of Vienna, Waehringerstr. 17       A-1090 Vienna, Austria
Phone: -43-1-427752715                        Fax:   -43-1-427752790
#1 lore raw
Quoted 7 lines · Stefan Boresch

So, if anyone is willing to take a look, here are some facts (again, please let me know whatever other info you need!). I have put the output of lspci, dmesg and cat /proc/scsi/aic79xx/0 of the system running a default Ubuntu dapper installation (2.6.15 based kernel) on

http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.lspci.output
http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.dmesg.output

This gives you your answer:

Quoted 1 line
[  104.075410]  target0:0:1: Wide Transfers Fail

That's a hardware or cabling issue.

Quoted 13 lines

http://www.mdy.univie.ac.at/de/people/boresch/privat/dapper.proc_aic79xx.output

respectively.

Hardware:

* Supermicro H8DAR-8 motherboard with two dual-core Opterons
* Two Seagate Cheetahs (ST373207LC) attached to the onboard Super Micro (Adaptec) AIC 7902B U320 controller
* There is also a LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08) controller, to which an external RAID is connected. This part of the system seems to be working flawlessly!!

Quoted 6 lines

The problem(s):

With the kernels 2.6.x (x < 20) I have tried so far the system boots, but there are many warnings during the boot when loading the aic79xx controller and the result to me seems nowhere near the speed which the disks should be capable of.

Wide transfers are required by the spec for periods lower than 25ns so the driver in all cases does the very best it can for you until you can fix the hardware problem.

James

#2 lore raw
In reply to Stefan Boresch
Quoted 7 lines · Stefan Boresch

I could live with all this if kernels 2.6.2x I have tried would not simply crash. When the aic79xx module loads, I get again endless

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Dump Card State Begins <<<<<<<<<<<<<<<<<

listings, but the warnings / error messages get more and more severe until the system hangs.

This shouldn't be happening; we should get the same behaviour as the old kernels (lots of scary warnings and problems but then turn off wide and continue on). Investigating this, unfortunately, is going to be a real pain. However, I think I can cut a cable to simulate your problem.

James

#3 lore raw

Thank you for both your replies.

Quoted 6 lines · James Bottomley
Quoted 5 lines · Stefan Boresch

I could live with all this if kernels 2.6.2x I have tried would not simply crash. When the aic79xx module loads, I get again endless

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Dump Card State Begins <<<<<<<<<<<<<<<<<

Quoted 10 lines
Quoted 2 lines

listings, but the warnings / error messages get more and more severe until the system hangs.

This shouldn't be happening; we should get the same behaviour as the old kernels (lots of scary warnings and problems but then turn off wide and continue on). Investigating this, unfortunately, is going to be a real pain. However, I think I can cut a cable to simulate your problem.

I guess I'll "attack" the hardware angle by harassing the vendor (who so far was completely "sure" that it "must" be a driver issue). My problem is that this SCSI only system is really a "stray dog" in my zoo, so I have no replacement cables / parts whatsoever, i.e., it will take a while for them to get these to me.

So, since I seem to have a slightly broken machine at hand, let me know whether I can try/test anything to fix the issues the newer kernels might have.

In any case, already many thanks for your quick reply!

Stefan

Signature · 4 lines
Stefan Boresch
Institute for Computational Biological Chemistry
University of Vienna, Waehringerstr. 17       A-1090 Vienna, Austria
Phone: -43-1-427752715                        Fax:   -43-1-427752790
#4 lore raw
Quoted 3 lines · Stefan Boresch

So, since I seem to have a slightly broken machine at hand, let me know whether I can try/test anything to fix the issues the newer kernels might have.

It will take me a while to set up the configuration, so the dmesg from the failing 2.6.2x might be helpful, just in case it's an obvious problem that doesn't need debugging (small chance, but still possible).

Thanks,

James

#5 lore raw
Quoted 9 lines · James Bottomley
Quoted 3 lines · Stefan Boresch

So, since I seem to have a slightly broken machine at hand, let me know whether I can try/test anything to fix the issues the newer kernels might have.

It will take me a while to set up the configuration, so the dmesg from the failing 2.6.2x might be helpful, just in case it's an obvious problem that doesn't need debugging (small chance, but still possible).

I will try, but a very dumb question first. If I have a kernel that crashes because of a disk problem ..., how do I get to save the output? (Never worked with a serial console, but there might be a first time for everything ...) But maybe there is an obvious solution that I overlook?

Or should I just try to watch and look for certain messages (ordering of messages), which given the huge amount of output seems a bit daunting ...

Best regards,

Stefan

Signature · 4 lines
Stefan Boresch
Institute for Computational Biological Chemistry
University of Vienna, Waehringerstr. 17       A-1090 Vienna, Austria
Phone: -43-1-427752715                        Fax:   -43-1-427752790
#6 lore raw
Quoted 8 lines · Stefan Boresch

I will try, but a very dumb question first. If I have a kernel that crashes because of a disk problem ..., how do I get to save the output? (Never worked with a serial console, but there might be a first time for everything ...) But maybe there is an obvious solution that I overlook?

Or should I just try to watch and look for certain messages (ordering of messages), which given the huge amount of output seems a bit daunting ...

Ok, in response to your dumb question, an answer from another dumb user: (me)

Firstly, serial consoles aren't that difficult to set up - all you need is a null modem cable and suitable software on the other end. Then ensure that it's built in and pass "console=ttyS0" (or "console=ttyS1" if you're using serial port #2) when you boot.

There is a network console - but I'm not sure whether that is useful for boot messages.

Hope that helps =)

--

Julian Calaby

Email: [email protected]

#7 lore raw
In reply to James Bottomley
Quoted 8 lines · James Bottomley
Quoted 3 lines · Stefan Boresch

So, since I seem to have a slightly broken machine at hand, let me know whether I can try/test anything to fix the issues the newer kernels might have.

It will take me a while to set up the configuration, so the dmesg from the failing 2.6.2x might be helpful, just in case it's an obvious problem that doesn't need debugging (small chance, but still possible).

OK, did the cut cable test (finally). It turns out that our DV interaction with aic79xx isn't very smart. After assessing that wide isn't allowed and turning it off, it then merrily begins DV at the lowest possible period it can think of, which turns wide back on again, sigh.

Try this patch, it fixes the problem for me.

James

drivers/scsi/scsi_transport_spi.c +10 -3
index 6f56f87..fccc62d 100644
@@ -787,6 +787,7 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
 	struct scsi_target *starget = sdev->sdev_target;
 	struct Scsi_Host *shost = sdev->host;
 	int len = sdev->inquiry_len;
+	int min_period = spi_min_period(starget);
 	/* first set us up for narrow async */
 	DV_SET(offset, 0);
 	DV_SET(width, 0);
@@ -809,6 +810,11 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
 		    != SPI_COMPARE_SUCCESS) {
 			starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n");
 			i->f->set_width(starget, 0);
+			/* Make sure we don't force wide back on by asking
+			 * for a transfer period that requires it */
+			spi_max_width(starget) = 0;
+			if (min_period < 10)
+				min_period = 10;
 		}
 	}
 
@@ -828,7 +834,8 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
 
 	/* now set up to the maximum */
 	DV_SET(offset, spi_max_offset(starget));
-	DV_SET(period, spi_min_period(starget));
+	DV_SET(period, min_period);
+
 	/* try QAS requests; this should be harmless to set if the
 	 * target supports it */
 	if (scsi_device_qas(sdev)) {
@@ -837,14 +844,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
 		DV_SET(qas, 0);
 	}
 
-	if (scsi_device_ius(sdev) && spi_min_period(starget) < 9) {
+	if (scsi_device_ius(sdev) && min_period < 9) {
 		/* This u320 (or u640). Set IU transfers */
 		DV_SET(iu, 1);
 		/* Then set the optional parameters */
 		DV_SET(rd_strm, 1);
 		DV_SET(wr_flow, 1);
 		DV_SET(rti, 1);
-		if (spi_min_period(starget) == 8)
+		if (min_period == 8)
 			DV_SET(pcomp_en, 1);
 	} else {
 		DV_SET(iu, 0);