Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213343
b: refs/heads/master
c: 57c2377
h: refs/heads/master
i:
  213341: 1506952
  213339: 2b1c104
  213335: a09a4a0
  213327: ece3312
  213311: 4ba1cc7
v: v3
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Sep 17, 2010
1 parent d631aa9 commit eda9d48
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d99e5f488ae28d9dfccc84435f4fd29bd1fe1b9b
refs/heads/master: 57c237731b92fadc7d44824276313ec330b1989b
3 changes: 3 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ static int __init zfcp_module_init(void)
fc_attach_transport(&zfcp_transport_functions);
if (!zfcp_data.scsi_transport_template)
goto out_transport;
scsi_transport_reserve_device(zfcp_data.scsi_transport_template,
sizeof(struct zfcp_scsi_dev));


retval = misc_register(&zfcp_cfdc_misc);
if (retval) {
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,45 @@ struct zfcp_unit {
struct work_struct scsi_work;
};

/**
* struct zfcp_scsi_dev - zfcp data per SCSI device
* @status: zfcp internal status flags
* @lun_handle: handle from "open lun" for issuing FSF requests
* @erp_action: zfcp erp data for opening and recovering this LUN
* @erp_counter: zfcp erp counter for this LUN
* @latencies: FSF channel and fabric latencies
* @port: zfcp_port where this LUN belongs to
*/
struct zfcp_scsi_dev {
atomic_t status;
u32 lun_handle;
struct zfcp_erp_action erp_action;
atomic_t erp_counter;
struct zfcp_latencies latencies;
struct zfcp_port *port;
};

/**
* sdev_to_zfcp - Access zfcp LUN data for SCSI device
* @sdev: scsi_device where to get the zfcp_scsi_dev pointer
*/
static inline struct zfcp_scsi_dev *sdev_to_zfcp(struct scsi_device *sdev)
{
return scsi_transport_device_data(sdev);
}

/**
* zfcp_scsi_dev_lun - Return SCSI device LUN as 64 bit FCP LUN
* @sdev: SCSI device where to get the LUN from
*/
static inline u64 zfcp_scsi_dev_lun(struct scsi_device *sdev)
{
u64 fcp_lun;

int_to_scsilun(sdev->lun, (struct scsi_lun *)&fcp_lun);
return fcp_lun;
}

/**
* struct zfcp_fsf_req - basic FSF request structure
* @list: list of FSF requests
Expand Down

0 comments on commit eda9d48

Please sign in to comment.