diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/Kconfig | 14 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 10 | ||||
-rw-r--r-- | drivers/ide/mips/swarm.c | 1 | ||||
-rw-r--r-- | drivers/ide/pci/hpt366.c | 31 |
5 files changed, 35 insertions, 23 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index fc735ab08ff4..8e93a797c93d 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -292,6 +292,20 @@ config IDE_GENERIC | |||
292 | tristate "generic/default IDE chipset support" | 292 | tristate "generic/default IDE chipset support" |
293 | depends on ALPHA || X86 || IA64 || M32R || MIPS | 293 | depends on ALPHA || X86 || IA64 || M32R || MIPS |
294 | help | 294 | help |
295 | This is the generic IDE driver. This driver attaches to the | ||
296 | fixed legacy ports (e.g. on PCs 0x1f0/0x170, 0x1e8/0x168 and | ||
297 | so on). Please note that if this driver is built into the | ||
298 | kernel or loaded before other ATA (IDE or libata) drivers | ||
299 | and the controller is located at legacy ports, this driver | ||
300 | may grab those ports and thus can prevent the controller | ||
301 | specific driver from attaching. | ||
302 | |||
303 | Also, currently, IDE generic doesn't allow IRQ sharing | ||
304 | meaning that the IRQs it grabs won't be available to other | ||
305 | controllers sharing those IRQs which usually makes drivers | ||
306 | for those controllers fail. Generally, it's not a good idea | ||
307 | to load IDE generic driver on modern systems. | ||
308 | |||
295 | If unsure, say N. | 309 | If unsure, say N. |
296 | 310 | ||
297 | config BLK_DEV_PLATFORM | 311 | config BLK_DEV_PLATFORM |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f1489999cf91..49a8c589e346 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1933,7 +1933,6 @@ static void ide_cd_remove(ide_drive_t *drive) | |||
1933 | 1933 | ||
1934 | ide_proc_unregister_driver(drive, info->driver); | 1934 | ide_proc_unregister_driver(drive, info->driver); |
1935 | 1935 | ||
1936 | blk_unregister_filter(info->disk); | ||
1937 | del_gendisk(info->disk); | 1936 | del_gendisk(info->disk); |
1938 | 1937 | ||
1939 | ide_cd_put(info); | 1938 | ide_cd_put(info); |
@@ -2159,7 +2158,6 @@ static int ide_cd_probe(ide_drive_t *drive) | |||
2159 | g->fops = &idecd_ops; | 2158 | g->fops = &idecd_ops; |
2160 | g->flags |= GENHD_FL_REMOVABLE; | 2159 | g->flags |= GENHD_FL_REMOVABLE; |
2161 | add_disk(g); | 2160 | add_disk(g); |
2162 | blk_register_filter(g); | ||
2163 | return 0; | 2161 | return 0; |
2164 | 2162 | ||
2165 | out_free_cd: | 2163 | out_free_cd: |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 1bce84b56630..3833189144ed 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2338,7 +2338,7 @@ static void idetape_get_inquiry_results(ide_drive_t *drive) | |||
2338 | { | 2338 | { |
2339 | idetape_tape_t *tape = drive->driver_data; | 2339 | idetape_tape_t *tape = drive->driver_data; |
2340 | struct ide_atapi_pc pc; | 2340 | struct ide_atapi_pc pc; |
2341 | char fw_rev[6], vendor_id[10], product_id[18]; | 2341 | char fw_rev[4], vendor_id[8], product_id[16]; |
2342 | 2342 | ||
2343 | idetape_create_inquiry_cmd(&pc); | 2343 | idetape_create_inquiry_cmd(&pc); |
2344 | if (idetape_queue_pc_tail(drive, &pc)) { | 2344 | if (idetape_queue_pc_tail(drive, &pc)) { |
@@ -2350,11 +2350,11 @@ static void idetape_get_inquiry_results(ide_drive_t *drive) | |||
2350 | memcpy(product_id, &pc.buf[16], 16); | 2350 | memcpy(product_id, &pc.buf[16], 16); |
2351 | memcpy(fw_rev, &pc.buf[32], 4); | 2351 | memcpy(fw_rev, &pc.buf[32], 4); |
2352 | 2352 | ||
2353 | ide_fixstring(vendor_id, 10, 0); | 2353 | ide_fixstring(vendor_id, 8, 0); |
2354 | ide_fixstring(product_id, 18, 0); | 2354 | ide_fixstring(product_id, 16, 0); |
2355 | ide_fixstring(fw_rev, 6, 0); | 2355 | ide_fixstring(fw_rev, 4, 0); |
2356 | 2356 | ||
2357 | printk(KERN_INFO "ide-tape: %s <-> %s: %s %s rev %s\n", | 2357 | printk(KERN_INFO "ide-tape: %s <-> %s: %.8s %.16s rev %.4s\n", |
2358 | drive->name, tape->name, vendor_id, product_id, fw_rev); | 2358 | drive->name, tape->name, vendor_id, product_id, fw_rev); |
2359 | } | 2359 | } |
2360 | 2360 | ||
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index badf79fc9e3a..39c9ee995857 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c | |||
@@ -107,6 +107,7 @@ static int __devinit swarm_ide_probe(struct device *dev) | |||
107 | 107 | ||
108 | base = ioremap(offset, size); | 108 | base = ioremap(offset, size); |
109 | 109 | ||
110 | memset(&hw, 0, sizeof(hw)); | ||
110 | for (i = 0; i <= 7; i++) | 111 | for (i = 0; i <= 7; i++) |
111 | hw.io_ports_array[i] = | 112 | hw.io_ports_array[i] = |
112 | (unsigned long)(base + ((0x1f0 + i) << 5)); | 113 | (unsigned long)(base + ((0x1f0 + i) << 5)); |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index eb107eef0dbc..c37ab1743819 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -613,6 +613,14 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list) | |||
613 | return 0; | 613 | return 0; |
614 | } | 614 | } |
615 | 615 | ||
616 | static struct hpt_info *hpt3xx_get_info(struct device *dev) | ||
617 | { | ||
618 | struct ide_host *host = dev_get_drvdata(dev); | ||
619 | struct hpt_info *info = (struct hpt_info *)host->host_priv; | ||
620 | |||
621 | return dev == host->dev[1] ? info + 1 : info; | ||
622 | } | ||
623 | |||
616 | /* | 624 | /* |
617 | * The Marvell bridge chips used on the HighPoint SATA cards do not seem | 625 | * The Marvell bridge chips used on the HighPoint SATA cards do not seem |
618 | * to support the UltraDMA modes 1, 2, and 3 as well as any MWDMA modes... | 626 | * to support the UltraDMA modes 1, 2, and 3 as well as any MWDMA modes... |
@@ -621,9 +629,7 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list) | |||
621 | static u8 hpt3xx_udma_filter(ide_drive_t *drive) | 629 | static u8 hpt3xx_udma_filter(ide_drive_t *drive) |
622 | { | 630 | { |
623 | ide_hwif_t *hwif = HWIF(drive); | 631 | ide_hwif_t *hwif = HWIF(drive); |
624 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 632 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
625 | struct ide_host *host = pci_get_drvdata(dev); | ||
626 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
627 | u8 mask = hwif->ultra_mask; | 633 | u8 mask = hwif->ultra_mask; |
628 | 634 | ||
629 | switch (info->chip_type) { | 635 | switch (info->chip_type) { |
@@ -662,9 +668,7 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive) | |||
662 | static u8 hpt3xx_mdma_filter(ide_drive_t *drive) | 668 | static u8 hpt3xx_mdma_filter(ide_drive_t *drive) |
663 | { | 669 | { |
664 | ide_hwif_t *hwif = HWIF(drive); | 670 | ide_hwif_t *hwif = HWIF(drive); |
665 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 671 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
666 | struct ide_host *host = pci_get_drvdata(dev); | ||
667 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
668 | 672 | ||
669 | switch (info->chip_type) { | 673 | switch (info->chip_type) { |
670 | case HPT372 : | 674 | case HPT372 : |
@@ -700,8 +704,7 @@ static void hpt3xx_set_mode(ide_drive_t *drive, const u8 speed) | |||
700 | { | 704 | { |
701 | ide_hwif_t *hwif = drive->hwif; | 705 | ide_hwif_t *hwif = drive->hwif; |
702 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 706 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
703 | struct ide_host *host = pci_get_drvdata(dev); | 707 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
704 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
705 | struct hpt_timings *t = info->timings; | 708 | struct hpt_timings *t = info->timings; |
706 | u8 itr_addr = 0x40 + (drive->dn * 4); | 709 | u8 itr_addr = 0x40 + (drive->dn * 4); |
707 | u32 old_itr = 0; | 710 | u32 old_itr = 0; |
@@ -744,8 +747,7 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask) | |||
744 | { | 747 | { |
745 | ide_hwif_t *hwif = HWIF(drive); | 748 | ide_hwif_t *hwif = HWIF(drive); |
746 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 749 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
747 | struct ide_host *host = pci_get_drvdata(dev); | 750 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
748 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
749 | 751 | ||
750 | if (drive->quirk_list) { | 752 | if (drive->quirk_list) { |
751 | if (info->chip_type >= HPT370) { | 753 | if (info->chip_type >= HPT370) { |
@@ -973,8 +975,7 @@ static int __devinit hpt37x_calibrate_dpll(struct pci_dev *dev, u16 f_low, u16 f | |||
973 | static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) | 975 | static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) |
974 | { | 976 | { |
975 | unsigned long io_base = pci_resource_start(dev, 4); | 977 | unsigned long io_base = pci_resource_start(dev, 4); |
976 | struct ide_host *host = pci_get_drvdata(dev); | 978 | struct hpt_info *info = hpt3xx_get_info(&dev->dev); |
977 | struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1]); | ||
978 | const char *name = DRV_NAME; | 979 | const char *name = DRV_NAME; |
979 | u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */ | 980 | u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */ |
980 | u8 chip_type; | 981 | u8 chip_type; |
@@ -1217,8 +1218,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) | |||
1217 | static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | 1218 | static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) |
1218 | { | 1219 | { |
1219 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 1220 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1220 | struct ide_host *host = pci_get_drvdata(dev); | 1221 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
1221 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
1222 | u8 chip_type = info->chip_type; | 1222 | u8 chip_type = info->chip_type; |
1223 | u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02; | 1223 | u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02; |
1224 | 1224 | ||
@@ -1262,8 +1262,7 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | |||
1262 | static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | 1262 | static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) |
1263 | { | 1263 | { |
1264 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 1264 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1265 | struct ide_host *host = pci_get_drvdata(dev); | 1265 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
1266 | struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]); | ||
1267 | int serialize = HPT_SERIALIZE_IO; | 1266 | int serialize = HPT_SERIALIZE_IO; |
1268 | u8 chip_type = info->chip_type; | 1267 | u8 chip_type = info->chip_type; |
1269 | u8 new_mcr, old_mcr = 0; | 1268 | u8 new_mcr, old_mcr = 0; |