Commit 9a0e4c80 authored by Linus Torvalds's avatar Linus Torvalds

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:
  add deprecated ide-scsi to feature-removal-schedule.txt
  ide: Fix pointer arithmetic in hpt3xx driver code (3rd try)
parents 9e7222c8 46dfa040
...@@ -322,3 +322,11 @@ Why: Accounting can now be enabled/disabled without kernel recompilation. ...@@ -322,3 +322,11 @@ Why: Accounting can now be enabled/disabled without kernel recompilation.
controlled by a kernel/module/sysfs/sysctl parameter. controlled by a kernel/module/sysfs/sysctl parameter.
Who: Krzysztof Piotr Oledzki <ole@ans.pl> Who: Krzysztof Piotr Oledzki <ole@ans.pl>
---------------------------
What: ide-scsi (BLK_DEV_IDESCSI)
When: 2.6.29
Why: The 2.6 kernel supports direct writing to ide CD drives, which
eliminates the need for ide-scsi. The new method is more
efficient in every way.
Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
...@@ -613,6 +613,14 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list) ...@@ -613,6 +613,14 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list)
return 0; return 0;
} }
static struct hpt_info *hpt3xx_get_info(struct device *dev)
{
struct ide_host *host = dev_get_drvdata(dev);
struct hpt_info *info = (struct hpt_info *)host->host_priv;
return dev == host->dev[1] ? info + 1 : info;
}
/* /*
* The Marvell bridge chips used on the HighPoint SATA cards do not seem * The Marvell bridge chips used on the HighPoint SATA cards do not seem
* to support the UltraDMA modes 1, 2, and 3 as well as any MWDMA modes... * 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,9 +629,7 @@ static int check_in_drive_list(ide_drive_t *drive, const char **list)
static u8 hpt3xx_udma_filter(ide_drive_t *drive) static u8 hpt3xx_udma_filter(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = to_pci_dev(hwif->dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
u8 mask = hwif->ultra_mask; u8 mask = hwif->ultra_mask;
switch (info->chip_type) { switch (info->chip_type) {
...@@ -662,9 +668,7 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive) ...@@ -662,9 +668,7 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive)
static u8 hpt3xx_mdma_filter(ide_drive_t *drive) static u8 hpt3xx_mdma_filter(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = to_pci_dev(hwif->dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
switch (info->chip_type) { switch (info->chip_type) {
case HPT372 : case HPT372 :
...@@ -700,8 +704,7 @@ static void hpt3xx_set_mode(ide_drive_t *drive, const u8 speed) ...@@ -700,8 +704,7 @@ static void hpt3xx_set_mode(ide_drive_t *drive, const u8 speed)
{ {
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
struct pci_dev *dev = to_pci_dev(hwif->dev); struct pci_dev *dev = to_pci_dev(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
struct hpt_timings *t = info->timings; struct hpt_timings *t = info->timings;
u8 itr_addr = 0x40 + (drive->dn * 4); u8 itr_addr = 0x40 + (drive->dn * 4);
u32 old_itr = 0; u32 old_itr = 0;
...@@ -744,8 +747,7 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask) ...@@ -744,8 +747,7 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = to_pci_dev(hwif->dev); struct pci_dev *dev = to_pci_dev(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
if (drive->quirk_list) { if (drive->quirk_list) {
if (info->chip_type >= HPT370) { 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,8 +975,7 @@ static int __devinit hpt37x_calibrate_dpll(struct pci_dev *dev, u16 f_low, u16 f
static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev)
{ {
unsigned long io_base = pci_resource_start(dev, 4); unsigned long io_base = pci_resource_start(dev, 4);
struct ide_host *host = pci_get_drvdata(dev); struct hpt_info *info = hpt3xx_get_info(&dev->dev);
struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1]);
const char *name = DRV_NAME; const char *name = DRV_NAME;
u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */ u8 pci_clk, dpll_clk = 0; /* PCI and DPLL clock in MHz */
u8 chip_type; u8 chip_type;
...@@ -1217,8 +1218,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) ...@@ -1217,8 +1218,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev)
static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)
{ {
struct pci_dev *dev = to_pci_dev(hwif->dev); struct pci_dev *dev = to_pci_dev(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
u8 chip_type = info->chip_type; u8 chip_type = info->chip_type;
u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02; u8 scr1 = 0, ata66 = hwif->channel ? 0x01 : 0x02;
...@@ -1262,8 +1262,7 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) ...@@ -1262,8 +1262,7 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)
static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
{ {
struct pci_dev *dev = to_pci_dev(hwif->dev); struct pci_dev *dev = to_pci_dev(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev); struct hpt_info *info = hpt3xx_get_info(hwif->dev);
struct hpt_info *info = host->host_priv + (hwif->dev == host->dev[1]);
int serialize = HPT_SERIALIZE_IO; int serialize = HPT_SERIALIZE_IO;
u8 chip_type = info->chip_type; u8 chip_type = info->chip_type;
u8 new_mcr, old_mcr = 0; u8 new_mcr, old_mcr = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment