From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266170AbUGOJ6i (ORCPT ); Thu, 15 Jul 2004 05:58:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266175AbUGOJ6h (ORCPT ); Thu, 15 Jul 2004 05:58:37 -0400 Received: from cantor.suse.de ([195.135.220.2]:51370 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S266170AbUGOJ6g (ORCPT ); Thu, 15 Jul 2004 05:58:36 -0400 Date: Thu, 15 Jul 2004 11:58:35 +0200 Message-ID: From: Takashi Iwai To: Jeff Garzik Cc: Greg Ingram , linux-kernel@vger.kernel.org, Jaroslav Kysela Subject: Re: via82xx.c vs. sonypi.c i/o region conflict on vaio In-Reply-To: <40F58A20.1090807@pobox.com> References: <40F58A20.1090807@pobox.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 14 Jul 2004 15:31:44 -0400, Jeff Garzik wrote: > > Greg Ingram wrote: > > I modified the sound driver to grab only 128 ports instead of 256 and the > > driver works fine on this hardware. In 2.6.7, it's line 2049 or so of > > sound/pci/via82xx.c: > > > > old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) { > > new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) { > > > I don't see any difference between these two lines. > > Regardless, I see two bugs: > > 1) Hardcoding 256 for resource size. Should be using pci_resource_len() > > 2) via82xx sound driver should be using pci_request_regions() and > pci_release_regions(), not request_region. Doing this eliminates issue #1. Agreed, it's much simpler. I'll fix it (over all ALSA PCI drivers). Takashi