Drivers IOC


.modalias This tells which spi-device driver to use. Setting it to 'spidev' will use the spi user mode device driver, but there are other device drivers in the kernel, e.g. For the ADS7843 Touchscreen. If you want to use one of these you have to set the relevant modalias for this driver and of course activate it in your configuration. Intel® Integrator Toolkit is a command line utility used to customize BIOS on Intel® NUC and Intel® Compute Stick products. This download record contains the BIOS update package for Intel® Compute Stick STK1AW32SC and STK1A32SC. This download installs the Intel® Trusted Execution Engine driver and firmware.

-->Drivers/scsi/sg ioctl.c

The IoCsqInsertIrpEx routine inserts an IRP into the driver's cancel-safe IRP queue.




[in, out]Pointer to the IO_CSQ structure for the driver's cancel-safe IRP queue. This structure must have been initialized by IoCsqInitialize or IoCsqInitializeEx.

Drivers iocl


[in, out]Pointer to the IRP to be queued.



[out, optional]Pointer to an IO_CSQ_IRP_CONTEXT structure. IoCsqInsertIrpEx initializes this structure with context information for the inserted IRP. The driver passes this value to IoCsqRemoveIrp to delete the IRP from the queue. Context can be NULL if the driver will not use IoCsqRemoveIrp to remove this IRP from the queue.


[in, optional]Pointer to a driver-defined context value. This parameter is passed to the driver's CsqInsertIrpEx routine, if it has one. Otherwise, this parameter is ignored.

Return value

If the Csq parameter was initialized with IoCsqInitialize, IoCsqInsertIrpEx always returns STATUS_SUCCESS. If Csq was initialized with IoCsqInitializeEx, IoCsqInsertIrpEx returns the value that was returned by the driver's CsqInsertIrpEx routine.


IoCsqInsertIrpEx uses the queue's dispatch routines to insert the IRP. The IoCsqInsertIrpEx routine:

  1. Calls the queue's CsqAcquireLock routine to lock the queue.
  2. If the queue's IO_CSQ structure was initialized by IoCsqInitialize, IoCsqInsertIrpEx calls the queue's CsqInsertIrp routine to insert the IRP. If the queue's IO_CSQ structure was initialized by IoCsqInitializeEx, IoCsqInsertIrpEx calls the queue's CsqInsertIrpEx routine to insert the IRP, and passes the InsertContext parameter as the InsertContext parameter of CsqInsertIrpEx.
  3. Calls the queue's CsqReleaseLock routine to unlock the queue.
If the IRP to be inserted has already been canceled, IoCsqInsertIrpEx does not attempt to insert the IRP into the queue.

For more information, see Cancel-Safe IRP Queues.

Note that IoCsqXxx routines use the DriverContext[3] member of the IRP to hold IRP context information. Drivers that use these routines to queue IRPs must leave that member unused.

Callers of IoCsqInsertIrpEx must be running at an IRQL <= DISPATCH_LEVEL. The driver's callback routines must work correctly at this IRQL.


Minimum supported clientAvailable in Windows Server 2003 and later versions of the Windows operating system. The routine is also available in the Csq.lib library that ships with the Windows Driver Kit (WDK) and the Driver Development Kit (DDK) for Windows Server 2003. Drivers that must also work for on Windows XP, Windows 2000, and Windows 98/Me can instead link to Csq.lib to use the routine.
Target PlatformUniversal
Headerwdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL<= DISPATCH_LEVEL (see Remarks section)
DDI compliance rulesIoAllocateFree, IoReuseIrp, IrpCancelField, RemoveLockCheck, RemoveLockForward, RemoveLockForward2, RemoveLockForwardDeviceControl, RemoveLockForwardDeviceControl2, RemoveLockForwardDeviceControlInternal, RemoveLockForwardDeviceControlInternal2, RemoveLockForwardRead, RemoveLockForwardRead2, RemoveLockForwardWrite, RemoveLockForwardWrite2, RemoveLockReleaseCleanup, RemoveLockReleaseClose, RemoveLockReleaseCreate, RemoveLockReleaseDeviceControl, RemoveLockReleaseInternalDeviceControl, RemoveLockReleasePower, RemoveLockReleaseRead, RemoveLockReleaseShutdown, RemoveLockReleaseSystemControl, RemoveLockReleaseWrite

See also

Raghuram Sharma recounts his visit to the Sankari Terminal of Indian Oil Corporation in Tamil Nadu where, in the course of training the drivers, he managed to gain insights about their life and the facilities accorded to them in the periods between their road trips

Ahead of the onset of the corona virus-triggered pandemic, rather more precisely in the nascent days before the realisation of its ramifications, we were given marching orders to reach the far-flung district of Salem from Chennai by road. Having to kick-off from Hyderabad, my journey started a day earlier to reach Chennai. Transport Mitra, the training partner for Logistic Skill Council, scheduled the RPL program for the Indian Oil Corporation (IOC) drivers at their Sankari Terminal in Salem district of Tamil Nadu.

