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


 166         pciide_detach,          /* detach */
 167         nodev,                  /* reset */
 168         (struct cb_ops *)0,     /* driver operations */
 169         &pciide_bus_ops,    /* bus operations */
 170         NULL,                   /* power */
 171         ddi_quiesce_not_needed,         /* quiesce */
 172 };
 173 
 174 /*
 175  * Module linkage information for the kernel.
 176  */
 177 
 178 static struct modldrv modldrv = {
 179         &mod_driverops, /* Type of module.  This is PCI-IDE bus driver */
 180         "pciide nexus driver for 'PCI-IDE' 1.26",
 181         &pciide_ops,        /* driver ops */
 182 };
 183 
 184 static struct modlinkage modlinkage = {
 185         MODREV_1,
 186         &modldrv,
 187         NULL
 188 };
 189 
 190 
 191 int
 192 _init(void)
 193 {
 194         return (mod_install(&modlinkage));
 195 }
 196 
 197 int
 198 _fini(void)
 199 {
 200         return (mod_remove(&modlinkage));
 201 }
 202 
 203 int
 204 _info(struct modinfo *modinfop)
 205 {
 206         return (mod_info(&modlinkage, modinfop));
 207 }


 967  *      where: Px is the primary tuples, Sx the secondary tuples, and
 968  *      B the Bus Master tuple.
 969  *
 970  *      Here's the results for each of the four states:
 971  *
 972  *              0, 1, 2, 3, 4
 973  *
 974  *      CC      1, 2, 3, 4, 0
 975  *      CN      3, 4, 0, 1, 2
 976  *      NC      0, 1, 3, 4, 2
 977  *      NN      0, 1, 2, 3, 4
 978  *
 979  *      C = compatible(!native) == 0
 980  *      N = native == 1
 981  *
 982  *      Here's the transformation matrix:
 983  */
 984 
 985 static  int     pciide_transform[2][2][5] = {
 986 /*  P  S  */
 987 /* [C][C] */    +1, +1, +1, +1, -4,
 988 /* [C][N] */    +3, +3, -2, -2, -2,
 989 /* [N][C] */    +0, +0, +1, +1, -2,
 990 /* [N][N] */    +0, +0, +0, +0, +0
 991 };
 992 
 993 
 994 static int
 995 pciide_map_rnumber(int rnumber, int pri_native, int sec_native)
 996 {
 997         /* transform flags into indexes */
 998         pri_native = pri_native ? 1 : 0;
 999         sec_native = sec_native ? 1 : 0;
1000 
1001         rnumber += pciide_transform[pri_native][sec_native][rnumber];
1002         return (rnumber);
1003 }


 166         pciide_detach,          /* detach */
 167         nodev,                  /* reset */
 168         (struct cb_ops *)0,     /* driver operations */
 169         &pciide_bus_ops,    /* bus operations */
 170         NULL,                   /* power */
 171         ddi_quiesce_not_needed,         /* quiesce */
 172 };
 173 
 174 /*
 175  * Module linkage information for the kernel.
 176  */
 177 
 178 static struct modldrv modldrv = {
 179         &mod_driverops, /* Type of module.  This is PCI-IDE bus driver */
 180         "pciide nexus driver for 'PCI-IDE' 1.26",
 181         &pciide_ops,        /* driver ops */
 182 };
 183 
 184 static struct modlinkage modlinkage = {
 185         MODREV_1,
 186         { &modldrv, NULL }

 187 };
 188 
 189 
 190 int
 191 _init(void)
 192 {
 193         return (mod_install(&modlinkage));
 194 }
 195 
 196 int
 197 _fini(void)
 198 {
 199         return (mod_remove(&modlinkage));
 200 }
 201 
 202 int
 203 _info(struct modinfo *modinfop)
 204 {
 205         return (mod_info(&modlinkage, modinfop));
 206 }


 966  *      where: Px is the primary tuples, Sx the secondary tuples, and
 967  *      B the Bus Master tuple.
 968  *
 969  *      Here's the results for each of the four states:
 970  *
 971  *              0, 1, 2, 3, 4
 972  *
 973  *      CC      1, 2, 3, 4, 0
 974  *      CN      3, 4, 0, 1, 2
 975  *      NC      0, 1, 3, 4, 2
 976  *      NN      0, 1, 2, 3, 4
 977  *
 978  *      C = compatible(!native) == 0
 979  *      N = native == 1
 980  *
 981  *      Here's the transformation matrix:
 982  */
 983 
 984 static  int     pciide_transform[2][2][5] = {
 985 /*  P  S  */
 986 /* [C][C] */    {   { +1, +1, +1, +1, -4 },
 987 /* [C][N] */        { +3, +3, -2, -2, -2 } },
 988 /* [N][C] */    {   { +0, +0, +1, +1, -2 },
 989 /* [N][N] */        { +0, +0, +0, +0, +0 } }
 990 };
 991 
 992 
 993 static int
 994 pciide_map_rnumber(int rnumber, int pri_native, int sec_native)
 995 {
 996         /* transform flags into indexes */
 997         pri_native = pri_native ? 1 : 0;
 998         sec_native = sec_native ? 1 : 0;
 999 
1000         rnumber += pciide_transform[pri_native][sec_native][rnumber];
1001         return (rnumber);
1002 }