diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
commit | 98339cbd360b77c3167db287fd611468c2c44559 (patch) | |
tree | 06779e040c18aa40fc5a6e15b132fa1f70ec45f6 /include | |
parent | e4e0fadcd929138aa82130a1c5f22206d86d7bb2 (diff) | |
parent | cbbc4e818de4451cdef75a112b7fc8a523d5d2a0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 55 |
2 files changed, 24 insertions, 32 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1ffd8bfdc4c9..32a441b05fd5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -651,7 +651,6 @@ extern void generic_make_request(struct bio *bio); | |||
651 | extern void blk_rq_init(struct request_queue *q, struct request *rq); | 651 | extern void blk_rq_init(struct request_queue *q, struct request *rq); |
652 | extern void blk_put_request(struct request *); | 652 | extern void blk_put_request(struct request *); |
653 | extern void __blk_put_request(struct request_queue *, struct request *); | 653 | extern void __blk_put_request(struct request_queue *, struct request *); |
654 | extern void blk_end_sync_rq(struct request *rq, int error); | ||
655 | extern struct request *blk_get_request(struct request_queue *, int, gfp_t); | 654 | extern struct request *blk_get_request(struct request_queue *, int, gfp_t); |
656 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); | 655 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); |
657 | extern void blk_requeue_request(struct request_queue *, struct request *); | 656 | extern void blk_requeue_request(struct request_queue *, struct request *); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index eddb6daadf4a..ac4eeb2932ef 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -364,7 +364,6 @@ typedef struct ide_drive_s { | |||
364 | u8 wcache; /* status of write cache */ | 364 | u8 wcache; /* status of write cache */ |
365 | u8 acoustic; /* acoustic management */ | 365 | u8 acoustic; /* acoustic management */ |
366 | u8 media; /* disk, cdrom, tape, floppy, ... */ | 366 | u8 media; /* disk, cdrom, tape, floppy, ... */ |
367 | u8 ctl; /* "normal" value for Control register */ | ||
368 | u8 ready_stat; /* min status value for drive ready */ | 367 | u8 ready_stat; /* min status value for drive ready */ |
369 | u8 mult_count; /* current multiple sector setting */ | 368 | u8 mult_count; /* current multiple sector setting */ |
370 | u8 mult_req; /* requested multiple sector setting */ | 369 | u8 mult_req; /* requested multiple sector setting */ |
@@ -493,7 +492,7 @@ typedef struct hwif_s { | |||
493 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 492 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
494 | 493 | ||
495 | void (*OUTB)(u8 addr, unsigned long port); | 494 | void (*OUTB)(u8 addr, unsigned long port); |
496 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 495 | void (*OUTBSYNC)(struct hwif_s *hwif, u8 addr, unsigned long port); |
497 | 496 | ||
498 | u8 (*INB)(unsigned long port); | 497 | u8 (*INB)(unsigned long port); |
499 | 498 | ||
@@ -532,7 +531,6 @@ typedef struct hwif_s { | |||
532 | unsigned serialized : 1; /* serialized all channel operation */ | 531 | unsigned serialized : 1; /* serialized all channel operation */ |
533 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | 532 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ |
534 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 533 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
535 | unsigned mmio : 1; /* host uses MMIO */ | ||
536 | 534 | ||
537 | struct device gendev; | 535 | struct device gendev; |
538 | struct device *portdev; | 536 | struct device *portdev; |
@@ -604,12 +602,13 @@ enum { | |||
604 | PC_FLAG_SUPPRESS_ERROR = (1 << 1), | 602 | PC_FLAG_SUPPRESS_ERROR = (1 << 1), |
605 | PC_FLAG_WAIT_FOR_DSC = (1 << 2), | 603 | PC_FLAG_WAIT_FOR_DSC = (1 << 2), |
606 | PC_FLAG_DMA_OK = (1 << 3), | 604 | PC_FLAG_DMA_OK = (1 << 3), |
607 | PC_FLAG_DMA_RECOMMENDED = (1 << 4), | 605 | PC_FLAG_DMA_IN_PROGRESS = (1 << 4), |
608 | PC_FLAG_DMA_IN_PROGRESS = (1 << 5), | 606 | PC_FLAG_DMA_ERROR = (1 << 5), |
609 | PC_FLAG_DMA_ERROR = (1 << 6), | 607 | PC_FLAG_WRITING = (1 << 6), |
610 | PC_FLAG_WRITING = (1 << 7), | ||
611 | /* command timed out */ | 608 | /* command timed out */ |
612 | PC_FLAG_TIMEDOUT = (1 << 8), | 609 | PC_FLAG_TIMEDOUT = (1 << 7), |
610 | PC_FLAG_ZIP_DRIVE = (1 << 8), | ||
611 | PC_FLAG_DRQ_INTERRUPT = (1 << 9), | ||
613 | }; | 612 | }; |
614 | 613 | ||
615 | struct ide_atapi_pc { | 614 | struct ide_atapi_pc { |
@@ -642,8 +641,8 @@ struct ide_atapi_pc { | |||
642 | * to change/removal later. | 641 | * to change/removal later. |
643 | */ | 642 | */ |
644 | u8 pc_buf[256]; | 643 | u8 pc_buf[256]; |
645 | void (*idefloppy_callback) (ide_drive_t *); | 644 | |
646 | ide_startstop_t (*idetape_callback) (ide_drive_t *); | 645 | void (*callback)(ide_drive_t *); |
647 | 646 | ||
648 | /* idetape only */ | 647 | /* idetape only */ |
649 | struct idetape_bh *bh; | 648 | struct idetape_bh *bh; |
@@ -813,10 +812,6 @@ int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsig | |||
813 | #ifndef _IDE_C | 812 | #ifndef _IDE_C |
814 | extern ide_hwif_t ide_hwifs[]; /* master data repository */ | 813 | extern ide_hwif_t ide_hwifs[]; /* master data repository */ |
815 | #endif | 814 | #endif |
816 | extern int ide_noacpi; | ||
817 | extern int ide_acpigtf; | ||
818 | extern int ide_acpionboot; | ||
819 | extern int noautodma; | ||
820 | 815 | ||
821 | extern int ide_vlb_clk; | 816 | extern int ide_vlb_clk; |
822 | extern int ide_pci_clk; | 817 | extern int ide_pci_clk; |
@@ -857,25 +852,12 @@ int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | |||
857 | 852 | ||
858 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 853 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
859 | 854 | ||
860 | extern void ide_init_drive_cmd (struct request *rq); | 855 | extern void ide_do_drive_cmd(ide_drive_t *, struct request *); |
861 | |||
862 | /* | ||
863 | * "action" parameter type for ide_do_drive_cmd() below. | ||
864 | */ | ||
865 | typedef enum { | ||
866 | ide_wait, /* insert rq at end of list, and wait for it */ | ||
867 | ide_preempt, /* insert rq in front of current request */ | ||
868 | ide_head_wait, /* insert rq in front of current request and wait for it */ | ||
869 | ide_end /* insert rq at end of list, but don't wait for it */ | ||
870 | } ide_action_t; | ||
871 | |||
872 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); | ||
873 | 856 | ||
874 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 857 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
875 | 858 | ||
876 | enum { | 859 | enum { |
877 | IDE_TFLAG_LBA48 = (1 << 0), | 860 | IDE_TFLAG_LBA48 = (1 << 0), |
878 | IDE_TFLAG_NO_SELECT_MASK = (1 << 1), | ||
879 | IDE_TFLAG_FLAGGED = (1 << 2), | 861 | IDE_TFLAG_FLAGGED = (1 << 2), |
880 | IDE_TFLAG_OUT_DATA = (1 << 3), | 862 | IDE_TFLAG_OUT_DATA = (1 << 3), |
881 | IDE_TFLAG_OUT_HOB_FEATURE = (1 << 4), | 863 | IDE_TFLAG_OUT_HOB_FEATURE = (1 << 4), |
@@ -980,11 +962,23 @@ typedef struct ide_task_s { | |||
980 | void ide_tf_dump(const char *, struct ide_taskfile *); | 962 | void ide_tf_dump(const char *, struct ide_taskfile *); |
981 | 963 | ||
982 | extern void SELECT_DRIVE(ide_drive_t *); | 964 | extern void SELECT_DRIVE(ide_drive_t *); |
965 | void SELECT_MASK(ide_drive_t *, int); | ||
983 | 966 | ||
984 | extern int drive_is_ready(ide_drive_t *); | 967 | extern int drive_is_ready(ide_drive_t *); |
985 | 968 | ||
986 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | 969 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); |
987 | 970 | ||
971 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | ||
972 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, | ||
973 | void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), | ||
974 | void (*retry_pc)(ide_drive_t *), void (*dsc_handle)(ide_drive_t *), | ||
975 | void (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned int, | ||
976 | int)); | ||
977 | ide_startstop_t ide_transfer_pc(ide_drive_t *, struct ide_atapi_pc *, | ||
978 | ide_handler_t *, unsigned int, ide_expiry_t *); | ||
979 | ide_startstop_t ide_issue_pc(ide_drive_t *, struct ide_atapi_pc *, | ||
980 | ide_handler_t *, unsigned int, ide_expiry_t *); | ||
981 | |||
988 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | 982 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); |
989 | 983 | ||
990 | void task_end_request(ide_drive_t *, struct request *, u8); | 984 | void task_end_request(ide_drive_t *, struct request *, u8); |
@@ -996,8 +990,6 @@ int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | |||
996 | int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long); | 990 | int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long); |
997 | int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long); | 991 | int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long); |
998 | 992 | ||
999 | extern int system_bus_clock(void); | ||
1000 | |||
1001 | extern int ide_driveid_update(ide_drive_t *); | 993 | extern int ide_driveid_update(ide_drive_t *); |
1002 | extern int ide_config_drive_speed(ide_drive_t *, u8); | 994 | extern int ide_config_drive_speed(ide_drive_t *, u8); |
1003 | extern u8 eighty_ninty_three (ide_drive_t *); | 995 | extern u8 eighty_ninty_three (ide_drive_t *); |
@@ -1349,7 +1341,8 @@ static inline void ide_set_irq(ide_drive_t *drive, int on) | |||
1349 | { | 1341 | { |
1350 | ide_hwif_t *hwif = drive->hwif; | 1342 | ide_hwif_t *hwif = drive->hwif; |
1351 | 1343 | ||
1352 | hwif->OUTB(drive->ctl | (on ? 0 : 2), hwif->io_ports.ctl_addr); | 1344 | hwif->OUTBSYNC(hwif, ATA_DEVCTL_OBS | (on ? 0 : 2), |
1345 | hwif->io_ports.ctl_addr); | ||
1353 | } | 1346 | } |
1354 | 1347 | ||
1355 | static inline u8 ide_read_status(ide_drive_t *drive) | 1348 | static inline u8 ide_read_status(ide_drive_t *drive) |