From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f177.google.com ([209.85.223.177]) by ur; Sun Jul 3 18:55:54 EDT 2016 Received: by mail-io0-f177.google.com with SMTP id s63so139912850ioi.3 for <9front@9front.org>; Sun, 03 Jul 2016 15:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7rveXrnomqhli69aq0ot/Cotg+S9f3yEcZySDA3m608=; b=XxIx34y6CSrKbT2OvS1zOo0Bp1XcTNwWySb9pDmxCPMemxqXMPKfTpC4W0OxGync++ 3utMAexqd5fg37/mS0Fa9XYRVvGLra8prSBStbXdTAEvnwj/9/38Znrcp/IY6KXvYxSI Qu7NsupcBRDg7L+dgD27Uf1GBFAQWwXjisoaSUY16axCv7rQxl5SBAtac9Vy6byA+oOb h6TQxjoabr5fM+kxyeJWuQaJaRKEMJT8+RnIAPoN2VTGuyY2a6aQsSEYX+ZolkY2t4Gk 69ID00RITSTzx6jvWFQiTqGaTPFu1ymD4tylVPQjCJS86YIy6sXAbFgt5huN6zKRTkVk 4Zew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7rveXrnomqhli69aq0ot/Cotg+S9f3yEcZySDA3m608=; b=KtFEYkI++klDzVka+u63PVcmWHHwSvgXa7n80b9kQ9kOIN6mAV0CAGjwietx18/j2B dogDJXakSTYaYcXxvm/qOC0PVe8KOo84fQ3Frir+DCYaF5VV0ZqXz9yxh4bcbZJDaUWN 0HkD1jZpR3OC61GoySLOL+PKG3GhDFSV+we0mq7rqfsjcKAAWADWThFq8quq1CHmMosr H7OZzXWw7Ga+fihGxR537aP/RDS4i8wAgn7jVivkaRU+vxNcnyY7aF0Seb4MwuNZlMGk SILJ+/lxhguEk7y3bkb0M7KwgSIIm24LE5EZsDs/dYkYbYgZ/9J8LJeFKS3GQRY4nEcx CfyA== X-Gm-Message-State: ALyK8tJdoqUwjlwSOZel3ImPLNBs4zxV0IOuRlEg7qGUV2xIB4f5vCSA2tTrpZxR8AM3gn2snphdTgbQeyW5rw== X-Received: by 10.107.56.215 with SMTP id f206mr6740238ioa.188.1467586550443; Sun, 03 Jul 2016 15:55:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.55.65 with HTTP; Sun, 3 Jul 2016 15:55:20 -0700 (PDT) In-Reply-To: <1b7f4590bc4b19ce8253e6373f2ff7d9@felloff.net> References: <1b7f4590bc4b19ce8253e6373f2ff7d9@felloff.net> From: Dave MacFarlane Date: Sun, 3 Jul 2016 18:55:20 -0400 Message-ID: Subject: Re: [9front] Hardware woes To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: proven content-driven proxy CMS interface > see iwlpci() function: > > switch(pdev->did){ > default: > continue; > case 0x0084: /* WiFi Link 1000 */ > case 0x4229: /* WiFi Link 4965 */ > case 0x4230: /* WiFi Link 4965 */ > case 0x4232: /* Wifi Link 5100 */ > case 0x4236: /* WiFi Link 5300 AGN */ > case 0x4237: /* Wifi Link 5100 AGN */ > case 0x423d: /* Wifi Link 5150 */ > case 0x423b: /* PRO/Wireless 5350 AGN */ > case 0x0082: /* Centrino Advanced-N 6205 */ > case 0x0085: /* Centrino Advanced-N 6205 */ > case 0x422b: /* Centrino Ultimate-N 6300 variant 1 */ > case 0x4238: /* Centrino Ultimate-N 6300 variant 2 */ > case 0x08ae: /* Centrino Wireless-N 100 */ > case 0x0083: /* Centrino Wireless-N 1000 */ > case 0x0887: /* Centrino Wireless-N 2230 */ > case 0x0888: /* Centrino Wireless-N 2230 */ > break; > } > > the device type is read from pci config space Rev register: > > ctlr->type = (csr32r(ctlr, Rev) >> 4) & 0xF; > > the differences are distinguished by that field, like > the firmware name is indexed by that: > > fw = readfirmware(fwname[ctlr->type]); > > -- > cinap Okay, I ordered a wired usb dongle with a chipset that nusb/ether says it supports and gave the IWL driver a quick shot while I wait for that to ship. it seems that the driver differences aren't as trivial as I hoped. I added 0x081b to the switch and it's loading the driver now, but the ctlr->type id (4) conflicts with the id for Type5150. Since I don't really care about that chipset right now, I replaced the firmware for Type 4 with iwm-7260-9 and took out the references for checking if Type (==/!= Type5150) throughout the code. It's using the driver, but after the handover and poweron in iwlinit, it's finding a bad rom signature. I had a quick look at the poweron and handover code that preceed the check in iwlinit, and while handover is pretty generic, there's a couple chipset specific paths through poweron, so I tried changing: if(ctlr->type != Type4965 && ctlr->type <= Type1000) to: if(ctlr->type != Type4965 && ctlr->type != Type7620 && ctlr->type <= Type1000) (Type1000 == 6, which is in an odd order right in the middle of 5xxx and 6xxx Types, so from what I can tell that "if" statement is just using an accidental ordering in the identifiers to target 5xxx chipsets) Still no luck, so I think this requires actually figuring out what the differences between the iwl and iwm drivers are to get the 7260 to initialize properly. (I also tried going into the ctlr->type == Type4965 statement a little further down with no luck.) I'll probably stop looking into this here, but I figured I'd let anyone else who wants to look into it know what I found. You're probably right that it's best to port the iwm driver, even though Linux manages to get by with a single Intel driver. - Dave