Print this page
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/targets/sd.c
          +++ new/usr/src/uts/common/io/scsi/targets/sd.c
↓ open down ↓ 255 lines elided ↑ open up ↑
 256  256   */
 257  257  uint_t  sd_component_mask               = 0x0;
 258  258  uint_t  sd_level_mask                   = 0x0;
 259  259  struct  sd_lun *sd_debug_un             = NULL;
 260  260  uint_t  sd_error_level                  = SCSI_ERR_RETRYABLE;
 261  261  
 262  262  /* Note: these may go away in the future... */
 263  263  static uint32_t sd_xbuf_active_limit    = 512;
 264  264  static uint32_t sd_xbuf_reserve_limit   = 16;
 265  265  
 266      -static struct sd_resv_reclaim_request   sd_tr = { NULL, NULL, NULL, 0, 0, 0 };
      266 +static struct sd_resv_reclaim_request   sd_tr = { NULL, NULL, NULL, {0} };
 267  267  
 268  268  /*
 269  269   * Timer value used to reset the throttle after it has been reduced
 270  270   * (typically in response to TRAN_BUSY or STATUS_QFULL)
 271  271   */
 272  272  static int sd_reset_throttle_timeout    = SD_RESET_THROTTLE_TIMEOUT;
 273  273  static int sd_qfull_throttle_timeout    = SD_QFULL_THROTTLE_TIMEOUT;
 274  274  
 275  275  /*
 276  276   * Interval value associated with the media change scsi watch.
↓ open down ↓ 550 lines elided ↑ open up ↑
 827  827          (((un)->un_interconnect_type == SD_INTERCONNECT_SATA) ||\
 828  828          ((un)->un_interconnect_type == SD_INTERCONNECT_SAS))
 829  829  
 830  830  /*
 831  831   * Definitions used by device id registration routines
 832  832   */
 833  833  #define VPD_HEAD_OFFSET         3       /* size of head for vpd page */
 834  834  #define VPD_PAGE_LENGTH         3       /* offset for pge length data */
 835  835  #define VPD_MODE_PAGE           1       /* offset into vpd pg for "page code" */
 836  836  
 837      -static kmutex_t sd_sense_mutex = {0};
      837 +static kmutex_t sd_sense_mutex = {{NULL}};
 838  838  
 839  839  /*
 840  840   * Macros for updates of the driver state
 841  841   */
 842  842  #define New_state(un, s)        \
 843  843          (un)->un_last_state = (un)->un_state, (un)->un_state = (s)
 844  844  #define Restore_state(un)       \
 845  845          { uchar_t tmp = (un)->un_last_state; New_state((un), tmp); }
 846  846  
 847  847  static struct sd_cdbinfo sd_cdbtab[] = {
↓ open down ↓ 916 lines elided ↑ open up ↑
1764 1764  #include <sys/modctl.h>
1765 1765  
1766 1766  #ifndef XPV_HVM_DRIVER
1767 1767  static struct modldrv modldrv = {
1768 1768          &mod_driverops,         /* Type of module. This one is a driver */
1769 1769          SD_MODULE_NAME,         /* Module name. */
1770 1770          &sd_ops                 /* driver ops */
1771 1771  };
1772 1772  
1773 1773  static struct modlinkage modlinkage = {
1774      -        MODREV_1, &modldrv, NULL
     1774 +        MODREV_1, { &modldrv, NULL }
1775 1775  };
1776 1776  
1777 1777  #else /* XPV_HVM_DRIVER */
1778 1778  static struct modlmisc modlmisc = {
1779 1779          &mod_miscops,           /* Type of module. This one is a misc */
1780 1780          "HVM " SD_MODULE_NAME,          /* Module name. */
1781 1781  };
1782 1782  
1783 1783  static struct modlinkage modlinkage = {
1784      -        MODREV_1, &modlmisc, NULL
     1784 +        MODREV_1, { &modlmisc, NULL }
1785 1785  };
1786 1786  
1787 1787  #endif /* XPV_HVM_DRIVER */
1788 1788  
1789 1789  static cmlb_tg_ops_t sd_tgops = {
1790 1790          TG_DK_OPS_VERSION_1,
1791 1791          sd_tg_rdwr,
1792 1792          sd_tg_getinfo
1793 1793  };
1794 1794  
1795 1795  static struct scsi_asq_key_strings sd_additional_codes[] = {
1796      -        0x81, 0, "Logical Unit is Reserved",
1797      -        0x85, 0, "Audio Address Not Valid",
1798      -        0xb6, 0, "Media Load Mechanism Failed",
1799      -        0xB9, 0, "Audio Play Operation Aborted",
1800      -        0xbf, 0, "Buffer Overflow for Read All Subcodes Command",
1801      -        0x53, 2, "Medium removal prevented",
1802      -        0x6f, 0, "Authentication failed during key exchange",
1803      -        0x6f, 1, "Key not present",
1804      -        0x6f, 2, "Key not established",
1805      -        0x6f, 3, "Read without proper authentication",
1806      -        0x6f, 4, "Mismatched region to this logical unit",
1807      -        0x6f, 5, "Region reset count error",
1808      -        0xffff, 0x0, NULL
     1796 +        { 0x81, 0, "Logical Unit is Reserved" },
     1797 +        { 0x85, 0, "Audio Address Not Valid" },
     1798 +        { 0xb6, 0, "Media Load Mechanism Failed" },
     1799 +        { 0xB9, 0, "Audio Play Operation Aborted" },
     1800 +        { 0xbf, 0, "Buffer Overflow for Read All Subcodes Command" },
     1801 +        { 0x53, 2, "Medium removal prevented" },
     1802 +        { 0x6f, 0, "Authentication failed during key exchange" },
     1803 +        { 0x6f, 1, "Key not present" },
     1804 +        { 0x6f, 2, "Key not established" },
     1805 +        { 0x6f, 3, "Read without proper authentication" },
     1806 +        { 0x6f, 4, "Mismatched region to this logical unit" },
     1807 +        { 0x6f, 5, "Region reset count error" },
     1808 +        { 0xffff, 0x0, NULL }
1809 1809  };
1810 1810  
1811 1811  
1812 1812  /*
1813 1813   * Struct for passing printing information for sense data messages
1814 1814   */
1815 1815  struct sd_sense_info {
1816 1816          int     ssi_severity;
1817 1817          int     ssi_pfa_flag;
1818 1818  };
↓ open down ↓ 30002 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX