linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sata_promise: Port enumeration order - SATA 150 TX4, SATA 300 TX4
@ 2006-02-25  1:09 Milan Kupcevic
  2006-02-25  1:16 ` Jeff Garzik
  2006-02-25  6:59 ` Eyal Lebedinsky
  0 siblings, 2 replies; 9+ messages in thread
From: Milan Kupcevic @ 2006-02-25  1:09 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-scsi, linux-kernel, trivial, torvalds

From: Milan Kupcevic <milan@physics.harvard.edu>

Fix Promise SATAII 150 TX4 (PDC40518) and Promise SATA 300 TX4 
(PDC40718-GP) wrong port enumeration order that makes it (nearly) 
impossible to deal with boot problems using two or more drives.

Signed-off-by: Milan Kupcevic <milan@physics.harvard.edu>
---

The current kernel driver assumes:

port 1 - scsi3
port 2 - scsi1
port 3 - scsi0
port 4 - scsi2

Having 4 hard drives connected to the controller grub recognizes the 
port 1 connected drive as "(hd0)" but kernel recognizes the port 3 
connected drive as scsi0:0:0:0 (/dev/sda). There is no clean way to make 
it boot correctly.

 sata_promise.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff -uprN ./drivers/scsi/sata_promise.c 
../linux/drivers/scsi/sata_promise.c
--- ./drivers/scsi/sata_promise.c       2006-02-17 17:23:45.000000000 -0500
+++ ../linux/drivers/scsi/sata_promise.c        2006-02-24 
19:35:16.000000000 -0500
@@ -707,14 +707,18 @@ static int pdc_ata_init_one (struct pci_
 
        /* notice 4-port boards */
        switch (board_idx) {
-       case board_20319:
+       case board_20319: /* tx4  */
                        probe_ent->n_ports = 4;
 
-               pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
-               pdc_ata_setup_port(&probe_ent->port[3], base + 0x380);
-
-               probe_ent->port[2].scr_addr = base + 0x600;
-               probe_ent->port[3].scr_addr = base + 0x700;
+               pdc_ata_setup_port(&probe_ent->port[0], base + 0x380);
+               pdc_ata_setup_port(&probe_ent->port[1], base + 0x280);
+               pdc_ata_setup_port(&probe_ent->port[2], base + 0x200);
+               pdc_ata_setup_port(&probe_ent->port[3], base + 0x300);
+
+               probe_ent->port[0].scr_addr = base + 0x700;
+               probe_ent->port[1].scr_addr = base + 0x500;
+               probe_ent->port[2].scr_addr = base + 0x400;
+               probe_ent->port[3].scr_addr = base + 0x600;
                break;
        case board_2037x:
                probe_ent->n_ports = 2;

-- 
Milan Kupcevic
System Administrator
Harvard University
Department of Physics


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-16 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-25  1:09 [PATCH] sata_promise: Port enumeration order - SATA 150 TX4, SATA 300 TX4 Milan Kupcevic
2006-02-25  1:16 ` Jeff Garzik
2006-02-25  1:42   ` Milan Kupcevic
2006-02-25  6:59 ` Eyal Lebedinsky
2006-02-25 10:52   ` Christiaan den Besten
     [not found]     ` <442DB29D.1010102@avona.com>
2006-05-30 21:31       ` Milan Kupcevic
2006-06-06 17:27         ` Fabian Knittel
2006-10-02 22:08         ` Evan Harris
2006-12-16 17:09           ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).