Commit a7f82c36 authored by Niklas Schnelle's avatar Niklas Schnelle Committed by Heiko Carstens
Browse files

s390/pci: rename zpci_configure_device()



With zpci_configure_device() now always called on a device that has
already been configured on the platform level its name has become
misleading. Rename it to zpci_scan_configured_device() to signify that
the function now only handles the correct scanning of a newly configured
PCI function taking care of the special handling necessary for function
0 and functions parked waiting for a PCI bus that can't be created
without first seeing function 0.

Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: default avatarPierre Morel <pmorel@linux.ibm.com>
Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 6daa755f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ extern unsigned int s390_pci_no_rid;
struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state);
int zpci_enable_device(struct zpci_dev *);
int zpci_disable_device(struct zpci_dev *);
int zpci_configure_device(struct zpci_dev *zdev, u32 fh);
int zpci_scan_configured_device(struct zpci_dev *zdev, u32 fh);
int zpci_deconfigure_device(struct zpci_dev *zdev);

int zpci_register_ioat(struct zpci_dev *, u8, u64, u64, u64);
+6 −4
Original line number Diff line number Diff line
@@ -738,17 +738,19 @@ struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state)
}

/**
 * zpci_configure_device() - Configure a zpci_dev
 * zpci_scan_configured_device() - Scan a freshly configured zpci_dev
 * @zdev: The zpci_dev to be configured
 * @fh: The general function handle supplied by the platform
 *
 * Given a device in the configuration state Configured, enables, scans and
 * adds it to the common code PCI subsystem. If any failure occurs, the
 * zpci_dev is left disabled.
 * adds it to the common code PCI subsystem if possible. If the PCI device is
 * parked because we can not yet create a PCI bus because we have not seen
 * function 0, it is ignored but will be scanned once function 0 appears.
 * If any failure occurs, the zpci_dev is left disabled.
 *
 * Return: 0 on success, or an error code otherwise
 */
int zpci_configure_device(struct zpci_dev *zdev, u32 fh)
int zpci_scan_configured_device(struct zpci_dev *zdev, u32 fh)
{
	int rc;

+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
				break;
			zdev->state = ZPCI_FN_STATE_CONFIGURED;
		}
		zpci_configure_device(zdev, ccdf->fh);
		zpci_scan_configured_device(zdev, ccdf->fh);
		break;
	case 0x0302: /* Reserved -> Standby */
		if (!zdev)
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
		return rc;
	zdev->state = ZPCI_FN_STATE_CONFIGURED;

	return zpci_configure_device(zdev, zdev->fh);
	return zpci_scan_configured_device(zdev, zdev->fh);
}

static int disable_slot(struct hotplug_slot *hotplug_slot)