From nobody@FreeBSD.ORG Wed Aug 18 22:20:45 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id D793F14EA4; Wed, 18 Aug 1999 22:20:45 -0700 (PDT)
Message-Id: <19990819052045.D793F14EA4@hub.freebsd.org>
Date: Wed, 18 Aug 1999 22:20:45 -0700 (PDT)
From: norihiro@tmlab.osakac.ac.jp
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Can't probe Adaptec AHA-2930CU PCI SCSI Adapter
X-Send-Pr-Version: www-1.0

>Number:         13250
>Category:       kern
>Synopsis:       Can't probe Adaptec AHA-2930CU PCI SCSI Adapter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gibbs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 18 22:30:01 PDT 1999
>Closed-Date:    Mon Aug 30 10:11:09 PDT 1999
>Last-Modified:  Mon Aug 30 10:12:03 PDT 1999
>Originator:     Norihiro TANAKA
>Release:        FreeBSD 3.2R
>Organization:
Osaka Electro-Communication Univ.
>Environment:
FreeBSD cervo.tmlab.osakac.ac.jp 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Sat Aug 12 20:59:50 JST 2000     norihiro@cervo.tmlab.osakac.ac.jp:/usr/src/sys/compile/CERVO  i386

My SYSTEM
CPU: K6-2 400MHz
MB:  ASUS P5A-B
MEM: 192MB
SCSI: AHA-2930CU
SCSI DRIVE: HDD x 2, 230MB MO, CDROM
IDE:        nothing
>Description:
AHA-2930CU was not probed by FreeBSD 3.2R.
Because there is no description of AHA-2930CU CARD ID in ahc_pci.c.

>How-To-Repeat:
This problem break out at all time.
>Fix:
patch for /usr/src/sys/pci/ahc_pci.c

*** ahc_pci.c.org       Thu Aug 19 03:31:19 1999
--- ahc_pci.c   Thu Aug 19 03:35:38 1999
***************
*** 108,113 ****
--- 108,114 ----
  #define ID_AHA_4944U          0x8678900400000000ull
  #define ID_AHA_2940UB         0x8178900478819004ull
  #define ID_AHA_2930U          0x8878900478889004ull
+ #define ID_AHA_2930CU         0x3860900438699004ull
  #define ID_AHA_2940U_PRO      0x8778900478879004ull
  #define ID_AHA_2940U_CN               0x0078900478009004ull
  
***************
*** 265,270 ****
--- 266,277 ----
                ID_AHA_2930U,
                ID_ALL_MASK,
                "Adaptec 2930 Ultra SCSI adapter",
+               ahc_aic7880_setup
+       },
+       {
+               ID_AHA_2930CU,
+               ID_ALL_MASK,
+               "Adaptec 2930 Ultra SCSI adapter(J-Retail)",
                ahc_aic7880_setup
        },
        {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Aug 19 04:48:51 PDT 1999 
Responsible-Changed-Why:  
Justin may be interested in the diff. 

From: "Justin T. Gibbs" <gibbs@caspian.plutotech.com>
To: norihiro@tmlab.osakac.ac.jp
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/13250: Can't probe Adaptec AHA-2930CU PCI SCSI Adapter 
Date: Thu, 19 Aug 1999 12:37:19 -0600

 >  #define ID_AHA_4944U          0x8678900400000000ull
 >  #define ID_AHA_2940UB         0x8178900478819004ull
 >  #define ID_AHA_2930U          0x8878900478889004ull
 >+ #define ID_AHA_2930CU         0x3860900438699004ull
 
 According to documentation I have from Adaptec, the aic7860 can only
 have a device ID of {1,2,5,6}{0,1}{3,7}{5,8}.  This would make the above
 ID impossible.  This ID also looks familiar to an ID that Adaptec lists
 as reserved for this product line, 0x6038900438699004.  Are you positive
 that the above ID you gave is correct?  Can you verify the type of SCSI
 controller chip used on this board?  It should be a 7860 or similar chip,
 not an aic7880.
 
 --
 Justin
 
 

From: norihiro@tmlab.osakac.ac.jp (Norihiro TANAKA)
To: gibbs@caspian.plutotech.com
Cc: freebsd-gnats-submit@FreeBSD.ORG, norihiro@tmlab.osakac.ac.jp
Subject: Re: kern/13250: Can't probe Adaptec AHA-2930CU PCI SCSI Adapter 
Date: Fri, 20 Aug 1999 17:18:15 GMT

 Dear Justin.
 
 Thank you for your reply.
 I'm sorry to poor at English.
 
 I purchased AHA-2930U Japanese Retail Package.
 But this card was not probed by FreeBSD 3.2R,
 because it is not the same as ID of AHA-2930U.
 To be exact, it is known this card is AHA-2930CU.
 
 Then I obtain CARD ID from actual CARD.
 To be exact, I install AHA-2930CU in my PC,
 then I examined full_id of variable at
 FUNCTION ahc_find_pci_device() in ahc_pci.c.
 
 I am sorry that I don't know CHIP type of this CARD,
 because I guess this CARD has integrated CUSTOM CHIP.
 There is no describe such as AIC-XXXX.
 (This CARD have only two CHIP, the one is BIOS, the other is unknown.)
 
 According to manual of AHA-2930U(Japanese package),
 it should use AIC-78XX (same as AHA-2940U) driver in Windows NT.
 
 CHIP DATA:
 adaptec 
 T
 BQEB914 
 742211
 BK2823.1
 KOREA
 
 BIOS CHIP DATA:
 1760900-00A
 BIOS 0200
 1997 
 V 1.34.1
 
 
 Now, this CARD is probed by FreeBSD.
 I guess this CARD behavior is normal.
 
 
 Follow as dmesg of SCSI.
 
 ahc0: <Adaptec 2930 Ultra SCSI adapter(J-Retail)> rev 0x03 int a irq
 10 on pci0.10.0
 ahc0: aic7880 Single Channel A, SCSI Id=7, 3/255 SCBs
 
 da1 at ahc0 bus 0 target 1 lun 0
 da1: <IBM DPES-31080 S31Q> Fixed Direct Access SCSI-2 device 
 da1: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing
 Enabled
 da1: 1034MB (2118144 512 byte sectors: 255H 63S/T 131C)
 da2 at ahc0 bus 0 target 3 lun 0
 da2: <FUJITSU M2512A 1513> Removable Optical SCSI-2 device 
 da2: 5.000MB/s transfers (5.000MHz, offset 8)
 da2: 217MB (446325 512 byte sectors: 64H 32S/T 217C)
 cd0 at ahc0 bus 0 target 6 lun 0
 cd0: <PLEXTOR CD-ROM PX-8XCS 1.02> Removable CD-ROM SCSI-2 device 
 cd0: 10.000MB/s transfers (10.000MHz, offset 15)
 cd0: Attempt to query device size failed: NOT READY, Medium not
 present
 da0 at ahc0 bus 0 target 0 lun 0
 da0: <IBM DCAS-34330 S65A> Fixed Direct Access SCSI-2 device 
 da0: 20.000MB/s transfers (20.000MHz, offset 15)
 da0: 4134MB (8467200 512 byte sectors: 255H 63S/T 527C)
 
 
 Thanks regards.
 
 --
 Norihiro TANAKA  <norihiro@tmlab.osakac.ac.jp>
 Osaka Electro-Communication University 
 HomePage: http://ac3.aimcom.co.jp/~norihiro/
 

From: "Justin T. Gibbs" <gibbs@caspian.plutotech.com>
To: norihiro@tmlab.osakac.ac.jp (Norihiro TANAKA)
Cc: gibbs@plutotech.com, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/13250: Can't probe Adaptec AHA-2930CU PCI SCSI Adapter 
Date: Fri, 20 Aug 1999 12:50:51 -0600

 >Then I obtain CARD ID from actual CARD.
 
 Can you send me the output from a pciconf -l of your system?
 
 >According to manual of AHA-2930U(Japanese package),
 >it should use AIC-78XX (same as AHA-2940U) driver in Windows NT.
 >
 >CHIP DATA:
 >adaptec 
 >T
 
 Funny.  The aic style part number is usually listed right here.
 
 >Follow as dmesg of SCSI.
 >
 >ahc0: <Adaptec 2930 Ultra SCSI adapter(J-Retail)> rev 0x03 int a irq
 >10 on pci0.10.0
 >ahc0: aic7880 Single Channel A, SCSI Id=7, 3/255 SCBs
 
 The number of SCBs tells me that the chip is not an aic7880, but
 most likely an aic7860 derivative.  Is the chip roughly 1cm square
 or perhaps 1cm X 2cm?  An aic7880 is roughly 2.5cm X 2.5cm.
 
 --
 Justin
 
 

From: norihiro@tmlab.osakac.ac.jp (Norihiro TANAKA)
To: gibbs@caspian.plutotech.com
Cc: gibbs@plutotech.com, freebsd-gnats-submit@FreeBSD.ORG,
	norihiro@tmlab.osakac.ac.jp
Subject: Re: kern/13250: Can't probe Adaptec AHA-2930CU PCI SCSI Adapter 
Date: Sat, 21 Aug 1999 17:39:43 GMT

 Dear justin.
 
 Thank you for your reply.
 
 
 >> >Then I obtain CARD ID from actual CARD.
 >> 
 >> Can you send me the output from a pciconf -l of your system?
 
 
 Follow as pciconf -l
 
 chip0@pci0:0:0: class=0x060000 card=0x154110b9 chip=0x154110b9
 rev=0x04 hdr=0x00
 chip1@pci0:1:0: class=0x060400 card=0x000000e0 chip=0x524310b9
 rev=0x04 hdr=0x01
 chip2@pci0:3:0: class=0x068000 card=0x710110b9 chip=0x710110b9
 rev=0x00 hdr=0x00
 chip3@pci0:7:0: class=0x060100 card=0x00000000 chip=0x153310b9
 rev=0xc3 hdr=0x00
 fxp0@pci0:9:0:  class=0x020000 card=0x00000000 chip=0x12298086
 rev=0x01 hdr=0x00
 ahc0@pci0:10:0: class=0x010000 card=0x38699004 chip=0x38609004
 rev=0x03 hdr=0x00
 ide_pci0@pci0:15:0:     class=0x01018a card=0x00000000 chip=0x522910b9
 rev=0xc1 hdr=0x00
 vga0@pci1:0:0:  class=0x030000 card=0xff03102b chip=0x0521102b
 rev=0x01 hdr=0x00
 
 
 >> Funny.  The aic style part number is usually listed right here.
 
 I search for AIC-XXXX again.
 But I can't find it.
 There is no describe such as AIC-XXXX.
 
 
 >> The number of SCBs tells me that the chip is not an aic7880, but
 >> most likely an aic7860 derivative.  Is the chip roughly 1cm square
 >> or perhaps 1cm X 2cm?  An aic7880 is roughly 2.5cm X 2.5cm.
 
 The chip dimensions is roughly 1.5cm X 1.5cm.
 And the chip is very thin. 
 
 I have a AHA-2940U too.
 The dimensions of chip of AHA-2940U is about 2.7cm X 2.7cm.
 The chip on AHA-2930CU is far smaller and thinner than chip on AHA-2940U.
 
 I have a proper understanding of this chip is AIC-7860 derivative
 by your advice.
 
 Then, correct setting in ahc_pci.c is 
 
 ID_AHA_2930CU,
 ID_ALL_MASK,
 "Adaptec 2930 Ultra SCSI adapter(J-Retail)",
 ahc_aic7860_setup
 
 Is this OK??
 
 
 Thanks regards.
 
 --
 Norihiro TANAKA  <norihiro@tmlab.osakac.ac.jp>
 Osaka Electro-Communication University 
 HomePage: http://ac3.aimcom.co.jp/~norihiro/
 
State-Changed-From-To: open->closed 
State-Changed-By: gibbs 
State-Changed-When: Mon Aug 30 10:11:09 PDT 1999 
State-Changed-Why:  
Support for the aic7859 which is used on the 2930CU, has been added 
to -current. 
>Unformatted:
