On 11/16/2017 03:12 PM, Brian King wrote: > This fixes a regression that was introduced which broke the > iprconfig option to download microcode to all devices.
Wendy, Can you try this as an alternate fix? It prevents us from having to duplicate some code. Thanks, Brian > > Fixes: bcfcda764d10 ("iprutils: Fix iprconfig dump option to log full IOA > details") > Signed-off-by: Brian King <brk...@linux.vnet.ibm.com> > --- > iprconfig.c | 4 ++-- > iprlib.h | 4 ++++ > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/iprconfig.c b/iprconfig.c > index 11233cf..5da12cc 100644 > --- a/iprconfig.c > +++ b/iprconfig.c > @@ -11842,7 +11842,7 @@ int download_all_ucode(i_container *i_con) > if (!ioa->ioa.scsi_dev_data || ioa->ioa_dead) > continue; > > - for_each_dev (ioa, dev) { > + for_ioa_and_each_dev (ioa, dev) { > if (ipr_is_volume_set(dev)) > continue; > > @@ -15754,7 +15754,7 @@ static int update_all_ucodes(char **args, int > num_args) > for_each_ioa(ioa) { > if (!ioa->ioa.scsi_dev_data) > continue; > - for_each_dev(ioa, dev) { > + for_ioa_and_each_dev(ioa, dev) { > if (ipr_is_volume_set(dev)) > continue; > > diff --git a/iprlib.h b/iprlib.h > index 4fe9823..f715522 100644 > --- a/iprlib.h > +++ b/iprlib.h > @@ -1594,6 +1594,10 @@ struct ipr_ioa { > > #define for_each_dev(i, d) for (d = (i)->dev; (d - (i)->dev) < > (i)->num_devices; d++) > > +#define for_ioa_and_each_dev(i, d) for (d = &((i)->ioa); \ > + (d == &((i)->ioa)) || ((d - (i)->dev) > < (i)->num_devices); \ > + d = (d == &((i)->ioa)) ? (i)->dev : d > + 1) > + > #define for_each_hotplug_dev(i, d) \ > for_each_dev(i, d) \ > if (ipr_is_af_dasd_device(d) || ipr_is_gscsi(d)) > -- Brian King Power Linux I/O IBM Linux Technology Center ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel