Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2949383ybi; Sun, 2 Jun 2019 04:47:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSAEfhpAdY6whE2fMIbMiT+2431mT+msOLDeoYuN4KtyudryzVX5Ee21E9WKmFOJnJ9Wf3 X-Received: by 2002:a17:90a:5d15:: with SMTP id s21mr22093452pji.125.1559476031718; Sun, 02 Jun 2019 04:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559476031; cv=none; d=google.com; s=arc-20160816; b=PmPOwQ6SXiqDtsccP2OUrtf0kY63Kt+VNVtS+8AqeqlnDKZuLIA3C3LyZO7OidW7PW y5qeQ6APHR1Res4/EcAjVzS1Msel8LsfLyl0YqTzISIYf0iTTxyC2B8UbJn0jYm03I48 5kikpiPpRY6AtyovB0XMxgB+6DzZFNNGQgSnHMxDL+EXU8ZO9K4Y1ao+CWBYXfJspT+p BeAzf0MAqeB9WoiqrcTl+zn7fA80Q8SntD8cl7E2+hobvzsjXbHtT5EJjaSYLkwvDk+l PsONSQ4rWyEwNZ51q6foDVxYBsYzsk9Tbd0Wf/E+eA5vR1ssBp/ASL6h2n42QQLhg5Td p/+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZHFmU6uTiy07mtRHw1tHemTFmMEujbmzL3sESgruD9w=; b=mgfWnGlrbUjip0cEK/eNVbUUDw3SLri5u7z/TtJpRXGg1hyKdSZPoYnK3+zyCT8Wfd UqVaWFWFpjXgcU8mTHI6By3ssr3dTlxKmzzurkAJ2LCz0gJKIodAxNSYel3esCN3J9Vf bn/eLMX5c7Ck/RCewPEnFOjN5ewYSivtQGjsRgx+P1iCQPqudfIQTPcIF6L2HyklMyYw XK6Lo5rCJps2NBRjym1DbksvxuEumSDqnCnRfqKfRJa7e5elOxxRoKoUG2ysWL+d6q0u Ozbd/pn38PmhPmOdv0DN/aP1H2FwgDEe+XDNExWnAqO89DY4T9fiS5Lum+CRH+USu38C G+dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DQhy5bIc; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si15688870pfd.137.2019.06.02.04.46.30; Sun, 02 Jun 2019 04:47:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DQhy5bIc; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbfFBLoF (ORCPT + 99 others); Sun, 2 Jun 2019 07:44:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41071 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726212AbfFBLoF (ORCPT ); Sun, 2 Jun 2019 07:44:05 -0400 Received: by mail-pf1-f195.google.com with SMTP id q17so8929101pfq.8 for ; Sun, 02 Jun 2019 04:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZHFmU6uTiy07mtRHw1tHemTFmMEujbmzL3sESgruD9w=; b=DQhy5bIcF/FH7ReQ4cwZZhKhcsojgAVo1hRPoS9W2UxBbX4fpReLRstCUGamXCjxMd IDQhFQodM9LS9SV7IupvCk1Loq69L3A8H8cTFF3ErZvmo8ivhd3tBVOAv5sGilckKmZO 5eTBIB1lcpsbK0JC5Niu9KWBNm8yqpEHlt2jsvggNNu38H5zyyTr5qvMsI9eVw1epckZ MBRDgtOMYJ5C4cXT4lcMzRwNcdurLxMGFayl9vV0Lohesh0IYVuD/UiyCZnJaP/rKkda QGzrwvGnGVi2LmPQxkn6Xwqb99L1zKixfmq2dVVpj6t0z/i6OHO1gyKvjH9vQUbg/P93 UB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZHFmU6uTiy07mtRHw1tHemTFmMEujbmzL3sESgruD9w=; b=XHS1H9Jukc8WN26L090wtzbpN41FEus8rt/3Z3tmCUvCDVvmF+gNb5IJ1hKkhJScs/ I2xActDpctE7MzOHdkALnNHT60kqmhD09/fv3ZrEuqnfDJ8mtylWZDzV0++BbUx8ewzT Twq51tzRQ2aL4FZGiqG6SEnGsmeo4pdjJBkxNphGUSmW1n9i3goY2S5Pa3jlenDkTO7u 8CsWiUMrE4IXSj+HOZTT+p2iwZL6U6yJOlHVCoYkG96G2IoSSQ58ukMi1HvPj5JHK/TR ejy5NysxsiyIVxwbg7MyXceP5hxd4iNl2QSS6OVgWW5M43gK0ZZb9cORb7NIVhc9+zuI HqGg== X-Gm-Message-State: APjAAAXebfkMjDvCJVS7OQm2NyQMtyW62zPSWJjoyz3jeX6wr/1mg/Nl S+0C78aoXfvnXQd3K89UuToSDh3rHxKqMPSmeJY= X-Received: by 2002:a63:5c1a:: with SMTP id q26mr22085674pgb.260.1559475844467; Sun, 02 Jun 2019 04:44:04 -0700 (PDT) MIME-Version: 1.0 References: <20190602102144.17360-1-chunkeey@gmail.com> In-Reply-To: <20190602102144.17360-1-chunkeey@gmail.com> From: Julian Calaby Date: Sun, 2 Jun 2019 21:43:52 +1000 Message-ID: Subject: Re: [RFC PATCH] ath9k: integrate AR92XX pci fixup code To: Christian Lamparter Cc: QCA ath9k Development , linux-wireless@vger.kernel.org, Hauke Mehrtens , Martin Blumenstingl Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Christian, On Sun, Jun 2, 2019 at 8:24 PM Christian Lamparter wrote: > > Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) > need to be able to initialize the PCIe wifi device. Normally, this is done > during the early stages of booting linux, because the necessary init code > is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. > However, this isn't possible for devices which have the init code for the > Atheros chip stored on NAND in an UBI volume. Hence, this module can be > used to initialize the chip when the user-space is ready to extract the > init code. > > Martin Blumenstingl prodived the following fixes: > owl-loader: add support for OWL emulation PCI devices > owl-loader: don't re-scan the bus when ath9k_pci_fixup failed > owl-loader: use dev_* instead of pr_* logging functions > owl-loader: auto-generate the eeprom filename as fallback > owl-loader: add a debug message when swapping the eeprom data > owl-loader: add missing newlines in log messages > > Signed-off-by: Christian Lamparter > Signed-off-by: Martin Blumenstingl Two questions: 1. This seems complicated enough that the functions introduced should probably go into a separate .c file, maybe "noeeprom.c", with a header file with all the ifdef / config magic in it. 2. This smells almost like a completely separate PCI(e) driver for cards in a "weird" state. Is there anything you're using from ath9k other than the eeprom file naming? and is that really useful? Won't the eeprom files be device specific and therefore could always use the device name fallback? Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/