hpsa.c (4967bd3e5caa87da43c251ae32504230259b18c6) hpsa.c (bcc4425548ada73475606c9c5d7cfce7eae0eb64)
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 *

--- 884 unchanged lines hidden (view full) ---

893 if (sd != NULL)
894 sdev->hostdata = sd;
895 spin_unlock_irqrestore(&h->devlock, flags);
896 return 0;
897}
898
899static void hpsa_slave_destroy(struct scsi_device *sdev)
900{
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 *

--- 884 unchanged lines hidden (view full) ---

893 if (sd != NULL)
894 sdev->hostdata = sd;
895 spin_unlock_irqrestore(&h->devlock, flags);
896 return 0;
897}
898
899static void hpsa_slave_destroy(struct scsi_device *sdev)
900{
901 return; /* nothing to do. */
901 /* nothing to do. */
902}
903
904static void hpsa_scsi_setup(struct ctlr_info *h)
905{
906 h->ndevices = 0;
907 h->scsi_host = NULL;
908 spin_lock_init(&h->devlock);
902}
903
904static void hpsa_scsi_setup(struct ctlr_info *h)
905{
906 h->ndevices = 0;
907 h->scsi_host = NULL;
908 spin_lock_init(&h->devlock);
909 return;
910}
911
912static void complete_scsi_command(struct CommandList *cp,
913 int timeout, u32 tag)
914{
915 struct scsi_cmnd *cmd;
916 struct ctlr_info *h;
917 struct ErrorInfo *ei;

--- 852 unchanged lines hidden (view full) ---

1770out:
1771 kfree(tmpdevice);
1772 for (i = 0; i < ndev_allocated; i++)
1773 kfree(currentsd[i]);
1774 kfree(currentsd);
1775 kfree(inq_buff);
1776 kfree(physdev_list);
1777 kfree(logdev_list);
909}
910
911static void complete_scsi_command(struct CommandList *cp,
912 int timeout, u32 tag)
913{
914 struct scsi_cmnd *cmd;
915 struct ctlr_info *h;
916 struct ErrorInfo *ei;

--- 852 unchanged lines hidden (view full) ---

1769out:
1770 kfree(tmpdevice);
1771 for (i = 0; i < ndev_allocated; i++)
1772 kfree(currentsd[i]);
1773 kfree(currentsd);
1774 kfree(inq_buff);
1775 kfree(physdev_list);
1776 kfree(logdev_list);
1778 return;
1779}
1780
1781/* hpsa_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci
1782 * dma mapping and fills in the scatter gather entries of the
1783 * hpsa command, cp.
1784 */
1785static int hpsa_scatter_gather(struct pci_dev *pdev,
1786 struct CommandList *cp,

--- 1314 unchanged lines hidden (view full) ---

3101 h->msi_vector = 1;
3102 else
3103 dev_warn(&pdev->dev, "MSI init failed\n");
3104 }
3105default_int_mode:
3106#endif /* CONFIG_PCI_MSI */
3107 /* if we get here we're going to use the default interrupt mode */
3108 h->intr[SIMPLE_MODE_INT] = pdev->irq;
1777}
1778
1779/* hpsa_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci
1780 * dma mapping and fills in the scatter gather entries of the
1781 * hpsa command, cp.
1782 */
1783static int hpsa_scatter_gather(struct pci_dev *pdev,
1784 struct CommandList *cp,

--- 1314 unchanged lines hidden (view full) ---

3099 h->msi_vector = 1;
3100 else
3101 dev_warn(&pdev->dev, "MSI init failed\n");
3102 }
3103default_int_mode:
3104#endif /* CONFIG_PCI_MSI */
3105 /* if we get here we're going to use the default interrupt mode */
3106 h->intr[SIMPLE_MODE_INT] = pdev->irq;
3109 return;
3110}
3111
3112static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev)
3113{
3114 ushort subsystem_vendor_id, subsystem_device_id, command;
3115 u32 board_id, scratchpad = 0;
3116 u64 cfg_offset;
3117 u32 cfg_base_addr;

--- 412 unchanged lines hidden ---
3107}
3108
3109static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev)
3110{
3111 ushort subsystem_vendor_id, subsystem_device_id, command;
3112 u32 board_id, scratchpad = 0;
3113 u64 cfg_offset;
3114 u32 cfg_base_addr;

--- 412 unchanged lines hidden ---