RE: [PATCH v4 06/19] IB/core: Add max_mad_size to ib_device_attr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > diff --git a/drivers/infiniband/core/mad.c
> > b/drivers/infiniband/core/mad.c index 819b794..a6a33cf 100644
> > --- a/drivers/infiniband/core/mad.c
> > +++ b/drivers/infiniband/core/mad.c
> > @@ -2924,6 +2924,12 @@ static int ib_mad_port_open(struct ib_device
> *device,
> >  	char name[sizeof "ib_mad123"];
> >  	int has_smi;
> >
> > +	if (device->cached_dev_attrs.max_mad_size < IB_MGMT_MAD_SIZE) {
> > +		dev_err(&device->dev, "Min MAD size for device is %u\n",
> > +			IB_MGMT_MAD_SIZE);
> > +		return -EFAULT;
> > +	}
> > +
> 
> The printk message here is not very informative and it qualifies as an error.
> Someone reading that for the first time in the dmesg output and wondering
> why their device isn't working will be confused if they don't know about the
> mad size changes you are making here.  Something like "max supported MAD
> size (%u) < min required by ib_mad (%u), ignoring dev \n"

Good suggestion.

Fixed for v5 with this message.

+               dev_err(&device->dev,
+                       "Max supported MAD size (%u) < min required by ib_mad (%u), ignoring device (%s)\n",
+                       device->cached_dev_attrs.max_mad_size,
+                       IB_MGMT_MAD_SIZE, device->name);


Ira

��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux