diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-generic/libata-portmap.h | 12 | ||||
-rw-r--r-- | include/asm-i386/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-sparc/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/libata-portmap.h | 1 | ||||
-rw-r--r-- | include/linux/ata.h | 26 | ||||
-rw-r--r-- | include/linux/libata.h | 84 |
10 files changed, 96 insertions, 33 deletions
diff --git a/include/asm-alpha/libata-portmap.h b/include/asm-alpha/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-alpha/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-generic/libata-portmap.h b/include/asm-generic/libata-portmap.h new file mode 100644 index 000000000000..9202fd02d5be --- /dev/null +++ b/include/asm-generic/libata-portmap.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __ASM_GENERIC_LIBATA_PORTMAP_H | ||
2 | #define __ASM_GENERIC_LIBATA_PORTMAP_H | ||
3 | |||
4 | #define ATA_PRIMARY_CMD 0x1F0 | ||
5 | #define ATA_PRIMARY_CTL 0x3F6 | ||
6 | #define ATA_PRIMARY_IRQ 14 | ||
7 | |||
8 | #define ATA_SECONDARY_CMD 0x170 | ||
9 | #define ATA_SECONDARY_CTL 0x376 | ||
10 | #define ATA_SECONDARY_IRQ 15 | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-i386/libata-portmap.h b/include/asm-i386/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-i386/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-ia64/libata-portmap.h b/include/asm-ia64/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-ia64/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-powerpc/libata-portmap.h b/include/asm-powerpc/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-powerpc/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-sparc/libata-portmap.h b/include/asm-sparc/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-sparc/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-sparc64/libata-portmap.h b/include/asm-sparc64/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-sparc64/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/asm-x86_64/libata-portmap.h b/include/asm-x86_64/libata-portmap.h new file mode 100644 index 000000000000..75484ef0c743 --- /dev/null +++ b/include/asm-x86_64/libata-portmap.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/libata-portmap.h> | |||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 3671af869696..d89441907024 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -40,6 +40,8 @@ enum { | |||
40 | ATA_MAX_DEVICES = 2, /* per bus/port */ | 40 | ATA_MAX_DEVICES = 2, /* per bus/port */ |
41 | ATA_MAX_PRD = 256, /* we could make these 256/256 */ | 41 | ATA_MAX_PRD = 256, /* we could make these 256/256 */ |
42 | ATA_SECT_SIZE = 512, | 42 | ATA_SECT_SIZE = 512, |
43 | ATA_MAX_SECTORS = 256, | ||
44 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | ||
43 | 45 | ||
44 | ATA_ID_WORDS = 256, | 46 | ATA_ID_WORDS = 256, |
45 | ATA_ID_SERNO_OFS = 10, | 47 | ATA_ID_SERNO_OFS = 10, |
@@ -168,12 +170,16 @@ enum { | |||
168 | XFER_UDMA_2 = 0x42, | 170 | XFER_UDMA_2 = 0x42, |
169 | XFER_UDMA_1 = 0x41, | 171 | XFER_UDMA_1 = 0x41, |
170 | XFER_UDMA_0 = 0x40, | 172 | XFER_UDMA_0 = 0x40, |
173 | XFER_MW_DMA_4 = 0x24, /* CFA only */ | ||
174 | XFER_MW_DMA_3 = 0x23, /* CFA only */ | ||
171 | XFER_MW_DMA_2 = 0x22, | 175 | XFER_MW_DMA_2 = 0x22, |
172 | XFER_MW_DMA_1 = 0x21, | 176 | XFER_MW_DMA_1 = 0x21, |
173 | XFER_MW_DMA_0 = 0x20, | 177 | XFER_MW_DMA_0 = 0x20, |
174 | XFER_SW_DMA_2 = 0x12, | 178 | XFER_SW_DMA_2 = 0x12, |
175 | XFER_SW_DMA_1 = 0x11, | 179 | XFER_SW_DMA_1 = 0x11, |
176 | XFER_SW_DMA_0 = 0x10, | 180 | XFER_SW_DMA_0 = 0x10, |
181 | XFER_PIO_6 = 0x0E, /* CFA only */ | ||
182 | XFER_PIO_5 = 0x0D, /* CFA only */ | ||
177 | XFER_PIO_4 = 0x0C, | 183 | XFER_PIO_4 = 0x0C, |
178 | XFER_PIO_3 = 0x0B, | 184 | XFER_PIO_3 = 0x0B, |
179 | XFER_PIO_2 = 0x0A, | 185 | XFER_PIO_2 = 0x0A, |
@@ -272,7 +278,6 @@ struct ata_taskfile { | |||
272 | }; | 278 | }; |
273 | 279 | ||
274 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 280 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) |
275 | #define ata_id_is_cfa(id) ((id)[0] == 0x848A) | ||
276 | #define ata_id_is_sata(id) ((id)[93] == 0) | 281 | #define ata_id_is_sata(id) ((id)[93] == 0) |
277 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) | 282 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) |
278 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) | 283 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) |
@@ -304,6 +309,9 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
304 | { | 309 | { |
305 | unsigned int mver; | 310 | unsigned int mver; |
306 | 311 | ||
312 | if (id[ATA_ID_MAJOR_VER] == 0xFFFF) | ||
313 | return 0; | ||
314 | |||
307 | for (mver = 14; mver >= 1; mver--) | 315 | for (mver = 14; mver >= 1; mver--) |
308 | if (id[ATA_ID_MAJOR_VER] & (1 << mver)) | 316 | if (id[ATA_ID_MAJOR_VER] & (1 << mver)) |
309 | break; | 317 | break; |
@@ -312,8 +320,8 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
312 | 320 | ||
313 | static inline int ata_id_current_chs_valid(const u16 *id) | 321 | static inline int ata_id_current_chs_valid(const u16 *id) |
314 | { | 322 | { |
315 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 323 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
316 | has not been issued to the device then the values of | 324 | has not been issued to the device then the values of |
317 | id[54] to id[56] are vendor specific. */ | 325 | id[54] to id[56] are vendor specific. */ |
318 | return (id[53] & 0x01) && /* Current translation valid */ | 326 | return (id[53] & 0x01) && /* Current translation valid */ |
319 | id[54] && /* cylinders in current translation */ | 327 | id[54] && /* cylinders in current translation */ |
@@ -322,6 +330,18 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
322 | id[56]; /* sectors in current translation */ | 330 | id[56]; /* sectors in current translation */ |
323 | } | 331 | } |
324 | 332 | ||
333 | static inline int ata_id_is_cfa(const u16 *id) | ||
334 | { | ||
335 | u16 v = id[0]; | ||
336 | if (v == 0x848A) /* Standard CF */ | ||
337 | return 1; | ||
338 | /* Could be CF hiding as standard ATA */ | ||
339 | if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF && | ||
340 | (id[82] & ( 1 << 2))) | ||
341 | return 1; | ||
342 | return 0; | ||
343 | } | ||
344 | |||
325 | static inline int atapi_cdb_len(const u16 *dev_id) | 345 | static inline int atapi_cdb_len(const u16 *dev_id) |
326 | { | 346 | { |
327 | u16 tmp = dev_id[0] & 0x3; | 347 | u16 tmp = dev_id[0] & 0x3; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 66c3100c2b94..ff67e7524fe9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
38 | 38 | ||
39 | #include <asm/libata-portmap.h> | ||
40 | |||
39 | /* | 41 | /* |
40 | * compile-time options: to be removed as soon as all the drivers are | 42 | * compile-time options: to be removed as soon as all the drivers are |
41 | * converted to the new debugging mechanism | 43 | * converted to the new debugging mechanism |
@@ -44,7 +46,7 @@ | |||
44 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 46 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
45 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 47 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
46 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 48 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
47 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 49 | #define ATA_ENABLE_PATA /* define to enable PATA support in some |
48 | * low-level drivers */ | 50 | * low-level drivers */ |
49 | 51 | ||
50 | 52 | ||
@@ -112,8 +114,6 @@ enum { | |||
112 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 114 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
113 | ATA_MAX_QUEUE = 32, | 115 | ATA_MAX_QUEUE = 32, |
114 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 116 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
115 | ATA_MAX_SECTORS = 200, /* FIXME */ | ||
116 | ATA_MAX_SECTORS_LBA48 = 65535, | ||
117 | ATA_MAX_BUS = 2, | 117 | ATA_MAX_BUS = 2, |
118 | ATA_DEF_BUSY_WAIT = 10000, | 118 | ATA_DEF_BUSY_WAIT = 10000, |
119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 119 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
@@ -197,8 +197,8 @@ enum { | |||
197 | ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ | 197 | ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ |
198 | 198 | ||
199 | /* host set flags */ | 199 | /* host set flags */ |
200 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ | 200 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ |
201 | 201 | ||
202 | /* various lengths of time */ | 202 | /* various lengths of time */ |
203 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ | 203 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ |
204 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ | 204 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ |
@@ -225,8 +225,8 @@ enum { | |||
225 | /* encoding various smaller bitmaps into a single | 225 | /* encoding various smaller bitmaps into a single |
226 | * unsigned int bitmap | 226 | * unsigned int bitmap |
227 | */ | 227 | */ |
228 | ATA_BITS_PIO = 5, | 228 | ATA_BITS_PIO = 7, |
229 | ATA_BITS_MWDMA = 3, | 229 | ATA_BITS_MWDMA = 5, |
230 | ATA_BITS_UDMA = 8, | 230 | ATA_BITS_UDMA = 8, |
231 | 231 | ||
232 | ATA_SHIFT_PIO = 0, | 232 | ATA_SHIFT_PIO = 0, |
@@ -350,23 +350,32 @@ struct ata_probe_ent { | |||
350 | struct scsi_host_template *sht; | 350 | struct scsi_host_template *sht; |
351 | struct ata_ioports port[ATA_MAX_PORTS]; | 351 | struct ata_ioports port[ATA_MAX_PORTS]; |
352 | unsigned int n_ports; | 352 | unsigned int n_ports; |
353 | unsigned int hard_port_no; | 353 | unsigned int dummy_port_mask; |
354 | unsigned int pio_mask; | 354 | unsigned int pio_mask; |
355 | unsigned int mwdma_mask; | 355 | unsigned int mwdma_mask; |
356 | unsigned int udma_mask; | 356 | unsigned int udma_mask; |
357 | unsigned int legacy_mode; | ||
358 | unsigned long irq; | 357 | unsigned long irq; |
358 | unsigned long irq2; | ||
359 | unsigned int irq_flags; | 359 | unsigned int irq_flags; |
360 | unsigned long host_flags; | 360 | unsigned long port_flags; |
361 | unsigned long host_set_flags; | 361 | unsigned long _host_flags; |
362 | void __iomem *mmio_base; | 362 | void __iomem *mmio_base; |
363 | void *private_data; | 363 | void *private_data; |
364 | |||
365 | /* port_info for the secondary port. Together with irq2, it's | ||
366 | * used to implement non-uniform secondary port. Currently, | ||
367 | * the only user is ata_piix combined mode. This workaround | ||
368 | * will be removed together with ata_probe_ent when init model | ||
369 | * is updated. | ||
370 | */ | ||
371 | const struct ata_port_info *pinfo2; | ||
364 | }; | 372 | }; |
365 | 373 | ||
366 | struct ata_host_set { | 374 | struct ata_host { |
367 | spinlock_t lock; | 375 | spinlock_t lock; |
368 | struct device *dev; | 376 | struct device *dev; |
369 | unsigned long irq; | 377 | unsigned long irq; |
378 | unsigned long irq2; | ||
370 | void __iomem *mmio_base; | 379 | void __iomem *mmio_base; |
371 | unsigned int n_ports; | 380 | unsigned int n_ports; |
372 | void *private_data; | 381 | void *private_data; |
@@ -374,7 +383,6 @@ struct ata_host_set { | |||
374 | unsigned long flags; | 383 | unsigned long flags; |
375 | int simplex_claimed; /* Keep seperate in case we | 384 | int simplex_claimed; /* Keep seperate in case we |
376 | ever need to do this locked */ | 385 | ever need to do this locked */ |
377 | struct ata_host_set *next; /* for legacy mode */ | ||
378 | struct ata_port *ports[0]; | 386 | struct ata_port *ports[0]; |
379 | }; | 387 | }; |
380 | 388 | ||
@@ -420,7 +428,7 @@ struct ata_queued_cmd { | |||
420 | void *private_data; | 428 | void *private_data; |
421 | }; | 429 | }; |
422 | 430 | ||
423 | struct ata_host_stats { | 431 | struct ata_port_stats { |
424 | unsigned long unhandled_irq; | 432 | unsigned long unhandled_irq; |
425 | unsigned long idle_irq; | 433 | unsigned long idle_irq; |
426 | unsigned long rw_reqbuf; | 434 | unsigned long rw_reqbuf; |
@@ -498,14 +506,13 @@ struct ata_eh_context { | |||
498 | }; | 506 | }; |
499 | 507 | ||
500 | struct ata_port { | 508 | struct ata_port { |
501 | struct Scsi_Host *host; /* our co-allocated scsi host */ | 509 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
502 | const struct ata_port_operations *ops; | 510 | const struct ata_port_operations *ops; |
503 | spinlock_t *lock; | 511 | spinlock_t *lock; |
504 | unsigned long flags; /* ATA_FLAG_xxx */ | 512 | unsigned long flags; /* ATA_FLAG_xxx */ |
505 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 513 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
506 | unsigned int id; /* unique id req'd by scsi midlyr */ | 514 | unsigned int id; /* unique id req'd by scsi midlyr */ |
507 | unsigned int port_no; /* unique port #; from zero */ | 515 | unsigned int port_no; /* unique port #; from zero */ |
508 | unsigned int hard_port_no; /* hardware port #; from zero */ | ||
509 | 516 | ||
510 | struct ata_prd *prd; /* our SG list */ | 517 | struct ata_prd *prd; /* our SG list */ |
511 | dma_addr_t prd_dma; /* and its DMA mapping */ | 518 | dma_addr_t prd_dma; /* and its DMA mapping */ |
@@ -524,7 +531,7 @@ struct ata_port { | |||
524 | unsigned int hw_sata_spd_limit; | 531 | unsigned int hw_sata_spd_limit; |
525 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ | 532 | unsigned int sata_spd_limit; /* SATA PHY speed limit */ |
526 | 533 | ||
527 | /* record runtime error info, protected by host_set lock */ | 534 | /* record runtime error info, protected by host lock */ |
528 | struct ata_eh_info eh_info; | 535 | struct ata_eh_info eh_info; |
529 | /* EH context owned by EH */ | 536 | /* EH context owned by EH */ |
530 | struct ata_eh_context eh_context; | 537 | struct ata_eh_context eh_context; |
@@ -538,8 +545,8 @@ struct ata_port { | |||
538 | unsigned int active_tag; | 545 | unsigned int active_tag; |
539 | u32 sactive; | 546 | u32 sactive; |
540 | 547 | ||
541 | struct ata_host_stats stats; | 548 | struct ata_port_stats stats; |
542 | struct ata_host_set *host_set; | 549 | struct ata_host *host; |
543 | struct device *dev; | 550 | struct device *dev; |
544 | 551 | ||
545 | struct work_struct port_task; | 552 | struct work_struct port_task; |
@@ -615,7 +622,7 @@ struct ata_port_operations { | |||
615 | int (*port_start) (struct ata_port *ap); | 622 | int (*port_start) (struct ata_port *ap); |
616 | void (*port_stop) (struct ata_port *ap); | 623 | void (*port_stop) (struct ata_port *ap); |
617 | 624 | ||
618 | void (*host_stop) (struct ata_host_set *host_set); | 625 | void (*host_stop) (struct ata_host *host); |
619 | 626 | ||
620 | void (*bmdma_stop) (struct ata_queued_cmd *qc); | 627 | void (*bmdma_stop) (struct ata_queued_cmd *qc); |
621 | u8 (*bmdma_status) (struct ata_port *ap); | 628 | u8 (*bmdma_status) (struct ata_port *ap); |
@@ -623,7 +630,7 @@ struct ata_port_operations { | |||
623 | 630 | ||
624 | struct ata_port_info { | 631 | struct ata_port_info { |
625 | struct scsi_host_template *sht; | 632 | struct scsi_host_template *sht; |
626 | unsigned long host_flags; | 633 | unsigned long flags; |
627 | unsigned long pio_mask; | 634 | unsigned long pio_mask; |
628 | unsigned long mwdma_mask; | 635 | unsigned long mwdma_mask; |
629 | unsigned long udma_mask; | 636 | unsigned long udma_mask; |
@@ -649,6 +656,8 @@ extern const unsigned long sata_deb_timing_normal[]; | |||
649 | extern const unsigned long sata_deb_timing_hotplug[]; | 656 | extern const unsigned long sata_deb_timing_hotplug[]; |
650 | extern const unsigned long sata_deb_timing_long[]; | 657 | extern const unsigned long sata_deb_timing_long[]; |
651 | 658 | ||
659 | extern const struct ata_port_operations ata_dummy_port_ops; | ||
660 | |||
652 | static inline const unsigned long * | 661 | static inline const unsigned long * |
653 | sata_ehc_deb_timing(struct ata_eh_context *ehc) | 662 | sata_ehc_deb_timing(struct ata_eh_context *ehc) |
654 | { | 663 | { |
@@ -658,6 +667,11 @@ sata_ehc_deb_timing(struct ata_eh_context *ehc) | |||
658 | return sata_deb_timing_normal; | 667 | return sata_deb_timing_normal; |
659 | } | 668 | } |
660 | 669 | ||
670 | static inline int ata_port_is_dummy(struct ata_port *ap) | ||
671 | { | ||
672 | return ap->ops == &ata_dummy_port_ops; | ||
673 | } | ||
674 | |||
661 | extern void ata_port_probe(struct ata_port *); | 675 | extern void ata_port_probe(struct ata_port *); |
662 | extern void __sata_phy_reset(struct ata_port *ap); | 676 | extern void __sata_phy_reset(struct ata_port *ap); |
663 | extern void sata_phy_reset(struct ata_port *ap); | 677 | extern void sata_phy_reset(struct ata_port *ap); |
@@ -676,19 +690,30 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
676 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 690 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
677 | unsigned int n_ports); | 691 | unsigned int n_ports); |
678 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 692 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
679 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); | 693 | extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); |
680 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); | 694 | extern void ata_pci_device_do_resume(struct pci_dev *pdev); |
681 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | 695 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); |
682 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 696 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
683 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | 697 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); |
684 | #endif /* CONFIG_PCI */ | 698 | #endif /* CONFIG_PCI */ |
685 | extern int ata_device_add(const struct ata_probe_ent *ent); | 699 | extern int ata_device_add(const struct ata_probe_ent *ent); |
686 | extern void ata_port_detach(struct ata_port *ap); | 700 | extern void ata_port_detach(struct ata_port *ap); |
687 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 701 | extern void ata_host_init(struct ata_host *, struct device *, |
702 | unsigned long, const struct ata_port_operations *); | ||
703 | extern void ata_host_remove(struct ata_host *host); | ||
688 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 704 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
689 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 705 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
690 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 706 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
691 | extern int ata_scsi_release(struct Scsi_Host *host); | 707 | extern int ata_scsi_release(struct Scsi_Host *host); |
708 | extern void ata_sas_port_destroy(struct ata_port *); | ||
709 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | ||
710 | struct ata_port_info *, struct Scsi_Host *); | ||
711 | extern int ata_sas_port_init(struct ata_port *); | ||
712 | extern int ata_sas_port_start(struct ata_port *ap); | ||
713 | extern void ata_sas_port_stop(struct ata_port *ap); | ||
714 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | ||
715 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | ||
716 | struct ata_port *ap); | ||
692 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 717 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
693 | extern int sata_scr_valid(struct ata_port *ap); | 718 | extern int sata_scr_valid(struct ata_port *ap); |
694 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); | 719 | extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); |
@@ -697,10 +722,9 @@ extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); | |||
697 | extern int ata_port_online(struct ata_port *ap); | 722 | extern int ata_port_online(struct ata_port *ap); |
698 | extern int ata_port_offline(struct ata_port *ap); | 723 | extern int ata_port_offline(struct ata_port *ap); |
699 | extern int ata_scsi_device_resume(struct scsi_device *); | 724 | extern int ata_scsi_device_resume(struct scsi_device *); |
700 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); | 725 | extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg); |
701 | extern int ata_host_set_suspend(struct ata_host_set *host_set, | 726 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
702 | pm_message_t mesg); | 727 | extern void ata_host_resume(struct ata_host *host); |
703 | extern void ata_host_set_resume(struct ata_host_set *host_set); | ||
704 | extern int ata_ratelimit(void); | 728 | extern int ata_ratelimit(void); |
705 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 729 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
706 | unsigned long timeout_pat, | 730 | unsigned long timeout_pat, |
@@ -725,7 +749,7 @@ extern u8 ata_altstatus(struct ata_port *ap); | |||
725 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); | 749 | extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); |
726 | extern int ata_port_start (struct ata_port *ap); | 750 | extern int ata_port_start (struct ata_port *ap); |
727 | extern void ata_port_stop (struct ata_port *ap); | 751 | extern void ata_port_stop (struct ata_port *ap); |
728 | extern void ata_host_stop (struct ata_host_set *host_set); | 752 | extern void ata_host_stop (struct ata_host *host); |
729 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 753 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
730 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, | 754 | extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, |
731 | unsigned int buflen, int write_data); | 755 | unsigned int buflen, int write_data); |
@@ -811,7 +835,7 @@ struct pci_bits { | |||
811 | unsigned long val; | 835 | unsigned long val; |
812 | }; | 836 | }; |
813 | 837 | ||
814 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | 838 | extern void ata_pci_host_stop (struct ata_host *host); |
815 | extern struct ata_probe_ent * | 839 | extern struct ata_probe_ent * |
816 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 840 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
817 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 841 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |