diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 22:47:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 22:47:31 -0500 |
commit | 728c7763e7234cf8d34fa159660df736556563c9 (patch) | |
tree | fe66af9029dd1aea787d2a231a82dcaf5dc4c9ee /drivers | |
parent | d1138cf035ad5a8dc0796b213bd078a2fb92eb7c (diff) | |
parent | a1bd9e68573239320d18823c73eb06d8e56cc9e2 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 5 | ||||
-rw-r--r-- | drivers/scsi/ahci.c | 10 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 3 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 73 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 16 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 1 |
6 files changed, 97 insertions, 11 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 605f0df0bfba..dda6099903c1 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1142,6 +1142,9 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) | |||
1142 | case 0x27c4: | 1142 | case 0x27c4: |
1143 | ich = 7; | 1143 | ich = 7; |
1144 | break; | 1144 | break; |
1145 | case 0x2828: /* ICH8M */ | ||
1146 | ich = 8; | ||
1147 | break; | ||
1145 | default: | 1148 | default: |
1146 | /* we do not handle this PCI device */ | 1149 | /* we do not handle this PCI device */ |
1147 | return; | 1150 | return; |
@@ -1161,7 +1164,7 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) | |||
1161 | else | 1164 | else |
1162 | return; /* not in combined mode */ | 1165 | return; /* not in combined mode */ |
1163 | } else { | 1166 | } else { |
1164 | WARN_ON((ich != 6) && (ich != 7)); | 1167 | WARN_ON((ich != 6) && (ich != 7) && (ich != 8)); |
1165 | tmp &= 0x3; /* interesting bits 1:0 */ | 1168 | tmp &= 0x3; /* interesting bits 1:0 */ |
1166 | if (tmp & (1 << 0)) | 1169 | if (tmp & (1 << 0)) |
1167 | comb = (1 << 2); /* PATA port 0, SATA port 1 */ | 1170 | comb = (1 << 2); /* PATA port 0, SATA port 1 */ |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index d113290b5fc0..19bd346951dd 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -276,6 +276,16 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
276 | board_ahci }, /* ESB2 */ | 276 | board_ahci }, /* ESB2 */ |
277 | { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 277 | { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
278 | board_ahci }, /* ICH7-M DH */ | 278 | board_ahci }, /* ICH7-M DH */ |
279 | { PCI_VENDOR_ID_INTEL, 0x2821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
280 | board_ahci }, /* ICH8 */ | ||
281 | { PCI_VENDOR_ID_INTEL, 0x2822, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
282 | board_ahci }, /* ICH8 */ | ||
283 | { PCI_VENDOR_ID_INTEL, 0x2824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
284 | board_ahci }, /* ICH8 */ | ||
285 | { PCI_VENDOR_ID_INTEL, 0x2829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
286 | board_ahci }, /* ICH8M */ | ||
287 | { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
288 | board_ahci }, /* ICH8M */ | ||
279 | { } /* terminate list */ | 289 | { } /* terminate list */ |
280 | }; | 290 | }; |
281 | 291 | ||
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 557788ec4eec..fc3ca051ceed 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -157,6 +157,9 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
157 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 157 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
158 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 158 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
159 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 159 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
160 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | ||
161 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | ||
162 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | ||
160 | 163 | ||
161 | { } /* terminate list */ | 164 | { } /* terminate list */ |
162 | }; | 165 | }; |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 99bae8369ab2..46c4cdbaee86 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc) | |||
611 | if (dev->flags & ATA_DFLAG_PIO) { | 611 | if (dev->flags & ATA_DFLAG_PIO) { |
612 | tf->protocol = ATA_PROT_PIO; | 612 | tf->protocol = ATA_PROT_PIO; |
613 | index = dev->multi_count ? 0 : 8; | 613 | index = dev->multi_count ? 0 : 8; |
614 | } else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) { | ||
615 | /* Unable to use DMA due to host limitation */ | ||
616 | tf->protocol = ATA_PROT_PIO; | ||
617 | index = dev->multi_count ? 0 : 4; | ||
614 | } else { | 618 | } else { |
615 | tf->protocol = ATA_PROT_DMA; | 619 | tf->protocol = ATA_PROT_DMA; |
616 | index = 16; | 620 | index = 16; |
@@ -1051,18 +1055,22 @@ static unsigned int ata_pio_modes(const struct ata_device *adev) | |||
1051 | { | 1055 | { |
1052 | u16 modes; | 1056 | u16 modes; |
1053 | 1057 | ||
1054 | /* Usual case. Word 53 indicates word 88 is valid */ | 1058 | /* Usual case. Word 53 indicates word 64 is valid */ |
1055 | if (adev->id[ATA_ID_FIELD_VALID] & (1 << 2)) { | 1059 | if (adev->id[ATA_ID_FIELD_VALID] & (1 << 1)) { |
1056 | modes = adev->id[ATA_ID_PIO_MODES] & 0x03; | 1060 | modes = adev->id[ATA_ID_PIO_MODES] & 0x03; |
1057 | modes <<= 3; | 1061 | modes <<= 3; |
1058 | modes |= 0x7; | 1062 | modes |= 0x7; |
1059 | return modes; | 1063 | return modes; |
1060 | } | 1064 | } |
1061 | 1065 | ||
1062 | /* If word 88 isn't valid then Word 51 holds the PIO timing number | 1066 | /* If word 64 isn't valid then Word 51 high byte holds the PIO timing |
1063 | for the maximum. Turn it into a mask and return it */ | 1067 | number for the maximum. Turn it into a mask and return it */ |
1064 | modes = (2 << (adev->id[ATA_ID_OLD_PIO_MODES] & 0xFF)) - 1 ; | 1068 | modes = (2 << ((adev->id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF)) - 1 ; |
1065 | return modes; | 1069 | return modes; |
1070 | /* But wait.. there's more. Design your standards by committee and | ||
1071 | you too can get a free iordy field to process. However its the | ||
1072 | speeds not the modes that are supported... Note drivers using the | ||
1073 | timing API will get this right anyway */ | ||
1066 | } | 1074 | } |
1067 | 1075 | ||
1068 | struct ata_exec_internal_arg { | 1076 | struct ata_exec_internal_arg { |
@@ -1165,6 +1173,39 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev, | |||
1165 | } | 1173 | } |
1166 | 1174 | ||
1167 | /** | 1175 | /** |
1176 | * ata_pio_need_iordy - check if iordy needed | ||
1177 | * @adev: ATA device | ||
1178 | * | ||
1179 | * Check if the current speed of the device requires IORDY. Used | ||
1180 | * by various controllers for chip configuration. | ||
1181 | */ | ||
1182 | |||
1183 | unsigned int ata_pio_need_iordy(const struct ata_device *adev) | ||
1184 | { | ||
1185 | int pio; | ||
1186 | int speed = adev->pio_mode - XFER_PIO_0; | ||
1187 | |||
1188 | if (speed < 2) | ||
1189 | return 0; | ||
1190 | if (speed > 2) | ||
1191 | return 1; | ||
1192 | |||
1193 | /* If we have no drive specific rule, then PIO 2 is non IORDY */ | ||
1194 | |||
1195 | if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE */ | ||
1196 | pio = adev->id[ATA_ID_EIDE_PIO]; | ||
1197 | /* Is the speed faster than the drive allows non IORDY ? */ | ||
1198 | if (pio) { | ||
1199 | /* This is cycle times not frequency - watch the logic! */ | ||
1200 | if (pio > 240) /* PIO2 is 240nS per cycle */ | ||
1201 | return 1; | ||
1202 | return 0; | ||
1203 | } | ||
1204 | } | ||
1205 | return 0; | ||
1206 | } | ||
1207 | |||
1208 | /** | ||
1168 | * ata_dev_identify - obtain IDENTIFY x DEVICE page | 1209 | * ata_dev_identify - obtain IDENTIFY x DEVICE page |
1169 | * @ap: port on which device we wish to probe resides | 1210 | * @ap: port on which device we wish to probe resides |
1170 | * @device: device bus address, starting at zero | 1211 | * @device: device bus address, starting at zero |
@@ -1415,7 +1456,7 @@ void ata_dev_config(struct ata_port *ap, unsigned int i) | |||
1415 | ap->udma_mask &= ATA_UDMA5; | 1456 | ap->udma_mask &= ATA_UDMA5; |
1416 | ap->host->max_sectors = ATA_MAX_SECTORS; | 1457 | ap->host->max_sectors = ATA_MAX_SECTORS; |
1417 | ap->host->hostt->max_sectors = ATA_MAX_SECTORS; | 1458 | ap->host->hostt->max_sectors = ATA_MAX_SECTORS; |
1418 | ap->device->flags |= ATA_DFLAG_LOCK_SECTORS; | 1459 | ap->device[i].flags |= ATA_DFLAG_LOCK_SECTORS; |
1419 | } | 1460 | } |
1420 | 1461 | ||
1421 | if (ap->ops->dev_config) | 1462 | if (ap->ops->dev_config) |
@@ -3056,10 +3097,21 @@ static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf, | |||
3056 | static void ata_data_xfer(struct ata_port *ap, unsigned char *buf, | 3097 | static void ata_data_xfer(struct ata_port *ap, unsigned char *buf, |
3057 | unsigned int buflen, int do_write) | 3098 | unsigned int buflen, int do_write) |
3058 | { | 3099 | { |
3059 | if (ap->flags & ATA_FLAG_MMIO) | 3100 | /* Make the crap hardware pay the costs not the good stuff */ |
3060 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | 3101 | if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) { |
3061 | else | 3102 | unsigned long flags; |
3062 | ata_pio_data_xfer(ap, buf, buflen, do_write); | 3103 | local_irq_save(flags); |
3104 | if (ap->flags & ATA_FLAG_MMIO) | ||
3105 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | ||
3106 | else | ||
3107 | ata_pio_data_xfer(ap, buf, buflen, do_write); | ||
3108 | local_irq_restore(flags); | ||
3109 | } else { | ||
3110 | if (ap->flags & ATA_FLAG_MMIO) | ||
3111 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | ||
3112 | else | ||
3113 | ata_pio_data_xfer(ap, buf, buflen, do_write); | ||
3114 | } | ||
3063 | } | 3115 | } |
3064 | 3116 | ||
3065 | /** | 3117 | /** |
@@ -5122,6 +5174,7 @@ EXPORT_SYMBOL_GPL(ata_dev_id_string); | |||
5122 | EXPORT_SYMBOL_GPL(ata_dev_config); | 5174 | EXPORT_SYMBOL_GPL(ata_dev_config); |
5123 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); | 5175 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); |
5124 | 5176 | ||
5177 | EXPORT_SYMBOL_GPL(ata_pio_need_iordy); | ||
5125 | EXPORT_SYMBOL_GPL(ata_timing_compute); | 5178 | EXPORT_SYMBOL_GPL(ata_timing_compute); |
5126 | EXPORT_SYMBOL_GPL(ata_timing_merge); | 5179 | EXPORT_SYMBOL_GPL(ata_timing_merge); |
5127 | 5180 | ||
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 3d1ea09a06a1..b0b0a69b3563 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -66,6 +66,7 @@ enum { | |||
66 | board_2037x = 0, /* FastTrak S150 TX2plus */ | 66 | board_2037x = 0, /* FastTrak S150 TX2plus */ |
67 | board_20319 = 1, /* FastTrak S150 TX4 */ | 67 | board_20319 = 1, /* FastTrak S150 TX4 */ |
68 | board_20619 = 2, /* FastTrak TX4000 */ | 68 | board_20619 = 2, /* FastTrak TX4000 */ |
69 | board_20771 = 3, /* FastTrak TX2300 */ | ||
69 | 70 | ||
70 | PDC_HAS_PATA = (1 << 1), /* PDC20375 has PATA */ | 71 | PDC_HAS_PATA = (1 << 1), /* PDC20375 has PATA */ |
71 | 72 | ||
@@ -190,6 +191,16 @@ static const struct ata_port_info pdc_port_info[] = { | |||
190 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 191 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
191 | .port_ops = &pdc_pata_ops, | 192 | .port_ops = &pdc_pata_ops, |
192 | }, | 193 | }, |
194 | |||
195 | /* board_20771 */ | ||
196 | { | ||
197 | .sht = &pdc_ata_sht, | ||
198 | .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, | ||
199 | .pio_mask = 0x1f, /* pio0-4 */ | ||
200 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
201 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | ||
202 | .port_ops = &pdc_sata_ops, | ||
203 | }, | ||
193 | }; | 204 | }; |
194 | 205 | ||
195 | static const struct pci_device_id pdc_ata_pci_tbl[] = { | 206 | static const struct pci_device_id pdc_ata_pci_tbl[] = { |
@@ -226,6 +237,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = { | |||
226 | { PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 237 | { PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
227 | board_20619 }, | 238 | board_20619 }, |
228 | 239 | ||
240 | { PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
241 | board_20771 }, | ||
229 | { } /* terminate list */ | 242 | { } /* terminate list */ |
230 | }; | 243 | }; |
231 | 244 | ||
@@ -706,6 +719,9 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
706 | case board_2037x: | 719 | case board_2037x: |
707 | probe_ent->n_ports = 2; | 720 | probe_ent->n_ports = 2; |
708 | break; | 721 | break; |
722 | case board_20771: | ||
723 | probe_ent->n_ports = 2; | ||
724 | break; | ||
709 | case board_20619: | 725 | case board_20619: |
710 | probe_ent->n_ports = 4; | 726 | probe_ent->n_ports = 4; |
711 | 727 | ||
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 668373590aa4..d8472563fde8 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -470,6 +470,7 @@ static const struct pci_device_id k2_sata_pci_tbl[] = { | |||
470 | { 0x1166, 0x0241, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 470 | { 0x1166, 0x0241, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, |
471 | { 0x1166, 0x0242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 471 | { 0x1166, 0x0242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, |
472 | { 0x1166, 0x024a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 472 | { 0x1166, 0x024a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, |
473 | { 0x1166, 0x024b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | ||
473 | { } | 474 | { } |
474 | }; | 475 | }; |
475 | 476 | ||