Print this page
8634 epoll fails to wake on certain edge-triggered conditions
8635 epoll should not emit POLLNVAL
8636 recursive epoll should emit EPOLLRDNORM
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>


   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.

  25  */
  26 
  27 #ifndef _SYS_1394_TARGETS_DCAM1394_DCAM_H
  28 #define _SYS_1394_TARGETS_DCAM1394_DCAM_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #include <sys/modctl.h>
  33 #include <sys/ksynch.h>
  34 #include <sys/types.h>
  35 #include <sys/dditypes.h>
  36 #include <sys/1394/t1394.h>
  37 #include <sys/dcam/dcam1394_io.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 #define ILP32_PTR_SIZE  4       /* caller's data model type     */
  44 #define LP64_PTR_SIZE   8
  45 
  46 #define DCAM_POWER_OFF  0       /* power management state       */
  47 #define DCAM_POWER_ON   1
  48 
  49 #define DCAM1394_MINOR_CTRL     0x80            /* this is the control device */
  50 
  51 #define DCAM1394_FLAG_ATTACH_COMPLETE   0x1  /* dcam_attach() is complete */


 103         t1394_attachinfo_t              attachinfo;
 104         t1394_targetinfo_t              targetinfo;
 105         t1394_isoch_singleinfo_t        sii;
 106         t1394_isoch_single_out_t        sii_output_args;
 107         t1394_isoch_single_handle_t     sii_hdl;
 108         t1394_isoch_dma_handle_t        isoch_handle;
 109         kmutex_t                        softc_mutex;
 110         kmutex_t                        dcam_frame_is_done_mutex;
 111         dcam1394_param_attr_t           param_attr;
 112 
 113         ixl1394_command_t               *ixlp;
 114 
 115         ring_buff_t                     *ring_buff_p;
 116         unsigned int                    seq_count;
 117         uint_t                          reader_flags[MAX_NUM_READ_PTRS];
 118         uint_t                          flags;
 119         int                             cur_vid_mode;
 120         int                             cur_frame_rate;
 121         int                             cur_ring_buff_capacity;
 122         int                             param_status;
 123         struct pollhead                 dcam_pollhead;
 124         int                             camera_online;
 125         int                             pm_open_count;
 126         int                             pm_cable_power;
 127         int                             suspended;
 128         ddi_callback_id_t               event_id;
 129 } dcam_state_t;
 130 
 131 int _init(void);
 132 int _info(struct modinfo *modinfop);
 133 int _fini(void);
 134 
 135 int dcam_attach(dev_info_t *dip, ddi_attach_cmd_t cmd);
 136 int dcam_power(dev_info_t *dip, int component, int level);
 137 int dcam_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result);
 138 int dcam_identify(dev_info_t *dip);
 139 int dcam_detach(dev_info_t *dip, ddi_detach_cmd_t cmd);
 140 int dcam_open(dev_t *devp, int flag, int otyp, cred_t *credp);
 141 int dcam_close(dev_t dev, int flags, int otyp, cred_t *credp);
 142 int dcam_read(dev_t dev, struct uio *uio, cred_t *credp);
 143 int dcam_write(dev_t dev, struct uio *uio, cred_t *credp);




   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright 2017 Joyent, Inc.
  26  */
  27 
  28 #ifndef _SYS_1394_TARGETS_DCAM1394_DCAM_H
  29 #define _SYS_1394_TARGETS_DCAM1394_DCAM_H
  30 


  31 #include <sys/modctl.h>
  32 #include <sys/ksynch.h>
  33 #include <sys/types.h>
  34 #include <sys/dditypes.h>
  35 #include <sys/1394/t1394.h>
  36 #include <sys/dcam/dcam1394_io.h>
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 #define ILP32_PTR_SIZE  4       /* caller's data model type     */
  43 #define LP64_PTR_SIZE   8
  44 
  45 #define DCAM_POWER_OFF  0       /* power management state       */
  46 #define DCAM_POWER_ON   1
  47 
  48 #define DCAM1394_MINOR_CTRL     0x80            /* this is the control device */
  49 
  50 #define DCAM1394_FLAG_ATTACH_COMPLETE   0x1  /* dcam_attach() is complete */


 102         t1394_attachinfo_t              attachinfo;
 103         t1394_targetinfo_t              targetinfo;
 104         t1394_isoch_singleinfo_t        sii;
 105         t1394_isoch_single_out_t        sii_output_args;
 106         t1394_isoch_single_handle_t     sii_hdl;
 107         t1394_isoch_dma_handle_t        isoch_handle;
 108         kmutex_t                        softc_mutex;
 109         kmutex_t                        dcam_frame_is_done_mutex;
 110         dcam1394_param_attr_t           param_attr;
 111 
 112         ixl1394_command_t               *ixlp;
 113 
 114         ring_buff_t                     *ring_buff_p;
 115         unsigned int                    seq_count;
 116         uint_t                          reader_flags[MAX_NUM_READ_PTRS];
 117         uint_t                          flags;
 118         int                             cur_vid_mode;
 119         int                             cur_frame_rate;
 120         int                             cur_ring_buff_capacity;
 121         int                             param_status;

 122         int                             camera_online;
 123         int                             pm_open_count;
 124         int                             pm_cable_power;
 125         int                             suspended;
 126         ddi_callback_id_t               event_id;
 127 } dcam_state_t;
 128 
 129 int _init(void);
 130 int _info(struct modinfo *modinfop);
 131 int _fini(void);
 132 
 133 int dcam_attach(dev_info_t *dip, ddi_attach_cmd_t cmd);
 134 int dcam_power(dev_info_t *dip, int component, int level);
 135 int dcam_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result);
 136 int dcam_identify(dev_info_t *dip);
 137 int dcam_detach(dev_info_t *dip, ddi_detach_cmd_t cmd);
 138 int dcam_open(dev_t *devp, int flag, int otyp, cred_t *credp);
 139 int dcam_close(dev_t dev, int flags, int otyp, cred_t *credp);
 140 int dcam_read(dev_t dev, struct uio *uio, cred_t *credp);
 141 int dcam_write(dev_t dev, struct uio *uio, cred_t *credp);