|
@@ -9939,7 +9939,6 @@ static void i40e_print_features(struct i40e_pf *pf)
|
|
static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
{
|
|
{
|
|
struct i40e_aq_get_phy_abilities_resp abilities;
|
|
struct i40e_aq_get_phy_abilities_resp abilities;
|
|
- unsigned long ioremap_len;
|
|
|
|
struct i40e_pf *pf;
|
|
struct i40e_pf *pf;
|
|
struct i40e_hw *hw;
|
|
struct i40e_hw *hw;
|
|
static u16 pfs_found;
|
|
static u16 pfs_found;
|
|
@@ -9992,15 +9991,15 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
hw = &pf->hw;
|
|
hw = &pf->hw;
|
|
hw->back = pf;
|
|
hw->back = pf;
|
|
|
|
|
|
- ioremap_len = min_t(unsigned long, pci_resource_len(pdev, 0),
|
|
|
|
- I40E_MAX_CSR_SPACE);
|
|
|
|
|
|
+ pf->ioremap_len = min_t(int, pci_resource_len(pdev, 0),
|
|
|
|
+ I40E_MAX_CSR_SPACE);
|
|
|
|
|
|
- hw->hw_addr = ioremap(pci_resource_start(pdev, 0), ioremap_len);
|
|
|
|
|
|
+ hw->hw_addr = ioremap(pci_resource_start(pdev, 0), pf->ioremap_len);
|
|
if (!hw->hw_addr) {
|
|
if (!hw->hw_addr) {
|
|
err = -EIO;
|
|
err = -EIO;
|
|
dev_info(&pdev->dev, "ioremap(0x%04x, 0x%04x) failed: 0x%x\n",
|
|
dev_info(&pdev->dev, "ioremap(0x%04x, 0x%04x) failed: 0x%x\n",
|
|
(unsigned int)pci_resource_start(pdev, 0),
|
|
(unsigned int)pci_resource_start(pdev, 0),
|
|
- (unsigned int)pci_resource_len(pdev, 0), err);
|
|
|
|
|
|
+ pf->ioremap_len, err);
|
|
goto err_ioremap;
|
|
goto err_ioremap;
|
|
}
|
|
}
|
|
hw->vendor_id = pdev->vendor;
|
|
hw->vendor_id = pdev->vendor;
|