From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com ([134.134.136.20]:37854 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752955Ab2JZRRw (ORCPT ); Fri, 26 Oct 2012 13:17:52 -0400 Date: Fri, 26 Oct 2012 10:17:42 -0700 From: Sarah Sharp To: shashank chaturvedi Cc: linux-usb@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: xhci Portsc register issue Message-ID: <20121026171742.GF4713@xanatos> References: <20121025153552.GA5205@xanatos> <20121025223706.17034.qmail@stuge.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-pci-owner@vger.kernel.org List-ID: On Fri, Oct 26, 2012 at 10:32:05AM +0530, shashank chaturvedi wrote: > >Why would you want to do that? For link power management? What is the > >xHCI kernel driver not providing you such that you have to write a > >userspace program? > > I want to do this for link power managment.But i am able to read & write > the PORTPMSC register (as per xhci spec 5.4.9) from userspace program.Why > not the PORTSC regsiter? Do NOT do this from userspace! You need to modify the xHCI kernel driver to support link PM for your host controller. The USB core has specific times it disables link PM (e.g. before a device is reset) and some drivers may require link PM to be disabled. You are circumventing kernel policy by writing the link PM registers from userspace. Do NOT do this! Sarah Sharp