From 8474f3a02a18e18459663ad88951822c62a45068 Mon Sep 17 00:00:00 2001 From: Santosh Vernekar Date: Tue, 25 Aug 2009 11:36:16 -0700 Subject: [SCSI] qla2xxx: Correctly set FCF_TAPE_PRESENT flag based on scsi-device. In fabric-login based on iop BIT_8 firmware notifies presence of a FCP2 device and not necessarily a TAPE device. So instead of setting FCF_TAPE_PRESENT flag there we set it using scsi_device->type after mid-layer scan recognises "type" of the device. It also adds a new flag FCF_FCP2_DEVICE for any future use. Signed-off-by: Andrew Vasquez Signed-off-by: Giridhar Malavali Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_os.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/scsi/qla2xxx/qla_os.c') diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5fd7adbff30..649fd75d37b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1216,6 +1216,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev) scsi_qla_host_t *vha = shost_priv(sdev->host); struct qla_hw_data *ha = vha->hw; struct fc_rport *rport = starget_to_rport(sdev->sdev_target); + fc_port_t *fcport = *(fc_port_t **)rport->dd_data; struct req_que *req = vha->req; if (sdev->tagged_supported) @@ -1224,6 +1225,8 @@ qla2xxx_slave_configure(struct scsi_device *sdev) scsi_deactivate_tcq(sdev, req->max_q_depth); rport->dev_loss_tmo = ha->port_down_retry_count; + if (sdev->type == TYPE_TAPE) + fcport->flags |= FCF_TAPE_PRESENT; return 0; } -- cgit v1.2.3