On Jun 23, 2011 23:04, David Gwynne wrote:
> you dawe,
> 
> you could point both chips at the same function...
> 
> dlg

sure, or would you prefer a name like ahci_intel_3400_1_4_attach?
Because the behaviour of 3400_2 and 3400_3 isn't known.

Index: ahci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.180
diff -u -p -r1.180 ahci.c
--- ahci.c      14 Jun 2011 10:40:14 -0000      1.180
+++ ahci.c      23 Jun 2011 13:58:33 -0000
@@ -456,7 +456,7 @@ int                 ahci_ati_sb700_attach(struct ahci_
                            struct pci_attach_args *);
 int                    ahci_amd_hudson2_attach(struct ahci_softc *,
                            struct pci_attach_args *);
-int                    ahci_intel_3400_1_attach(struct ahci_softc *,
+int                    ahci_intel_3400_attach(struct ahci_softc *,
                            struct pci_attach_args *);
 int                    ahci_nvidia_mcp_attach(struct ahci_softc *,
                            struct pci_attach_args *);
@@ -481,7 +481,9 @@ static const struct ahci_device ahci_dev
            NULL,               ahci_ati_sb700_attach },
 
        { PCI_VENDOR_INTEL,     PCI_PRODUCT_INTEL_3400_AHCI_1,
-           NULL,               ahci_intel_3400_1_attach },
+           NULL,               ahci_intel_3400_attach },
+       { PCI_VENDOR_INTEL,     PCI_PRODUCT_INTEL_3400_AHCI_4,
+           NULL,               ahci_intel_3400_attach },
 
        { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP65_AHCI_2,
            NULL,               ahci_nvidia_mcp_attach },
@@ -716,7 +718,7 @@ ahci_amd_hudson2_attach(struct ahci_soft
 }
 
 int
