Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754433Ab1DGPBG (ORCPT ); Thu, 7 Apr 2011 11:01:06 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:47566 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754130Ab1DGPBE (ORCPT ); Thu, 7 Apr 2011 11:01:04 -0400 Date: Thu, 7 Apr 2011 11:01:02 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Roedel, Joerg" cc: "Xu, Andiry" , Greg Kroah-Hartman , Sarah Sharp , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@kernel.org" Subject: Re: [PATCH] USB host: Fix lockdep warning in AMD PLL quirk In-Reply-To: <20110407130008.GX23633@amd.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 27 On Thu, 7 Apr 2011, Roedel, Joerg wrote: > So we could access the data structure without any locks if we want using > atomic_t for the probe_count and isoc_reqs members. But as I've seen > meanwhile the lock still needs to protect the access to the hardware in > the usb_amd_quirk_pll() function. > So its probably not worth the work, what do you think? You might as well use the spinlock. However, is there a good reason to zero out the amd_chipset members in usb_amd_dev_put()? Can these things be added and removed dynamically? If they can't then the data should remain valid indefinitely once it has been probed, and you could call pci_dev_put() at the end of usb_amd_find_chipset_info(). And if they can, is it valid to call pci_dev_put() in usb_amd_dev_put() while holding a spinlock? You might want to move those calls to the end of the function. Alan Stern -- 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/