mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 2.6.16-mm2] Make fusion MPT driver legacy I/O port free
@ 2006-03-31 13:13 Masao Fukuchi
  0 siblings, 0 replies; only message in thread
From: Masao Fukuchi @ 2006-03-31 13:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Eric.Moore

Hi,

I made a patch for Fusion MPT driver to make PCI legacy I/O
port free.

The way to make PCI legacy I/O port free function is based on 
Kaneshige-san's patch which was uploaded several weeks ago and
is already merged into kernel 2.6.16-mm2.

Fusion MPT driver basically doesn't use PCI legacy I/O port.
But some PCI card/controller still use PCI legacy I/O port for
download boot operation.
So this driver needs to set I/O port at download boot operation.

I'm not a member of this mailing list, please cc to my e-mail 
address.

Thanks,
Masao Fukuchi

Signed-off-by: Masao Fukuchi <masao.fukuchi@jp.fujitsu.com>

-----------------------------------------------------------
diff -uarN linux-2.6.16-mm2.org/drivers/message/fusion/mptbase.c linux-2.6.16-
mm2/drivers/message/fusion/mptbase.c
--- linux-2.6.16-mm2.org/drivers/message/fusion/mptbase.c	2006-03-31 16:41:47.000000000 
+0900
+++ linux-2.6.16-mm2/drivers/message/fusion/mptbase.c	2006-03-31 21:16:12.000000000 +0900
@@ -1155,8 +1155,8 @@
 #ifdef CONFIG_PROC_FS
 	struct proc_dir_entry *dent, *ent;
 #endif
-
-	if (pci_enable_device(pdev))
+	int bars = pci_select_bars(pdev, IORESOURCE_MEM);
+	if (pci_enable_device_bars(pdev, bars))
 		return r;
 
 	dinitprintk((KERN_WARNING MYNAM ": mpt_adapter_install\n"));
@@ -1572,6 +1572,7 @@
 	MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
 	u32 device_state = pdev->current_state;
 	int recovery_state;
+	int bars;
 
 	printk(MYIOC_s_INFO_FMT
 	"pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n",
@@ -1579,7 +1580,9 @@
 
 	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev);
-	pci_enable_device(pdev);
+	bars = pci_select_bars(pdev, IORESOURCE_MEM);
+	if (pci_enable_device_bars(pdev, bars))
+		return -ENODEV;
 
 	/* enable interrupts */
 	CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM);
@@ -2575,6 +2578,7 @@
 	int			 r;
 	int			 count;
 	int			 cntdn;
+	int			 bars;
 
 	memset(&ioc_init, 0, sizeof(ioc_init));
 	memset(&init_reply, 0, sizeof(init_reply));
@@ -2587,7 +2591,13 @@
 	 * Set this flag if cached_fw set for either IOC.
 	 */
 	if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT)
+	{
 		ioc->upload_fw = 1;
+		bars = pci_select_bars(ioc->pcidev, IORESOURCE_MEM | IORESOURCE_IO);
+		if (pci_enable_device_bars(ioc->pcidev, bars))
+			return -ENODEV;
+	}
+
 	else
 		ioc->upload_fw = 0;
 	ddlprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-31 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-31 13:13 [patch 2.6.16-mm2] Make fusion MPT driver legacy I/O port free Masao Fukuchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome