diff options
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/Makefile | 2 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 1 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 5 | ||||
-rw-r--r-- | drivers/scsi/aacraid/nark.c | 87 |
4 files changed, 92 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/Makefile b/drivers/scsi/aacraid/Makefile index 28d133a3094f..f1cca4ee5410 100644 --- a/drivers/scsi/aacraid/Makefile +++ b/drivers/scsi/aacraid/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | obj-$(CONFIG_SCSI_AACRAID) := aacraid.o | 3 | obj-$(CONFIG_SCSI_AACRAID) := aacraid.o |
4 | 4 | ||
5 | aacraid-objs := linit.o aachba.o commctrl.o comminit.o commsup.o \ | 5 | aacraid-objs := linit.o aachba.o commctrl.o comminit.o commsup.o \ |
6 | dpcsup.o rx.o sa.o rkt.o | 6 | dpcsup.o rx.o sa.o rkt.o nark.o |
7 | 7 | ||
8 | EXTRA_CFLAGS := -Idrivers/scsi | 8 | EXTRA_CFLAGS := -Idrivers/scsi |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 813e68993aa6..bdbd81e73f18 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -1810,6 +1810,7 @@ int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg); | |||
1810 | int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg); | 1810 | int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg); |
1811 | int aac_rx_init(struct aac_dev *dev); | 1811 | int aac_rx_init(struct aac_dev *dev); |
1812 | int aac_rkt_init(struct aac_dev *dev); | 1812 | int aac_rkt_init(struct aac_dev *dev); |
1813 | int aac_nark_init(struct aac_dev *dev); | ||
1813 | int aac_sa_init(struct aac_dev *dev); | 1814 | int aac_sa_init(struct aac_dev *dev); |
1814 | int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify); | 1815 | int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify); |
1815 | unsigned int aac_response_normal(struct aac_queue * q); | 1816 | unsigned int aac_response_normal(struct aac_queue * q); |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 359e7ddfdb47..1326c0a1bdae 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -157,6 +157,7 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
157 | { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 58 }, /* Legend Catchall */ | 157 | { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 58 }, /* Legend Catchall */ |
158 | { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 59 }, /* Adaptec Catch All */ | 158 | { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 59 }, /* Adaptec Catch All */ |
159 | { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 60 }, /* Adaptec Rocket Catch All */ | 159 | { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 60 }, /* Adaptec Rocket Catch All */ |
160 | { 0x9005, 0x0288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 61 }, /* Adaptec NEMER/ARK Catch All */ | ||
160 | { 0,} | 161 | { 0,} |
161 | }; | 162 | }; |
162 | MODULE_DEVICE_TABLE(pci, aac_pci_tbl); | 163 | MODULE_DEVICE_TABLE(pci, aac_pci_tbl); |
@@ -230,7 +231,8 @@ static struct aac_driver_ident aac_drivers[] = { | |||
230 | { aac_rx_init, "aacraid", "DELL ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Dell Catchall */ | 231 | { aac_rx_init, "aacraid", "DELL ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Dell Catchall */ |
231 | { aac_rx_init, "aacraid", "Legend ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Legend Catchall */ | 232 | { aac_rx_init, "aacraid", "Legend ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Legend Catchall */ |
232 | { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec Catch All */ | 233 | { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Adaptec Catch All */ |
233 | { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec Rocket Catch All */ | 234 | { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Rocket Catch All */ |
235 | { aac_nark_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec NEMER/ARK Catch All */ | ||
234 | }; | 236 | }; |
235 | 237 | ||
236 | /** | 238 | /** |
@@ -804,7 +806,6 @@ static struct scsi_host_template aac_driver_template = { | |||
804 | .emulated = 1, | 806 | .emulated = 1, |
805 | }; | 807 | }; |
806 | 808 | ||
807 | |||
808 | static int __devinit aac_probe_one(struct pci_dev *pdev, | 809 | static int __devinit aac_probe_one(struct pci_dev *pdev, |
809 | const struct pci_device_id *id) | 810 | const struct pci_device_id *id) |
810 | { | 811 | { |
diff --git a/drivers/scsi/aacraid/nark.c b/drivers/scsi/aacraid/nark.c new file mode 100644 index 000000000000..c76b611b6afb --- /dev/null +++ b/drivers/scsi/aacraid/nark.c | |||
@@ -0,0 +1,87 @@ | |||
1 | /* | ||
2 | * Adaptec AAC series RAID controller driver | ||
3 | * (c) Copyright 2001 Red Hat Inc. <alan@redhat.com> | ||
4 | * | ||
5 | * based on the old aacraid driver that is.. | ||
6 | * Adaptec aacraid device driver for Linux. | ||
7 | * | ||
8 | * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com) | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2, or (at your option) | ||
13 | * any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; see the file COPYING. If not, write to | ||
22 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | * | ||
24 | * Module Name: | ||
25 | * nark.c | ||
26 | * | ||
27 | * Abstract: Hardware Device Interface for NEMER/ARK | ||
28 | * | ||
29 | */ | ||
30 | |||
31 | #include <linux/pci.h> | ||
32 | #include <linux/blkdev.h> | ||
33 | |||
34 | #include <scsi/scsi_host.h> | ||
35 | |||
36 | #include "aacraid.h" | ||
37 | |||
38 | /** | ||
39 | * aac_nark_ioremap | ||
40 | * @size: mapping resize request | ||
41 | * | ||
42 | */ | ||
43 | static int aac_nark_ioremap(struct aac_dev * dev, u32 size) | ||
44 | { | ||
45 | if (!size) { | ||
46 | iounmap(dev->regs.rx); | ||
47 | dev->regs.rx = NULL; | ||
48 | iounmap(dev->base); | ||
49 | dev->base = NULL; | ||
50 | return 0; | ||
51 | } | ||
52 | dev->scsi_host_ptr->base = pci_resource_start(dev->pdev, 2); | ||
53 | dev->regs.rx = ioremap((u64)pci_resource_start(dev->pdev, 0) | | ||
54 | ((u64)pci_resource_start(dev->pdev, 1) << 32), | ||
55 | sizeof(struct rx_registers) - sizeof(struct rx_inbound)); | ||
56 | dev->base = NULL; | ||
57 | if (dev->regs.rx == NULL) | ||
58 | return -1; | ||
59 | dev->base = ioremap(dev->scsi_host_ptr->base, size); | ||
60 | if (dev->base == NULL) { | ||
61 | iounmap(dev->regs.rx); | ||
62 | dev->regs.rx = NULL; | ||
63 | return -1; | ||
64 | } | ||
65 | dev->IndexRegs = &((struct rx_registers __iomem *)dev->base)->IndexRegs; | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * aac_nark_init - initialize an NEMER/ARK Split Bar card | ||
71 | * @dev: device to configure | ||
72 | * | ||
73 | */ | ||
74 | |||
75 | int aac_nark_init(struct aac_dev * dev) | ||
76 | { | ||
77 | extern int _aac_rx_init(struct aac_dev *dev); | ||
78 | extern int aac_rx_select_comm(struct aac_dev *dev, int comm); | ||
79 | |||
80 | /* | ||
81 | * Fill in the function dispatch table. | ||
82 | */ | ||
83 | dev->a_ops.adapter_ioremap = aac_nark_ioremap; | ||
84 | dev->a_ops.adapter_comm = aac_rx_select_comm; | ||
85 | |||
86 | return _aac_rx_init(dev); | ||
87 | } | ||