Lines Matching +full:i +full:- +full:drive

4  * Copyright (C) 2012-2014  LSI Corporation
5 * Copyright (C) 2013-2015 Avago Technologies
6 * (mailto: MPT-FusionLinux.pdl@avagotech.com)
21 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
50 * _warpdrive_disable_ddio - Disable direct I/O for all the volumes
71 spin_lock_irqsave(&ioc->raid_device_lock, flags); in _warpdrive_disable_ddio()
74 raid_device->direct_io_enabled = 0; in _warpdrive_disable_ddio()
75 spin_unlock_irqrestore(&ioc->raid_device_lock, flags); in _warpdrive_disable_ddio()
82 * mpt3sas_get_num_volumes - Get number of volumes in the ioc
109 * mpt3sas_init_warpdrive_properties - Set properties for warpdrive direct I/O.
126 if (!ioc->is_warpdrive) in mpt3sas_init_warpdrive_properties()
129 if (ioc->mfg_pg10_hide_flag == MFG_PAGE10_EXPOSE_ALL_DISKS) { in mpt3sas_init_warpdrive_properties()
138 if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, in mpt3sas_init_warpdrive_properties()
152 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, raid_device->handle, sz))) { in mpt3sas_init_warpdrive_properties()
160 * assumed for WARPDRIVE, disable direct I/O in mpt3sas_init_warpdrive_properties()
163 …ioc_warn(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): num_mem=%d, ma… in mpt3sas_init_warpdrive_properties()
164 raid_device->handle, num_pds, MPT_MAX_WARPDRIVE_PDS); in mpt3sas_init_warpdrive_properties()
171 vol_pg0->PhysDisk[count].PhysDiskNum) || in mpt3sas_init_warpdrive_properties()
174 …ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle r… in mpt3sas_init_warpdrive_properties()
175 raid_device->handle, in mpt3sas_init_warpdrive_properties()
176 vol_pg0->PhysDisk[count].PhysDiskNum); in mpt3sas_init_warpdrive_properties()
179 /* Disable direct I/O if member drive lba exceeds 4 bytes */ in mpt3sas_init_warpdrive_properties()
182 …ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) member handle (… in mpt3sas_init_warpdrive_properties()
183 raid_device->handle, in mpt3sas_init_warpdrive_properties()
189 raid_device->pd_handle[count] = le16_to_cpu(pd_pg0.DevHandle); in mpt3sas_init_warpdrive_properties()
193 * Assumption for WD: Direct I/O is not supported if the volume is in mpt3sas_init_warpdrive_properties()
196 if (raid_device->volume_type != MPI2_RAID_VOL_TYPE_RAID0) { in mpt3sas_init_warpdrive_properties()
197 …ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x): type=%d, s_sz=… in mpt3sas_init_warpdrive_properties()
198 raid_device->handle, raid_device->volume_type, in mpt3sas_init_warpdrive_properties()
199 (le32_to_cpu(vol_pg0->StripeSize) * in mpt3sas_init_warpdrive_properties()
200 le16_to_cpu(vol_pg0->BlockSize)) / 1024, in mpt3sas_init_warpdrive_properties()
201 le16_to_cpu(vol_pg0->BlockSize)); in mpt3sas_init_warpdrive_properties()
205 stripe_sz = le32_to_cpu(vol_pg0->StripeSize); in mpt3sas_init_warpdrive_properties()
208 …ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid stripe … in mpt3sas_init_warpdrive_properties()
209 raid_device->handle, in mpt3sas_init_warpdrive_properties()
210 (le32_to_cpu(vol_pg0->StripeSize) * in mpt3sas_init_warpdrive_properties()
211 le16_to_cpu(vol_pg0->BlockSize)) / 1024); in mpt3sas_init_warpdrive_properties()
214 raid_device->stripe_exponent = stripe_exp; in mpt3sas_init_warpdrive_properties()
215 block_sz = le16_to_cpu(vol_pg0->BlockSize); in mpt3sas_init_warpdrive_properties()
218 …ioc_info(ioc, "WarpDrive : Direct IO is disabled for the drive with handle(0x%04x) invalid block s… in mpt3sas_init_warpdrive_properties()
219 raid_device->handle, le16_to_cpu(vol_pg0->BlockSize)); in mpt3sas_init_warpdrive_properties()
222 raid_device->block_exponent = block_exp; in mpt3sas_init_warpdrive_properties()
223 raid_device->direct_io_enabled = 1; in mpt3sas_init_warpdrive_properties()
225 ioc_info(ioc, "WarpDrive : Direct IO is Enabled for the drive with handle(0x%04x)\n", in mpt3sas_init_warpdrive_properties()
226 raid_device->handle); in mpt3sas_init_warpdrive_properties()
231 raid_device->max_lba = le64_to_cpu(vol_pg0->MaxLBA); in mpt3sas_init_warpdrive_properties()
232 raid_device->stripe_sz = le32_to_cpu(vol_pg0->StripeSize); in mpt3sas_init_warpdrive_properties()
233 raid_device->block_sz = le16_to_cpu(vol_pg0->BlockSize); in mpt3sas_init_warpdrive_properties()
240 raid_device->direct_io_enabled = 0; in mpt3sas_init_warpdrive_properties()
242 raid_device->pd_handle[count] = 0; in mpt3sas_init_warpdrive_properties()
248 * mpt3sas_setup_direct_io - setup MPI request for WARPDRIVE Direct I/O
260 u8 num_pds, cmd = scmd->cmnd[0]; in mpt3sas_setup_direct_io()
268 v_lba = get_unaligned_be32(&mpi_request->CDB.CDB32[2]); in mpt3sas_setup_direct_io()
270 v_lba = get_unaligned_be64(&mpi_request->CDB.CDB32[2]); in mpt3sas_setup_direct_io()
272 io_size = scsi_bufflen(scmd) >> raid_device->block_exponent; in mpt3sas_setup_direct_io()
274 if (v_lba + io_size - 1 > raid_device->max_lba) in mpt3sas_setup_direct_io()
277 stripe_sz = raid_device->stripe_sz; in mpt3sas_setup_direct_io()
278 stripe_exp = raid_device->stripe_exponent; in mpt3sas_setup_direct_io()
279 stripe_off = v_lba & (stripe_sz - 1); in mpt3sas_setup_direct_io()
285 num_pds = raid_device->num_pds; in mpt3sas_setup_direct_io()
289 mpi_request->DevHandle = cpu_to_le16(raid_device->pd_handle[column]); in mpt3sas_setup_direct_io()
293 &mpi_request->CDB.CDB32[2]); in mpt3sas_setup_direct_io()
295 put_unaligned_be64(p_lba, &mpi_request->CDB.CDB32[2]); in mpt3sas_setup_direct_io()
297 st->direct_io = 1; in mpt3sas_setup_direct_io()