forked from mirrors/linux
		
	scsi: ibmvscsi: add vscsi hosts to global list_head
Add each vscsi host adatper to a new global list_head named ibmvscsi_head. There is no functional change. This is meant primarily as a convience for locating adapters from within the debugger or crash utility. [mkp: fixed typo] Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
		
							parent
							
								
									b84ca6e9c7
								
							
						
					
					
						commit
						32d6e4b6e4
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -95,6 +95,7 @@ static int fast_fail = 1;
 | 
				
			||||||
static int client_reserve = 1;
 | 
					static int client_reserve = 1;
 | 
				
			||||||
static char partition_name[97] = "UNKNOWN";
 | 
					static char partition_name[97] = "UNKNOWN";
 | 
				
			||||||
static unsigned int partition_number = -1;
 | 
					static unsigned int partition_number = -1;
 | 
				
			||||||
 | 
					static LIST_HEAD(ibmvscsi_head);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct scsi_transport_template *ibmvscsi_transport_template;
 | 
					static struct scsi_transport_template *ibmvscsi_transport_template;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2270,6 +2271,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_set_drvdata(&vdev->dev, hostdata);
 | 
						dev_set_drvdata(&vdev->dev, hostdata);
 | 
				
			||||||
 | 
						list_add_tail(&hostdata->host_list, &ibmvscsi_head);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      add_srp_port_failed:
 | 
					      add_srp_port_failed:
 | 
				
			||||||
| 
						 | 
					@ -2291,6 +2293,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 | 
				
			||||||
static int ibmvscsi_remove(struct vio_dev *vdev)
 | 
					static int ibmvscsi_remove(struct vio_dev *vdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev);
 | 
						struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev);
 | 
				
			||||||
 | 
						list_del(&hostdata->host_list);
 | 
				
			||||||
	unmap_persist_bufs(hostdata);
 | 
						unmap_persist_bufs(hostdata);
 | 
				
			||||||
	release_event_pool(&hostdata->pool, hostdata);
 | 
						release_event_pool(&hostdata->pool, hostdata);
 | 
				
			||||||
	ibmvscsi_release_crq_queue(&hostdata->queue, hostdata,
 | 
						ibmvscsi_release_crq_queue(&hostdata->queue, hostdata,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,6 +90,7 @@ struct event_pool {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* all driver data associated with a host adapter */
 | 
					/* all driver data associated with a host adapter */
 | 
				
			||||||
struct ibmvscsi_host_data {
 | 
					struct ibmvscsi_host_data {
 | 
				
			||||||
 | 
						struct list_head host_list;
 | 
				
			||||||
	atomic_t request_limit;
 | 
						atomic_t request_limit;
 | 
				
			||||||
	int client_migrated;
 | 
						int client_migrated;
 | 
				
			||||||
	int reset_crq;
 | 
						int reset_crq;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue