Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1641063 > unrolled thread
| Started by | Anatolij Gustschin <agust@denx.de> |
|---|---|
| First post | 2017-05-14 10:40 +0200 |
| Last post | 2017-05-14 10:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4] fpga manager: Add Altera CvP driver Anatolij Gustschin <agust@denx.de> - 2017-05-14 10:40 +0200
| From | Anatolij Gustschin <agust@denx.de> |
|---|---|
| Date | 2017-05-14 10:40 +0200 |
| Subject | Re: [PATCH v4] fpga manager: Add Altera CvP driver |
| Message-ID | <tGXeh-7D7-1@gated-at.bofh.it> |
On Wed, 3 May 2017 18:01:19 +0300
Andy Shevchenko andy.shevchenko@gmail.com wrote:
...
>> when 12 LSBs are zero, the bytes value has been decremented by
>> 4k, meaning that a new 4k data block has been written. Only
>> then the error checking is performed.
>
>If the size is less than 4k...?
then the final check below will catch it. And I doubt that config
images can be so small. The lowest size I've ever seen is more
than 1MiB.
...
>>>> pci config space access works without enabling the pci device,
>>>> writing commands to config space enables the device first. It is done
>>>> some lines below which you deleted when commenting (please see original
>>>> patch).
>>>
>>>Your comment didn't clarify what's going on along these lines.
>>>
>>>I checked original patch, I didn't find any type of
>>>pci_enable_device() call.
>>
>
>> I mean this part (instead of pci_enable_device()):
>
>> + /* Enable memory BAR access */
>> + pci_read_config_word(pdev, PCI_COMMAND, &cmd);
>> + if (!(cmd & PCI_COMMAND_MEMORY)) {
>> + cmd |= PCI_COMMAND_MEMORY;
>> + pci_write_config_word(pdev, PCI_COMMAND, cmd);
>> + }
>
>I see this code is used somewhere else (several places I suppose,
>drivers/video/fbdev/aty/atyfb_base.c is one of them).
other places set or clean additional pci command flags, use
different pci config accessors or contain debug code. And I reuse
pre-initialized cmd in the error path, so the usage pattern here
is not the same as in the atyfb_base driver.
--
Anatolij
Back to top | Article view | linux.kernel
csiph-web