Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1641063

Re: [PATCH v4] fpga manager: Add Altera CvP driver

From Anatolij Gustschin <agust@denx.de>
Newsgroups linux.kernel
Subject Re: [PATCH v4] fpga manager: Add Altera CvP driver
Date 2017-05-14 10:40 +0200
Message-ID <tGXeh-7D7-1@gated-at.bofh.it> (permalink)
References (1 earlier) <tCpNT-59h-7@gated-at.bofh.it> <tCCL8-4Uk-5@gated-at.bofh.it> <tCNwS-3BR-15@gated-at.bofh.it> <tCQbn-5iz-3@gated-at.bofh.it> <tD44G-73B-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v4] fpga manager: Add Altera CvP driver Anatolij Gustschin <agust@denx.de> - 2017-05-14 10:40 +0200

csiph-web