aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r--drivers/message/fusion/mptspi.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 5c0e307d1d5d..ce332a6085e5 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -103,13 +103,16 @@ static int mptspiTaskCtx = -1;
103static int mptspiInternalCtx = -1; /* Used only for internal commands */ 103static int mptspiInternalCtx = -1; /* Used only for internal commands */
104 104
105static struct scsi_host_template mptspi_driver_template = { 105static struct scsi_host_template mptspi_driver_template = {
106 .module = THIS_MODULE,
106 .proc_name = "mptspi", 107 .proc_name = "mptspi",
107 .proc_info = mptscsih_proc_info, 108 .proc_info = mptscsih_proc_info,
108 .name = "MPT SPI Host", 109 .name = "MPT SPI Host",
109 .info = mptscsih_info, 110 .info = mptscsih_info,
110 .queuecommand = mptscsih_qcmd, 111 .queuecommand = mptscsih_qcmd,
112 .target_alloc = mptscsih_target_alloc,
111 .slave_alloc = mptscsih_slave_alloc, 113 .slave_alloc = mptscsih_slave_alloc,
112 .slave_configure = mptscsih_slave_configure, 114 .slave_configure = mptscsih_slave_configure,
115 .target_destroy = mptscsih_target_destroy,
113 .slave_destroy = mptscsih_slave_destroy, 116 .slave_destroy = mptscsih_slave_destroy,
114 .change_queue_depth = mptscsih_change_queue_depth, 117 .change_queue_depth = mptscsih_change_queue_depth,
115 .eh_abort_handler = mptscsih_abort, 118 .eh_abort_handler = mptscsih_abort,
@@ -177,13 +180,15 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
177 printk(MYIOC_s_WARN_FMT 180 printk(MYIOC_s_WARN_FMT
178 "Skipping because it's not operational!\n", 181 "Skipping because it's not operational!\n",
179 ioc->name); 182 ioc->name);
180 return -ENODEV; 183 error = -ENODEV;
184 goto out_mptspi_probe;
181 } 185 }
182 186
183 if (!ioc->active) { 187 if (!ioc->active) {
184 printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", 188 printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n",
185 ioc->name); 189 ioc->name);
186 return -ENODEV; 190 error = -ENODEV;
191 goto out_mptspi_probe;
187 } 192 }
188 193
189 /* Sanity check - ensure at least 1 port is INITIATOR capable 194 /* Sanity check - ensure at least 1 port is INITIATOR capable
@@ -208,7 +213,8 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
208 printk(MYIOC_s_WARN_FMT 213 printk(MYIOC_s_WARN_FMT
209 "Unable to register controller with SCSI subsystem\n", 214 "Unable to register controller with SCSI subsystem\n",
210 ioc->name); 215 ioc->name);
211 return -1; 216 error = -1;
217 goto out_mptspi_probe;
212 } 218 }
213 219
214 spin_lock_irqsave(&ioc->FreeQlock, flags); 220 spin_lock_irqsave(&ioc->FreeQlock, flags);
@@ -286,7 +292,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
286 mem = kmalloc(sz, GFP_ATOMIC); 292 mem = kmalloc(sz, GFP_ATOMIC);
287 if (mem == NULL) { 293 if (mem == NULL) {
288 error = -ENOMEM; 294 error = -ENOMEM;
289 goto mptspi_probe_failed; 295 goto out_mptspi_probe;
290 } 296 }
291 297
292 memset(mem, 0, sz); 298 memset(mem, 0, sz);
@@ -304,14 +310,14 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
304 mem = kmalloc(sz, GFP_ATOMIC); 310 mem = kmalloc(sz, GFP_ATOMIC);
305 if (mem == NULL) { 311 if (mem == NULL) {
306 error = -ENOMEM; 312 error = -ENOMEM;
307 goto mptspi_probe_failed; 313 goto out_mptspi_probe;
308 } 314 }
309 315
310 memset(mem, 0, sz); 316 memset(mem, 0, sz);
311 hd->Targets = (VirtDevice **) mem; 317 hd->Targets = (VirtTarget **) mem;
312 318
313 dprintk((KERN_INFO 319 dprintk((KERN_INFO
314 " Targets @ %p, sz=%d\n", hd->Targets, sz)); 320 " vdev @ %p, sz=%d\n", hd->Targets, sz));
315 321
316 /* Clear the TM flags 322 /* Clear the TM flags
317 */ 323 */
@@ -385,13 +391,13 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
385 if(error) { 391 if(error) {
386 dprintk((KERN_ERR MYNAM 392 dprintk((KERN_ERR MYNAM
387 "scsi_add_host failed\n")); 393 "scsi_add_host failed\n"));
388 goto mptspi_probe_failed; 394 goto out_mptspi_probe;
389 } 395 }
390 396
391 scsi_scan_host(sh); 397 scsi_scan_host(sh);
392 return 0; 398 return 0;
393 399
394mptspi_probe_failed: 400out_mptspi_probe:
395 401
396 mptscsih_remove(pdev); 402 mptscsih_remove(pdev);
397 return error; 403 return error;