Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1415012
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] xen-pciback: return proper values during BAR sizing |
| Date | 2016-06-06 15:10 +0200 |
| Message-ID | <rH2s2-5nS-21@gated-at.bofh.it> (permalink) |
| References | <rGXLI-2fW-55@gated-at.bofh.it> <rGXVo-2jv-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/06/2016 04:11 AM, Jan Beulich wrote:
> @@ -225,38 +225,42 @@ static inline void read_dev_bar(struct p
> (PCI_BASE_ADDRESS_SPACE_MEMORY |
> PCI_BASE_ADDRESS_MEM_TYPE_64))) {
> bar_info->val = res[pos - 1].start >> 32;
> - bar_info->len_val = res[pos - 1].end >> 32;
> + bar_info->len_val = -resource_size(&res[pos - 1]) >> 32;
> return;
> }
> }
>
> + if (!res[pos].flags ||
> + (res[pos].flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET |
> + IORESOURCE_BUSY)))
> + return;
Why are you not making this check first thing in the routine?
-boris
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] xen-pciback: correct and clean up BAR handling "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 10:10 +0200
[PATCH 2/2] xen-pciback: clean up read_dev_bar() "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 10:20 +0200
Re: [PATCH 2/2] xen-pciback: clean up read_dev_bar() Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-06-06 15:10 +0200
[PATCH 1/2] xen-pciback: return proper values during BAR sizing "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 10:20 +0200
Re: [PATCH 1/2] xen-pciback: return proper values during BAR sizing Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-06-06 15:10 +0200
Re: [PATCH 1/2] xen-pciback: return proper values during BAR sizing "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 16:00 +0200
Re: [PATCH 1/2] xen-pciback: return proper values during BAR sizing Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-06-06 16:40 +0200
[PATCH 3/2] xen-pciback: drop rom_init() "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 10:50 +0200
Re: [PATCH 3/2] xen-pciback: drop rom_init() Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-06-06 15:20 +0200
Re: [PATCH 3/2] xen-pciback: drop rom_init() "Jan Beulich" <JBeulich@suse.com> - 2016-06-06 16:00 +0200
Re: [PATCH 3/2] xen-pciback: drop rom_init() Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-06-06 16:40 +0200
csiph-web