Re: pci_generic_config_write32() access size problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 30, 2015 at 4:47 PM, Duc Dang <dhdang@xxxxxxx> wrote:
> On Wed, Sep 30, 2015 at 2:30 PM, Rob Herring <robh@xxxxxxxxxx> wrote:
>> On Wed, Sep 30, 2015 at 4:17 PM, Duc Dang <dhdang@xxxxxxx> wrote:
>>> On Tue, Sep 29, 2015 at 9:47 AM, Rob Herring <robh@xxxxxxxxxx> wrote:
>>>> + several affected driver maintainers
>>>>
>>>> On Mon, Sep 28, 2015 at 6:05 PM, Russell King - ARM Linux
>>>> <linux@xxxxxxxxxxxxxxxx> wrote:
>>>>> On Mon, Sep 28, 2015 at 05:42:20PM -0500, Rob Herring wrote:
>>>>>> On Mon, Sep 28, 2015 at 5:08 PM, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
>>>>>> > Hi Rob,
>>>>>> >
>>>>>> > Russell pointed out a problem with 1f94a94f67e1 ("PCI: Add generic config
>>>>>> > accessors").  pci_generic_config_write32() does a read/modify/write if the
>>>>>> > size is less than 32 bits, so I think we have problem if this is used with
>>>>>> > 8- or 16-bit registers that contain RW1C bits.  Any thoughts on how we can
>>>>>> > fix this?
>>>>>>
>>>>>> My series didn't change access sizes unless I made a made a mistake
>>>>>> somewhere, so the problem should have existed before.
>>>>>>
>>>>>> Is it known addresses we need to deal with? We could do special case
>>>>>> handling of certain addresses to mask out RW1C bits. This could be in
>>>>>> the generic functions or in wrappers around the generic functions.
>>>>>> There's already some similar examples of special address handling
>>>>>> IIRC.
>>>>>
>>>>> I think this originally came into being because Intel decided that their
>>>>> IOP platforms wouldn't support anything except 32-bit accesses, and
>>>>> cargo cult programming took over.  I complained about it on the Intel IOP
>>>>> platforms, but obviously if the hardware doesn't support anything else
>>>>> then your stuck with it.
>>>>
>>>> What about SA1100 nanoengine?
>>>>
>>>> Others are Tegra, XGene, iproc, and maybe rcar. These are all
>>>> relatively active platforms, so hopefully some testing can be done.
>>>
>>> On X-Gene, so far I don't see anything strange after switching to use
>>> pci_generic_config_write32 with all the cards that I can test.
>>
>> You mean switching to use pci_generic_config_write, right?
> Hi Rob,
>
> I meant even using pci_generic_config_write32 , all the cards that I
> have right now are still running fine.

No doubt. I would hope your driver was already tested to some level.

The question is can you switch to pci_generic_config_write? Is there
some h/w bug like hanging the bus or garbage data that prevents 8 and
16 bit accesses from working?

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux