diff options
Diffstat (limited to 'drivers/message/fusion/mptfc.c')
-rw-r--r-- | drivers/message/fusion/mptfc.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index a628be9bbbad..ba61e1828858 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -84,13 +84,16 @@ static int mptfcTaskCtx = -1; | |||
84 | static int mptfcInternalCtx = -1; /* Used only for internal commands */ | 84 | static int mptfcInternalCtx = -1; /* Used only for internal commands */ |
85 | 85 | ||
86 | static struct scsi_host_template mptfc_driver_template = { | 86 | static struct scsi_host_template mptfc_driver_template = { |
87 | .module = THIS_MODULE, | ||
87 | .proc_name = "mptfc", | 88 | .proc_name = "mptfc", |
88 | .proc_info = mptscsih_proc_info, | 89 | .proc_info = mptscsih_proc_info, |
89 | .name = "MPT FC Host", | 90 | .name = "MPT FC Host", |
90 | .info = mptscsih_info, | 91 | .info = mptscsih_info, |
91 | .queuecommand = mptscsih_qcmd, | 92 | .queuecommand = mptscsih_qcmd, |
93 | .target_alloc = mptscsih_target_alloc, | ||
92 | .slave_alloc = mptscsih_slave_alloc, | 94 | .slave_alloc = mptscsih_slave_alloc, |
93 | .slave_configure = mptscsih_slave_configure, | 95 | .slave_configure = mptscsih_slave_configure, |
96 | .target_destroy = mptscsih_target_destroy, | ||
94 | .slave_destroy = mptscsih_slave_destroy, | 97 | .slave_destroy = mptscsih_slave_destroy, |
95 | .change_queue_depth = mptscsih_change_queue_depth, | 98 | .change_queue_depth = mptscsih_change_queue_depth, |
96 | .eh_abort_handler = mptscsih_abort, | 99 | .eh_abort_handler = mptscsih_abort, |
@@ -167,13 +170,15 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
167 | printk(MYIOC_s_WARN_FMT | 170 | printk(MYIOC_s_WARN_FMT |
168 | "Skipping because it's not operational!\n", | 171 | "Skipping because it's not operational!\n", |
169 | ioc->name); | 172 | ioc->name); |
170 | return -ENODEV; | 173 | error = -ENODEV; |
174 | goto out_mptfc_probe; | ||
171 | } | 175 | } |
172 | 176 | ||
173 | if (!ioc->active) { | 177 | if (!ioc->active) { |
174 | printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", | 178 | printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", |
175 | ioc->name); | 179 | ioc->name); |
176 | return -ENODEV; | 180 | error = -ENODEV; |
181 | goto out_mptfc_probe; | ||
177 | } | 182 | } |
178 | 183 | ||
179 | /* Sanity check - ensure at least 1 port is INITIATOR capable | 184 | /* Sanity check - ensure at least 1 port is INITIATOR capable |
@@ -198,7 +203,8 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
198 | printk(MYIOC_s_WARN_FMT | 203 | printk(MYIOC_s_WARN_FMT |
199 | "Unable to register controller with SCSI subsystem\n", | 204 | "Unable to register controller with SCSI subsystem\n", |
200 | ioc->name); | 205 | ioc->name); |
201 | return -1; | 206 | error = -1; |
207 | goto out_mptfc_probe; | ||
202 | } | 208 | } |
203 | 209 | ||
204 | spin_lock_irqsave(&ioc->FreeQlock, flags); | 210 | spin_lock_irqsave(&ioc->FreeQlock, flags); |
@@ -266,7 +272,7 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
266 | mem = kmalloc(sz, GFP_ATOMIC); | 272 | mem = kmalloc(sz, GFP_ATOMIC); |
267 | if (mem == NULL) { | 273 | if (mem == NULL) { |
268 | error = -ENOMEM; | 274 | error = -ENOMEM; |
269 | goto mptfc_probe_failed; | 275 | goto out_mptfc_probe; |
270 | } | 276 | } |
271 | 277 | ||
272 | memset(mem, 0, sz); | 278 | memset(mem, 0, sz); |
@@ -284,14 +290,14 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
284 | mem = kmalloc(sz, GFP_ATOMIC); | 290 | mem = kmalloc(sz, GFP_ATOMIC); |
285 | if (mem == NULL) { | 291 | if (mem == NULL) { |
286 | error = -ENOMEM; | 292 | error = -ENOMEM; |
287 | goto mptfc_probe_failed; | 293 | goto out_mptfc_probe; |
288 | } | 294 | } |
289 | 295 | ||
290 | memset(mem, 0, sz); | 296 | memset(mem, 0, sz); |
291 | hd->Targets = (VirtDevice **) mem; | 297 | hd->Targets = (VirtTarget **) mem; |
292 | 298 | ||
293 | dprintk((KERN_INFO | 299 | dprintk((KERN_INFO |
294 | " Targets @ %p, sz=%d\n", hd->Targets, sz)); | 300 | " vdev @ %p, sz=%d\n", hd->Targets, sz)); |
295 | 301 | ||
296 | /* Clear the TM flags | 302 | /* Clear the TM flags |
297 | */ | 303 | */ |
@@ -330,13 +336,13 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
330 | if(error) { | 336 | if(error) { |
331 | dprintk((KERN_ERR MYNAM | 337 | dprintk((KERN_ERR MYNAM |
332 | "scsi_add_host failed\n")); | 338 | "scsi_add_host failed\n")); |
333 | goto mptfc_probe_failed; | 339 | goto out_mptfc_probe; |
334 | } | 340 | } |
335 | 341 | ||
336 | scsi_scan_host(sh); | 342 | scsi_scan_host(sh); |
337 | return 0; | 343 | return 0; |
338 | 344 | ||
339 | mptfc_probe_failed: | 345 | out_mptfc_probe: |
340 | 346 | ||
341 | mptscsih_remove(pdev); | 347 | mptscsih_remove(pdev); |
342 | return error; | 348 | return error; |