Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73d1dd93c462b52512685fe118159eafc7eb9f7e
Commit:     73d1dd93c462b52512685fe118159eafc7eb9f7e
Parent:     33b18a602525198ab8892789dab6839f325407f8
Author:     Sergei Shtylyov <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:35:51 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:55 2006 -0800

    [PATCH] ide: fix the case of multiple HPT3xx chips present
    
    init_chipset_hpt366() modifies some fields of the ide_pci_device_t structure
    depending on the chip's revision, so pass it a copy of the structure to 
avoid
    issues when multiple different chips are present.
    
    Signed-off-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Cc: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/ide/pci/hpt366.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 29a3770..4968b16 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -72,6 +72,8 @@
  *   table in which the mode lookup is done
  * - fix the hotswap code:  it caused RESET- to glitch when tristating the bus,
  *   and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead
+ * - pass to init_chipset() handlers a copy of the IDE PCI device structure as
+ *   they tamper with its fields
  *             <[EMAIL PROTECTED]>
  *
  */
@@ -1564,13 +1566,16 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata 
= {
  *
  *     Called when the PCI registration layer (or the IDE initialization)
  *     finds a device matching our IDE device tables.
+ *
+ *     NOTE: since we'll have to modify some fields of the ide_pci_device_t
+ *     structure depending on the chip's revision, we'd better pass a local
+ *     copy down the call chain...
  */
- 
 static int __devinit hpt366_init_one(struct pci_dev *dev, const struct 
pci_device_id *id)
 {
-       ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
+       ide_pci_device_t d = hpt366_chipsets[id->driver_data];
 
-       return d->init_setup(dev, d);
+       return d.init_setup(dev, &d);
 }
 
 static struct pci_device_id hpt366_pci_tbl[] = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to