Re: add intel 6235 support to iwn(4)

2013-01-09 Thread James Turner
On Wed, Jan 09, 2013 at 04:12:23PM +, Richard N wrote:
> Mark Kettenis  xs4all.nl> writes:
> 
> > 
> > > Date: Tue, 13 Nov 2012 21:02:24 -0500
> > > From: James Turner  calminferno.net>
> > > 
> > > I was actually able to add support myself with the following diff.
> > 
> > Great!
> > 
> > Committed an improved diff that also adds the "other" 6030 variant.
> > 
> > > Index: if_iwn.c
> > > ===
> > > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
> > > retrieving revision 1.115
> > > diff -u -p if_iwn.c
> > > --- if_iwn.c  11 Nov 2012 20:45:31 -  1.115
> > > +++ if_iwn.c  14 Nov 2012 02:00:52 -
> > > @@ -639,7 +639,8 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t 
> > >   break;
> > >   case IWN_HW_REV_TYPE_6005:
> > >   sc->limits = &iwn6000_sensitivity_limits;
> > > - if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
> > > + if (pid == PCI_PRODUCT_INTEL_WL_6235_1 ||
> > > + pid == PCI_PRODUCT_INTEL_WL_6030_2) {
> > >   sc->fwname = "iwn-6030";
> > >  
> > >   /* XXX: The 6235 generates a fatal firmware error when
> > 
> > 
> 
> --
> 
> Thankyou for all the above info
> I am interested in purchasing a Laptop which will unfortunately have the 
> "Intel
> Centrino Advanced-N 6235 + Bluetooth Combo Module"
> 
>  I assume, in an earlier post, that someone "disabled" bluetooth (in their
> BIOS), and then the "iwn0 firmware/driver" had worked flawlessly. ?
> 
>  I'm sorry for interrupting here, but I just wanted to confirm, that in 
> OpenBSD
> 5.2 Official (Stable) Release , that this in fact is still the case. ?
>  Either way, I do NOT plan on using Bluetooth on my laptop.
> 
>  Thanks for all your efforts as well.
> 
> Rick.
> 

Rick,

I did not have to disable BT in my bios, the driver it self
disables/skips over it I believe.

This commit was made to cvs after 5.2 was released so you will need to
run a snapshot or follow -current instead.

-- 
James Turner



Re: add intel 6235 support to iwn(4)

2013-01-09 Thread Richard N
Mark Kettenis  xs4all.nl> writes:

> 
> > Date: Tue, 13 Nov 2012 21:02:24 -0500
> > From: James Turner  calminferno.net>
> > 
> > I was actually able to add support myself with the following diff.
> 
> Great!
> 
> Committed an improved diff that also adds the "other" 6030 variant.
> 
> > Index: if_iwn.c
> > ===
> > RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
> > retrieving revision 1.115
> > diff -u -p if_iwn.c
> > --- if_iwn.c11 Nov 2012 20:45:31 -  1.115
> > +++ if_iwn.c14 Nov 2012 02:00:52 -
> > @@ -639,7 +639,8 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t 
> > break;
> > case IWN_HW_REV_TYPE_6005:
> > sc->limits = &iwn6000_sensitivity_limits;
> > -   if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
> > +   if (pid == PCI_PRODUCT_INTEL_WL_6235_1 ||
> > +   pid == PCI_PRODUCT_INTEL_WL_6030_2) {
> > sc->fwname = "iwn-6030";
> >  
> > /* XXX: The 6235 generates a fatal firmware error when
> 
> 

--

Thankyou for all the above info
I am interested in purchasing a Laptop which will unfortunately have the "Intel
Centrino Advanced-N 6235 + Bluetooth Combo Module"

 I assume, in an earlier post, that someone "disabled" bluetooth (in their
BIOS), and then the "iwn0 firmware/driver" had worked flawlessly. ?

 I'm sorry for interrupting here, but I just wanted to confirm, that in OpenBSD
5.2 Official (Stable) Release , that this in fact is still the case. ?
 Either way, I do NOT plan on using Bluetooth on my laptop.

 Thanks for all your efforts as well.

Rick.



Re: add intel 6235 support to iwn(4)

2012-11-14 Thread Mark Kettenis
> Date: Tue, 13 Nov 2012 21:02:24 -0500
> From: James Turner 
> 
> I was actually able to add support myself with the following diff.

Great!

Committed an improved diff that also adds the "other" 6030 variant.

> Index: if_iwn.c
> ===
> RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
> retrieving revision 1.115
> diff -u -p if_iwn.c
> --- if_iwn.c  11 Nov 2012 20:45:31 -  1.115
> +++ if_iwn.c  14 Nov 2012 02:00:52 -
> @@ -639,7 +639,8 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t 
>   break;
>   case IWN_HW_REV_TYPE_6005:
>   sc->limits = &iwn6000_sensitivity_limits;
> - if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
> + if (pid == PCI_PRODUCT_INTEL_WL_6235_1 ||
> + pid == PCI_PRODUCT_INTEL_WL_6030_2) {
>   sc->fwname = "iwn-6030";
>  
>   /* XXX: The 6235 generates a fatal firmware error when



Re: add intel 6235 support to iwn(4)

2012-11-13 Thread Paul de Weerd
This fixes iwn(4) for me too.  Where previously I would get "iwn0:
fatal firmware error" I now get a working setup with:

iwn0 at pci1 dev 0 function 0 "Intel Centrino Advanced-N 6030" rev 0x34: msi, 
MIMO 2T2R, MoW, address 88:53:2e:d9:dd:9d

Full dmesg (including a boot with the previous kernel and the error I
got) included at the end of this mail.

Thanks Joshua and James, that fixes one of the remaining issues on my
laptop.  This e-mail sent via that iwn(4) ;)

Paul 'WEiRD' de Weerd

On Tue, Nov 13, 2012 at 09:02:24PM -0500, James Turner wrote:
| I was actually able to add support myself with the following diff.
| 
| -- 
| James Turner
| ja...@calminferno.net
| Index: if_iwn.c
| ===
| RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
| retrieving revision 1.115
| diff -u -p if_iwn.c
| --- if_iwn.c  11 Nov 2012 20:45:31 -  1.115
| +++ if_iwn.c  14 Nov 2012 02:00:52 -
| @@ -639,7 +639,8 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t 
|   break;
|   case IWN_HW_REV_TYPE_6005:
|   sc->limits = &iwn6000_sensitivity_limits;
| - if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
| + if (pid == PCI_PRODUCT_INTEL_WL_6235_1 ||
| + pid == PCI_PRODUCT_INTEL_WL_6030_2) {
|   sc->fwname = "iwn-6030";
|  
|   /* XXX: The 6235 generates a fatal firmware error when
| 

OpenBSD 5.2-current (GENERIC.MP) #0: Sun Nov 11 22:19:14 CET 2012
we...@banana.alm.weirdnet.nl:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8501063680 (8107MB)
avail mem = 8252280832 (7869MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe6020 (18 entries)
bios0: vendor INSYDE version "R1010H5" date 07/28/2011
bios0: Sony Corporation VPCZ23C5E
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA ASF! HPET APIC MCFG SLIC WDAT SSDT BOOT SSDT ASPT 
SSDT SSDT SSDT SSDT
acpi0: wakeup devices EHC1(S3) EHC2(S3) HDEF(S0) WLAN(S0) RP01(S0) RMSC(S0) 
RP02(S0) NXUC(S3) RP03(S3) RLAN(S3) RP04(S3) RP07(S3) PEG0(S0) PEGP(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2794.10 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 99MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu1: 256KB 64b/line 8-way L2 cache
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu2: 256KB 64b/line 8-way L2 cache
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2793.66 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu3: 256KB 64b/line 8-way L2 cache
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (RP01)
acpiprt2 at acpi0: bus 3 (RP02)
acpiprt3 at acpi0: bus 4 (RP03)
acpiprt4 at acpi0: bus 5 (RP04)
acpiprt5 at acpi0: bus 8 (RP07)
acpiprt6 at acpi0: bus -1 (PEG0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C1, PSS
acpicpu1 at acpi0: C3, C1, PSS
acpicpu2 at acpi0: C3, C1, PSS
acpicpu3 at acpi0: C3, C1, PSS
acpitz0 at acpi0: critical temperature is 98 degC
acpibat0 at acpi0: BAT1 type Lion oem "Sony Corporation"
acpibat1 at acpi0: BAT2 type Lion oem "Sony Corporation"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpidock0 at acpi0: DOCK not docked (0)
acpivideo0 at acpi0: DD01
acpivideo1 at acpi0: DD02
acpivideo2 at acpi0: DD03
acpivideo3 at acpi0: DD04
acpivideo4 at acpi0: DD05
acpivideo5 at acpi0: DD06
acpivideo6 at acpi0: DD07
acpivideo7 at acpi0: DD08
acpivideo8 at acpi0: GFX0
acpivout0 at acpivideo8: DD02
cpu0: Enhanced Speed

Re: add intel 6235 support to iwn(4)

2012-11-13 Thread James Turner
I was actually able to add support myself with the following diff.

-- 
James Turner
ja...@calminferno.net
Index: if_iwn.c
===
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.115
diff -u -p if_iwn.c
--- if_iwn.c11 Nov 2012 20:45:31 -  1.115
+++ if_iwn.c14 Nov 2012 02:00:52 -
@@ -639,7 +639,8 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t 
break;
case IWN_HW_REV_TYPE_6005:
sc->limits = &iwn6000_sensitivity_limits;
-   if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
+   if (pid == PCI_PRODUCT_INTEL_WL_6235_1 ||
+   pid == PCI_PRODUCT_INTEL_WL_6030_2) {
sc->fwname = "iwn-6030";
 
/* XXX: The 6235 generates a fatal firmware error when



Re: add intel 6235 support to iwn(4)

2012-11-13 Thread James Turner
Does this happen to also add support for 6230? If not how hard would it
be to add 6230 support now that 6235 is supported?

I'd be happy to test diffs.

-- 
James Turner
ja...@calminferno.net



Re: add intel 6235 support to iwn(4)

2012-11-11 Thread Mark Kettenis
> Date: Sat, 10 Nov 2012 22:43:13 -0600
> From: joshua stein 
> 
> Add support for Intel 6235 WiFi:
> 
> iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6235" rev 0x24: msi, 
> MIMO 2T2R, AGN, address c4:85:08:35:55:f7
> 
> Requires newer iwn-6030 firmware that I recently added to the
> iwn-firmware package.  Trying to configure Bluetooth coexistence
> kills the device (unrecoverable firmware error) and I couldn't
> understand all of the voodoo that the Linux driver does to deal with
> this, so I just disabled it.  I don't think our Bluetooth stuff
> works anyway.

Right.  Could you add a XXX comment stating that configuring bluetooth
coexistence crashed the firmware?

With that, ok kettenis@



add intel 6235 support to iwn(4)

2012-11-10 Thread joshua stein
Add support for Intel 6235 WiFi:

iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6235" rev 0x24: msi, 
MIMO 2T2R, AGN, address c4:85:08:35:55:f7

Requires newer iwn-6030 firmware that I recently added to the
iwn-firmware package.  Trying to configure Bluetooth coexistence
kills the device (unrecoverable firmware error) and I couldn't
understand all of the voodoo that the Linux driver does to deal with
this, so I just disabled it.  I don't think our Bluetooth stuff
works anyway.


Index: dev/pci/if_iwn.c
===
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.114
diff -u -p -u -p -r1.114 if_iwn.c
--- dev/pci/if_iwn.c12 Oct 2012 19:53:24 -  1.114
+++ dev/pci/if_iwn.c11 Nov 2012 04:31:39 -
@@ -90,7 +90,8 @@ static const struct pci_matchid iwn_devi
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_1030_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_1030_2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_100_1 },
-   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_100_2 }
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_100_2 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_6235_1 },
 };
 
 intiwn_match(struct device *, void *, void *);
@@ -638,7 +639,11 @@ iwn5000_attach(struct iwn_softc *sc, pci
break;
case IWN_HW_REV_TYPE_6005:
sc->limits = &iwn6000_sensitivity_limits;
-   sc->fwname = "iwn-6005";
+   if (pid == PCI_PRODUCT_INTEL_WL_6235_1) {
+   sc->fwname = "iwn-6030";
+   sc->sc_flags |= IWN_FLAG_NO_BT_COEX;
+   } else
+   sc->fwname = "iwn-6005";
break;
default:
printf(": adapter type %d not supported\n", sc->hw_type);
@@ -4191,12 +4196,14 @@ iwn_config(struct iwn_softc *sc)
}
}
 
-   /* Configure bluetooth coexistence. */
-   error = iwn_send_btcoex(sc);
-   if (error != 0) {
-   printf("%s: could not configure bluetooth coexistence\n",
-   sc->sc_dev.dv_xname);
-   return error;
+   if (!(sc->sc_flags & IWN_FLAG_NO_BT_COEX)) {
+   /* Configure bluetooth coexistence. */
+   error = iwn_send_btcoex(sc);
+   if (error != 0) {
+   printf("%s: could not configure bluetooth 
coexistence\n",
+   sc->sc_dev.dv_xname);
+   return error;
+   }
}
 
/* Set mode, channel, RX filter and enable RX. */
Index: dev/pci/if_iwnvar.h
===
RCS file: /cvs/src/sys/dev/pci/if_iwnvar.h,v
retrieving revision 1.22
diff -u -p -u -p -r1.22 if_iwnvar.h
--- dev/pci/if_iwnvar.h 9 Jan 2011 15:45:37 -   1.22
+++ dev/pci/if_iwnvar.h 11 Nov 2012 04:31:39 -
@@ -201,6 +201,7 @@ struct iwn_softc {
 #define IWN_FLAG_BUSY  (1 << 5)
 #define IWN_FLAG_HAS_11N   (1 << 6)
 #define IWN_FLAG_ENH_SENS  (1 << 7)
+#define IWN_FLAG_NO_BT_COEX(1 << 8)
 
uint8_t hw_type;
 



OpenBSD 5.2-current (GENERIC.MP) #60: Sat Nov 10 22:29:29 CST 2012
j...@zen.superblock.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4173500416 (3980MB)
avail mem = 4040249344 (3853MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeba60 (23 entries)
bios0: vendor American Megatrends Inc. version "UX21A.209" date 06/06/2012
bios0: ASUSTeK COMPUTER INC. UX21A
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG SSDT SSDT SSDT SSDT SLIC HPET SSDT 
SSDT DMAR
acpi0: wakeup devices P0P1(S4) PEG0(S4) PEG1(S4) PEG2(S4) PEG3(S4) USB1(S3) 
USB2(S3) USB3(S3) USB4(S3) EHC2(S3) USB5(S3) USB6(S3) USB7(S3) HDEF(S4) 
RP01(S4) RP02(S4) WLAN(S3) RP03(S4) RP04(S4) RP05(S4) RP06(S4) RP07(S4) 
RP08(S4) EHC1(S3) XHC1(S3) XHC_(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz, 1596.59 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 99MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz, 1596.38 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-