# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.589 -> 1.590 # drivers/block/cciss.h 1.10 -> 1.11 # drivers/block/cpqarray.c 1.35 -> 1.36 # drivers/block/smart1,2.h 1.3 -> 1.4 # drivers/block/cpqarray.h 1.6 -> 1.7 # drivers/block/cciss.c 1.42 -> 1.43 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/05/28 axboe@burns.home.kernel.dk 1.590 # various cpqarray and cciss updates # -------------------------------------------- # diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c --- a/drivers/block/cciss.c Tue May 28 10:34:16 2002 +++ b/drivers/block/cciss.c Tue May 28 10:34:16 2002 @@ -281,7 +281,7 @@ i = find_first_zero_bit(h->cmd_pool_bits, NR_CMDS); if (i == NR_CMDS) return NULL; - } while(test_and_set_bit(i & 31, h->cmd_pool_bits+(i/32)) != 0); + } while(test_and_set_bit(i & (BITS_PER_LONG - 1), h->cmd_pool_bits+(i/BITS_PER_LONG)) != 0); #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss: using command buffer %d\n", i); #endif @@ -327,7 +327,7 @@ } else { i = c - h->cmd_pool; - clear_bit(i%32, h->cmd_pool_bits+(i/32)); + clear_bit(i&(BITS_PER_LONG-1), h->cmd_pool_bits+(i/BITS_PER_LONG)); h->nr_frees++; } } @@ -338,7 +338,7 @@ static void cciss_geninit( int ctlr) { drive_info_struct *drv; - int i,j; + int i; /* Loop through each real device */ hba[ctlr]->gendisk.nr_real = 0; @@ -1883,6 +1883,7 @@ goto queue; startio: + blk_stop_queue(q); start_io(h); } @@ -1943,8 +1944,8 @@ /* * See if we can queue up some more IO */ - do_cciss_request(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); + blk_start_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); } /* * We cannot read the structure directly, for portablity we must use @@ -2448,8 +2449,7 @@ free_hba(i); return(-1); } - hba[i]->cmd_pool_bits = (__u32*)kmalloc( - ((NR_CMDS+31)/32)*sizeof(__u32), GFP_KERNEL); + hba[i]->cmd_pool_bits = kmalloc(((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long), GFP_KERNEL); hba[i]->cmd_pool = (CommandList_struct *)pci_alloc_consistent( hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct), &(hba[i]->cmd_pool_dhandle)); @@ -2484,7 +2484,7 @@ pci_set_drvdata(pdev, hba[i]); /* command and error info recs zeroed out before they are used */ - memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+31)/32)*sizeof(__u32)); + memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long)); #ifdef CCISS_DEBUG printk(KERN_DEBUG "Scanning for drives on controller cciss%d\n",i); diff -Nru a/drivers/block/cciss.h b/drivers/block/cciss.h --- a/drivers/block/cciss.h Tue May 28 10:34:16 2002 +++ b/drivers/block/cciss.h Tue May 28 10:34:16 2002 @@ -76,7 +76,7 @@ dma_addr_t cmd_pool_dhandle; ErrorInfo_struct *errinfo_pool; dma_addr_t errinfo_pool_dhandle; - __u32 *cmd_pool_bits; + unsigned long *cmd_pool_bits; int nr_allocs; int nr_frees; diff -Nru a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c --- a/drivers/block/cpqarray.c Tue May 28 10:34:16 2002 +++ b/drivers/block/cpqarray.c Tue May 28 10:34:16 2002 @@ -166,7 +166,7 @@ static void ida_geninit(int ctlr) { - int i,j; + int i; drv_info_t *drv; for(i=0; icmd_pool = (cmdlist_t *)pci_alloc_consistent( hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t), &(hba[i]->cmd_pool_dhandle)); - hba[i]->cmd_pool_bits = (__u32*)kmalloc( - ((NR_CMDS+31)/32)*sizeof(__u32), GFP_KERNEL); + hba[i]->cmd_pool_bits = kmalloc(((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long), GFP_KERNEL); if(hba[i]->cmd_pool_bits == NULL || hba[i]->cmd_pool == NULL) { @@ -441,7 +440,7 @@ } memset(hba[i]->cmd_pool, 0, NR_CMDS * sizeof(cmdlist_t)); - memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+31)/32)*sizeof(__u32)); + memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long)); printk(KERN_INFO "cpqarray: Finding drives on %s", hba[i]->devname); getgeometry(i); @@ -916,6 +915,7 @@ goto queue_next; startio: + blk_stop_queue(q); start_io(h); } @@ -1066,8 +1066,8 @@ /* * See if we can queue up some more IO */ - do_ida_request(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); spin_unlock_irqrestore(IDA_LOCK(h->ctlr), flags); + blk_start_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); } /* @@ -1333,7 +1333,7 @@ i = find_first_zero_bit(h->cmd_pool_bits, NR_CMDS); if (i == NR_CMDS) return NULL; - } while(test_and_set_bit(i%32, h->cmd_pool_bits+(i/32)) != 0); + } while(test_and_set_bit(i&(BITS_PER_LONG-1), h->cmd_pool_bits+(i/BITS_PER_LONG)) != 0); c = h->cmd_pool + i; cmd_dhandle = h->cmd_pool_dhandle + i*sizeof(cmdlist_t); h->nr_allocs++; @@ -1353,7 +1353,7 @@ c->busaddr); } else { i = c - h->cmd_pool; - clear_bit(i%32, h->cmd_pool_bits+(i/32)); + clear_bit(i&(BITS_PER_LONG-1), h->cmd_pool_bits+(i/BITS_PER_LONG)); h->nr_frees++; } } diff -Nru a/drivers/block/cpqarray.h b/drivers/block/cpqarray.h --- a/drivers/block/cpqarray.h Tue May 28 10:34:16 2002 +++ b/drivers/block/cpqarray.h Tue May 28 10:34:16 2002 @@ -104,7 +104,7 @@ cmdlist_t *cmpQ; cmdlist_t *cmd_pool; dma_addr_t cmd_pool_dhandle; - __u32 *cmd_pool_bits; + unsigned long *cmd_pool_bits; spinlock_t lock; unsigned int Qdepth; diff -Nru a/drivers/block/smart1,2.h b/drivers/block/smart1,2.h --- a/drivers/block/smart1,2.h Tue May 28 10:34:16 2002 +++ b/drivers/block/smart1,2.h Tue May 28 10:34:16 2002 @@ -252,7 +252,9 @@ outb(CHANNEL_CLEAR, h->ioaddr + SMART1_LOCAL_DOORBELL); -#error Please convert me to Documentation/DMA-mapping.txt + /* + * this is x86 (actually compaq x86) only, so it's ok + */ if (cmd) ((cmdlist_t*)bus_to_virt(cmd))->req.hdr.rcode = status; } else { cmd = 0;