> +            /* the HT capability type byte is 3 bytes after the
 > +             * capability byte.
 > +             */
 > +            if (pci_read_config_byte(pdev, pos + 3, &cap_type)) {
 > +                    dev_info(&pdev->dev, "Couldn't read config "
 > +                             "command @ %d\n", pos);
 > +                    continue;
 > +            }
 > +            if (!(cap_type & 0xE0)) {

It seems like all these hypertransport magic constants should be in a
general .h somewhere.  I'm not sure if it makes sense to put them in
<linux/pci.h>, or start a <linux/hypertransport.h>.

 > +                            else if (linkctrl & (0xf << 8)) {
 > +                                    ipath_cdbg(
 > +                                            VERBOSE,
 > +                                            "Clear linkctrl%d CRC "
 > +                                            "Error bits %x\n", i,
 > +                                            linkctrl & (0xf << 8));
 > +                                    /*
 > +                                     * now write them back to clear
 > +                                     * the error.
 > +                                     */
 > +                                    pci_write_config_byte(
 > +                                            pdev, link_off,
 > +                                            linkctrl & (0xf << 8));

The logic here is pretty hard to follow, and you're getting squeezed
pretty hard by indenting 5 tabs stops.  Can ipath_setup_ht_config() be
split up into subfunctions?
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to