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

Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]>

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 0e67723..d74975d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -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:

Signed-off-by: Mike Miller <[EMAIL PROTECTED]>
Signed-off-by: Chase Maupin <[EMAIL PROTECTED]>
Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]>
---
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e01380b..6632150 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -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

> 
> Cheers,
> 
> Hannes
> -- 
> 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

Reply via email to