From: Noriyuki Fujii <n-fujii@np.css.fujitsu.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] PCI legacy I/O port free driver - Making MegaRAID SAS driver
Date: Fri, 07 Aug 2009 14:24:22 +0900 [thread overview]
Message-ID: <4A7BBA86.2040504@np.css.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
Hi,
I made a patch for MegaRAID sas driver to make PCI legacy I/O port free.
The way to make PCI legacy I/O port free is the same as Fusion-MPT
driver's and it has been merged into 2.6.30.4.
As a result of the above, the driver can handle its device even when
there are a huge number of PCI devices being used on the system and no
I/O port region assigned to the device.
I'm not in the linux-scsi mailing list.
Please reply to the following address.
E-Mail: n-fujii@np.css.fujitsu.com
Thanks,
Noriyuki Fujii
[-- Attachment #2: linux-2.6-scsi-megaraid-sas-make-legacy-i-o-port-free.patch --]
[-- Type: text/plain, Size: 1617 bytes --]
--- megaraid_sasOrg.c 2009-07-02 16:31:17.000000000 +0900
+++ megaraid_sasMod.c 2009-08-06 11:24:42.000000000 +0900
@@ -2573,7 +2573,9 @@ static int megasas_init_mfi(struct megas
instance->base_addr = pci_resource_start(instance->pdev, 0);
}
- if (pci_request_regions(instance->pdev, "megasas: LSI")) {
+ if (pci_request_selected_regions(instance->pdev,
+ pci_select_bars(instance->pdev, IORESOURCE_MEM),
+ "megasas: LSI")) {
printk(KERN_DEBUG "megasas: IO memory region busy!\n");
return -EBUSY;
}
@@ -2719,7 +2721,8 @@ static int megasas_init_mfi(struct megas
iounmap(instance->reg_set);
fail_ioremap:
- pci_release_regions(instance->pdev);
+ pci_release_selected_regions(instance->pdev,
+ pci_select_bars(instance->pdev, IORESOURCE_MEM));
return -EINVAL;
}
@@ -2739,7 +2742,8 @@ static void megasas_release_mfi(struct m
iounmap(instance->reg_set);
- pci_release_regions(instance->pdev);
+ pci_release_selected_regions(instance->pdev,
+ pci_select_bars(instance->pdev, IORESOURCE_MEM));
}
/**
@@ -3049,7 +3053,7 @@ megasas_probe_one(struct pci_dev *pdev,
/*
* PCI prepping: enable device set bus mastering and dma mask
*/
- rval = pci_enable_device(pdev);
+ rval = pci_enable_device_mem(pdev);
if (rval) {
return rval;
@@ -3343,7 +3347,7 @@ megasas_resume(struct pci_dev *pdev)
/*
* PCI prepping: enable device set bus mastering and dma mask
*/
- rval = pci_enable_device(pdev);
+ rval = pci_enable_device_mem(pdev);
if (rval) {
printk(KERN_INFO "megasas: Enable device failed\n");
next reply other threads:[~2009-08-07 5:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 5:24 Noriyuki Fujii [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-11-20 7:27 [PATCH] PCI legacy I/O port free driver - Making MegaRAID SAS driver Noriyuki Fujii
2009-12-02 7:41 ` Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7BBA86.2040504@np.css.fujitsu.com \
--to=n-fujii@np.css.fujitsu.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.