From patchwork Wed Mar 11 13:02:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 448975 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8C565140172 for ; Thu, 12 Mar 2015 00:04:02 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 655661A0C21 for ; Thu, 12 Mar 2015 00:04:02 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 580971A0784 for ; Thu, 12 Mar 2015 00:03:07 +1100 (AEDT) Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Mar 2015 23:03:05 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp05.au.ibm.com (202.81.31.211) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 11 Mar 2015 23:03:04 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 183282CE804E for ; Thu, 12 Mar 2015 00:03:03 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2BD2shU45547604 for ; Thu, 12 Mar 2015 00:03:03 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2BD2TSF005349 for ; Thu, 12 Mar 2015 00:02:29 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2BD2TuN004944; Thu, 12 Mar 2015 00:02:29 +1100 Received: from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.253.15]) by ozlabs.au.ibm.com (Postfix) with ESMTP id EE7D6A010D; Thu, 12 Mar 2015 00:02:05 +1100 (AEDT) Received: from ka1.ozlabs.ibm.com (ka1.ozlabs.ibm.com [10.61.145.11]) by bran.ozlabs.ibm.com (Postfix) with ESMTP id 9D90816A9BA; Thu, 12 Mar 2015 00:02:05 +1100 (AEDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH slof v2] pci-properties: Remove redundant call to device-type Date: Thu, 12 Mar 2015 00:02:02 +1100 Message-Id: <1426078922-22972-1-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 2.0.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031113-0017-0000-0000-000000E6719E Cc: Alexey Kardashevskiy , Thomas Huth , Nikunj A Dadhania , David Gibson X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" At the moment SLOF adds a "device_type" property automatically for every single PCI device based on its class even if there is no SLOF driver for such a device. OF1275 says that "device_type" is for implemented interfaces only. A side effect of this is virtio-balloon getting device_type=="memory" while it should not have. This removes automatic call to device-type from the common PCI code. Since now, we rely on existing SLOF PCI drivers to call device-type if needed. virtio-blk/net, e1000, ohci/ehci/xhci do this. virtio-scsi does not create the property for itself but disks on its bus do. virtio-ballon won't get the device_type property as there is no driver for it. While we are here, remove device-type from usb-mouse as well. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thomas Huth --- Changes: v2: * removed usb mouse as well - slof does not implement it --- slof/fs/pci-properties.fs | 2 +- slof/fs/usb/dev-mouse.fs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs index a19c651..9efa87e 100644 --- a/slof/fs/pci-properties.fs +++ b/slof/fs/pci-properties.fs @@ -565,7 +565,7 @@ \ *************************************************************************************** \ set up common properties for devices and bridges : pci-common-props ( addr -- ) - dup pci-class-name 2dup device-name device-type + dup pci-class-name device-name dup pci-vendor@ encode-int s" vendor-id" property dup pci-device@ encode-int s" device-id" property dup pci-revision@ encode-int s" revision-id" property diff --git a/slof/fs/usb/dev-mouse.fs b/slof/fs/usb/dev-mouse.fs index 278a7c0..f6acd7e 100644 --- a/slof/fs/usb/dev-mouse.fs +++ b/slof/fs/usb/dev-mouse.fs @@ -6,7 +6,6 @@ sudev slof-dev>port l@ dup set-unit encode-phys " reg" property sudev slof-dev>udev @ VALUE udev s" usb-mouse" device-name -s" mouse" device-type \ .S cr \ dup slof-dev>udev dup . @ . cr