Commit 7ee75762 authored by James Bottomley's avatar James Bottomley

[SCSI] update lasi700 for new parisc device model

parent 81513c82
...@@ -114,7 +114,11 @@ static struct parisc_device_id lasi700_scsi_tbl[] = { ...@@ -114,7 +114,11 @@ static struct parisc_device_id lasi700_scsi_tbl[] = {
MODULE_DEVICE_TABLE(parisc, lasi700_scsi_tbl); MODULE_DEVICE_TABLE(parisc, lasi700_scsi_tbl);
static struct parisc_driver lasi700_driver = LASI700_DRIVER; static struct parisc_driver lasi700_driver = {
.name = "Lasi SCSI",
.id_table = lasi700_scsi_tbl,
.probe = lasi700_driver_callback,
};
static int __init static int __init
lasi700_detect(Scsi_Host_Template *tpnt) lasi700_detect(Scsi_Host_Template *tpnt)
...@@ -145,6 +149,7 @@ lasi700_driver_callback(struct parisc_device *dev) ...@@ -145,6 +149,7 @@ lasi700_driver_callback(struct parisc_device *dev)
} else { } else {
driver_name = "lasi710"; driver_name = "lasi710";
} }
snprintf(dev->dev.name, sizeof(dev->dev.name), "%s", driver_name);
if(hostdata == NULL) { if(hostdata == NULL) {
printk(KERN_ERR "%s: Failed to allocate host data\n", printk(KERN_ERR "%s: Failed to allocate host data\n",
driver_name); driver_name);
...@@ -168,12 +173,14 @@ lasi700_driver_callback(struct parisc_device *dev) ...@@ -168,12 +173,14 @@ lasi700_driver_callback(struct parisc_device *dev)
hostdata->chip710 = 1; hostdata->chip710 = 1;
hostdata->dmode_extra = DMODE_FC2; hostdata->dmode_extra = DMODE_FC2;
} }
hostdata->pci_dev = ccio_get_fake(dev); hostdata->dev = &dev->dev;
dma_set_mask(&dev->dev, 0xffffffffUL);
if((host = NCR_700_detect(host_tpnt, hostdata)) == NULL) { if((host = NCR_700_detect(host_tpnt, hostdata)) == NULL) {
kfree(hostdata); kfree(hostdata);
release_mem_region(host->base, 64); release_mem_region(host->base, 64);
return 1; return 1;
} }
scsi_set_device(host, &dev->dev);
host->irq = dev->irq; host->irq = dev->irq;
if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, driver_name, host)) { if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, driver_name, host)) {
printk(KERN_ERR "%s: irq problem, detaching\n", printk(KERN_ERR "%s: irq problem, detaching\n",
......
...@@ -55,12 +55,6 @@ static int lasi700_release(struct Scsi_Host *host); ...@@ -55,12 +55,6 @@ static int lasi700_release(struct Scsi_Host *host);
.hversion_rev = HVERSION_REV_ANY_ID, \ .hversion_rev = HVERSION_REV_ANY_ID, \
} }
#define LASI700_DRIVER { \
.name = "Lasi SCSI", \
.id_table = lasi700_scsi_tbl, \
.probe = lasi700_driver_callback,\
}
#define LASI700_CLOCK 25 #define LASI700_CLOCK 25
#define LASI710_CLOCK 40 #define LASI710_CLOCK 40
#define LASI_SCSI_CORE_OFFSET 0x100 #define LASI_SCSI_CORE_OFFSET 0x100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment