diff options
-rw-r--r-- | drivers/scsi/hpsa.c | 90 | ||||
-rw-r--r-- | drivers/scsi/hpsa.h | 4 | ||||
-rw-r--r-- | drivers/scsi/hpsa_cmd.h | 146 |
3 files changed, 120 insertions, 120 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index bb96fdd58e23..0f4a1f3c7e9f 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -126,8 +126,8 @@ static void cmd_free(struct ctlr_info *h, struct CommandList *c); | |||
126 | static void cmd_special_free(struct ctlr_info *h, struct CommandList *c); | 126 | static void cmd_special_free(struct ctlr_info *h, struct CommandList *c); |
127 | static struct CommandList *cmd_alloc(struct ctlr_info *h); | 127 | static struct CommandList *cmd_alloc(struct ctlr_info *h); |
128 | static struct CommandList *cmd_special_alloc(struct ctlr_info *h); | 128 | static struct CommandList *cmd_special_alloc(struct ctlr_info *h); |
129 | static void fill_cmd(struct CommandList *c, __u8 cmd, struct ctlr_info *h, | 129 | static void fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h, |
130 | void *buff, size_t size, __u8 page_code, unsigned char *scsi3addr, | 130 | void *buff, size_t size, u8 page_code, unsigned char *scsi3addr, |
131 | int cmd_type); | 131 | int cmd_type); |
132 | 132 | ||
133 | static int hpsa_scsi_queue_command(struct scsi_cmnd *cmd, | 133 | static int hpsa_scsi_queue_command(struct scsi_cmnd *cmd, |
@@ -912,7 +912,7 @@ static void hpsa_scsi_setup(struct ctlr_info *h) | |||
912 | } | 912 | } |
913 | 913 | ||
914 | static void complete_scsi_command(struct CommandList *cp, | 914 | static void complete_scsi_command(struct CommandList *cp, |
915 | int timeout, __u32 tag) | 915 | int timeout, u32 tag) |
916 | { | 916 | { |
917 | struct scsi_cmnd *cmd; | 917 | struct scsi_cmnd *cmd; |
918 | struct ctlr_info *h; | 918 | struct ctlr_info *h; |
@@ -1160,7 +1160,7 @@ static void hpsa_map_one(struct pci_dev *pdev, | |||
1160 | size_t buflen, | 1160 | size_t buflen, |
1161 | int data_direction) | 1161 | int data_direction) |
1162 | { | 1162 | { |
1163 | __u64 addr64; | 1163 | u64 addr64; |
1164 | 1164 | ||
1165 | if (buflen == 0 || data_direction == PCI_DMA_NONE) { | 1165 | if (buflen == 0 || data_direction == PCI_DMA_NONE) { |
1166 | cp->Header.SGList = 0; | 1166 | cp->Header.SGList = 0; |
@@ -1168,14 +1168,14 @@ static void hpsa_map_one(struct pci_dev *pdev, | |||
1168 | return; | 1168 | return; |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | addr64 = (__u64) pci_map_single(pdev, buf, buflen, data_direction); | 1171 | addr64 = (u64) pci_map_single(pdev, buf, buflen, data_direction); |
1172 | cp->SG[0].Addr.lower = | 1172 | cp->SG[0].Addr.lower = |
1173 | (__u32) (addr64 & (__u64) 0x00000000FFFFFFFF); | 1173 | (u32) (addr64 & (u64) 0x00000000FFFFFFFF); |
1174 | cp->SG[0].Addr.upper = | 1174 | cp->SG[0].Addr.upper = |
1175 | (__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF); | 1175 | (u32) ((addr64 >> 32) & (u64) 0x00000000FFFFFFFF); |
1176 | cp->SG[0].Len = buflen; | 1176 | cp->SG[0].Len = buflen; |
1177 | cp->Header.SGList = (__u8) 1; /* no. SGs contig in this cmd */ | 1177 | cp->Header.SGList = (u8) 1; /* no. SGs contig in this cmd */ |
1178 | cp->Header.SGTotal = (__u16) 1; /* total sgs in this cmd list */ | 1178 | cp->Header.SGTotal = (u16) 1; /* total sgs in this cmd list */ |
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | static inline void hpsa_scsi_do_simple_cmd_core(struct ctlr_info *h, | 1181 | static inline void hpsa_scsi_do_simple_cmd_core(struct ctlr_info *h, |
@@ -1485,11 +1485,11 @@ static int is_msa2xxx(struct ctlr_info *h, struct hpsa_scsi_dev_t *device) | |||
1485 | * in hpsa_find_target_lun, called by hpsa_scsi_add_entry.) | 1485 | * in hpsa_find_target_lun, called by hpsa_scsi_add_entry.) |
1486 | */ | 1486 | */ |
1487 | static void figure_bus_target_lun(struct ctlr_info *h, | 1487 | static void figure_bus_target_lun(struct ctlr_info *h, |
1488 | __u8 *lunaddrbytes, int *bus, int *target, int *lun, | 1488 | u8 *lunaddrbytes, int *bus, int *target, int *lun, |
1489 | struct hpsa_scsi_dev_t *device) | 1489 | struct hpsa_scsi_dev_t *device) |
1490 | { | 1490 | { |
1491 | 1491 | ||
1492 | __u32 lunid; | 1492 | u32 lunid; |
1493 | 1493 | ||
1494 | if (is_logical_dev_addr_mode(lunaddrbytes)) { | 1494 | if (is_logical_dev_addr_mode(lunaddrbytes)) { |
1495 | /* logical device */ | 1495 | /* logical device */ |
@@ -1529,7 +1529,7 @@ static void figure_bus_target_lun(struct ctlr_info *h, | |||
1529 | */ | 1529 | */ |
1530 | static int add_msa2xxx_enclosure_device(struct ctlr_info *h, | 1530 | static int add_msa2xxx_enclosure_device(struct ctlr_info *h, |
1531 | struct hpsa_scsi_dev_t *tmpdevice, | 1531 | struct hpsa_scsi_dev_t *tmpdevice, |
1532 | struct hpsa_scsi_dev_t *this_device, __u8 *lunaddrbytes, | 1532 | struct hpsa_scsi_dev_t *this_device, u8 *lunaddrbytes, |
1533 | int bus, int target, int lun, unsigned long lunzerobits[], | 1533 | int bus, int target, int lun, unsigned long lunzerobits[], |
1534 | int *nmsa2xxx_enclosures) | 1534 | int *nmsa2xxx_enclosures) |
1535 | { | 1535 | { |
@@ -1576,8 +1576,8 @@ static int add_msa2xxx_enclosure_device(struct ctlr_info *h, | |||
1576 | */ | 1576 | */ |
1577 | static int hpsa_gather_lun_info(struct ctlr_info *h, | 1577 | static int hpsa_gather_lun_info(struct ctlr_info *h, |
1578 | int reportlunsize, | 1578 | int reportlunsize, |
1579 | struct ReportLUNdata *physdev, __u32 *nphysicals, | 1579 | struct ReportLUNdata *physdev, u32 *nphysicals, |
1580 | struct ReportLUNdata *logdev, __u32 *nlogicals) | 1580 | struct ReportLUNdata *logdev, u32 *nlogicals) |
1581 | { | 1581 | { |
1582 | if (hpsa_scsi_do_report_phys_luns(h, physdev, reportlunsize, 0)) { | 1582 | if (hpsa_scsi_do_report_phys_luns(h, physdev, reportlunsize, 0)) { |
1583 | dev_err(&h->pdev->dev, "report physical LUNs failed.\n"); | 1583 | dev_err(&h->pdev->dev, "report physical LUNs failed.\n"); |
@@ -1636,9 +1636,9 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) | |||
1636 | struct ReportLUNdata *physdev_list = NULL; | 1636 | struct ReportLUNdata *physdev_list = NULL; |
1637 | struct ReportLUNdata *logdev_list = NULL; | 1637 | struct ReportLUNdata *logdev_list = NULL; |
1638 | unsigned char *inq_buff = NULL; | 1638 | unsigned char *inq_buff = NULL; |
1639 | __u32 nphysicals = 0; | 1639 | u32 nphysicals = 0; |
1640 | __u32 nlogicals = 0; | 1640 | u32 nlogicals = 0; |
1641 | __u32 ndev_allocated = 0; | 1641 | u32 ndev_allocated = 0; |
1642 | struct hpsa_scsi_dev_t **currentsd, *this_device, *tmpdevice; | 1642 | struct hpsa_scsi_dev_t **currentsd, *this_device, *tmpdevice; |
1643 | int ncurrent = 0; | 1643 | int ncurrent = 0; |
1644 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 8; | 1644 | int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 8; |
@@ -1684,7 +1684,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) | |||
1684 | /* adjust our table of devices */ | 1684 | /* adjust our table of devices */ |
1685 | nmsa2xxx_enclosures = 0; | 1685 | nmsa2xxx_enclosures = 0; |
1686 | for (i = 0; i < nphysicals + nlogicals + 1; i++) { | 1686 | for (i = 0; i < nphysicals + nlogicals + 1; i++) { |
1687 | __u8 *lunaddrbytes; | 1687 | u8 *lunaddrbytes; |
1688 | 1688 | ||
1689 | /* Figure out where the LUN ID info is coming from */ | 1689 | /* Figure out where the LUN ID info is coming from */ |
1690 | if (i < nphysicals) | 1690 | if (i < nphysicals) |
@@ -1790,7 +1790,7 @@ static int hpsa_scatter_gather(struct pci_dev *pdev, | |||
1790 | { | 1790 | { |
1791 | unsigned int len; | 1791 | unsigned int len; |
1792 | struct scatterlist *sg; | 1792 | struct scatterlist *sg; |
1793 | __u64 addr64; | 1793 | u64 addr64; |
1794 | int use_sg, i; | 1794 | int use_sg, i; |
1795 | 1795 | ||
1796 | BUG_ON(scsi_sg_count(cmd) > MAXSGENTRIES); | 1796 | BUG_ON(scsi_sg_count(cmd) > MAXSGENTRIES); |
@@ -1803,20 +1803,20 @@ static int hpsa_scatter_gather(struct pci_dev *pdev, | |||
1803 | goto sglist_finished; | 1803 | goto sglist_finished; |
1804 | 1804 | ||
1805 | scsi_for_each_sg(cmd, sg, use_sg, i) { | 1805 | scsi_for_each_sg(cmd, sg, use_sg, i) { |
1806 | addr64 = (__u64) sg_dma_address(sg); | 1806 | addr64 = (u64) sg_dma_address(sg); |
1807 | len = sg_dma_len(sg); | 1807 | len = sg_dma_len(sg); |
1808 | cp->SG[i].Addr.lower = | 1808 | cp->SG[i].Addr.lower = |
1809 | (__u32) (addr64 & (__u64) 0x00000000FFFFFFFF); | 1809 | (u32) (addr64 & (u64) 0x00000000FFFFFFFF); |
1810 | cp->SG[i].Addr.upper = | 1810 | cp->SG[i].Addr.upper = |
1811 | (__u32) ((addr64 >> 32) & (__u64) 0x00000000FFFFFFFF); | 1811 | (u32) ((addr64 >> 32) & (u64) 0x00000000FFFFFFFF); |
1812 | cp->SG[i].Len = len; | 1812 | cp->SG[i].Len = len; |
1813 | cp->SG[i].Ext = 0; /* we are not chaining */ | 1813 | cp->SG[i].Ext = 0; /* we are not chaining */ |
1814 | } | 1814 | } |
1815 | 1815 | ||
1816 | sglist_finished: | 1816 | sglist_finished: |
1817 | 1817 | ||
1818 | cp->Header.SGList = (__u8) use_sg; /* no. SGs contig in this cmd */ | 1818 | cp->Header.SGList = (u8) use_sg; /* no. SGs contig in this cmd */ |
1819 | cp->Header.SGTotal = (__u16) use_sg; /* total sgs in this cmd list */ | 1819 | cp->Header.SGTotal = (u16) use_sg; /* total sgs in this cmd list */ |
1820 | return 0; | 1820 | return 0; |
1821 | } | 1821 | } |
1822 | 1822 | ||
@@ -2053,8 +2053,8 @@ static struct CommandList *cmd_alloc(struct ctlr_info *h) | |||
2053 | c->cmdindex = i; | 2053 | c->cmdindex = i; |
2054 | 2054 | ||
2055 | INIT_HLIST_NODE(&c->list); | 2055 | INIT_HLIST_NODE(&c->list); |
2056 | c->busaddr = (__u32) cmd_dma_handle; | 2056 | c->busaddr = (u32) cmd_dma_handle; |
2057 | temp64.val = (__u64) err_dma_handle; | 2057 | temp64.val = (u64) err_dma_handle; |
2058 | c->ErrDesc.Addr.lower = temp64.val32.lower; | 2058 | c->ErrDesc.Addr.lower = temp64.val32.lower; |
2059 | c->ErrDesc.Addr.upper = temp64.val32.upper; | 2059 | c->ErrDesc.Addr.upper = temp64.val32.upper; |
2060 | c->ErrDesc.Len = sizeof(*c->err_info); | 2060 | c->ErrDesc.Len = sizeof(*c->err_info); |
@@ -2091,8 +2091,8 @@ static struct CommandList *cmd_special_alloc(struct ctlr_info *h) | |||
2091 | memset(c->err_info, 0, sizeof(*c->err_info)); | 2091 | memset(c->err_info, 0, sizeof(*c->err_info)); |
2092 | 2092 | ||
2093 | INIT_HLIST_NODE(&c->list); | 2093 | INIT_HLIST_NODE(&c->list); |
2094 | c->busaddr = (__u32) cmd_dma_handle; | 2094 | c->busaddr = (u32) cmd_dma_handle; |
2095 | temp64.val = (__u64) err_dma_handle; | 2095 | temp64.val = (u64) err_dma_handle; |
2096 | c->ErrDesc.Addr.lower = temp64.val32.lower; | 2096 | c->ErrDesc.Addr.lower = temp64.val32.lower; |
2097 | c->ErrDesc.Addr.upper = temp64.val32.upper; | 2097 | c->ErrDesc.Addr.upper = temp64.val32.upper; |
2098 | c->ErrDesc.Len = sizeof(*c->err_info); | 2098 | c->ErrDesc.Len = sizeof(*c->err_info); |
@@ -2378,8 +2378,8 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp) | |||
2378 | BYTE sg_used = 0; | 2378 | BYTE sg_used = 0; |
2379 | int status = 0; | 2379 | int status = 0; |
2380 | int i; | 2380 | int i; |
2381 | __u32 left; | 2381 | u32 left; |
2382 | __u32 sz; | 2382 | u32 sz; |
2383 | BYTE __user *data_ptr; | 2383 | BYTE __user *data_ptr; |
2384 | 2384 | ||
2385 | if (!argp) | 2385 | if (!argp) |
@@ -2542,8 +2542,8 @@ static int hpsa_ioctl(struct scsi_device *dev, int cmd, void *arg) | |||
2542 | } | 2542 | } |
2543 | } | 2543 | } |
2544 | 2544 | ||
2545 | static void fill_cmd(struct CommandList *c, __u8 cmd, struct ctlr_info *h, | 2545 | static void fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h, |
2546 | void *buff, size_t size, __u8 page_code, unsigned char *scsi3addr, | 2546 | void *buff, size_t size, u8 page_code, unsigned char *scsi3addr, |
2547 | int cmd_type) | 2547 | int cmd_type) |
2548 | { | 2548 | { |
2549 | int pci_dir = XFER_NONE; | 2549 | int pci_dir = XFER_NONE; |
@@ -2721,8 +2721,8 @@ static inline long interrupt_not_for_us(struct ctlr_info *h) | |||
2721 | (h->interrupts_enabled == 0)); | 2721 | (h->interrupts_enabled == 0)); |
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | static inline int bad_tag(struct ctlr_info *h, __u32 tag_index, | 2724 | static inline int bad_tag(struct ctlr_info *h, u32 tag_index, |
2725 | __u32 raw_tag) | 2725 | u32 raw_tag) |
2726 | { | 2726 | { |
2727 | if (unlikely(tag_index >= h->nr_cmds)) { | 2727 | if (unlikely(tag_index >= h->nr_cmds)) { |
2728 | dev_warn(&h->pdev->dev, "bad tag 0x%08x ignored.\n", raw_tag); | 2728 | dev_warn(&h->pdev->dev, "bad tag 0x%08x ignored.\n", raw_tag); |
@@ -2731,7 +2731,7 @@ static inline int bad_tag(struct ctlr_info *h, __u32 tag_index, | |||
2731 | return 0; | 2731 | return 0; |
2732 | } | 2732 | } |
2733 | 2733 | ||
2734 | static inline void finish_cmd(struct CommandList *c, __u32 raw_tag) | 2734 | static inline void finish_cmd(struct CommandList *c, u32 raw_tag) |
2735 | { | 2735 | { |
2736 | removeQ(c); | 2736 | removeQ(c); |
2737 | if (likely(c->cmd_type == CMD_SCSI)) | 2737 | if (likely(c->cmd_type == CMD_SCSI)) |
@@ -2745,7 +2745,7 @@ static irqreturn_t do_hpsa_intr(int irq, void *dev_id) | |||
2745 | struct ctlr_info *h = dev_id; | 2745 | struct ctlr_info *h = dev_id; |
2746 | struct CommandList *c; | 2746 | struct CommandList *c; |
2747 | unsigned long flags; | 2747 | unsigned long flags; |
2748 | __u32 raw_tag, tag, tag_index; | 2748 | u32 raw_tag, tag, tag_index; |
2749 | struct hlist_node *tmp; | 2749 | struct hlist_node *tmp; |
2750 | 2750 | ||
2751 | if (interrupt_not_for_us(h)) | 2751 | if (interrupt_not_for_us(h)) |
@@ -3063,7 +3063,7 @@ static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr) | |||
3063 | */ | 3063 | */ |
3064 | 3064 | ||
3065 | static void __devinit hpsa_interrupt_mode(struct ctlr_info *h, | 3065 | static void __devinit hpsa_interrupt_mode(struct ctlr_info *h, |
3066 | struct pci_dev *pdev, __u32 board_id) | 3066 | struct pci_dev *pdev, u32 board_id) |
3067 | { | 3067 | { |
3068 | #ifdef CONFIG_PCI_MSI | 3068 | #ifdef CONFIG_PCI_MSI |
3069 | int err; | 3069 | int err; |
@@ -3114,15 +3114,15 @@ default_int_mode: | |||
3114 | static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev) | 3114 | static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev) |
3115 | { | 3115 | { |
3116 | ushort subsystem_vendor_id, subsystem_device_id, command; | 3116 | ushort subsystem_vendor_id, subsystem_device_id, command; |
3117 | __u32 board_id, scratchpad = 0; | 3117 | u32 board_id, scratchpad = 0; |
3118 | __u64 cfg_offset; | 3118 | u64 cfg_offset; |
3119 | __u32 cfg_base_addr; | 3119 | u32 cfg_base_addr; |
3120 | __u64 cfg_base_addr_index; | 3120 | u64 cfg_base_addr_index; |
3121 | int i, prod_index, err; | 3121 | int i, prod_index, err; |
3122 | 3122 | ||
3123 | subsystem_vendor_id = pdev->subsystem_vendor; | 3123 | subsystem_vendor_id = pdev->subsystem_vendor; |
3124 | subsystem_device_id = pdev->subsystem_device; | 3124 | subsystem_device_id = pdev->subsystem_device; |
3125 | board_id = (((__u32) (subsystem_device_id << 16) & 0xffff0000) | | 3125 | board_id = (((u32) (subsystem_device_id << 16) & 0xffff0000) | |
3126 | subsystem_vendor_id); | 3126 | subsystem_vendor_id); |
3127 | 3127 | ||
3128 | for (i = 0; i < ARRAY_SIZE(products); i++) | 3128 | for (i = 0; i < ARRAY_SIZE(products); i++) |
@@ -3199,7 +3199,7 @@ static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev) | |||
3199 | 3199 | ||
3200 | /* get the address index number */ | 3200 | /* get the address index number */ |
3201 | cfg_base_addr = readl(h->vaddr + SA5_CTCFG_OFFSET); | 3201 | cfg_base_addr = readl(h->vaddr + SA5_CTCFG_OFFSET); |
3202 | cfg_base_addr &= (__u32) 0x0000ffff; | 3202 | cfg_base_addr &= (u32) 0x0000ffff; |
3203 | cfg_base_addr_index = find_PCI_BAR_index(pdev, cfg_base_addr); | 3203 | cfg_base_addr_index = find_PCI_BAR_index(pdev, cfg_base_addr); |
3204 | if (cfg_base_addr_index == -1) { | 3204 | if (cfg_base_addr_index == -1) { |
3205 | dev_warn(&pdev->dev, "cannot find cfg_base_addr_index\n"); | 3205 | dev_warn(&pdev->dev, "cannot find cfg_base_addr_index\n"); |
@@ -3232,7 +3232,7 @@ static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev) | |||
3232 | #ifdef CONFIG_X86 | 3232 | #ifdef CONFIG_X86 |
3233 | { | 3233 | { |
3234 | /* Need to enable prefetch in the SCSI core for 6400 in x86 */ | 3234 | /* Need to enable prefetch in the SCSI core for 6400 in x86 */ |
3235 | __u32 prefetch; | 3235 | u32 prefetch; |
3236 | prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); | 3236 | prefetch = readl(&(h->cfgtable->SCSI_Prefetch)); |
3237 | prefetch |= 0x100; | 3237 | prefetch |= 0x100; |
3238 | writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); | 3238 | writel(prefetch, &(h->cfgtable->SCSI_Prefetch)); |
@@ -3244,7 +3244,7 @@ static int hpsa_pci_init(struct ctlr_info *h, struct pci_dev *pdev) | |||
3244 | * physical memory. | 3244 | * physical memory. |
3245 | */ | 3245 | */ |
3246 | if (board_id == 0x3225103C) { | 3246 | if (board_id == 0x3225103C) { |
3247 | __u32 dma_prefetch; | 3247 | u32 dma_prefetch; |
3248 | dma_prefetch = readl(h->vaddr + I2O_DMA1_CFG); | 3248 | dma_prefetch = readl(h->vaddr + I2O_DMA1_CFG); |
3249 | dma_prefetch |= 0x8000; | 3249 | dma_prefetch |= 0x8000; |
3250 | writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); | 3250 | writel(dma_prefetch, h->vaddr + I2O_DMA1_CFG); |
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h index 6bd1949144b5..194968e861c7 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h | |||
@@ -55,7 +55,7 @@ struct ctlr_info { | |||
55 | char *product_name; | 55 | char *product_name; |
56 | char firm_ver[4]; /* Firmware version */ | 56 | char firm_ver[4]; /* Firmware version */ |
57 | struct pci_dev *pdev; | 57 | struct pci_dev *pdev; |
58 | __u32 board_id; | 58 | u32 board_id; |
59 | void __iomem *vaddr; | 59 | void __iomem *vaddr; |
60 | unsigned long paddr; | 60 | unsigned long paddr; |
61 | int nr_cmds; /* Number of commands allowed on this controller */ | 61 | int nr_cmds; /* Number of commands allowed on this controller */ |
@@ -261,7 +261,7 @@ static struct access_method SA5_access = { | |||
261 | }; | 261 | }; |
262 | 262 | ||
263 | struct board_type { | 263 | struct board_type { |
264 | __u32 board_id; | 264 | u32 board_id; |
265 | char *product_name; | 265 | char *product_name; |
266 | struct access_method *access; | 266 | struct access_method *access; |
267 | }; | 267 | }; |
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 2df1c661ce10..88bb3b0a21d3 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h | |||
@@ -107,13 +107,13 @@ | |||
107 | #define CFGTBL_BusType_Fibre1G 0x00000100l | 107 | #define CFGTBL_BusType_Fibre1G 0x00000100l |
108 | #define CFGTBL_BusType_Fibre2G 0x00000200l | 108 | #define CFGTBL_BusType_Fibre2G 0x00000200l |
109 | struct vals32 { | 109 | struct vals32 { |
110 | __u32 lower; | 110 | u32 lower; |
111 | __u32 upper; | 111 | u32 upper; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | union u64bit { | 114 | union u64bit { |
115 | struct vals32 val32; | 115 | struct vals32 val32; |
116 | __u64 val; | 116 | u64 val; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* FIXME this is a per controller value (barf!) */ | 119 | /* FIXME this is a per controller value (barf!) */ |
@@ -126,34 +126,34 @@ union u64bit { | |||
126 | 126 | ||
127 | #define HPSA_INQUIRY 0x12 | 127 | #define HPSA_INQUIRY 0x12 |
128 | struct InquiryData { | 128 | struct InquiryData { |
129 | __u8 data_byte[36]; | 129 | u8 data_byte[36]; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | #define HPSA_REPORT_LOG 0xc2 /* Report Logical LUNs */ | 132 | #define HPSA_REPORT_LOG 0xc2 /* Report Logical LUNs */ |
133 | #define HPSA_REPORT_PHYS 0xc3 /* Report Physical LUNs */ | 133 | #define HPSA_REPORT_PHYS 0xc3 /* Report Physical LUNs */ |
134 | struct ReportLUNdata { | 134 | struct ReportLUNdata { |
135 | __u8 LUNListLength[4]; | 135 | u8 LUNListLength[4]; |
136 | __u32 reserved; | 136 | u32 reserved; |
137 | __u8 LUN[HPSA_MAX_LUN][8]; | 137 | u8 LUN[HPSA_MAX_LUN][8]; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct ReportExtendedLUNdata { | 140 | struct ReportExtendedLUNdata { |
141 | __u8 LUNListLength[4]; | 141 | u8 LUNListLength[4]; |
142 | __u8 extended_response_flag; | 142 | u8 extended_response_flag; |
143 | __u8 reserved[3]; | 143 | u8 reserved[3]; |
144 | __u8 LUN[HPSA_MAX_LUN][24]; | 144 | u8 LUN[HPSA_MAX_LUN][24]; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | struct SenseSubsystem_info { | 147 | struct SenseSubsystem_info { |
148 | __u8 reserved[36]; | 148 | u8 reserved[36]; |
149 | __u8 portname[8]; | 149 | u8 portname[8]; |
150 | __u8 reserved1[1108]; | 150 | u8 reserved1[1108]; |
151 | }; | 151 | }; |
152 | 152 | ||
153 | #define HPSA_READ_CAPACITY 0x25 /* Read Capacity */ | 153 | #define HPSA_READ_CAPACITY 0x25 /* Read Capacity */ |
154 | struct ReadCapdata { | 154 | struct ReadCapdata { |
155 | __u8 total_size[4]; /* Total size in blocks */ | 155 | u8 total_size[4]; /* Total size in blocks */ |
156 | __u8 block_size[4]; /* Size of blocks in bytes */ | 156 | u8 block_size[4]; /* Size of blocks in bytes */ |
157 | }; | 157 | }; |
158 | 158 | ||
159 | #if 0 | 159 | #if 0 |
@@ -174,94 +174,94 @@ struct ReadCapdata { | |||
174 | /* Command List Structure */ | 174 | /* Command List Structure */ |
175 | union SCSI3Addr { | 175 | union SCSI3Addr { |
176 | struct { | 176 | struct { |
177 | __u8 Dev; | 177 | u8 Dev; |
178 | __u8 Bus:6; | 178 | u8 Bus:6; |
179 | __u8 Mode:2; /* b00 */ | 179 | u8 Mode:2; /* b00 */ |
180 | } PeripDev; | 180 | } PeripDev; |
181 | struct { | 181 | struct { |
182 | __u8 DevLSB; | 182 | u8 DevLSB; |
183 | __u8 DevMSB:6; | 183 | u8 DevMSB:6; |
184 | __u8 Mode:2; /* b01 */ | 184 | u8 Mode:2; /* b01 */ |
185 | } LogDev; | 185 | } LogDev; |
186 | struct { | 186 | struct { |
187 | __u8 Dev:5; | 187 | u8 Dev:5; |
188 | __u8 Bus:3; | 188 | u8 Bus:3; |
189 | __u8 Targ:6; | 189 | u8 Targ:6; |
190 | __u8 Mode:2; /* b10 */ | 190 | u8 Mode:2; /* b10 */ |
191 | } LogUnit; | 191 | } LogUnit; |
192 | }; | 192 | }; |
193 | 193 | ||
194 | struct PhysDevAddr { | 194 | struct PhysDevAddr { |
195 | __u32 TargetId:24; | 195 | u32 TargetId:24; |
196 | __u32 Bus:6; | 196 | u32 Bus:6; |
197 | __u32 Mode:2; | 197 | u32 Mode:2; |
198 | /* 2 level target device addr */ | 198 | /* 2 level target device addr */ |
199 | union SCSI3Addr Target[2]; | 199 | union SCSI3Addr Target[2]; |
200 | }; | 200 | }; |
201 | 201 | ||
202 | struct LogDevAddr { | 202 | struct LogDevAddr { |
203 | __u32 VolId:30; | 203 | u32 VolId:30; |
204 | __u32 Mode:2; | 204 | u32 Mode:2; |
205 | __u8 reserved[4]; | 205 | u8 reserved[4]; |
206 | }; | 206 | }; |
207 | 207 | ||
208 | union LUNAddr { | 208 | union LUNAddr { |
209 | __u8 LunAddrBytes[8]; | 209 | u8 LunAddrBytes[8]; |
210 | union SCSI3Addr SCSI3Lun[4]; | 210 | union SCSI3Addr SCSI3Lun[4]; |
211 | struct PhysDevAddr PhysDev; | 211 | struct PhysDevAddr PhysDev; |
212 | struct LogDevAddr LogDev; | 212 | struct LogDevAddr LogDev; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | struct CommandListHeader { | 215 | struct CommandListHeader { |
216 | __u8 ReplyQueue; | 216 | u8 ReplyQueue; |
217 | __u8 SGList; | 217 | u8 SGList; |
218 | __u16 SGTotal; | 218 | u16 SGTotal; |
219 | struct vals32 Tag; | 219 | struct vals32 Tag; |
220 | union LUNAddr LUN; | 220 | union LUNAddr LUN; |
221 | }; | 221 | }; |
222 | 222 | ||
223 | struct RequestBlock { | 223 | struct RequestBlock { |
224 | __u8 CDBLen; | 224 | u8 CDBLen; |
225 | struct { | 225 | struct { |
226 | __u8 Type:3; | 226 | u8 Type:3; |
227 | __u8 Attribute:3; | 227 | u8 Attribute:3; |
228 | __u8 Direction:2; | 228 | u8 Direction:2; |
229 | } Type; | 229 | } Type; |
230 | __u16 Timeout; | 230 | u16 Timeout; |
231 | __u8 CDB[16]; | 231 | u8 CDB[16]; |
232 | }; | 232 | }; |
233 | 233 | ||
234 | struct ErrDescriptor { | 234 | struct ErrDescriptor { |
235 | struct vals32 Addr; | 235 | struct vals32 Addr; |
236 | __u32 Len; | 236 | u32 Len; |
237 | }; | 237 | }; |
238 | 238 | ||
239 | struct SGDescriptor { | 239 | struct SGDescriptor { |
240 | struct vals32 Addr; | 240 | struct vals32 Addr; |
241 | __u32 Len; | 241 | u32 Len; |
242 | __u32 Ext; | 242 | u32 Ext; |
243 | }; | 243 | }; |
244 | 244 | ||
245 | union MoreErrInfo { | 245 | union MoreErrInfo { |
246 | struct { | 246 | struct { |
247 | __u8 Reserved[3]; | 247 | u8 Reserved[3]; |
248 | __u8 Type; | 248 | u8 Type; |
249 | __u32 ErrorInfo; | 249 | u32 ErrorInfo; |
250 | } Common_Info; | 250 | } Common_Info; |
251 | struct { | 251 | struct { |
252 | __u8 Reserved[2]; | 252 | u8 Reserved[2]; |
253 | __u8 offense_size; /* size of offending entry */ | 253 | u8 offense_size; /* size of offending entry */ |
254 | __u8 offense_num; /* byte # of offense 0-base */ | 254 | u8 offense_num; /* byte # of offense 0-base */ |
255 | __u32 offense_value; | 255 | u32 offense_value; |
256 | } Invalid_Cmd; | 256 | } Invalid_Cmd; |
257 | }; | 257 | }; |
258 | struct ErrorInfo { | 258 | struct ErrorInfo { |
259 | __u8 ScsiStatus; | 259 | u8 ScsiStatus; |
260 | __u8 SenseLen; | 260 | u8 SenseLen; |
261 | __u16 CommandStatus; | 261 | u16 CommandStatus; |
262 | __u32 ResidualCnt; | 262 | u32 ResidualCnt; |
263 | union MoreErrInfo MoreErrInfo; | 263 | union MoreErrInfo MoreErrInfo; |
264 | __u8 SenseInfo[SENSEINFOBYTES]; | 264 | u8 SenseInfo[SENSEINFOBYTES]; |
265 | }; | 265 | }; |
266 | /* Command types */ | 266 | /* Command types */ |
267 | #define CMD_IOCTL_PEND 0x01 | 267 | #define CMD_IOCTL_PEND 0x01 |
@@ -279,7 +279,7 @@ struct CommandList { | |||
279 | struct ErrDescriptor ErrDesc; | 279 | struct ErrDescriptor ErrDesc; |
280 | struct SGDescriptor SG[MAXSGENTRIES]; | 280 | struct SGDescriptor SG[MAXSGENTRIES]; |
281 | /* information associated with the command */ | 281 | /* information associated with the command */ |
282 | __u32 busaddr; /* physical addr of this record */ | 282 | u32 busaddr; /* physical addr of this record */ |
283 | struct ErrorInfo *err_info; /* pointer to the allocated mem */ | 283 | struct ErrorInfo *err_info; /* pointer to the allocated mem */ |
284 | struct ctlr_info *h; | 284 | struct ctlr_info *h; |
285 | int cmd_type; | 285 | int cmd_type; |
@@ -295,31 +295,31 @@ struct CommandList { | |||
295 | 295 | ||
296 | /* Configuration Table Structure */ | 296 | /* Configuration Table Structure */ |
297 | struct HostWrite { | 297 | struct HostWrite { |
298 | __u32 TransportRequest; | 298 | u32 TransportRequest; |
299 | __u32 Reserved; | 299 | u32 Reserved; |
300 | __u32 CoalIntDelay; | 300 | u32 CoalIntDelay; |
301 | __u32 CoalIntCount; | 301 | u32 CoalIntCount; |
302 | }; | 302 | }; |
303 | 303 | ||
304 | struct CfgTable { | 304 | struct CfgTable { |
305 | __u8 Signature[4]; | 305 | u8 Signature[4]; |
306 | __u32 SpecValence; | 306 | u32 SpecValence; |
307 | __u32 TransportSupport; | 307 | u32 TransportSupport; |
308 | __u32 TransportActive; | 308 | u32 TransportActive; |
309 | struct HostWrite HostWrite; | 309 | struct HostWrite HostWrite; |
310 | __u32 CmdsOutMax; | 310 | u32 CmdsOutMax; |
311 | __u32 BusTypes; | 311 | u32 BusTypes; |
312 | __u32 Reserved; | 312 | u32 Reserved; |
313 | __u8 ServerName[16]; | 313 | u8 ServerName[16]; |
314 | __u32 HeartBeat; | 314 | u32 HeartBeat; |
315 | __u32 SCSI_Prefetch; | 315 | u32 SCSI_Prefetch; |
316 | }; | 316 | }; |
317 | 317 | ||
318 | struct hpsa_pci_info { | 318 | struct hpsa_pci_info { |
319 | unsigned char bus; | 319 | unsigned char bus; |
320 | unsigned char dev_fn; | 320 | unsigned char dev_fn; |
321 | unsigned short domain; | 321 | unsigned short domain; |
322 | __u32 board_id; | 322 | u32 board_id; |
323 | }; | 323 | }; |
324 | 324 | ||
325 | #pragma pack() | 325 | #pragma pack() |