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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/ipmi/ipmi_main.c
          +++ new/usr/src/uts/intel/io/ipmi/ipmi_main.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23      - * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
       23 + * Copyright 2017 Joyent, Inc.
  24   24   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  25   25   */
  26   26  
  27   27  /*
  28   28   * The ipmi driver is an openipmi compatible IPMI driver based on the FreeBSD
  29   29   * driver.
  30   30   *
  31   31   * The current implementation has several limitations:
  32   32   * 1) It only does discovery through the SMBIOS.  The FreeBSD driver has
  33   33   *    several additional ways to discover the IPMI device (acpi, bus checking,
↓ open down ↓ 419 lines elided ↑ open up ↑
 453  453          if ((dev = lookup_ipmidev_by_dev(dv)) == NULL)
 454  454                  return (ENODEV);
 455  455  
 456  456          if (events & (POLLIN | POLLRDNORM)) {
 457  457                  if (!TAILQ_EMPTY(&dev->ipmi_completed_requests))
 458  458                          revent |= events & (POLLIN | POLLRDNORM);
 459  459                  if (dev->ipmi_requests == 0)
 460  460                          revent |= POLLERR;
 461  461          }
 462  462  
 463      -        if (revent == 0) {
 464      -                /* nothing has occurred */
 465      -                if (!anyyet)
 466      -                        *phpp = dev->ipmi_pollhead;
      463 +        if ((revent == 0 && !anyyet) || (events & POLLET)) {
      464 +                *phpp = dev->ipmi_pollhead;
 467  465          }
 468  466  
 469  467          *reventsp = revent;
 470  468          return (0);
 471  469  }
 472  470  
 473  471  /*ARGSUSED*/
 474  472  static int
 475  473  ipmi_info(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **resultp)
 476  474  {
↓ open down ↓ 170 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX