lkml.org 
[lkml]   [2004]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] __iomem annotations for cciss
Also remove the page masking before ioremap, it's not been nessecary for
ages.


--- 1.122/drivers/block/cciss.c 2004-08-23 10:15:28 +02:00
+++ edited/drivers/block/cciss.c 2004-10-02 15:14:22 +02:00
@@ -1841,17 +1841,6 @@
cmd_free(info_p, c, 1);
return (status);
}
-/*
- * Map (physical) PCI mem into (virtual) kernel space
- */
-static ulong remap_pci_mem(ulong base, ulong size)
-{
- ulong page_base = ((ulong) base) & PAGE_MASK;
- ulong page_offs = ((ulong) base) - page_base;
- ulong page_remapped = (ulong) ioremap(page_base, page_offs+size);
-
- return (ulong) (page_remapped ? (page_remapped + page_offs) : 0UL);
-}

/*
* Takes jobs of the Q and sends them to the hardware, then puts it on
@@ -2369,11 +2358,7 @@
* table
*/

- c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */
-#ifdef CCISS_DEBUG
- printk("address 0 = %x\n", c->paddr);
-#endif /* CCISS_DEBUG */
- c->vaddr = remap_pci_mem(c->paddr, 200);
+ c->vaddr = ioremap(pci_resource_start(pdev, 0), 200);

/* Wait for the board to become ready. (PCI hotplug needs this.)
* We poll for up to 120 secs, once per 100ms. */
@@ -2410,8 +2395,7 @@
#ifdef CCISS_DEBUG
printk("cfg offset = %x\n", cfg_offset);
#endif /* CCISS_DEBUG */
- c->cfgtable = (CfgTable_struct *)
- remap_pci_mem(pci_resource_start(pdev, cfg_base_addr_index)
+ c->cfgtable = ioremap(pci_resource_start(pdev, cfg_base_addr_index)
+ cfg_offset, sizeof(CfgTable_struct));
c->board_id = board_id;

@@ -2824,7 +2808,7 @@
}
free_irq(hba[i]->intr, hba[i]);
pci_set_drvdata(pdev, NULL);
- iounmap((void*)hba[i]->vaddr);
+ iounmap(hba[i]->vaddr);
cciss_unregister_scsi(i); /* unhook from SCSI subsystem */
unregister_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname);
remove_proc_entry(hba[i]->devname, proc_cciss);
--- 1.24/drivers/block/cciss.h 2004-08-23 10:15:28 +02:00
+++ edited/drivers/block/cciss.h 2004-10-02 15:12:53 +02:00
@@ -43,11 +43,10 @@
char firm_ver[4]; // Firmware version
struct pci_dev *pdev;
__u32 board_id;
- unsigned long vaddr;
- unsigned long paddr;
+ void __iomem *vaddr;
unsigned long io_mem_addr;
unsigned long io_mem_length;
- CfgTable_struct *cfgtable;
+ CfgTable_struct __iomem *cfgtable;
unsigned int intr;
int interrupts_enabled;
int max_commands;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans