--- drivers/block/cciss.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) --- lin2628-rc5.orig/drivers/block/cciss.c +++ lin2628-rc5/drivers/block/cciss.c @@ -65,6 +65,7 @@ MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ S MODULE_VERSION("3.6.20"); MODULE_LICENSE("GPL"); +#define CCISS_DEBUG 1 #include "cciss_cmd.h" #include "cciss.h" #include @@ -217,6 +218,10 @@ static struct block_device_operations cc */ static inline void addQ(CommandList_struct **Qptr, CommandList_struct *c) { +#ifdef CCISS_DEBUG + printk(KERN_DEBUG "cciss: %s: Qptr=%p, c=%p\n", + __func__, Qptr, c); +#endif if (*Qptr == NULL) { *Qptr = c; c->next = c->prev = c; @@ -231,6 +236,10 @@ static inline void addQ(CommandList_stru static inline CommandList_struct *removeQ(CommandList_struct **Qptr, CommandList_struct *c) { +#ifdef CCISS_DEBUG + printk(KERN_DEBUG "cciss: %s: Qptr=%p, c=%p, next=%p, prev=%p\n", + __func__, Qptr, c, c ? c->next : 0, c ? c->prev : 0); +#endif if (c && c->next != c) { if (*Qptr == c) *Qptr = c->next; @@ -3200,6 +3209,10 @@ static int __devinit cciss_pci_init(ctlr printk("address 0 = %x\n", c->paddr); #endif /* CCISS_DEBUG */ c->vaddr = remap_pci_mem(c->paddr, 0x250); + if (!c->vaddr) { + printk(KERN_ERR "cciss: remap_pci_mem/vaddr failed\n"); + return -ENOMEM; + } /* Wait for the board to become ready. (PCI hotplug needs this.) * We poll for up to 120 secs, once per 100ms. */ @@ -3239,6 +3252,10 @@ static int __devinit cciss_pci_init(ctlr c->cfgtable = remap_pci_mem(pci_resource_start(pdev, cfg_base_addr_index) + cfg_offset, sizeof(CfgTable_struct)); + if (!c->cfgtable) { + printk(KERN_ERR "cciss: remap_pci_mem/cfgtable failed\n"); + return -ENOMEM; + } c->board_id = board_id; #ifdef CCISS_DEBUG