Skip to contentSkip to conversation

cciss broken with 2.6.22-rc2

DISCUSSION Hannes Reinecke 2 participants 3 messages May 29, 2007 – May 30, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Mike,

with the latest git snapshot the cciss driver hangs during initialisation. Enabling debug output I get:

cciss0: <0x3230> at PCI 0000:06:00.0 IRQ 4338 using DAC Sending cff0000 - down to controller

cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
LUN Data
--------------------------
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
      blocks= 286677120 block_size= 512
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
      heads=255, sectors=32, cylinders=35132

Sending 5103000 - down to controller

and then the machine hangs.
I'll try to investigate, but as I'm no expert in cciss my results might be limited.
Looks like one of your recent fixes broke it; 2.6.21 worked fine.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 31 lines

-----Original Message-----
From: Hannes Reinecke [mailto:[email protected]]
Sent: Tuesday, May 29, 2007 7:01 AM
To: Miller, Mike (OS Dev); SCSI Mailing List
Subject: cciss broken with 2.6.22-rc2

Hi Mike,

with the latest git snapshot the cciss driver hangs during initialisation. Enabling debug output I get:

cciss0: <0x3230> at PCI 0000:06:00.0 IRQ 4338 using DAC Sending cff0000 - down to controller

cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
LUN Data
--------------------------
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
      blocks= 286677120 block_size= 512
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
      heads=255, sectors=32, cylinders=35132
Quoted 6 lines

Sending 5103000 - down to controller

and then the machine hangs.
I'll try to investigate, but as I'm no expert in cciss my results might be limited.
Looks like one of your recent fixes broke it; 2.6.21 worked fine.

Hannes,
Actually, it was someone else who broke the driver by making changes in msi.c. This patch fixes the hang:

From: "Mike Miller (OS Dev)" <[email protected]> writes:

Found what seems the problem with our vectors being listed backward. In drivers/pci/msi.c we should be using list_add_tail rather than list_add to preserve the ordering across various kernels. Please consider this for inclusion.

drivers/pci/msi.c +1 -1
@@ -333,7 +333,7 @@ static int msi_capability_init(struct pci_dev *dev)
 			msi_mask_bits_reg(pos, is_64bit_address(control)),
 			maskbits);
 	}
-	list_add(&entry->list, &dev->msi_list);
+	list_add_tail(&entry->list, &dev->msi_list);
 
 	/* Configure MSI capability structure */
 	ret = arch_setup_msi_irqs(dev, 1, PCI_CAP_ID_MSI); @@ -404,7 +404,7 @@ static int msix_capability_init(struct pci_dev *dev,

entry->dev = dev;
entry->mask_base = base;

- list_add(&entry->list, &dev->msi_list);
+ list_add_tail(&entry->list, &dev->msi_list);
}

ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
------------------------------------------------------------------------------------------------
This patch fixes an Oops during rmmod:

---

drivers/pci/msi.c +3 -3
@@ -558,12 +558,12 @@ static int msi_free_irqs(struct pci_dev* dev)
 
 	list_for_each_entry_safe(entry, tmp, &dev->msi_list, list) {
 		if (entry->msi_attrib.type == PCI_CAP_ID_MSIX) {
-			if (list_is_last(&entry->list, &dev->msi_list))
-				iounmap(entry->mask_base);
-
 			writel(1, entry->mask_base + entry->msi_attrib.entry_nr
 				  * PCI_MSIX_ENTRY_SIZE
 				  + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
+
+			if (list_is_last(&entry->list, &dev->msi_list))
+				iounmap(entry->mask_base);
 		}
 		list_del(&entry->list);
 		kfree(entry);

------------------------------------------------------------------------------------------------
WARNING: These patches may suffer from wordwrap as they are coming from my microsucks email client.

We found and fixed these late last week. So I hope they make into Linus' git tree ASAP.

Thanks,
mikem

Quoted 10 lines

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 52 lines · Mike (OS Dev)
Quoted 31 lines

-----Original Message-----
From: Hannes Reinecke [mailto:[email protected]]
Sent: Tuesday, May 29, 2007 7:01 AM
To: Miller, Mike (OS Dev); SCSI Mailing List
Subject: cciss broken with 2.6.22-rc2

Hi Mike,

with the latest git snapshot the cciss driver hangs during initialisation. Enabling debug output I get:

cciss0: <0x3230> at PCI 0000:06:00.0 IRQ 4338 using DAC Sending cff0000 - down to controller

cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
LUN Data
--------------------------
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00000 back from board
      blocks= 286677120 block_size= 512
Sending cff0000 - down to controller
cciss:  FIFO Empty read
cciss:  Read cff00002 back from board
      heads=255, sectors=32, cylinders=35132
Quoted 6 lines

Sending 5103000 - down to controller

and then the machine hangs.
I'll try to investigate, but as I'm no expert in cciss my results might be limited.
Looks like one of your recent fixes broke it; 2.6.21 worked fine.

Hannes,
Actually, it was someone else who broke the driver by making changes in msi.c. This patch fixes the hang:

From: "Mike Miller (OS Dev)" <[email protected]> writes:

Found what seems the problem with our vectors being listed backward. In drivers/pci/msi.c we should be using list_add_tail rather than list_add to preserve the ordering across various kernels. Please consider this for inclusion.

drivers/pci/msi.c index 0e67723..d74975d 100644 renamed from drivers/pci/msi.c +0 -0

[ .. ]

Quoted 2 lines

We found and fixed these late last week. So I hope they make into Linus' git tree ASAP.

Yes, these patches work.

Thanks,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html