Being a first-time visitor to the place and not having read much about it, my assumption was that it would be a sleepy hamlet. But Salem being a district headquarters turned out to be a bustling town. To my surprise, even Sankari was abuzz with trucks moving up and down the NH 381A in Sankagiri as also on NH 44 in Salem. There was at least a kilometre-long queue from the Indian Oil Corporation’s terminal gate where the tanker trucks lined up. Sankagiri and the surrounding areas are well known for its trucks and its bodybuilding industries. Adding to this industrial activity are its cement and steel industries.

No wonder, Sankari and the adjoining Tiruchengode were so lively, far from my imagination of a rather laidback place. The IOC depot at Sankari was established in the year 1993. It receives petroleum products from Chennai through product pipelines and stores petrol, diesel, kerosene and aviation turbine fuel. It despatches these products through 350+ petroleum tank trucks. And here comes the role of our road warriors in ensuring that the supply chain of these products by their tank trucks remains intact. Each driver on an average makes 19 trips each month.

High Priority for Training

All the drivers at IOC terminal are trained in the handling of hazardous goods before being assigned the duty. Thereafter also they regularly undergo training on safety procedures to be followed during loading and decantation. Defensive driving and awareness about the RTO rules and regulations are some of the other topics covered. For me, the spick and span premises of the IOC terminal at Sankari created the first good impression. The tanker trucks were lined up in a disciplined manner with the drivers waiting patiently in their vehicles. This was in total contrast to the utter chaos of the tipper trucks witnessed during my visit to the Nandihalli iron ore mines in Karnataka.

On the day of the training, and in fact on all days, the drivers would be present at the site ahead of us. Some would have already registered and others would be in the process of doing so. Be it the security, safety or the HR unit, all were more than eager to contribute to the cause. It was evident that drivers were treated well by the administrative staff, a sure sign of dignity of labour. By the way, they are called the TT crew. Here I am reminded of the saying that rivulets take the course of the river. I am referring to the proactive J. Barath, the chief of the terminal, who himself was leading the Sankari Terminal team from the front in all departments.

During my interaction with the drivers, I found that very few belonged to Sankari even though it was a lorry hub. Rather, a majority of them were from the neighbouring districts of Dharmapuri, Erode and Namakkal. Also, on our enquiry from the local Sankari Lorry Association, it was found that some 5,000 drivers are enrolled as their members. That indeed is a huge number! The average all-inclusive income of a driver attached to IOC is only 15,000-20,000 per month. Other than the insurance of the driver along with the vehicle and the goods, there is hardly any social security available to them. This scenario is no different from the rest of the country. During the ongoing difficult period of the pandemic, IOC has declared an ex-gratia amount of Rs 5 lakhs and insurance of Rs 1 lakh per driver.

When it comes to the drivers attached to IOC’s Sankari Terminal, by and large they were aware of the standard operating procedures (SOPs) set forth by their company. It’s a conclusion I reached from the fact that the drivers and rest of the staff were in the habit of adhering to all the SOPs during loading and other crucial operations of their vehicles. A pleasant surprise was that every vehicle had a helper attached to the driver. Given that their task is to transport extremely hazardous material, this is imperative from the safety angle as well.

Drivers Ioc Drivers

Going back to the classroom, it may be pertinent to mention that a majority of the drivers spoke Tamil, and they were certainly proud of it. During a training session, the trainer gains equally as much from his trainees on account of their vast field experience and in these particular sessions I managed to improve my Tamil to a certain extent, at least the colloquial part. The drivers, during the training, were not only responsive but enthusiastic too. In particular, sessions on etiquette and manners and communication skills were attended to with rapt attention. The segments on road signs and safe driving skills interested them as well since these are crucial for their professional wellbeing.

Drivers Oculus

The lunch organised in the staff canteen of IOC was yet another example of their disciplined behaviour, seldom witnessed among drivers elsewhere. Before I forget, let me mention that the lunch served was common to all, right from the terminal chief to the drivers and helpers. These were South Indian meals served on plantain leaves. What a pleasant surprise! After the training and assessment sessions, we took time out to visit the new facilities being set up especially for the drivers. The TT crew complex in the parking area has facilities like a waiting area, canteen, RO water, toilets and a training hall.

Drivers Ioc Test

All the facilities, instead of being for the sake of it, are a class unto themselves, waiting to be inaugurated. Barath was positive that in a month or so these facilities would be open for use by the drivers and their helpers. If at all there was one thing that was perturbing, it was that like most other organisations in India where drivers are not on the direct payroll of the company, IOC Sankari was no exception. Outsourcing is certainly not an adjudication of responsibility by the employer and towards this IOC has indeed taken steps. However, it is still a long way to go for the driver to get the status of a full-fledged employee of the organisation. One earnestly hopes to see it happen with time.