sparc64: vcc: Enable VCC port probe and removal
Enables VCC port probe and removal to initialize and terminate VCC ports respectively. When a device/port matching the VCC driver is added, the probe function is invoked along with a reference to the device. remove function is called when the device is removed. Also add APIs to cache and retrieve VCC ports from a VCC table Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ce808b7463
commit
5d171050e2
@@ -814,15 +814,21 @@ int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
|
||||
case VDEV_NETWORK_SWITCH:
|
||||
case VDEV_DISK:
|
||||
case VDEV_DISK_SERVER:
|
||||
case VDEV_CONSOLE_CON:
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!ops || !ops->send_attr || !ops->handle_attr ||
|
||||
!ops->handshake_complete)
|
||||
return -EINVAL;
|
||||
if (dev_class == VDEV_NETWORK ||
|
||||
dev_class == VDEV_NETWORK_SWITCH ||
|
||||
dev_class == VDEV_DISK ||
|
||||
dev_class == VDEV_DISK_SERVER) {
|
||||
if (!ops || !ops->send_attr || !ops->handle_attr ||
|
||||
!ops->handshake_complete)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!ver_table || ver_table_size < 0)
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user