-ahci_intel_3400_1_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+ahci_intel_3400_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
 {
        sc->sc_flags |= AHCI_F_IPMS_PROBE;
        return (0);

> 
> On 23/06/2011, at 10:50 PM, Dawe wrote:
> 
> > Hi,
> > the intel_3400_4 has the same issue as the intel_3400_1, ahci(4)
> > hangs for 30 seconds on boot and resume. See also PR6630.
> >
> > Index: ahci.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/pci/ahci.c,v
> > retrieving revision 1.180
> > diff -u -p -r1.180 ahci.c
> > --- ahci.c  14 Jun 2011 10:40:14 -0000      1.180
> > +++ ahci.c  23 Jun 2011 12:34:49 -0000
> > @@ -458,6 +458,8 @@ int                     ahci_amd_hudson2_attach(struct 
> > ahc
> >                         struct pci_attach_args *);
> > int                 ahci_intel_3400_1_attach(struct ahci_softc *,
> >                         struct pci_attach_args *);
> > +int                        ahci_intel_3400_4_attach(struct ahci_softc *,
> > +                       struct pci_attach_args *);
> > int                 ahci_nvidia_mcp_attach(struct ahci_softc *,
> >                         struct pci_attach_args *);
> >
> > @@ -482,6 +484,8 @@ static const struct ahci_device ahci_dev
> >
> >     { PCI_VENDOR_INTEL,     PCI_PRODUCT_INTEL_3400_AHCI_1,
> >         NULL,               ahci_intel_3400_1_attach },
> > +   { PCI_VENDOR_INTEL,     PCI_PRODUCT_INTEL_3400_AHCI_4,
> > +       NULL,               ahci_intel_3400_4_attach },
> >
> >     { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP65_AHCI_2,
> >         NULL,               ahci_nvidia_mcp_attach },
> > @@ -717,6 +721,13 @@ ahci_amd_hudson2_attach(struct ahci_soft
> >
> > int
> > ahci_intel_3400_1_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
> > +{
> > +   sc->sc_flags |= AHCI_F_IPMS_PROBE;
> > +   return (0);
> > +}
> > +
> > +int
> > +ahci_intel_3400_4_attach(struct ahci_softc *sc, struct pci_attach_args
> *pa)
> > {
> >     sc->sc_flags |= AHCI_F_IPMS_PROBE;
> >     return (0);
> >
> >
> > OpenBSD 4.9-current (GENERIC.MP) #9: Thu Jun 23 13:06:40 CEST 2011
> >    d...@padtree.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 1998045184 (1905MB)
> > avail mem = 1930702848 (1841MB)
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
> > bios0: vendor LENOVO version "6IET68WW (1.28 )" date 07/12/2010
> > bios0: LENOVO 25184QG
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA
> SSDT
> > SSDT SSDT
> > acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) IGBE(S4) EXP1(S4) EXP2(S4)
> > EXP3(S4) EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpiec0 at acpi0
> > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz, 2261.37 MHz
> > cpu0:
> >
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
> ,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: apic clock running at 133MHz
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz, 2261.00 MHz
> > cpu1:
> >
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
> ,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
> > cpu1: 256KB 64b/line 8-way L2 cache
> > cpu2 at mainbus0: apid 4 (application processor)
> > cpu2: Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz, 2261.00 MHz
> > cpu2:
> >
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
> ,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
> > cpu2: 256KB 64b/line 8-way L2 cache
> > cpu3 at mainbus0: apid 5 (application processor)
> > cpu3: Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz, 2261.00 MHz
> > cpu3:
> >
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
> ,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
> > cpu3: 256KB 64b/line 8-way L2 cache
> > ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
> > ioapic0: misconfigured as apic 2, remapped to apid 1
> > acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
> > acpihpet0 at acpi0: 14318179 Hz
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpiprt1 at acpi0: bus -1 (PEG_)
> > acpiprt2 at acpi0: bus 2 (EXP1)
> > acpiprt3 at acpi0: bus 3 (EXP2)
> > acpiprt4 at acpi0: bus -1 (EXP3)
> > acpiprt5 at acpi0: bus 5 (EXP4)
> > acpiprt6 at acpi0: bus 13 (EXP5)
> > acpicpu0 at acpi0: C3, C1, PSS
> > acpicpu1 at acpi0: C3, C1, PSS
> > acpicpu2 at acpi0: C3, C1, PSS
> > acpicpu3 at acpi0: C3, C1, PSS
> > acpipwrres0 at acpi0: PUBS
> > acpitz0 at acpi0: critical temperature is 100 degC
> > acpibtn0 at acpi0: LID_
> > acpibtn1 at acpi0: SLPB
> > acpibat0 at acpi0: BAT0 not present
> > acpibat1 at acpi0: BAT1 not present
> > acpiac0 at acpi0: AC unit online
> > acpithinkpad0 at acpi0
> > cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2267, 2266, 2133, 1999, 1866,
> 1733,
> > 1599, 1466, 1333, 1199 MHz
> > pci0 at mainbus0 bus 0
> > pchb0 at pci0 dev 0 function 0 "Intel Core Host" rev 0x02
> > vga1 at pci0 dev 2 function 0 "Intel Mobile HD graphics" rev 0x02
> > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> > wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> > intagp0 at vga1
> > agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
> > inteldrm0 at vga1: msi
> > drm0 at inteldrm0
> > "Intel 3400 MEI" rev 0x06 at pci0 dev 22 function 0 not configured
> > em0 at pci0 dev 25 function 0 "Intel 82577LM" rev 0x06: msi, address
> > 00:26:2d:fb:c7:02
> > ehci0 at pci0 dev 26 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 23
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > azalia0 at pci0 dev 27 function 0 "Intel 3400 HD Audio" rev 0x06: msi
> > azalia0: codecs: Conexant/0x5069, Intel/0x2804, using Conexant/0x5069
> > audio0 at azalia0
> > ppb0 at pci0 dev 28 function 0 "Intel 3400 PCIE" rev 0x06: apic 1 int 20
> > pci1 at ppb0 bus 2
> > ppb1 at pci0 dev 28 function 1 "Intel 3400 PCIE" rev 0x06: apic 1 int 21
> > pci2 at ppb1 bus 3
> > iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 1000" rev 0x00: msi, MIMO
> 1T2R,
> > BGS, address 00:26:c7:31:15:06
> > ppb2 at pci0 dev 28 function 3 "Intel 3400 PCIE" rev 0x06: apic 1 int 23
> > pci3 at ppb2 bus 5
> > ppb3 at pci0 dev 28 function 4 "Intel 3400 PCIE" rev 0x06: apic 1 int 20
> > pci4 at ppb3 bus 13
> > sdhc0 at pci4 dev 0 function 0 "Ricoh 5U822 SD/MMC" rev 0x01: apic 1 int 16
> > sdmmc0 at sdhc0
> > "Ricoh 5U230 Memory Stick" rev 0x01 at pci4 dev 0 function 1 not configured
> > "Ricoh 5U832 Firewire" rev 0x01 at pci4 dev 0 function 3 not configured
> > ehci1 at pci0 dev 29 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 19
> > usb1 at ehci1: USB revision 2.0
> > uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xa6
> > pci5 at ppb4 bus 14
> > pcib0 at pci0 dev 31 function 0 "Intel QM57 LPC" rev 0x06
> > ahci0 at pci0 dev 31 function 2 "Intel 3400 AHCI" rev 0x06: msi, AHCI 1.3
> > scsibus0 at ahci0: 32 targets
> > sd0 at scsibus0 targ 0 lun 0: <ATA, FUJITSU MJA2320B, 0084> SCSI3 0/direct
> fixed
> > naa.500000e0448000a9
> > sd0: 305245MB, 512 bytes/sec, 625142448 sec total
> > cd0 at scsibus0 targ 1 lun 0: <HL-DT-ST, DVDRAM GU10N, MX05> ATAPI 5/cdrom
> > removable
> > ichiic0 at pci0 dev 31 function 3 "Intel 3400 SMBus" rev 0x06: apic 1 int
> 23
> > iic0 at ichiic0
> > spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-8500 SO-DIMM
> > itherm0 at pci0 dev 31 function 6 "Intel 3400 Thermal" rev 0x06
> > isa0 at pcib0
> > isadma0 at isa0
> > pckbc0 at isa0 port 0x60/5
> > pckbd0 at pckbc0 (kbd slot)
> > pckbc0: using irq 1 for kbd slot
> > wskbd0 at pckbd0: console keyboard, using wsdisplay0
> > pms0 at pckbc0 (aux slot)
> > pckbc0: using irq 12 for aux slot
> > wsmouse0 at pms0 mux 0
> > pcppi0 at isa0 port 0x61
> > spkr0 at pcppi0
> > aps0 at isa0 port 0x1600/31
> > mtrr: Pentium Pro MTRR support
> > uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> > ugen0 at uhub2 port 3 "UPEK Biometric Coprocessor" rev 1.01/0.02 addr 3
> > uvideo0 at uhub2 port 6 configuration 1 interface 0 "Chicony Electronics
> Co.,
> > Ltd. Integrated Camera" rev 2.00/23.45 addr 4
> > video0 at uvideo0
> > uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> > vscsi0 at root
> > scsibus1 at vscsi0: 256 targets
> > softraid0 at root
> > root on sd0a swap on sd0b dump on sd0b
> > scsibus2 at softraid0: 1 targets
> > sd1 at scsibus2 targ 0 lun 0: <OPENBSD, SR CRYPTO, 004> SCSI2 0/direct
> fixed
> > sd1: 89321MB, 512 bytes/sec, 182930000 sec total

Reply via email to