hpsa.c (77c4495c17d7508bdef1cfd2c3c933ff5379908b) | hpsa.c (204892e9717790cd17689aaebf2790a477492734) |
---|---|
1/* 2 * Disk Array driver for HP Smart Array SAS controllers 3 * Copyright 2000, 2009 Hewlett-Packard Development Company, L.P. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * --- 3365 unchanged lines hidden (view full) --- 3374 "cannot obtain PCI resources, aborting\n"); 3375 return err; 3376 } 3377 hpsa_interrupt_mode(h); 3378 err = hpsa_pci_find_memory_BAR(h, &h->paddr); 3379 if (err) 3380 goto err_out_free_res; 3381 h->vaddr = remap_pci_mem(h->paddr, 0x250); | 1/* 2 * Disk Array driver for HP Smart Array SAS controllers 3 * Copyright 2000, 2009 Hewlett-Packard Development Company, L.P. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * --- 3365 unchanged lines hidden (view full) --- 3374 "cannot obtain PCI resources, aborting\n"); 3375 return err; 3376 } 3377 hpsa_interrupt_mode(h); 3378 err = hpsa_pci_find_memory_BAR(h, &h->paddr); 3379 if (err) 3380 goto err_out_free_res; 3381 h->vaddr = remap_pci_mem(h->paddr, 0x250); |
3382 | 3382 if (!h->vaddr) { 3383 err = -ENOMEM; 3384 goto err_out_free_res; 3385 } |
3383 err = hpsa_wait_for_board_ready(h); 3384 if (err) 3385 goto err_out_free_res; 3386 err = hpsa_find_cfgtables(h); 3387 if (err) 3388 goto err_out_free_res; 3389 3390 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); --- 70 unchanged lines hidden (view full) --- 3461 dev_warn(&h->pdev->dev, 3462 "unable to get board into simple mode\n"); 3463 err = -ENODEV; 3464 goto err_out_free_res; 3465 } 3466 return 0; 3467 3468err_out_free_res: | 3386 err = hpsa_wait_for_board_ready(h); 3387 if (err) 3388 goto err_out_free_res; 3389 err = hpsa_find_cfgtables(h); 3390 if (err) 3391 goto err_out_free_res; 3392 3393 h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands)); --- 70 unchanged lines hidden (view full) --- 3464 dev_warn(&h->pdev->dev, 3465 "unable to get board into simple mode\n"); 3466 err = -ENODEV; 3467 goto err_out_free_res; 3468 } 3469 return 0; 3470 3471err_out_free_res: |
3472 if (h->transtable) 3473 iounmap(h->transtable); 3474 if (h->cfgtable) 3475 iounmap(h->cfgtable); 3476 if (h->vaddr) 3477 iounmap(h->vaddr); |
|
3469 /* 3470 * Deliberately omit pci_disable_device(): it does something nasty to 3471 * Smart Array controllers that pci_enable_device does not undo 3472 */ 3473 pci_release_regions(h->pdev); 3474 return err; 3475} 3476 --- 202 unchanged lines hidden (view full) --- 3679 if (pci_get_drvdata(pdev) == NULL) { 3680 dev_err(&pdev->dev, "unable to remove device \n"); 3681 return; 3682 } 3683 h = pci_get_drvdata(pdev); 3684 hpsa_unregister_scsi(h); /* unhook from SCSI subsystem */ 3685 hpsa_shutdown(pdev); 3686 iounmap(h->vaddr); | 3478 /* 3479 * Deliberately omit pci_disable_device(): it does something nasty to 3480 * Smart Array controllers that pci_enable_device does not undo 3481 */ 3482 pci_release_regions(h->pdev); 3483 return err; 3484} 3485 --- 202 unchanged lines hidden (view full) --- 3688 if (pci_get_drvdata(pdev) == NULL) { 3689 dev_err(&pdev->dev, "unable to remove device \n"); 3690 return; 3691 } 3692 h = pci_get_drvdata(pdev); 3693 hpsa_unregister_scsi(h); /* unhook from SCSI subsystem */ 3694 hpsa_shutdown(pdev); 3695 iounmap(h->vaddr); |
3696 iounmap(h->transtable); 3697 iounmap(h->cfgtable); |
|
3687 hpsa_free_sg_chain_blocks(h); 3688 pci_free_consistent(h->pdev, 3689 h->nr_cmds * sizeof(struct CommandList), 3690 h->cmd_pool, h->cmd_pool_dhandle); 3691 pci_free_consistent(h->pdev, 3692 h->nr_cmds * sizeof(struct ErrorInfo), 3693 h->errinfo_pool, h->errinfo_pool_dhandle); 3694 pci_free_consistent(h->pdev, h->reply_pool_size, --- 173 unchanged lines hidden --- | 3698 hpsa_free_sg_chain_blocks(h); 3699 pci_free_consistent(h->pdev, 3700 h->nr_cmds * sizeof(struct CommandList), 3701 h->cmd_pool, h->cmd_pool_dhandle); 3702 pci_free_consistent(h->pdev, 3703 h->nr_cmds * sizeof(struct ErrorInfo), 3704 h->errinfo_pool, h->errinfo_pool_dhandle); 3705 pci_free_consistent(h->pdev, h->reply_pool_size, --- 173 unchanged lines hidden --- |