.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Isochronous I/O functionality: |
---|
3 | 4 | * - Isochronous DMA context management |
---|
4 | 5 | * - Isochronous bus resource management (channels, bandwidth), client side |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (C) 2006 Kristian Hoegsberg <krh@bitplanet.net> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - * (at your option) any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program; if not, write to the Free Software Foundation, |
---|
20 | | - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
21 | 8 | */ |
---|
22 | 9 | |
---|
23 | 10 | #include <linux/dma-mapping.h> |
---|
.. | .. |
---|
103 | 90 | return ret; |
---|
104 | 91 | } |
---|
105 | 92 | EXPORT_SYMBOL(fw_iso_buffer_init); |
---|
106 | | - |
---|
107 | | -int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer, |
---|
108 | | - struct vm_area_struct *vma) |
---|
109 | | -{ |
---|
110 | | - unsigned long uaddr; |
---|
111 | | - int i, err; |
---|
112 | | - |
---|
113 | | - uaddr = vma->vm_start; |
---|
114 | | - for (i = 0; i < buffer->page_count; i++) { |
---|
115 | | - err = vm_insert_page(vma, uaddr, buffer->pages[i]); |
---|
116 | | - if (err) |
---|
117 | | - return err; |
---|
118 | | - |
---|
119 | | - uaddr += PAGE_SIZE; |
---|
120 | | - } |
---|
121 | | - |
---|
122 | | - return 0; |
---|
123 | | -} |
---|
124 | 93 | |
---|
125 | 94 | void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, |
---|
126 | 95 | struct fw_card *card) |
---|
.. | .. |
---|
308 | 277 | if ((data[0] & bit) == (data[1] & bit)) |
---|
309 | 278 | continue; |
---|
310 | 279 | |
---|
311 | | - /* 1394-1995 IRM, fall through to retry. */ |
---|
| 280 | + fallthrough; /* It's a 1394-1995 IRM, retry */ |
---|
312 | 281 | default: |
---|
313 | 282 | if (retry) { |
---|
314 | 283 | retry--; |
---|
.. | .. |
---|
337 | 306 | |
---|
338 | 307 | /** |
---|
339 | 308 | * fw_iso_resource_manage() - Allocate or deallocate a channel and/or bandwidth |
---|
| 309 | + * @card: card interface for this action |
---|
| 310 | + * @generation: bus generation |
---|
| 311 | + * @channels_mask: bitmask for channel allocation |
---|
| 312 | + * @channel: pointer for returning channel allocation result |
---|
| 313 | + * @bandwidth: pointer for returning bandwidth allocation result |
---|
| 314 | + * @allocate: whether to allocate (true) or deallocate (false) |
---|
340 | 315 | * |
---|
341 | 316 | * In parameters: card, generation, channels_mask, bandwidth, allocate |
---|
342 | 317 | * Out parameters: channel, bandwidth |
---|
| 318 | + * |
---|
343 | 319 | * This function blocks (sleeps) during communication with the IRM. |
---|
344 | 320 | * |
---|
345 | 321 | * Allocates or deallocates at most one channel out of channels_mask. |
---|