blob: f7eb4c54a3545616e1f4148eaa219db8431735ba [file] [log] [blame]
Hans Verkuilca684382016-06-25 09:44:43 -03001/*
2 * cec-api.c - HDMI Consumer Electronics Control framework - API
3 *
4 * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
5 *
6 * This program is free software; you may redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
14 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
15 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17 * SOFTWARE.
18 */
19
20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/module.h>
23#include <linux/kernel.h>
24#include <linux/kmod.h>
25#include <linux/ktime.h>
26#include <linux/slab.h>
27#include <linux/mm.h>
28#include <linux/string.h>
29#include <linux/types.h>
30#include <linux/uaccess.h>
31#include <linux/version.h>
32
33#include "cec-priv.h"
34
35static inline struct cec_devnode *cec_devnode_data(struct file *filp)
36{
37 struct cec_fh *fh = filp->private_data;
38
39 return &fh->adap->devnode;
40}
41
42/* CEC file operations */
43
44static unsigned int cec_poll(struct file *filp,
45 struct poll_table_struct *poll)
46{
47 struct cec_devnode *devnode = cec_devnode_data(filp);
48 struct cec_fh *fh = filp->private_data;
49 struct cec_adapter *adap = fh->adap;
50 unsigned int res = 0;
51
52 if (!devnode->registered)
53 return POLLERR | POLLHUP;
54 mutex_lock(&adap->lock);
Hans Verkuilb7cbc892016-07-17 13:02:44 -030055 if (adap->is_configured &&
56 adap->transmit_queue_sz < CEC_MAX_MSG_TX_QUEUE_SZ)
Hans Verkuilca684382016-06-25 09:44:43 -030057 res |= POLLOUT | POLLWRNORM;
58 if (fh->queued_msgs)
59 res |= POLLIN | POLLRDNORM;
60 if (fh->pending_events)
61 res |= POLLPRI;
62 poll_wait(filp, &fh->wait, poll);
63 mutex_unlock(&adap->lock);
64 return res;
65}
66
67static bool cec_is_busy(const struct cec_adapter *adap,
68 const struct cec_fh *fh)
69{
70 bool valid_initiator = adap->cec_initiator && adap->cec_initiator == fh;
71 bool valid_follower = adap->cec_follower && adap->cec_follower == fh;
72
73 /*
74 * Exclusive initiators and followers can always access the CEC adapter
75 */
76 if (valid_initiator || valid_follower)
77 return false;
78 /*
79 * All others can only access the CEC adapter if there is no
80 * exclusive initiator and they are in INITIATOR mode.
81 */
82 return adap->cec_initiator ||
83 fh->mode_initiator == CEC_MODE_NO_INITIATOR;
84}
85
86static long cec_adap_g_caps(struct cec_adapter *adap,
87 struct cec_caps __user *parg)
88{
89 struct cec_caps caps = {};
90
Hans Verkuilf51e8082016-11-25 06:23:34 -020091 strlcpy(caps.driver, adap->devnode.dev.parent->driver->name,
Hans Verkuilca684382016-06-25 09:44:43 -030092 sizeof(caps.driver));
93 strlcpy(caps.name, adap->name, sizeof(caps.name));
94 caps.available_log_addrs = adap->available_log_addrs;
95 caps.capabilities = adap->capabilities;
96 caps.version = LINUX_VERSION_CODE;
97 if (copy_to_user(parg, &caps, sizeof(caps)))
98 return -EFAULT;
99 return 0;
100}
101
102static long cec_adap_g_phys_addr(struct cec_adapter *adap,
103 __u16 __user *parg)
104{
105 u16 phys_addr;
106
107 mutex_lock(&adap->lock);
108 phys_addr = adap->phys_addr;
109 mutex_unlock(&adap->lock);
110 if (copy_to_user(parg, &phys_addr, sizeof(phys_addr)))
111 return -EFAULT;
112 return 0;
113}
114
115static long cec_adap_s_phys_addr(struct cec_adapter *adap, struct cec_fh *fh,
116 bool block, __u16 __user *parg)
117{
118 u16 phys_addr;
119 long err;
120
121 if (!(adap->capabilities & CEC_CAP_PHYS_ADDR))
122 return -ENOTTY;
123 if (copy_from_user(&phys_addr, parg, sizeof(phys_addr)))
124 return -EFAULT;
125
126 err = cec_phys_addr_validate(phys_addr, NULL, NULL);
127 if (err)
128 return err;
129 mutex_lock(&adap->lock);
130 if (cec_is_busy(adap, fh))
131 err = -EBUSY;
132 else
133 __cec_s_phys_addr(adap, phys_addr, block);
134 mutex_unlock(&adap->lock);
135 return err;
136}
137
138static long cec_adap_g_log_addrs(struct cec_adapter *adap,
139 struct cec_log_addrs __user *parg)
140{
141 struct cec_log_addrs log_addrs;
142
143 mutex_lock(&adap->lock);
144 log_addrs = adap->log_addrs;
145 if (!adap->is_configured)
146 memset(log_addrs.log_addr, CEC_LOG_ADDR_INVALID,
147 sizeof(log_addrs.log_addr));
148 mutex_unlock(&adap->lock);
149
150 if (copy_to_user(parg, &log_addrs, sizeof(log_addrs)))
151 return -EFAULT;
152 return 0;
153}
154
155static long cec_adap_s_log_addrs(struct cec_adapter *adap, struct cec_fh *fh,
156 bool block, struct cec_log_addrs __user *parg)
157{
158 struct cec_log_addrs log_addrs;
159 long err = -EBUSY;
160
161 if (!(adap->capabilities & CEC_CAP_LOG_ADDRS))
162 return -ENOTTY;
163 if (copy_from_user(&log_addrs, parg, sizeof(log_addrs)))
164 return -EFAULT;
Hans Verkuilf4062622016-11-01 07:59:34 -0200165 log_addrs.flags &= CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK |
Hans Verkuila69a1682016-11-02 07:41:41 -0200166 CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU |
167 CEC_LOG_ADDRS_FL_CDC_ONLY;
Hans Verkuilca684382016-06-25 09:44:43 -0300168 mutex_lock(&adap->lock);
169 if (!adap->is_configuring &&
170 (!log_addrs.num_log_addrs || !adap->is_configured) &&
171 !cec_is_busy(adap, fh)) {
172 err = __cec_s_log_addrs(adap, &log_addrs, block);
173 if (!err)
174 log_addrs = adap->log_addrs;
175 }
176 mutex_unlock(&adap->lock);
177 if (err)
178 return err;
179 if (copy_to_user(parg, &log_addrs, sizeof(log_addrs)))
180 return -EFAULT;
181 return 0;
182}
183
184static long cec_transmit(struct cec_adapter *adap, struct cec_fh *fh,
185 bool block, struct cec_msg __user *parg)
186{
187 struct cec_msg msg = {};
188 long err = 0;
189
190 if (!(adap->capabilities & CEC_CAP_TRANSMIT))
191 return -ENOTTY;
192 if (copy_from_user(&msg, parg, sizeof(msg)))
193 return -EFAULT;
Hans Verkuila69a1682016-11-02 07:41:41 -0200194
195 /* A CDC-Only device can only send CDC messages */
196 if ((adap->log_addrs.flags & CEC_LOG_ADDRS_FL_CDC_ONLY) &&
197 (msg.len == 1 || msg.msg[1] != CEC_MSG_CDC_MESSAGE))
198 return -EINVAL;
199
Hans Verkuilca684382016-06-25 09:44:43 -0300200 mutex_lock(&adap->lock);
Hans Verkuil059d1462017-02-27 09:18:35 -0300201 if (adap->log_addrs.num_log_addrs == 0)
202 err = -EPERM;
203 else if (adap->is_configuring)
Hans Verkuil533a3f72017-02-10 13:02:31 -0200204 err = -ENONET;
Hans Verkuilf902c1e2017-06-07 11:46:12 -0300205 else if (!adap->is_configured &&
206 (adap->needs_hpd || msg.msg[0] != 0xf0))
Hans Verkuilca684382016-06-25 09:44:43 -0300207 err = -ENONET;
Hans Verkuil4eef4042016-07-16 09:59:18 -0300208 else if (cec_is_busy(adap, fh))
Hans Verkuilca684382016-06-25 09:44:43 -0300209 err = -EBUSY;
Hans Verkuil4eef4042016-07-16 09:59:18 -0300210 else
Hans Verkuilca684382016-06-25 09:44:43 -0300211 err = cec_transmit_msg_fh(adap, &msg, fh, block);
Hans Verkuilca684382016-06-25 09:44:43 -0300212 mutex_unlock(&adap->lock);
213 if (err)
214 return err;
215 if (copy_to_user(parg, &msg, sizeof(msg)))
216 return -EFAULT;
217 return 0;
218}
219
220/* Called by CEC_RECEIVE: wait for a message to arrive */
221static int cec_receive_msg(struct cec_fh *fh, struct cec_msg *msg, bool block)
222{
Hans Verkuile883b4d2016-07-16 07:58:31 -0300223 u32 timeout = msg->timeout;
Hans Verkuilca684382016-06-25 09:44:43 -0300224 int res;
225
226 do {
227 mutex_lock(&fh->lock);
228 /* Are there received messages queued up? */
229 if (fh->queued_msgs) {
230 /* Yes, return the first one */
231 struct cec_msg_entry *entry =
232 list_first_entry(&fh->msgs,
233 struct cec_msg_entry, list);
234
235 list_del(&entry->list);
236 *msg = entry->msg;
237 kfree(entry);
238 fh->queued_msgs--;
239 mutex_unlock(&fh->lock);
Hans Verkuile883b4d2016-07-16 07:58:31 -0300240 /* restore original timeout value */
241 msg->timeout = timeout;
Hans Verkuilca684382016-06-25 09:44:43 -0300242 return 0;
243 }
244
245 /* No, return EAGAIN in non-blocking mode or wait */
246 mutex_unlock(&fh->lock);
247
248 /* Return when in non-blocking mode */
249 if (!block)
250 return -EAGAIN;
251
252 if (msg->timeout) {
253 /* The user specified a timeout */
254 res = wait_event_interruptible_timeout(fh->wait,
255 fh->queued_msgs,
256 msecs_to_jiffies(msg->timeout));
257 if (res == 0)
258 res = -ETIMEDOUT;
259 else if (res > 0)
260 res = 0;
261 } else {
262 /* Wait indefinitely */
263 res = wait_event_interruptible(fh->wait,
264 fh->queued_msgs);
265 }
266 /* Exit on error, otherwise loop to get the new message */
267 } while (!res);
268 return res;
269}
270
271static long cec_receive(struct cec_adapter *adap, struct cec_fh *fh,
272 bool block, struct cec_msg __user *parg)
273{
274 struct cec_msg msg = {};
Hans Verkuilb94aac62017-06-07 12:07:51 -0300275 long err;
Hans Verkuilca684382016-06-25 09:44:43 -0300276
277 if (copy_from_user(&msg, parg, sizeof(msg)))
278 return -EFAULT;
Hans Verkuilca684382016-06-25 09:44:43 -0300279
280 err = cec_receive_msg(fh, &msg, block);
281 if (err)
282 return err;
Hans Verkuil7ae2a882016-11-04 07:52:11 -0200283 msg.flags = 0;
Hans Verkuilca684382016-06-25 09:44:43 -0300284 if (copy_to_user(parg, &msg, sizeof(msg)))
285 return -EFAULT;
286 return 0;
287}
288
289static long cec_dqevent(struct cec_adapter *adap, struct cec_fh *fh,
290 bool block, struct cec_event __user *parg)
291{
292 struct cec_event *ev = NULL;
293 u64 ts = ~0ULL;
294 unsigned int i;
295 long err = 0;
296
297 mutex_lock(&fh->lock);
298 while (!fh->pending_events && block) {
299 mutex_unlock(&fh->lock);
300 err = wait_event_interruptible(fh->wait, fh->pending_events);
301 if (err)
302 return err;
303 mutex_lock(&fh->lock);
304 }
305
306 /* Find the oldest event */
307 for (i = 0; i < CEC_NUM_EVENTS; i++) {
308 if (fh->pending_events & (1 << (i + 1)) &&
309 fh->events[i].ts <= ts) {
310 ev = &fh->events[i];
311 ts = ev->ts;
312 }
313 }
314 if (!ev) {
315 err = -EAGAIN;
316 goto unlock;
317 }
318
319 if (copy_to_user(parg, ev, sizeof(*ev))) {
320 err = -EFAULT;
321 goto unlock;
322 }
323
324 fh->pending_events &= ~(1 << ev->event);
325
326unlock:
327 mutex_unlock(&fh->lock);
328 return err;
329}
330
331static long cec_g_mode(struct cec_adapter *adap, struct cec_fh *fh,
332 u32 __user *parg)
333{
334 u32 mode = fh->mode_initiator | fh->mode_follower;
335
336 if (copy_to_user(parg, &mode, sizeof(mode)))
337 return -EFAULT;
338 return 0;
339}
340
341static long cec_s_mode(struct cec_adapter *adap, struct cec_fh *fh,
342 u32 __user *parg)
343{
344 u32 mode;
345 u8 mode_initiator;
346 u8 mode_follower;
347 long err = 0;
348
349 if (copy_from_user(&mode, parg, sizeof(mode)))
350 return -EFAULT;
351 if (mode & ~(CEC_MODE_INITIATOR_MSK | CEC_MODE_FOLLOWER_MSK))
352 return -EINVAL;
353
354 mode_initiator = mode & CEC_MODE_INITIATOR_MSK;
355 mode_follower = mode & CEC_MODE_FOLLOWER_MSK;
356
357 if (mode_initiator > CEC_MODE_EXCL_INITIATOR ||
358 mode_follower > CEC_MODE_MONITOR_ALL)
359 return -EINVAL;
360
361 if (mode_follower == CEC_MODE_MONITOR_ALL &&
362 !(adap->capabilities & CEC_CAP_MONITOR_ALL))
363 return -EINVAL;
364
365 /* Follower modes should always be able to send CEC messages */
366 if ((mode_initiator == CEC_MODE_NO_INITIATOR ||
367 !(adap->capabilities & CEC_CAP_TRANSMIT)) &&
368 mode_follower >= CEC_MODE_FOLLOWER &&
369 mode_follower <= CEC_MODE_EXCL_FOLLOWER_PASSTHRU)
370 return -EINVAL;
371
372 /* Monitor modes require CEC_MODE_NO_INITIATOR */
373 if (mode_initiator && mode_follower >= CEC_MODE_MONITOR)
374 return -EINVAL;
375
376 /* Monitor modes require CAP_NET_ADMIN */
377 if (mode_follower >= CEC_MODE_MONITOR && !capable(CAP_NET_ADMIN))
378 return -EPERM;
379
380 mutex_lock(&adap->lock);
381 /*
382 * You can't become exclusive follower if someone else already
383 * has that job.
384 */
385 if ((mode_follower == CEC_MODE_EXCL_FOLLOWER ||
386 mode_follower == CEC_MODE_EXCL_FOLLOWER_PASSTHRU) &&
387 adap->cec_follower && adap->cec_follower != fh)
388 err = -EBUSY;
389 /*
390 * You can't become exclusive initiator if someone else already
391 * has that job.
392 */
393 if (mode_initiator == CEC_MODE_EXCL_INITIATOR &&
394 adap->cec_initiator && adap->cec_initiator != fh)
395 err = -EBUSY;
396
397 if (!err) {
398 bool old_mon_all = fh->mode_follower == CEC_MODE_MONITOR_ALL;
399 bool new_mon_all = mode_follower == CEC_MODE_MONITOR_ALL;
400
401 if (old_mon_all != new_mon_all) {
402 if (new_mon_all)
403 err = cec_monitor_all_cnt_inc(adap);
404 else
405 cec_monitor_all_cnt_dec(adap);
406 }
407 }
408
409 if (err) {
410 mutex_unlock(&adap->lock);
411 return err;
412 }
413
414 if (fh->mode_follower == CEC_MODE_FOLLOWER)
415 adap->follower_cnt--;
416 if (mode_follower == CEC_MODE_FOLLOWER)
417 adap->follower_cnt++;
418 if (mode_follower == CEC_MODE_EXCL_FOLLOWER ||
419 mode_follower == CEC_MODE_EXCL_FOLLOWER_PASSTHRU) {
420 adap->passthrough =
421 mode_follower == CEC_MODE_EXCL_FOLLOWER_PASSTHRU;
422 adap->cec_follower = fh;
423 } else if (adap->cec_follower == fh) {
424 adap->passthrough = false;
425 adap->cec_follower = NULL;
426 }
427 if (mode_initiator == CEC_MODE_EXCL_INITIATOR)
428 adap->cec_initiator = fh;
429 else if (adap->cec_initiator == fh)
430 adap->cec_initiator = NULL;
431 fh->mode_initiator = mode_initiator;
432 fh->mode_follower = mode_follower;
433 mutex_unlock(&adap->lock);
434 return 0;
435}
436
437static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
438{
439 struct cec_devnode *devnode = cec_devnode_data(filp);
440 struct cec_fh *fh = filp->private_data;
441 struct cec_adapter *adap = fh->adap;
442 bool block = !(filp->f_flags & O_NONBLOCK);
443 void __user *parg = (void __user *)arg;
444
445 if (!devnode->registered)
Hans Verkuil60815d42016-08-24 07:17:22 -0300446 return -ENODEV;
Hans Verkuilca684382016-06-25 09:44:43 -0300447
448 switch (cmd) {
449 case CEC_ADAP_G_CAPS:
450 return cec_adap_g_caps(adap, parg);
451
452 case CEC_ADAP_G_PHYS_ADDR:
453 return cec_adap_g_phys_addr(adap, parg);
454
455 case CEC_ADAP_S_PHYS_ADDR:
456 return cec_adap_s_phys_addr(adap, fh, block, parg);
457
458 case CEC_ADAP_G_LOG_ADDRS:
459 return cec_adap_g_log_addrs(adap, parg);
460
461 case CEC_ADAP_S_LOG_ADDRS:
462 return cec_adap_s_log_addrs(adap, fh, block, parg);
463
464 case CEC_TRANSMIT:
465 return cec_transmit(adap, fh, block, parg);
466
467 case CEC_RECEIVE:
468 return cec_receive(adap, fh, block, parg);
469
470 case CEC_DQEVENT:
471 return cec_dqevent(adap, fh, block, parg);
472
473 case CEC_G_MODE:
474 return cec_g_mode(adap, fh, parg);
475
476 case CEC_S_MODE:
477 return cec_s_mode(adap, fh, parg);
478
479 default:
480 return -ENOTTY;
481 }
482}
483
484static int cec_open(struct inode *inode, struct file *filp)
485{
486 struct cec_devnode *devnode =
487 container_of(inode->i_cdev, struct cec_devnode, cdev);
488 struct cec_adapter *adap = to_cec_adapter(devnode);
489 struct cec_fh *fh = kzalloc(sizeof(*fh), GFP_KERNEL);
490 /*
491 * Initial events that are automatically sent when the cec device is
492 * opened.
493 */
494 struct cec_event ev_state = {
495 .event = CEC_EVENT_STATE_CHANGE,
496 .flags = CEC_EVENT_FL_INITIAL_STATE,
497 };
498 int err;
499
500 if (!fh)
501 return -ENOMEM;
502
503 INIT_LIST_HEAD(&fh->msgs);
504 INIT_LIST_HEAD(&fh->xfer_list);
505 mutex_init(&fh->lock);
506 init_waitqueue_head(&fh->wait);
507
508 fh->mode_initiator = CEC_MODE_INITIATOR;
509 fh->adap = adap;
510
511 err = cec_get_device(devnode);
512 if (err) {
513 kfree(fh);
514 return err;
515 }
516
Hans Verkuil533a3f72017-02-10 13:02:31 -0200517 mutex_lock(&devnode->lock);
518 if (list_empty(&devnode->fhs) &&
Hans Verkuilf902c1e2017-06-07 11:46:12 -0300519 !adap->needs_hpd &&
Hans Verkuil533a3f72017-02-10 13:02:31 -0200520 adap->phys_addr == CEC_PHYS_ADDR_INVALID) {
521 err = adap->ops->adap_enable(adap, true);
522 if (err) {
523 mutex_unlock(&devnode->lock);
524 kfree(fh);
525 return err;
526 }
527 }
Hans Verkuilca684382016-06-25 09:44:43 -0300528 filp->private_data = fh;
529
Hans Verkuilca684382016-06-25 09:44:43 -0300530 /* Queue up initial state events */
531 ev_state.state_change.phys_addr = adap->phys_addr;
532 ev_state.state_change.log_addr_mask = adap->log_addrs.log_addr_mask;
533 cec_queue_event_fh(fh, &ev_state, 0);
534
535 list_add(&fh->list, &devnode->fhs);
Hans Verkuil62148f02016-08-02 08:11:00 -0300536 mutex_unlock(&devnode->lock);
Hans Verkuilca684382016-06-25 09:44:43 -0300537
538 return 0;
539}
540
541/* Override for the release function */
542static int cec_release(struct inode *inode, struct file *filp)
543{
544 struct cec_devnode *devnode = cec_devnode_data(filp);
545 struct cec_adapter *adap = to_cec_adapter(devnode);
546 struct cec_fh *fh = filp->private_data;
547
548 mutex_lock(&adap->lock);
549 if (adap->cec_initiator == fh)
550 adap->cec_initiator = NULL;
551 if (adap->cec_follower == fh) {
552 adap->cec_follower = NULL;
553 adap->passthrough = false;
554 }
555 if (fh->mode_follower == CEC_MODE_FOLLOWER)
556 adap->follower_cnt--;
557 if (fh->mode_follower == CEC_MODE_MONITOR_ALL)
558 cec_monitor_all_cnt_dec(adap);
559 mutex_unlock(&adap->lock);
560
Hans Verkuil62148f02016-08-02 08:11:00 -0300561 mutex_lock(&devnode->lock);
Hans Verkuilca684382016-06-25 09:44:43 -0300562 list_del(&fh->list);
Hans Verkuil533a3f72017-02-10 13:02:31 -0200563 if (list_empty(&devnode->fhs) &&
Hans Verkuilf902c1e2017-06-07 11:46:12 -0300564 !adap->needs_hpd &&
Hans Verkuil533a3f72017-02-10 13:02:31 -0200565 adap->phys_addr == CEC_PHYS_ADDR_INVALID) {
566 WARN_ON(adap->ops->adap_enable(adap, false));
567 }
Hans Verkuil62148f02016-08-02 08:11:00 -0300568 mutex_unlock(&devnode->lock);
Hans Verkuilca684382016-06-25 09:44:43 -0300569
570 /* Unhook pending transmits from this filehandle. */
571 mutex_lock(&adap->lock);
572 while (!list_empty(&fh->xfer_list)) {
573 struct cec_data *data =
574 list_first_entry(&fh->xfer_list, struct cec_data, xfer_list);
575
576 data->blocking = false;
577 data->fh = NULL;
578 list_del(&data->xfer_list);
579 }
580 mutex_unlock(&adap->lock);
581 while (!list_empty(&fh->msgs)) {
582 struct cec_msg_entry *entry =
583 list_first_entry(&fh->msgs, struct cec_msg_entry, list);
584
585 list_del(&entry->list);
586 kfree(entry);
587 }
588 kfree(fh);
589
590 cec_put_device(devnode);
591 filp->private_data = NULL;
592 return 0;
593}
594
595const struct file_operations cec_devnode_fops = {
596 .owner = THIS_MODULE,
597 .open = cec_open,
598 .unlocked_ioctl = cec_ioctl,
599 .release = cec_release,
600 .poll = cec_poll,
601 .llseek = no_llseek,
602};