diff options
author | Greg KH <gregkh@suse.de> | 2005-09-09 17:26:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-09 17:26:01 -0400 |
commit | 8ccc457722ba226ea72fca6f9ba3b54535d4749e (patch) | |
tree | e323eda3b7ed55a5398751021e8031c1cae56f9d /drivers/scsi | |
parent | 20dd026d7f5a6972dc78b4928a99620001fa547d (diff) | |
parent | 5dce225bd9ea60e28e17076de63df0dee51b2883 (diff) |
Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ahci.c | 16 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 14 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 16 | ||||
-rw-r--r-- | drivers/scsi/sata_sis.c | 34 | ||||
-rw-r--r-- | drivers/scsi/sata_uli.c | 14 |
5 files changed, 14 insertions, 80 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 320df6cd3def..c2c8fa828e24 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -865,22 +865,6 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) | |||
865 | return 0; | 865 | return 0; |
866 | } | 866 | } |
867 | 867 | ||
868 | /* move to PCI layer, integrate w/ MSI stuff */ | ||
869 | static void pci_intx(struct pci_dev *pdev, int enable) | ||
870 | { | ||
871 | u16 pci_command, new; | ||
872 | |||
873 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
874 | |||
875 | if (enable) | ||
876 | new = pci_command & ~PCI_COMMAND_INTX_DISABLE; | ||
877 | else | ||
878 | new = pci_command | PCI_COMMAND_INTX_DISABLE; | ||
879 | |||
880 | if (new != pci_command) | ||
881 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
882 | } | ||
883 | |||
884 | static void ahci_print_info(struct ata_probe_ent *probe_ent) | 868 | static void ahci_print_info(struct ata_probe_ent *probe_ent) |
885 | { | 869 | { |
886 | struct ahci_host_priv *hpriv = probe_ent->private_data; | 870 | struct ahci_host_priv *hpriv = probe_ent->private_data; |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 5f8688529041..87e0c36f1554 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -568,18 +568,6 @@ static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
568 | } | 568 | } |
569 | } | 569 | } |
570 | 570 | ||
571 | /* move to PCI layer, integrate w/ MSI stuff */ | ||
572 | static void pci_enable_intx(struct pci_dev *pdev) | ||
573 | { | ||
574 | u16 pci_command; | ||
575 | |||
576 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
577 | if (pci_command & PCI_COMMAND_INTX_DISABLE) { | ||
578 | pci_command &= ~PCI_COMMAND_INTX_DISABLE; | ||
579 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
580 | } | ||
581 | } | ||
582 | |||
583 | #define AHCI_PCI_BAR 5 | 571 | #define AHCI_PCI_BAR 5 |
584 | #define AHCI_GLOBAL_CTL 0x04 | 572 | #define AHCI_GLOBAL_CTL 0x04 |
585 | #define AHCI_ENABLE (1 << 31) | 573 | #define AHCI_ENABLE (1 << 31) |
@@ -677,7 +665,7 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
677 | * message-signalled interrupts currently). | 665 | * message-signalled interrupts currently). |
678 | */ | 666 | */ |
679 | if (port_info[0]->host_flags & PIIX_FLAG_CHECKINTR) | 667 | if (port_info[0]->host_flags & PIIX_FLAG_CHECKINTR) |
680 | pci_enable_intx(pdev); | 668 | pci_intx(pdev, 1); |
681 | 669 | ||
682 | if (combined) { | 670 | if (combined) { |
683 | port_info[sata_chan] = &piix_port_info[ent->driver_data]; | 671 | port_info[sata_chan] = &piix_port_info[ent->driver_data]; |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index f97e3afa97d9..ea76fe44585e 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -699,22 +699,6 @@ static int mv_host_init(struct ata_probe_ent *probe_ent) | |||
699 | return rc; | 699 | return rc; |
700 | } | 700 | } |
701 | 701 | ||
702 | /* move to PCI layer, integrate w/ MSI stuff */ | ||
703 | static void pci_intx(struct pci_dev *pdev, int enable) | ||
704 | { | ||
705 | u16 pci_command, new; | ||
706 | |||
707 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
708 | |||
709 | if (enable) | ||
710 | new = pci_command & ~PCI_COMMAND_INTX_DISABLE; | ||
711 | else | ||
712 | new = pci_command | PCI_COMMAND_INTX_DISABLE; | ||
713 | |||
714 | if (new != pci_command) | ||
715 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
716 | } | ||
717 | |||
718 | static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 702 | static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
719 | { | 703 | { |
720 | static int printed_version = 0; | 704 | static int printed_version = 0; |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 7d1aaa99aaae..a63f93186e41 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -55,7 +55,7 @@ enum { | |||
55 | SIS180_SATA1_OFS = 0x10, /* offset from sata0->sata1 phy regs */ | 55 | SIS180_SATA1_OFS = 0x10, /* offset from sata0->sata1 phy regs */ |
56 | SIS182_SATA1_OFS = 0x20, /* offset from sata0->sata1 phy regs */ | 56 | SIS182_SATA1_OFS = 0x20, /* offset from sata0->sata1 phy regs */ |
57 | SIS_PMR = 0x90, /* port mapping register */ | 57 | SIS_PMR = 0x90, /* port mapping register */ |
58 | SIS_PMR_COMBINED = 0x30, | 58 | SIS_PMR_COMBINED = 0x30, |
59 | 59 | ||
60 | /* random bits */ | 60 | /* random bits */ |
61 | SIS_FLAG_CFGSCR = (1 << 30), /* host flag: SCRs via PCI cfg */ | 61 | SIS_FLAG_CFGSCR = (1 << 30), /* host flag: SCRs via PCI cfg */ |
@@ -147,11 +147,13 @@ static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg, | |||
147 | { | 147 | { |
148 | unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); | 148 | unsigned int addr = SIS_SCR_BASE + (4 * sc_reg); |
149 | 149 | ||
150 | if (port_no) | 150 | if (port_no) { |
151 | if (device == 0x182) | 151 | if (device == 0x182) |
152 | addr += SIS182_SATA1_OFS; | 152 | addr += SIS182_SATA1_OFS; |
153 | else | 153 | else |
154 | addr += SIS180_SATA1_OFS; | 154 | addr += SIS180_SATA1_OFS; |
155 | } | ||
156 | |||
155 | return addr; | 157 | return addr; |
156 | } | 158 | } |
157 | 159 | ||
@@ -166,10 +168,10 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) | |||
166 | return 0xffffffff; | 168 | return 0xffffffff; |
167 | 169 | ||
168 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 170 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
169 | 171 | ||
170 | pci_read_config_dword(pdev, cfg_addr, &val); | 172 | pci_read_config_dword(pdev, cfg_addr, &val); |
171 | 173 | ||
172 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) | 174 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) |
173 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); | 175 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); |
174 | 176 | ||
175 | return val|val2; | 177 | return val|val2; |
@@ -185,7 +187,7 @@ static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) | |||
185 | return; | 187 | return; |
186 | 188 | ||
187 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 189 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
188 | 190 | ||
189 | pci_write_config_dword(pdev, cfg_addr, val); | 191 | pci_write_config_dword(pdev, cfg_addr, val); |
190 | 192 | ||
191 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) | 193 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) |
@@ -195,7 +197,7 @@ static void sis_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) | |||
195 | static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) | 197 | static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) |
196 | { | 198 | { |
197 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); | 199 | struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); |
198 | u32 val,val2; | 200 | u32 val, val2 = 0; |
199 | u8 pmr; | 201 | u8 pmr; |
200 | 202 | ||
201 | if (sc_reg > SCR_CONTROL) | 203 | if (sc_reg > SCR_CONTROL) |
@@ -209,9 +211,9 @@ static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg) | |||
209 | val = inl(ap->ioaddr.scr_addr + (sc_reg * 4)); | 211 | val = inl(ap->ioaddr.scr_addr + (sc_reg * 4)); |
210 | 212 | ||
211 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) | 213 | if ((pdev->device == 0x182) || (pmr & SIS_PMR_COMBINED)) |
212 | val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4)+0x10); | 214 | val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); |
213 | 215 | ||
214 | return val|val2; | 216 | return val | val2; |
215 | } | 217 | } |
216 | 218 | ||
217 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | 219 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) |
@@ -223,7 +225,7 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
223 | return; | 225 | return; |
224 | 226 | ||
225 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 227 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
226 | 228 | ||
227 | if (ap->flags & SIS_FLAG_CFGSCR) | 229 | if (ap->flags & SIS_FLAG_CFGSCR) |
228 | sis_scr_cfg_write(ap, sc_reg, val); | 230 | sis_scr_cfg_write(ap, sc_reg, val); |
229 | else { | 231 | else { |
@@ -233,18 +235,6 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
233 | } | 235 | } |
234 | } | 236 | } |
235 | 237 | ||
236 | /* move to PCI layer, integrate w/ MSI stuff */ | ||
237 | static void pci_enable_intx(struct pci_dev *pdev) | ||
238 | { | ||
239 | u16 pci_command; | ||
240 | |||
241 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
242 | if (pci_command & PCI_COMMAND_INTX_DISABLE) { | ||
243 | pci_command &= ~PCI_COMMAND_INTX_DISABLE; | ||
244 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
245 | } | ||
246 | } | ||
247 | |||
248 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 238 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
249 | { | 239 | { |
250 | struct ata_probe_ent *probe_ent = NULL; | 240 | struct ata_probe_ent *probe_ent = NULL; |
@@ -319,7 +309,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
319 | } | 309 | } |
320 | 310 | ||
321 | pci_set_master(pdev); | 311 | pci_set_master(pdev); |
322 | pci_enable_intx(pdev); | 312 | pci_intx(pdev, 1); |
323 | 313 | ||
324 | /* FIXME: check ata_device_add return value */ | 314 | /* FIXME: check ata_device_add return value */ |
325 | ata_device_add(probe_ent); | 315 | ata_device_add(probe_ent); |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index 42e13ed8eb5b..4c9fb8b71be1 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -176,18 +176,6 @@ static void uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
176 | uli_scr_cfg_write(ap, sc_reg, val); | 176 | uli_scr_cfg_write(ap, sc_reg, val); |
177 | } | 177 | } |
178 | 178 | ||
179 | /* move to PCI layer, integrate w/ MSI stuff */ | ||
180 | static void pci_enable_intx(struct pci_dev *pdev) | ||
181 | { | ||
182 | u16 pci_command; | ||
183 | |||
184 | pci_read_config_word(pdev, PCI_COMMAND, &pci_command); | ||
185 | if (pci_command & PCI_COMMAND_INTX_DISABLE) { | ||
186 | pci_command &= ~PCI_COMMAND_INTX_DISABLE; | ||
187 | pci_write_config_word(pdev, PCI_COMMAND, pci_command); | ||
188 | } | ||
189 | } | ||
190 | |||
191 | static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 179 | static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
192 | { | 180 | { |
193 | struct ata_probe_ent *probe_ent; | 181 | struct ata_probe_ent *probe_ent; |
@@ -260,7 +248,7 @@ static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
260 | } | 248 | } |
261 | 249 | ||
262 | pci_set_master(pdev); | 250 | pci_set_master(pdev); |
263 | pci_enable_intx(pdev); | 251 | pci_intx(pdev, 1); |
264 | 252 | ||
265 | /* FIXME: check ata_device_add return value */ | 253 | /* FIXME: check ata_device_add return value */ |
266 | ata_device_add(probe_ent); | 254 | ata_device_add(probe_ent); |