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

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

 



 > +		/* 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux