From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44452 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752341Ab3IXDAY (ORCPT ); Mon, 23 Sep 2013 23:00:24 -0400 Date: Mon, 23 Sep 2013 20:01:19 -0700 From: Greg KH To: Sarah Sharp Cc: Bjorn Helgaas , Xenia Ragiadakou , USB list , Alan Stern , "linux-pci@vger.kernel.org" Subject: Re: [PATCH] xhci: fix write to USB3_PSSEN and XUSB2PRM pci config registers Message-ID: <20130924030119.GA5326@kroah.com> References: <1379695553-5891-1-git-send-email-burzalodowa@gmail.com> <20130923164529.GA16886@xanatos> <5240833E.6050508@gmail.com> <20130923204928.GA24225@kroah.com> <20130923214907.GA21695@kroah.com> <20130924002307.GB5682@xanatos> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20130924002307.GB5682@xanatos> Sender: linux-pci-owner@vger.kernel.org List-ID: On Mon, Sep 23, 2013 at 05:23:07PM -0700, Sarah Sharp wrote: > On Mon, Sep 23, 2013 at 02:49:07PM -0700, Greg KH wrote: > > On Mon, Sep 23, 2013 at 04:38:22PM -0500, Bjorn Helgaas wrote: > > > On Mon, Sep 23, 2013 at 3:49 PM, Greg KH wrote: > > > > On Mon, Sep 23, 2013 at 09:06:54PM +0300, Xenia Ragiadakou wrote: > > > >> I had in mind that the pci_ops .read and .write defined by the PCI > > > >> driver will take care of consistent byteorder access to the > > > >> configuration registers. At least, that was what i understood after > > > >> reading the > > > >> chapter on PCI of Linux Device Drivers (more specifically for > > > >> pci_write_config_* functions, it states that "The word and dword > > > >> functions convert the value to little-endian before writing to the > > > >> peripheral device."). > > > > > > > > Hm, I wrote that paragraph (or at least I think I did), but I sure > > > > didn't remember this at all... > > > > > > > > Hm, wait, I do see this happening for the PowerPC cell PCI code, so it > > > > might happen somewhere burried in the platform-specific code for > > > > different arches. You will not see it happen on x86 as there's no need > > > > to swap any bytes around. > > > > > > Greg, with regard to Xenia's patch, is this an ack or a nack? Since > > > you didn't include an "Acked-by" line, I assume you think Xenia's > > > patch is unnecessary. In that case, is there any way to shut sparse > > > up so it doesn't complain about this? > > > > At this point in time, I don't remember what the original patch looked > > like, and as it's an xhci patch, Sarah needs to ack it, not me :) > > Greg: So you're saying that there isn't a need to convert values from > CPU byte-ordering to little endian byte-ordering before passing them on > to pci_write_config_*? That is correct. Xenia, thanks for figuring this out, nice job. greg k-h