diff options
-rw-r--r-- | drivers/scsi/ahci.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 40 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 24 | ||||
-rw-r--r-- | drivers/scsi/libata-scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 6 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 2 | ||||
-rw-r--r-- | include/linux/libata.h | 2 |
10 files changed, 36 insertions, 52 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 83467a05dc8e..cfbdd3f071b6 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -243,7 +243,7 @@ static const struct ata_port_operations ahci_ops = { | |||
243 | .port_stop = ahci_port_stop, | 243 | .port_stop = ahci_port_stop, |
244 | }; | 244 | }; |
245 | 245 | ||
246 | static struct ata_port_info ahci_port_info[] = { | 246 | static const struct ata_port_info ahci_port_info[] = { |
247 | /* board_ahci */ | 247 | /* board_ahci */ |
248 | { | 248 | { |
249 | .sht = &ahci_sht, | 249 | .sht = &ahci_sht, |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 333d69dd84ef..887b2b9ee4aa 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -78,9 +78,7 @@ enum { | |||
78 | ich5_sata = 1, | 78 | ich5_sata = 1, |
79 | piix4_pata = 2, | 79 | piix4_pata = 2, |
80 | ich6_sata = 3, | 80 | ich6_sata = 3, |
81 | ich6_sata_rm = 4, | 81 | ich6_sata_ahci = 4, |
82 | ich7_sata = 5, | ||
83 | esb2_sata = 6, | ||
84 | 82 | ||
85 | PIIX_AHCI_DEVICE = 6, | 83 | PIIX_AHCI_DEVICE = 6, |
86 | }; | 84 | }; |
@@ -111,11 +109,11 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
111 | { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata }, | 109 | { 0x8086, 0x25a3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata }, |
112 | { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata }, | 110 | { 0x8086, 0x25b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_sata }, |
113 | { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata }, | 111 | { 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata }, |
114 | { 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm }, | 112 | { 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
115 | { 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm }, | 113 | { 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
116 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata }, | 114 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
117 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata }, | 115 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
118 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, esb2_sata }, | 116 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
119 | 117 | ||
120 | { } /* terminate list */ | 118 | { } /* terminate list */ |
121 | }; | 119 | }; |
@@ -258,31 +256,7 @@ static struct ata_port_info piix_port_info[] = { | |||
258 | .port_ops = &piix_sata_ops, | 256 | .port_ops = &piix_sata_ops, |
259 | }, | 257 | }, |
260 | 258 | ||
261 | /* ich6_sata_rm */ | 259 | /* ich6_sata_ahci */ |
262 | { | ||
263 | .sht = &piix_sht, | ||
264 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | ||
265 | PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR | | ||
266 | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI, | ||
267 | .pio_mask = 0x1f, /* pio0-4 */ | ||
268 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
269 | .udma_mask = 0x7f, /* udma0-6 */ | ||
270 | .port_ops = &piix_sata_ops, | ||
271 | }, | ||
272 | |||
273 | /* ich7_sata */ | ||
274 | { | ||
275 | .sht = &piix_sht, | ||
276 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | ||
277 | PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR | | ||
278 | ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI, | ||
279 | .pio_mask = 0x1f, /* pio0-4 */ | ||
280 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
281 | .udma_mask = 0x7f, /* udma0-6 */ | ||
282 | .port_ops = &piix_sata_ops, | ||
283 | }, | ||
284 | |||
285 | /* esb2_sata */ | ||
286 | { | 260 | { |
287 | .sht = &piix_sht, | 261 | .sht = &piix_sht, |
288 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | | 262 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 665ae79e1fd6..11ed6fa27096 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -605,7 +605,7 @@ void ata_rwcmd_protocol(struct ata_queued_cmd *qc) | |||
605 | tf->command = ata_rw_cmds[index + lba48 + write]; | 605 | tf->command = ata_rw_cmds[index + lba48 + write]; |
606 | } | 606 | } |
607 | 607 | ||
608 | static const char * xfer_mode_str[] = { | 608 | static const char * const xfer_mode_str[] = { |
609 | "UDMA/16", | 609 | "UDMA/16", |
610 | "UDMA/25", | 610 | "UDMA/25", |
611 | "UDMA/33", | 611 | "UDMA/33", |
@@ -1444,11 +1444,23 @@ void __sata_phy_reset(struct ata_port *ap) | |||
1444 | } while (time_before(jiffies, timeout)); | 1444 | } while (time_before(jiffies, timeout)); |
1445 | 1445 | ||
1446 | /* TODO: phy layer with polling, timeouts, etc. */ | 1446 | /* TODO: phy layer with polling, timeouts, etc. */ |
1447 | if (sata_dev_present(ap)) | 1447 | sstatus = scr_read(ap, SCR_STATUS); |
1448 | if (sata_dev_present(ap)) { | ||
1449 | const char *speed; | ||
1450 | u32 tmp; | ||
1451 | |||
1452 | tmp = (sstatus >> 4) & 0xf; | ||
1453 | if (tmp & (1 << 0)) | ||
1454 | speed = "1.5"; | ||
1455 | else if (tmp & (1 << 1)) | ||
1456 | speed = "3.0"; | ||
1457 | else | ||
1458 | speed = "<unknown>"; | ||
1459 | printk(KERN_INFO "ata%u: SATA link up %s Gbps (SStatus %X)\n", | ||
1460 | ap->id, speed, sstatus); | ||
1448 | ata_port_probe(ap); | 1461 | ata_port_probe(ap); |
1449 | else { | 1462 | } else { |
1450 | sstatus = scr_read(ap, SCR_STATUS); | 1463 | printk(KERN_INFO "ata%u: SATA link down (SStatus %X)\n", |
1451 | printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n", | ||
1452 | ap->id, sstatus); | 1464 | ap->id, sstatus); |
1453 | ata_port_disable(ap); | 1465 | ata_port_disable(ap); |
1454 | } | 1466 | } |
@@ -2071,7 +2083,7 @@ static void ata_pr_blacklisted(const struct ata_port *ap, | |||
2071 | ap->id, dev->devno); | 2083 | ap->id, dev->devno); |
2072 | } | 2084 | } |
2073 | 2085 | ||
2074 | static const char * ata_dma_blacklist [] = { | 2086 | static const char * const ata_dma_blacklist [] = { |
2075 | "WDC AC11000H", | 2087 | "WDC AC11000H", |
2076 | "WDC AC22100H", | 2088 | "WDC AC22100H", |
2077 | "WDC AC32500H", | 2089 | "WDC AC32500H", |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 379e87089764..ef763ed9a0e5 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -418,7 +418,7 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, | |||
418 | int i; | 418 | int i; |
419 | 419 | ||
420 | /* Based on the 3ware driver translation table */ | 420 | /* Based on the 3ware driver translation table */ |
421 | static unsigned char sense_table[][4] = { | 421 | static const unsigned char sense_table[][4] = { |
422 | /* BBD|ECC|ID|MAR */ | 422 | /* BBD|ECC|ID|MAR */ |
423 | {0xd1, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command | 423 | {0xd1, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command |
424 | /* BBD|ECC|ID */ | 424 | /* BBD|ECC|ID */ |
@@ -449,7 +449,7 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, | |||
449 | {0x80, MEDIUM_ERROR, 0x11, 0x04}, // Block marked bad Medium error, unrecovered read error | 449 | {0x80, MEDIUM_ERROR, 0x11, 0x04}, // Block marked bad Medium error, unrecovered read error |
450 | {0xFF, 0xFF, 0xFF, 0xFF}, // END mark | 450 | {0xFF, 0xFF, 0xFF, 0xFF}, // END mark |
451 | }; | 451 | }; |
452 | static unsigned char stat_table[][4] = { | 452 | static const unsigned char stat_table[][4] = { |
453 | /* Must be first because BUSY means no other bits valid */ | 453 | /* Must be first because BUSY means no other bits valid */ |
454 | {0x80, ABORTED_COMMAND, 0x47, 0x00}, // Busy, fake parity for now | 454 | {0x80, ABORTED_COMMAND, 0x47, 0x00}, // Busy, fake parity for now |
455 | {0x20, HARDWARE_ERROR, 0x00, 0x00}, // Device fault | 455 | {0x20, HARDWARE_ERROR, 0x00, 0x00}, // Device fault |
@@ -1532,7 +1532,7 @@ unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf, | |||
1532 | return 0; | 1532 | return 0; |
1533 | } | 1533 | } |
1534 | 1534 | ||
1535 | static const char *inq_83_str = "Linux ATA-SCSI simulator"; | 1535 | static const char * const inq_83_str = "Linux ATA-SCSI simulator"; |
1536 | 1536 | ||
1537 | /** | 1537 | /** |
1538 | * ata_scsiop_inq_83 - Simulate INQUIRY EVPD page 83, device identity | 1538 | * ata_scsiop_inq_83 - Simulate INQUIRY EVPD page 83, device identity |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index ab7432a5778e..c94176693d1f 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -430,7 +430,7 @@ static const struct ata_port_operations mv6_ops = { | |||
430 | .host_stop = mv_host_stop, | 430 | .host_stop = mv_host_stop, |
431 | }; | 431 | }; |
432 | 432 | ||
433 | static struct ata_port_info mv_port_info[] = { | 433 | static const struct ata_port_info mv_port_info[] = { |
434 | { /* chip_504x */ | 434 | { /* chip_504x */ |
435 | .sht = &mv_sht, | 435 | .sht = &mv_sht, |
436 | .host_flags = MV_COMMON_FLAGS, | 436 | .host_flags = MV_COMMON_FLAGS, |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 8a8e3e3ef0ed..02089069b0f6 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -158,7 +158,7 @@ static const struct ata_port_operations pdc_pata_ops = { | |||
158 | .host_stop = ata_pci_host_stop, | 158 | .host_stop = ata_pci_host_stop, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static struct ata_port_info pdc_port_info[] = { | 161 | static const struct ata_port_info pdc_port_info[] = { |
162 | /* board_2037x */ | 162 | /* board_2037x */ |
163 | { | 163 | { |
164 | .sht = &pdc_ata_sht, | 164 | .sht = &pdc_ata_sht, |
@@ -703,7 +703,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
703 | probe_ent->port[3].scr_addr = base + 0x700; | 703 | probe_ent->port[3].scr_addr = base + 0x700; |
704 | break; | 704 | break; |
705 | case board_2037x: | 705 | case board_2037x: |
706 | probe_ent->n_ports = 2; | 706 | probe_ent->n_ports = 2; |
707 | break; | 707 | break; |
708 | case board_20619: | 708 | case board_20619: |
709 | probe_ent->n_ports = 4; | 709 | probe_ent->n_ports = 4; |
@@ -713,7 +713,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
713 | 713 | ||
714 | probe_ent->port[2].scr_addr = base + 0x600; | 714 | probe_ent->port[2].scr_addr = base + 0x600; |
715 | probe_ent->port[3].scr_addr = base + 0x700; | 715 | probe_ent->port[3].scr_addr = base + 0x700; |
716 | break; | 716 | break; |
717 | default: | 717 | default: |
718 | BUG(); | 718 | BUG(); |
719 | break; | 719 | break; |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index a8987f5ff5cc..6b9c3ae07cb3 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -170,7 +170,7 @@ static const struct ata_port_operations qs_ata_ops = { | |||
170 | .bmdma_status = qs_bmdma_status, | 170 | .bmdma_status = qs_bmdma_status, |
171 | }; | 171 | }; |
172 | 172 | ||
173 | static struct ata_port_info qs_port_info[] = { | 173 | static const struct ata_port_info qs_port_info[] = { |
174 | /* board_2068_idx */ | 174 | /* board_2068_idx */ |
175 | { | 175 | { |
176 | .sht = &qs_ata_sht, | 176 | .sht = &qs_ata_sht, |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 36091868560d..d2053487c73b 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -176,7 +176,7 @@ static const struct ata_port_operations sil_ops = { | |||
176 | .host_stop = ata_pci_host_stop, | 176 | .host_stop = ata_pci_host_stop, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct ata_port_info sil_port_info[] = { | 179 | static const struct ata_port_info sil_port_info[] = { |
180 | /* sil_3112 */ | 180 | /* sil_3112 */ |
181 | { | 181 | { |
182 | .sht = &sil_sht, | 182 | .sht = &sil_sht, |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index dcc3ad9a9d6e..7c4b53575510 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -215,7 +215,7 @@ static const struct ata_port_operations pdc_20621_ops = { | |||
215 | .host_stop = pdc20621_host_stop, | 215 | .host_stop = pdc20621_host_stop, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | static struct ata_port_info pdc_port_info[] = { | 218 | static const struct ata_port_info pdc_port_info[] = { |
219 | /* board_20621 */ | 219 | /* board_20621 */ |
220 | { | 220 | { |
221 | .sht = &pdc_sata_sht, | 221 | .sht = &pdc_sata_sht, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index f2dbb684ce9e..83a83babff84 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -330,8 +330,6 @@ struct ata_port { | |||
330 | 330 | ||
331 | u8 ctl; /* cache of ATA control register */ | 331 | u8 ctl; /* cache of ATA control register */ |
332 | u8 last_ctl; /* Cache last written value */ | 332 | u8 last_ctl; /* Cache last written value */ |
333 | unsigned int bus_state; | ||
334 | unsigned int port_state; | ||
335 | unsigned int pio_mask; | 333 | unsigned int pio_mask; |
336 | unsigned int mwdma_mask; | 334 | unsigned int mwdma_mask; |
337 | unsigned int udma_mask; | 335 | unsigned int udma_mask; |