From ee2c663ff2b059a2d9c61511591ab99a7dc15c96 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Mon, 11 Oct 2004 12:11:55 -0400 Subject: [PATCH] libata: PCI IDE legacy mode fix In PCI IDE legacy mode ap->port_no is incorrectly set to zero for the second port. Fix it by adding ->hard_port_no to struct ata_probe_ent and struct ata_port (per Jeff's suggestion) and teaching ata_piix.c to use it instead of ->port_no. Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/libata.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/libata.h b/include/linux/libata.h index 171b06794ada..407b4adc06d1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -189,6 +189,7 @@ struct ata_probe_ent { Scsi_Host_Template *sht; struct ata_ioports port[ATA_MAX_PORTS]; unsigned int n_ports; + unsigned int hard_port_no; unsigned int pio_mask; unsigned int mwdma_mask; unsigned int udma_mask; @@ -273,6 +274,7 @@ struct ata_port { unsigned long flags; /* ATA_FLAG_xxx */ unsigned int id; /* unique id req'd by scsi midlyr */ unsigned int port_no; /* unique port #; from zero */ + unsigned int hard_port_no; /* hardware port #; from zero */ struct ata_prd *prd; /* our SG list */ dma_addr_t prd_dma; /* and its DMA mapping */ -- cgit v1.2.3