linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600
@ 2017-12-31 21:11 Darren Stevens
  2018-01-02 14:56 ` Tejun Heo
  2018-01-08 12:02 ` [PATCH] " Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Darren Stevens @ 2017-12-31 21:11 UTC (permalink / raw)
  To: linux-ide

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

  AmigaOS...........: http://yam.ch/
  Unix/MacOS/Windows: http://www.mozilla.com/thunderbird/

General information about MIME can be found at:
http://en.wikipedia.org/wiki/MIME

[-- Attachment #2: Type: text/plain, Size: 710 bytes --]

    The AMD SB600 southbridge has an PATA IDE interface, but the
    secondary port has no physical connections, so is disabled in
    the PCI header which makes it appear as a legacy port.
    
    On most systems this causes no trouble, but the Amigaone X1000 has
    an SB600 connected to a PowerPC SoC PCI-e root port, with an
    emulated ISA bus. On this system a kernel panic occurs at boot
    time during device attach for the secondary port.
    
    Mark the port as 'dummy' to prevent this. As a bonus, disabling
    this will slightly speed up booting on PC systems using an
    SB600 as they will now skip 2 known empty ports.
    
    Signed-off-by: Darren Stevens <Darren@stevens-zone.net>

---

[-- Attachment #3: ati.patch --]
[-- Type: text/plain, Size: 564 bytes --]

diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 49d705c..4d49fd3 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -278,6 +278,10 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &info, &info };
 
+	/* SB600 doesn't have secondary port wired */
+	if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE))
+		ppi[1] = &ata_dummy_port_info;
+
 	return ata_pci_bmdma_init_one(pdev, ppi, &atiixp_sht, NULL,
 				      ATA_HOST_PARALLEL_SCAN);
 }

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

* Re: [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600
  2017-12-31 21:11 [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600 Darren Stevens
@ 2018-01-02 14:56 ` Tejun Heo
  2018-01-06 10:13   ` Darren Stevens
  2018-01-08 12:02 ` [PATCH] " Tejun Heo
  1 sibling, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2018-01-02 14:56 UTC (permalink / raw)
  To: Darren Stevens; +Cc: linux-ide

Hello, Darren.

On Sun, Dec 31, 2017 at 09:11:05PM +0000, Darren Stevens wrote:
>     The AMD SB600 southbridge has an PATA IDE interface, but the
>     secondary port has no physical connections, so is disabled in
>     the PCI header which makes it appear as a legacy port.

How sure are you about the secondary port never being used?  Given the
age of the device and that this has been like this the whole time, I'd
prefer if the workaround were more specific - ie. mark it dummy only
on the specific machines that are known to be broken.  That said, if
we know with certainty that the secondary port is never used, sure.

Thanks.

-- 
tejun

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

* Re: libata:pata_atiixp: Don't use unconnected secondary port on SB600
  2018-01-02 14:56 ` Tejun Heo
@ 2018-01-06 10:13   ` Darren Stevens
  0 siblings, 0 replies; 4+ messages in thread
From: Darren Stevens @ 2018-01-06 10:13 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

Hello Tejun

On 02/01/2018, Tejun Heo wrote:
> Hello, Darren.
>
> On Sun, Dec 31, 2017 at 09:11:05PM +0000, Darren Stevens wrote:
>>     The AMD SB600 southbridge has an PATA IDE interface, but the
>>     secondary port has no physical connections, so is disabled in
>>     the PCI header which makes it appear as a legacy port.
>
> How sure are you about the secondary port never being used?  Given the
> age of the device and that this has been like this the whole time, I'd
> prefer if the workaround were more specific - ie. mark it dummy only
> on the specific machines that are known to be broken.  That said, if
> we know with certainty that the secondary port is never used, sure.

I'm reasonably sure.
>From '46157-sb600-bdg-pub-3.00'

Page 27 section 6.1.2

Note: Secondary IDE channel should always be disabled for there is no pin out for secondary IDE.

However I was trying to keep patches for the X1000 inside arch/powerpc rather than all over the linux tree. If you are OK with a specific patch I can resubmit.

Thanks
Darren


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

* Re: [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600
  2017-12-31 21:11 [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600 Darren Stevens
  2018-01-02 14:56 ` Tejun Heo
@ 2018-01-08 12:02 ` Tejun Heo
  1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2018-01-08 12:02 UTC (permalink / raw)
  To: Darren Stevens; +Cc: linux-ide

On Sun, Dec 31, 2017 at 09:11:05PM +0000, Darren Stevens wrote:
>     The AMD SB600 southbridge has an PATA IDE interface, but the
>     secondary port has no physical connections, so is disabled in
>     the PCI header which makes it appear as a legacy port.
>     
>     On most systems this causes no trouble, but the Amigaone X1000 has
>     an SB600 connected to a PowerPC SoC PCI-e root port, with an
>     emulated ISA bus. On this system a kernel panic occurs at boot
>     time during device attach for the secondary port.
>     
>     Mark the port as 'dummy' to prevent this. As a bonus, disabling
>     this will slightly speed up booting on PC systems using an
>     SB600 as they will now skip 2 known empty ports.
>     
>     Signed-off-by: Darren Stevens <Darren@stevens-zone.net>

Applied to libata/for-4.16.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2018-01-08 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-31 21:11 [PATCH] libata:pata_atiixp: Don't use unconnected secondary port on SB600 Darren Stevens
2018-01-02 14:56 ` Tejun Heo
2018-01-06 10:13   ` Darren Stevens
2018-01-08 12:02 ` [PATCH] " Tejun Heo

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).