Lines Matching defs:port_fd
84 int port_fd; /* >= 0 when using /dev/port */
118 if (p->port_fd >= 0)
120 if ((u_long) lseek (p->port_fd, addr, SEEK_SET) != addr)
122 if (write (p->port_fd, &val, 1) != 1)
134 if (p->port_fd >= 0)
136 if ((u_long) lseek (p->port_fd, addr, SEEK_SET) != addr)
138 if (read (p->port_fd, &ch, 1) != 1)
283 if (port[i].port_fd < 0)
284 port[i].port_fd = open (PORT_DEV, O_RDWR);
285 if (port[i].port_fd < 0)
289 if (lseek (port[i].port_fd, AB306_CIO, SEEK_SET) != AB306_CIO)
294 if (write (port[i].port_fd, &byte, 1) != 1)
328 if (p->port_fd >= 0)
330 close (p->port_fd);
331 p->port_fd = -1;
342 if (port[fd].port_fd < 0)
453 if (p->port_fd >= 0)
458 if ((u_long) lseek (p->port_fd, p->base, SEEK_SET) != p->base)
460 if (read (p->port_fd, buf, 1) != 1)