Re: [PATCH 4 of 20] ipath - support for HyperTransport devices

From: Roland Dreier
Date: Thu Mar 09 2006 - 17:59:21 EST


> + /* 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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/