diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/Kconfig | 45 | ||||
-rw-r--r-- | drivers/ide/atiixp.c | 2 | ||||
-rw-r--r-- | drivers/ide/au1xxx-ide.c | 7 | ||||
-rw-r--r-- | drivers/ide/hpt366.c | 65 | ||||
-rw-r--r-- | drivers/ide/ide-acpi.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 21 | ||||
-rw-r--r-- | drivers/ide/ide_platform.c | 8 | ||||
-rw-r--r-- | drivers/ide/tx4938ide.c | 2 |
8 files changed, 35 insertions, 120 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 9a5d0aaac9d0..98ccfeb3f5aa 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -7,50 +7,25 @@ config HAVE_IDE | |||
7 | bool | 7 | bool |
8 | 8 | ||
9 | menuconfig IDE | 9 | menuconfig IDE |
10 | tristate "ATA/ATAPI/MFM/RLL support" | 10 | tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)" |
11 | depends on HAVE_IDE | 11 | depends on HAVE_IDE |
12 | depends on BLOCK | 12 | depends on BLOCK |
13 | ---help--- | 13 | ---help--- |
14 | If you say Y here, your kernel will be able to manage low cost mass | 14 | If you say Y here, your kernel will be able to manage ATA/(E)IDE and |
15 | storage units such as ATA/(E)IDE and ATAPI units. The most common | 15 | ATAPI units. The most common cases are IDE hard drives and ATAPI |
16 | cases are IDE hard drives and ATAPI CD-ROM drives. | 16 | CD-ROM drives. |
17 | 17 | ||
18 | If your system is pure SCSI and doesn't use these interfaces, you | 18 | This subsystem is currently in maintenance mode with only bug fix |
19 | can say N here. | 19 | changes applied. Users of ATA hardware are encouraged to migrate to |
20 | 20 | the newer ATA subsystem ("Serial ATA (prod) and Parallel ATA | |
21 | Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard | 21 | (experimental) drivers") which is more actively maintained. |
22 | for mass storage units such as hard disks. It was designed by | ||
23 | Western Digital and Compaq Computer in 1984. It was then named | ||
24 | ST506. Quite a number of disks use the IDE interface. | ||
25 | |||
26 | AT Attachment (ATA) is the superset of the IDE specifications. | ||
27 | ST506 was also called ATA-1. | ||
28 | |||
29 | Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is | ||
30 | ATA-3. It provides support for larger disks (up to 8.4GB by means of | ||
31 | the LBA standard), more disks (4 instead of 2) and for other mass | ||
32 | storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is | ||
33 | ATA-4 and provides faster (and more CPU friendly) transfer modes | ||
34 | than previous PIO (Programmed processor Input/Output) from previous | ||
35 | ATA/IDE standards by means of fast DMA controllers. | ||
36 | |||
37 | ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and | ||
38 | CD-ROM drives, similar in many respects to the SCSI protocol. | ||
39 | |||
40 | SMART IDE (Self Monitoring, Analysis and Reporting Technology) was | ||
41 | designed in order to prevent data corruption and disk crash by | ||
42 | detecting pre hardware failure conditions (heat, access time, and | ||
43 | the like...). Disks built since June 1995 may follow this standard. | ||
44 | The kernel itself doesn't manage this; however there are quite a | ||
45 | number of user programs such as smart that can query the status of | ||
46 | SMART parameters from disk drives. | ||
47 | 22 | ||
48 | To compile this driver as a module, choose M here: the | 23 | To compile this driver as a module, choose M here: the |
49 | module will be called ide-core. | 24 | module will be called ide-core. |
50 | 25 | ||
51 | For further information, please read <file:Documentation/ide/ide.txt>. | 26 | For further information, please read <file:Documentation/ide/ide.txt>. |
52 | 27 | ||
53 | If unsure, say Y. | 28 | If unsure, say N. |
54 | 29 | ||
55 | if IDE | 30 | if IDE |
56 | 31 | ||
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c index 6396c3ad3252..837322b10a4c 100644 --- a/drivers/ide/atiixp.c +++ b/drivers/ide/atiixp.c | |||
@@ -177,7 +177,7 @@ static const struct pci_device_id atiixp_pci_tbl[] = { | |||
177 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 }, | 177 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 }, |
178 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 }, | 178 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 }, |
179 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 }, | 179 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 }, |
180 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), 0 }, | 180 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), 0 }, |
181 | { 0, }, | 181 | { 0, }, |
182 | }; | 182 | }; |
183 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); | 183 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); |
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 58121bd6c115..87cef0c440ad 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c | |||
@@ -532,14 +532,13 @@ static int au_ide_probe(struct platform_device *dev) | |||
532 | goto out; | 532 | goto out; |
533 | } | 533 | } |
534 | 534 | ||
535 | if (!request_mem_region(res->start, res->end - res->start + 1, | 535 | if (!request_mem_region(res->start, resource_size(res), dev->name)) { |
536 | dev->name)) { | ||
537 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); | 536 | pr_debug("%s: request_mem_region failed\n", DRV_NAME); |
538 | ret = -EBUSY; | 537 | ret = -EBUSY; |
539 | goto out; | 538 | goto out; |
540 | } | 539 | } |
541 | 540 | ||
542 | ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1); | 541 | ahwif->regbase = (u32)ioremap(res->start, resource_size(res)); |
543 | if (ahwif->regbase == 0) { | 542 | if (ahwif->regbase == 0) { |
544 | ret = -ENOMEM; | 543 | ret = -ENOMEM; |
545 | goto out; | 544 | goto out; |
@@ -575,7 +574,7 @@ static int au_ide_remove(struct platform_device *dev) | |||
575 | iounmap((void *)ahwif->regbase); | 574 | iounmap((void *)ahwif->regbase); |
576 | 575 | ||
577 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); | 576 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
578 | release_mem_region(res->start, res->end - res->start + 1); | 577 | release_mem_region(res->start, resource_size(res)); |
579 | 578 | ||
580 | return 0; | 579 | return 0; |
581 | } | 580 | } |
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index 7ce68ef6b904..4d90ac2dbb1b 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -297,68 +297,6 @@ static u32 twenty_five_base_hpt36x[] = { | |||
297 | /* XFER_PIO_0 */ 0xc0d08585 | 297 | /* XFER_PIO_0 */ 0xc0d08585 |
298 | }; | 298 | }; |
299 | 299 | ||
300 | #if 0 | ||
301 | /* These are the timing tables from the HighPoint open source drivers... */ | ||
302 | static u32 thirty_three_base_hpt37x[] = { | ||
303 | /* XFER_UDMA_6 */ 0x12446231, /* 0x12646231 ?? */ | ||
304 | /* XFER_UDMA_5 */ 0x12446231, | ||
305 | /* XFER_UDMA_4 */ 0x12446231, | ||
306 | /* XFER_UDMA_3 */ 0x126c6231, | ||
307 | /* XFER_UDMA_2 */ 0x12486231, | ||
308 | /* XFER_UDMA_1 */ 0x124c6233, | ||
309 | /* XFER_UDMA_0 */ 0x12506297, | ||
310 | |||
311 | /* XFER_MW_DMA_2 */ 0x22406c31, | ||
312 | /* XFER_MW_DMA_1 */ 0x22406c33, | ||
313 | /* XFER_MW_DMA_0 */ 0x22406c97, | ||
314 | |||
315 | /* XFER_PIO_4 */ 0x06414e31, | ||
316 | /* XFER_PIO_3 */ 0x06414e42, | ||
317 | /* XFER_PIO_2 */ 0x06414e53, | ||
318 | /* XFER_PIO_1 */ 0x06814e93, | ||
319 | /* XFER_PIO_0 */ 0x06814ea7 | ||
320 | }; | ||
321 | |||
322 | static u32 fifty_base_hpt37x[] = { | ||
323 | /* XFER_UDMA_6 */ 0x12848242, | ||
324 | /* XFER_UDMA_5 */ 0x12848242, | ||
325 | /* XFER_UDMA_4 */ 0x12ac8242, | ||
326 | /* XFER_UDMA_3 */ 0x128c8242, | ||
327 | /* XFER_UDMA_2 */ 0x120c8242, | ||
328 | /* XFER_UDMA_1 */ 0x12148254, | ||
329 | /* XFER_UDMA_0 */ 0x121882ea, | ||
330 | |||
331 | /* XFER_MW_DMA_2 */ 0x22808242, | ||
332 | /* XFER_MW_DMA_1 */ 0x22808254, | ||
333 | /* XFER_MW_DMA_0 */ 0x228082ea, | ||
334 | |||
335 | /* XFER_PIO_4 */ 0x0a81f442, | ||
336 | /* XFER_PIO_3 */ 0x0a81f443, | ||
337 | /* XFER_PIO_2 */ 0x0a81f454, | ||
338 | /* XFER_PIO_1 */ 0x0ac1f465, | ||
339 | /* XFER_PIO_0 */ 0x0ac1f48a | ||
340 | }; | ||
341 | |||
342 | static u32 sixty_six_base_hpt37x[] = { | ||
343 | /* XFER_UDMA_6 */ 0x1c869c62, | ||
344 | /* XFER_UDMA_5 */ 0x1cae9c62, /* 0x1c8a9c62 */ | ||
345 | /* XFER_UDMA_4 */ 0x1c8a9c62, | ||
346 | /* XFER_UDMA_3 */ 0x1c8e9c62, | ||
347 | /* XFER_UDMA_2 */ 0x1c929c62, | ||
348 | /* XFER_UDMA_1 */ 0x1c9a9c62, | ||
349 | /* XFER_UDMA_0 */ 0x1c829c62, | ||
350 | |||
351 | /* XFER_MW_DMA_2 */ 0x2c829c62, | ||
352 | /* XFER_MW_DMA_1 */ 0x2c829c66, | ||
353 | /* XFER_MW_DMA_0 */ 0x2c829d2e, | ||
354 | |||
355 | /* XFER_PIO_4 */ 0x0c829c62, | ||
356 | /* XFER_PIO_3 */ 0x0c829c84, | ||
357 | /* XFER_PIO_2 */ 0x0c829ca6, | ||
358 | /* XFER_PIO_1 */ 0x0d029d26, | ||
359 | /* XFER_PIO_0 */ 0x0d029d5e | ||
360 | }; | ||
361 | #else | ||
362 | /* | 300 | /* |
363 | * The following are the new timing tables with PIO mode data/taskfile transfer | 301 | * The following are the new timing tables with PIO mode data/taskfile transfer |
364 | * overclocking fixed... | 302 | * overclocking fixed... |
@@ -424,16 +362,13 @@ static u32 sixty_six_base_hpt37x[] = { | |||
424 | /* XFER_PIO_1 */ 0x0d02ff26, | 362 | /* XFER_PIO_1 */ 0x0d02ff26, |
425 | /* XFER_PIO_0 */ 0x0d42ff7f | 363 | /* XFER_PIO_0 */ 0x0d42ff7f |
426 | }; | 364 | }; |
427 | #endif | ||
428 | 365 | ||
429 | #define HPT366_DEBUG_DRIVE_INFO 0 | ||
430 | #define HPT371_ALLOW_ATA133_6 1 | 366 | #define HPT371_ALLOW_ATA133_6 1 |
431 | #define HPT302_ALLOW_ATA133_6 1 | 367 | #define HPT302_ALLOW_ATA133_6 1 |
432 | #define HPT372_ALLOW_ATA133_6 1 | 368 | #define HPT372_ALLOW_ATA133_6 1 |
433 | #define HPT370_ALLOW_ATA100_5 0 | 369 | #define HPT370_ALLOW_ATA100_5 0 |
434 | #define HPT366_ALLOW_ATA66_4 1 | 370 | #define HPT366_ALLOW_ATA66_4 1 |
435 | #define HPT366_ALLOW_ATA66_3 1 | 371 | #define HPT366_ALLOW_ATA66_3 1 |
436 | #define HPT366_MAX_DEVS 8 | ||
437 | 372 | ||
438 | /* Supported ATA clock frequencies */ | 373 | /* Supported ATA clock frequencies */ |
439 | enum ata_clock { | 374 | enum ata_clock { |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index c509c9916464..c0cf45a11b93 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -114,8 +114,6 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, | |||
114 | unsigned int bus, devnum, func; | 114 | unsigned int bus, devnum, func; |
115 | acpi_integer addr; | 115 | acpi_integer addr; |
116 | acpi_handle dev_handle; | 116 | acpi_handle dev_handle; |
117 | struct acpi_buffer buffer = {.length = ACPI_ALLOCATE_BUFFER, | ||
118 | .pointer = NULL}; | ||
119 | acpi_status status; | 117 | acpi_status status; |
120 | struct acpi_device_info *dinfo = NULL; | 118 | struct acpi_device_info *dinfo = NULL; |
121 | int ret = -ENODEV; | 119 | int ret = -ENODEV; |
@@ -134,12 +132,11 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, | |||
134 | goto err; | 132 | goto err; |
135 | } | 133 | } |
136 | 134 | ||
137 | status = acpi_get_object_info(dev_handle, &buffer); | 135 | status = acpi_get_object_info(dev_handle, &dinfo); |
138 | if (ACPI_FAILURE(status)) { | 136 | if (ACPI_FAILURE(status)) { |
139 | DEBPRINT("get_object_info for device failed\n"); | 137 | DEBPRINT("get_object_info for device failed\n"); |
140 | goto err; | 138 | goto err; |
141 | } | 139 | } |
142 | dinfo = buffer.pointer; | ||
143 | if (dinfo && (dinfo->valid & ACPI_VALID_ADR) && | 140 | if (dinfo && (dinfo->valid & ACPI_VALID_ADR) && |
144 | dinfo->address == addr) { | 141 | dinfo->address == addr) { |
145 | *pcidevfn = addr; | 142 | *pcidevfn = addr; |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 58fc920d5c32..6a0e62542167 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -221,6 +221,8 @@ typedef struct ide_tape_obj { | |||
221 | 221 | ||
222 | static DEFINE_MUTEX(idetape_ref_mutex); | 222 | static DEFINE_MUTEX(idetape_ref_mutex); |
223 | 223 | ||
224 | static DEFINE_MUTEX(idetape_chrdev_mutex); | ||
225 | |||
224 | static struct class *idetape_sysfs_class; | 226 | static struct class *idetape_sysfs_class; |
225 | 227 | ||
226 | static void ide_tape_release(struct device *); | 228 | static void ide_tape_release(struct device *); |
@@ -1457,10 +1459,11 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) | |||
1457 | if (i >= MAX_HWIFS * MAX_DRIVES) | 1459 | if (i >= MAX_HWIFS * MAX_DRIVES) |
1458 | return -ENXIO; | 1460 | return -ENXIO; |
1459 | 1461 | ||
1460 | lock_kernel(); | 1462 | mutex_lock(&idetape_chrdev_mutex); |
1463 | |||
1461 | tape = ide_tape_get(NULL, true, i); | 1464 | tape = ide_tape_get(NULL, true, i); |
1462 | if (!tape) { | 1465 | if (!tape) { |
1463 | unlock_kernel(); | 1466 | mutex_unlock(&idetape_chrdev_mutex); |
1464 | return -ENXIO; | 1467 | return -ENXIO; |
1465 | } | 1468 | } |
1466 | 1469 | ||
@@ -1519,12 +1522,15 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) | |||
1519 | tape->door_locked = DOOR_LOCKED; | 1522 | tape->door_locked = DOOR_LOCKED; |
1520 | } | 1523 | } |
1521 | } | 1524 | } |
1522 | unlock_kernel(); | 1525 | mutex_unlock(&idetape_chrdev_mutex); |
1526 | |||
1523 | return 0; | 1527 | return 0; |
1524 | 1528 | ||
1525 | out_put_tape: | 1529 | out_put_tape: |
1526 | ide_tape_put(tape); | 1530 | ide_tape_put(tape); |
1527 | unlock_kernel(); | 1531 | |
1532 | mutex_unlock(&idetape_chrdev_mutex); | ||
1533 | |||
1528 | return retval; | 1534 | return retval; |
1529 | } | 1535 | } |
1530 | 1536 | ||
@@ -1551,7 +1557,8 @@ static int idetape_chrdev_release(struct inode *inode, struct file *filp) | |||
1551 | ide_drive_t *drive = tape->drive; | 1557 | ide_drive_t *drive = tape->drive; |
1552 | unsigned int minor = iminor(inode); | 1558 | unsigned int minor = iminor(inode); |
1553 | 1559 | ||
1554 | lock_kernel(); | 1560 | mutex_lock(&idetape_chrdev_mutex); |
1561 | |||
1555 | tape = drive->driver_data; | 1562 | tape = drive->driver_data; |
1556 | 1563 | ||
1557 | ide_debug_log(IDE_DBG_FUNC, "enter"); | 1564 | ide_debug_log(IDE_DBG_FUNC, "enter"); |
@@ -1575,7 +1582,9 @@ static int idetape_chrdev_release(struct inode *inode, struct file *filp) | |||
1575 | } | 1582 | } |
1576 | clear_bit(ilog2(IDE_AFLAG_BUSY), &drive->atapi_flags); | 1583 | clear_bit(ilog2(IDE_AFLAG_BUSY), &drive->atapi_flags); |
1577 | ide_tape_put(tape); | 1584 | ide_tape_put(tape); |
1578 | unlock_kernel(); | 1585 | |
1586 | mutex_unlock(&idetape_chrdev_mutex); | ||
1587 | |||
1579 | return 0; | 1588 | return 0; |
1580 | } | 1589 | } |
1581 | 1590 | ||
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index b579fbe88370..42965b3e30b9 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c | |||
@@ -81,14 +81,14 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) | |||
81 | 81 | ||
82 | if (mmio) { | 82 | if (mmio) { |
83 | base = devm_ioremap(&pdev->dev, | 83 | base = devm_ioremap(&pdev->dev, |
84 | res_base->start, res_base->end - res_base->start + 1); | 84 | res_base->start, resource_size(res_base)); |
85 | alt_base = devm_ioremap(&pdev->dev, | 85 | alt_base = devm_ioremap(&pdev->dev, |
86 | res_alt->start, res_alt->end - res_alt->start + 1); | 86 | res_alt->start, resource_size(res_alt)); |
87 | } else { | 87 | } else { |
88 | base = devm_ioport_map(&pdev->dev, | 88 | base = devm_ioport_map(&pdev->dev, |
89 | res_base->start, res_base->end - res_base->start + 1); | 89 | res_base->start, resource_size(res_base)); |
90 | alt_base = devm_ioport_map(&pdev->dev, | 90 | alt_base = devm_ioport_map(&pdev->dev, |
91 | res_alt->start, res_alt->end - res_alt->start + 1); | 91 | res_alt->start, resource_size(res_alt)); |
92 | } | 92 | } |
93 | 93 | ||
94 | memset(&hw, 0, sizeof(hw)); | 94 | memset(&hw, 0, sizeof(hw)); |
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c index ea89fddeed91..fd59c0d235b5 100644 --- a/drivers/ide/tx4938ide.c +++ b/drivers/ide/tx4938ide.c | |||
@@ -146,7 +146,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev) | |||
146 | return -ENODEV; | 146 | return -ENODEV; |
147 | 147 | ||
148 | if (!devm_request_mem_region(&pdev->dev, res->start, | 148 | if (!devm_request_mem_region(&pdev->dev, res->start, |
149 | res->end - res->start + 1, "tx4938ide")) | 149 | resource_size(res), "tx4938ide")) |
150 | return -EBUSY; | 150 | return -EBUSY; |
151 | mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, | 151 | mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, |
152 | 8 << pdata->ioport_shift); | 152 | 8 << pdata->ioport_shift); |