Skip to contentSkip to conversation

ipath - support for HyperTransport devices

PATCH Roland Dreier 2 participants 2 messages Mar 9, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Review

Quoted 9 lines
(quoted diff) +9 -0
+		/* 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>.

Review

Quoted 13 lines
(quoted diff) +13 -0
+				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?

#2 lore raw
Quoted 3 lines · Roland Dreier

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>.

Either way is fine by me.

Quoted 3 lines

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?

Definitely. I mentioned this in the introductory message for the series as something I'm working on.

	<b