Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933588AbbGHOmq (ORCPT ); Wed, 8 Jul 2015 10:42:46 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34143 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933387AbbGHOmm (ORCPT ); Wed, 8 Jul 2015 10:42:42 -0400 From: Dmitry Kalinkin To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Cc: Martyn Welch , Manohar Vanga , Greg Kroah-Hartman , Dmitry Kalinkin Subject: [PATCH] vme: lower alignment requirement in pci bridge drivers Date: Wed, 8 Jul 2015 17:42:17 +0300 Message-Id: <1436366537-28094-1-git-send-email-dmitry.kalinkin@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <559D2879.30602@ge.com> References: <559D2879.30602@ge.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2046 Lines: 49 Universe II allows PCI address grannularity of 4K or 64K depending on the window id. tsi148 only supports 64K. Existing driver implementations are validating window size against this grannularity and then use that very size as alignment parameter to pci_bus_alloc_resource. This constraint is excessive, alignment by granularity should be enough. This changes alignment constraint from size to a fixed constraint of 64K. Signed-off-by: Dmitry Kalinkin --- drivers/vme/bridges/vme_ca91cx42.c | 2 +- drivers/vme/bridges/vme_tsi148.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index 834883d..b79a74a 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/drivers/vme/bridges/vme_ca91cx42.c @@ -553,7 +553,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, image->bus_resource.flags = IORESOURCE_MEM; retval = pci_bus_alloc_resource(pdev->bus, - &image->bus_resource, size, size, PCIBIOS_MIN_MEM, + &image->bus_resource, size, 0x10000, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { dev_err(ca91cx42_bridge->parent, "Failed to allocate mem " diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index b0132e0..d1e383b 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c @@ -768,7 +768,7 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, image->bus_resource.flags = IORESOURCE_MEM; retval = pci_bus_alloc_resource(pdev->bus, - &image->bus_resource, size, size, PCIBIOS_MIN_MEM, + &image->bus_resource, size, 0x10000, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { dev_err(tsi148_bridge->parent, "Failed to allocate mem " -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/