Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 323433

Summary: SCSI speed negotiation problem with AIC7XXX driver on 2940UW
Product: Gentoo Linux Reporter: Alex Cannon <alex6z>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED TEST-REQUEST    
Severity: normal CC: xmw
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alex Cannon 2010-06-10 15:05:42 UTC
When I put one of my U160 hard drives on my Adaptec 2940UW controller it gets detected as FAST-20 (20MB/sec) SCSI when it should go to 40MB/sec. Changing speed settings in the SCSI BIOS works as it should but it will never go over 20MB/sec in Linux.

Setting the speed manually to 40MB/sec using the following commands works, but I shouldn't have to do this!

# echo 50 > /sys/class/spi_transport/target1\:0\:1/min_period
# echo 1 > /sys/class/spi_transport/target1\:0\:1/revalidate

Is this happening because of the 2nd SCSI controller I have in my system?

It looks like there is a similar problem on a Red Hat bug tracker here: https://bugzilla.redhat.com/show_bug.cgi?id=171282

Reproducible: Always




# uname -a
Linux nomad 2.6.32-gentoo-r7 #5 SMP Sun May 30 13:45:21 CDT 2010 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

# lspci
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 82815 815 Chipset AGP Bridge (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 02)
00:1f.2 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 02)
00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 02)
00:1f.4 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio Controller (rev 02)
01:08.0 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 01)
01:09.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang]
01:0d.0 SCSI storage controller: Adaptec AIC-7861 (rev 03)
01:0e.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U
02:00.0 VGA compatible controller: ATI Technologies Inc Rage 128 Pro Ultra TF

Part of dmesg showing the problem:
aic7xxx 0000:01:0e.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
        <Adaptec 2940 Ultra SCSI adapter>
        aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs

scsi 1:0:0:0: Direct-Access     SEAGATE  ST318406LC       0109 PQ: 0 ANSI: 3
scsi1:A:0:0: Tagged Queuing enabled.  Depth 32
scsi target1:0:0: Beginning Domain Validation
scsi target1:0:0: wide asynchronous
scsi target1:0:0: FAST-10 WIDE SCSI 20.0 MB/s ST (100 ns, offset 8)
scsi target1:0:0: Domain Validation skipping write tests
scsi target1:0:0: Ending Domain Validation
scsi 0:0:0:0: Attached scsi generic sg0 type 3
sd 1:0:0:0: Attached scsi generic sg1 type 0

# cat /proc/scsi/scsi 
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: HP       Model: C2500A           Rev: 3332
  Type:   Processor                        ANSI  SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST318406LC       Rev: 0109
  Type:   Direct-Access                    ANSI  SCSI revision: 03
Host: scsi1 Channel: 00 Id: 01 Lun: 00
  Vendor: QUANTUM  Model: ATLAS10K2-TY092J Rev: DDD6
  Type:   Direct-Access                    ANSI  SCSI revision: 03

# cat /proc/scsi/aic7xxx/1 
Adaptec AIC7xxx driver version: 7.0
Adaptec 2940 Ultra SCSI adapter
aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs
Allocated SCBs: 36, SG List Length: 128

Serial EEPROM:
0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 
0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 0x0338 
0x18b6 0x005f 0x0007 0x0010 0xff00 0xffff 0xffff 0xffff 
0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0x00ff 0x4ca2 

Target 0 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
        Goal: 20.000MB/s transfers (10.000MHz, offset 8, 16bit)
        Curr: 20.000MB/s transfers (10.000MHz, offset 8, 16bit)
        Channel A Target 0 Lun 0 Settings
                Commands Queued 225488
                Commands Active 0
                Command Openings 32
                Max Tagged Openings 32
                Device Queue Frozen Count 0
* Target 1 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
        Goal: 40.000MB/s transfers (20.000MHz, offset 8, 16bit)
        Curr: 40.000MB/s transfers (20.000MHz, offset 8, 16bit)
        Channel A Target 1 Lun 0 Settings
                Commands Queued 7409
                Commands Active 0
                Command Openings 32
                Max Tagged Openings 32
                Device Queue Frozen Count 0
Target 2 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 3 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 4 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 5 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 6 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 7 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 8 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 9 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 10 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 11 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 12 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 13 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 14 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)
Target 15 Negotiation Settings
        User: 40.000MB/s transfers (20.000MHz, offset 127, 16bit)

* NOTE: Target 1 is different and at the faster correct speed because I changed the speed manually when I was messing with it. It looked the same as target 0 before.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-11 14:45:09 UTC
Hi, is this really a gentoo specific bug? 
Have you tried reproducing it with vanilla-source?
Please reopen if the this only happens on gentoo-sources (i.e. by doing some wrong patchwork, see the patchset for that).
Comment 2 Alex Cannon 2010-07-01 16:12:15 UTC
The problem exists in vanilla-sources too. Do you happen to know the proper place to report a bug like this to?
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-07-03 19:28:08 UTC
Hi Ales,

I think https://bugzilla.kernel.org/ has an linux kernel "product" for such issues.

Michael