diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 12:29:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 12:29:42 -0400 |
commit | d614aec4752f8c61b2e7cb77806b6bd59aa50836 (patch) | |
tree | 3b0cfb3085c43415931dbf18666d582fb8ae3c75 /include | |
parent | db8e7f10ed67933ca272f4030eb7057b7f13de07 (diff) | |
parent | ad7c52d0988a8965989dc06d630c52a5bde849d5 (diff) |
Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits)
ide: re-implement ide_pci_init_one() on top of ide_pci_init_two()
ide: unexport ide_find_dma_mode()
ide: fix PowerMac bootup oops
ide: skip probe if there are no devices on the port (v2)
sl82c105: add printk() logging facility
ide-tape: fix proc warning
ide: add IDE_DFLAG_NIEN_QUIRK device flag
ide: respect quirk_drives[] list on all controllers
hpt366: enable all quirks for devices on quirk_drives[] list
hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c
ide: remove superfluous SELECT_MASK() call from do_rw_taskfile()
ide: remove superfluous SELECT_MASK() call from ide_driveid_update()
icside: remove superfluous ->maskproc method
ide-tape: fix IDE_AFLAG_* atomic accesses
ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically
pdc202xx_old: kill resetproc() method
pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
pdc202xx_old: use ide_dma_test_irq()
ide: preserve Host Protected Area by default (v2)
ide-gd: implement block device ->set_capacity method (v2)
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 2 | ||||
-rw-r--r-- | include/linux/genhd.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 46 |
3 files changed, 23 insertions, 26 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebdfde8fe556..0b1a6cae9de1 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1226,6 +1226,8 @@ struct block_device_operations { | |||
1226 | int (*direct_access) (struct block_device *, sector_t, | 1226 | int (*direct_access) (struct block_device *, sector_t, |
1227 | void **, unsigned long *); | 1227 | void **, unsigned long *); |
1228 | int (*media_changed) (struct gendisk *); | 1228 | int (*media_changed) (struct gendisk *); |
1229 | unsigned long long (*set_capacity) (struct gendisk *, | ||
1230 | unsigned long long); | ||
1229 | int (*revalidate_disk) (struct gendisk *); | 1231 | int (*revalidate_disk) (struct gendisk *); |
1230 | int (*getgeo)(struct block_device *, struct hd_geometry *); | 1232 | int (*getgeo)(struct block_device *, struct hd_geometry *); |
1231 | struct module *owner; | 1233 | struct module *owner; |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 149fda264c86..7cbd38d363a2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -114,6 +114,7 @@ struct hd_struct { | |||
114 | #define GENHD_FL_UP 16 | 114 | #define GENHD_FL_UP 16 |
115 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 115 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
116 | #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ | 116 | #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ |
117 | #define GENHD_FL_NATIVE_CAPACITY 128 | ||
117 | 118 | ||
118 | #define BLK_SCSI_MAX_CMDS (256) | 119 | #define BLK_SCSI_MAX_CMDS (256) |
119 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | 120 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 867cb68d8461..a6c6a2fad7c8 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -178,7 +178,7 @@ typedef u8 hwif_chipset_t; | |||
178 | /* | 178 | /* |
179 | * Structure to hold all information about the location of this port | 179 | * Structure to hold all information about the location of this port |
180 | */ | 180 | */ |
181 | typedef struct hw_regs_s { | 181 | struct ide_hw { |
182 | union { | 182 | union { |
183 | struct ide_io_ports io_ports; | 183 | struct ide_io_ports io_ports; |
184 | unsigned long io_ports_array[IDE_NR_PORTS]; | 184 | unsigned long io_ports_array[IDE_NR_PORTS]; |
@@ -186,12 +186,11 @@ typedef struct hw_regs_s { | |||
186 | 186 | ||
187 | int irq; /* our irq number */ | 187 | int irq; /* our irq number */ |
188 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | 188 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ |
189 | hwif_chipset_t chipset; | ||
190 | struct device *dev, *parent; | 189 | struct device *dev, *parent; |
191 | unsigned long config; | 190 | unsigned long config; |
192 | } hw_regs_t; | 191 | }; |
193 | 192 | ||
194 | static inline void ide_std_init_ports(hw_regs_t *hw, | 193 | static inline void ide_std_init_ports(struct ide_hw *hw, |
195 | unsigned long io_addr, | 194 | unsigned long io_addr, |
196 | unsigned long ctl_addr) | 195 | unsigned long ctl_addr) |
197 | { | 196 | { |
@@ -218,21 +217,12 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
218 | 217 | ||
219 | /* | 218 | /* |
220 | * Special Driver Flags | 219 | * Special Driver Flags |
221 | * | ||
222 | * set_geometry : respecify drive geometry | ||
223 | * recalibrate : seek to cyl 0 | ||
224 | * set_multmode : set multmode count | ||
225 | * reserved : unused | ||
226 | */ | 220 | */ |
227 | typedef union { | 221 | enum { |
228 | unsigned all : 8; | 222 | IDE_SFLAG_SET_GEOMETRY = (1 << 0), |
229 | struct { | 223 | IDE_SFLAG_RECALIBRATE = (1 << 1), |
230 | unsigned set_geometry : 1; | 224 | IDE_SFLAG_SET_MULTMODE = (1 << 2), |
231 | unsigned recalibrate : 1; | 225 | }; |
232 | unsigned set_multmode : 1; | ||
233 | unsigned reserved : 5; | ||
234 | } b; | ||
235 | } special_t; | ||
236 | 226 | ||
237 | /* | 227 | /* |
238 | * Status returned from various ide_ functions | 228 | * Status returned from various ide_ functions |
@@ -391,6 +381,7 @@ struct ide_drive_s; | |||
391 | struct ide_disk_ops { | 381 | struct ide_disk_ops { |
392 | int (*check)(struct ide_drive_s *, const char *); | 382 | int (*check)(struct ide_drive_s *, const char *); |
393 | int (*get_capacity)(struct ide_drive_s *); | 383 | int (*get_capacity)(struct ide_drive_s *); |
384 | u64 (*set_capacity)(struct ide_drive_s *, u64); | ||
394 | void (*setup)(struct ide_drive_s *); | 385 | void (*setup)(struct ide_drive_s *); |
395 | void (*flush)(struct ide_drive_s *); | 386 | void (*flush)(struct ide_drive_s *); |
396 | int (*init_media)(struct ide_drive_s *, struct gendisk *); | 387 | int (*init_media)(struct ide_drive_s *, struct gendisk *); |
@@ -468,6 +459,8 @@ enum { | |||
468 | IDE_DFLAG_NICE1 = (1 << 5), | 459 | IDE_DFLAG_NICE1 = (1 << 5), |
469 | /* device is physically present */ | 460 | /* device is physically present */ |
470 | IDE_DFLAG_PRESENT = (1 << 6), | 461 | IDE_DFLAG_PRESENT = (1 << 6), |
462 | /* disable Host Protected Area */ | ||
463 | IDE_DFLAG_NOHPA = (1 << 7), | ||
471 | /* id read from device (synthetic if not set) */ | 464 | /* id read from device (synthetic if not set) */ |
472 | IDE_DFLAG_ID_READ = (1 << 8), | 465 | IDE_DFLAG_ID_READ = (1 << 8), |
473 | IDE_DFLAG_NOPROBE = (1 << 9), | 466 | IDE_DFLAG_NOPROBE = (1 << 9), |
@@ -506,6 +499,7 @@ enum { | |||
506 | /* write protect */ | 499 | /* write protect */ |
507 | IDE_DFLAG_WP = (1 << 29), | 500 | IDE_DFLAG_WP = (1 << 29), |
508 | IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 30), | 501 | IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 30), |
502 | IDE_DFLAG_NIEN_QUIRK = (1 << 31), | ||
509 | }; | 503 | }; |
510 | 504 | ||
511 | struct ide_drive_s { | 505 | struct ide_drive_s { |
@@ -530,14 +524,13 @@ struct ide_drive_s { | |||
530 | unsigned long sleep; /* sleep until this time */ | 524 | unsigned long sleep; /* sleep until this time */ |
531 | unsigned long timeout; /* max time to wait for irq */ | 525 | unsigned long timeout; /* max time to wait for irq */ |
532 | 526 | ||
533 | special_t special; /* special action flags */ | 527 | u8 special_flags; /* special action flags */ |
534 | 528 | ||
535 | u8 select; /* basic drive/head select reg value */ | 529 | u8 select; /* basic drive/head select reg value */ |
536 | u8 retry_pio; /* retrying dma capable host in pio */ | 530 | u8 retry_pio; /* retrying dma capable host in pio */ |
537 | u8 waiting_for_dma; /* dma currently in progress */ | 531 | u8 waiting_for_dma; /* dma currently in progress */ |
538 | u8 dma; /* atapi dma flag */ | 532 | u8 dma; /* atapi dma flag */ |
539 | 533 | ||
540 | u8 quirk_list; /* considered quirky, set for a specific host */ | ||
541 | u8 init_speed; /* transfer rate set at boot */ | 534 | u8 init_speed; /* transfer rate set at boot */ |
542 | u8 current_speed; /* current transfer rate set */ | 535 | u8 current_speed; /* current transfer rate set */ |
543 | u8 desired_speed; /* desired transfer rate set */ | 536 | u8 desired_speed; /* desired transfer rate set */ |
@@ -562,8 +555,7 @@ struct ide_drive_s { | |||
562 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ | 555 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ |
563 | unsigned int failures; /* current failure count */ | 556 | unsigned int failures; /* current failure count */ |
564 | unsigned int max_failures; /* maximum allowed failure count */ | 557 | unsigned int max_failures; /* maximum allowed failure count */ |
565 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 558 | u64 probed_capacity;/* initial/native media capacity */ |
566 | |||
567 | u64 capacity64; /* total number of sectors */ | 559 | u64 capacity64; /* total number of sectors */ |
568 | 560 | ||
569 | int lun; /* logical unit */ | 561 | int lun; /* logical unit */ |
@@ -1222,7 +1214,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | |||
1222 | } | 1214 | } |
1223 | 1215 | ||
1224 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, | 1216 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, |
1225 | hw_regs_t *, hw_regs_t **); | 1217 | struct ide_hw *, struct ide_hw **); |
1226 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1218 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1227 | 1219 | ||
1228 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1220 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
@@ -1461,16 +1453,18 @@ static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | |||
1461 | void ide_register_region(struct gendisk *); | 1453 | void ide_register_region(struct gendisk *); |
1462 | void ide_unregister_region(struct gendisk *); | 1454 | void ide_unregister_region(struct gendisk *); |
1463 | 1455 | ||
1456 | void ide_check_nien_quirk_list(ide_drive_t *); | ||
1464 | void ide_undecoded_slave(ide_drive_t *); | 1457 | void ide_undecoded_slave(ide_drive_t *); |
1465 | 1458 | ||
1466 | void ide_port_apply_params(ide_hwif_t *); | 1459 | void ide_port_apply_params(ide_hwif_t *); |
1467 | int ide_sysfs_register_port(ide_hwif_t *); | 1460 | int ide_sysfs_register_port(ide_hwif_t *); |
1468 | 1461 | ||
1469 | struct ide_host *ide_host_alloc(const struct ide_port_info *, hw_regs_t **); | 1462 | struct ide_host *ide_host_alloc(const struct ide_port_info *, struct ide_hw **, |
1463 | unsigned int); | ||
1470 | void ide_host_free(struct ide_host *); | 1464 | void ide_host_free(struct ide_host *); |
1471 | int ide_host_register(struct ide_host *, const struct ide_port_info *, | 1465 | int ide_host_register(struct ide_host *, const struct ide_port_info *, |
1472 | hw_regs_t **); | 1466 | struct ide_hw **); |
1473 | int ide_host_add(const struct ide_port_info *, hw_regs_t **, | 1467 | int ide_host_add(const struct ide_port_info *, struct ide_hw **, unsigned int, |
1474 | struct ide_host **); | 1468 | struct ide_host **); |
1475 | void ide_host_remove(struct ide_host *); | 1469 | void ide_host_remove(struct ide_host *); |
1476 | int ide_legacy_device_add(const struct ide_port_info *, unsigned long); | 1470 | int ide_legacy_device_add(const struct ide_port_info *, unsigned long); |